##// END OF EJS Templates
frontend: fixes
ergo -
Show More
@@ -1,13099 +1,13103 b''
1 // Underscore.js 1.6.0
1 // Underscore.js 1.6.0
2 // http://underscorejs.org
2 // http://underscorejs.org
3 // (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3 // (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4 // Underscore may be freely distributed under the MIT license.
4 // Underscore may be freely distributed under the MIT license.
5
5
6 (function() {
6 (function() {
7
7
8 // Baseline setup
8 // Baseline setup
9 // --------------
9 // --------------
10
10
11 // Establish the root object, `window` in the browser, or `exports` on the server.
11 // Establish the root object, `window` in the browser, or `exports` on the server.
12 var root = this;
12 var root = this;
13
13
14 // Save the previous value of the `_` variable.
14 // Save the previous value of the `_` variable.
15 var previousUnderscore = root._;
15 var previousUnderscore = root._;
16
16
17 // Establish the object that gets returned to break out of a loop iteration.
17 // Establish the object that gets returned to break out of a loop iteration.
18 var breaker = {};
18 var breaker = {};
19
19
20 // Save bytes in the minified (but not gzipped) version:
20 // Save bytes in the minified (but not gzipped) version:
21 var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
21 var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
22
22
23 // Create quick reference variables for speed access to core prototypes.
23 // Create quick reference variables for speed access to core prototypes.
24 var
24 var
25 push = ArrayProto.push,
25 push = ArrayProto.push,
26 slice = ArrayProto.slice,
26 slice = ArrayProto.slice,
27 concat = ArrayProto.concat,
27 concat = ArrayProto.concat,
28 toString = ObjProto.toString,
28 toString = ObjProto.toString,
29 hasOwnProperty = ObjProto.hasOwnProperty;
29 hasOwnProperty = ObjProto.hasOwnProperty;
30
30
31 // All **ECMAScript 5** native function implementations that we hope to use
31 // All **ECMAScript 5** native function implementations that we hope to use
32 // are declared here.
32 // are declared here.
33 var
33 var
34 nativeForEach = ArrayProto.forEach,
34 nativeForEach = ArrayProto.forEach,
35 nativeMap = ArrayProto.map,
35 nativeMap = ArrayProto.map,
36 nativeReduce = ArrayProto.reduce,
36 nativeReduce = ArrayProto.reduce,
37 nativeReduceRight = ArrayProto.reduceRight,
37 nativeReduceRight = ArrayProto.reduceRight,
38 nativeFilter = ArrayProto.filter,
38 nativeFilter = ArrayProto.filter,
39 nativeEvery = ArrayProto.every,
39 nativeEvery = ArrayProto.every,
40 nativeSome = ArrayProto.some,
40 nativeSome = ArrayProto.some,
41 nativeIndexOf = ArrayProto.indexOf,
41 nativeIndexOf = ArrayProto.indexOf,
42 nativeLastIndexOf = ArrayProto.lastIndexOf,
42 nativeLastIndexOf = ArrayProto.lastIndexOf,
43 nativeIsArray = Array.isArray,
43 nativeIsArray = Array.isArray,
44 nativeKeys = Object.keys,
44 nativeKeys = Object.keys,
45 nativeBind = FuncProto.bind;
45 nativeBind = FuncProto.bind;
46
46
47 // Create a safe reference to the Underscore object for use below.
47 // Create a safe reference to the Underscore object for use below.
48 var _ = function(obj) {
48 var _ = function(obj) {
49 if (obj instanceof _) return obj;
49 if (obj instanceof _) return obj;
50 if (!(this instanceof _)) return new _(obj);
50 if (!(this instanceof _)) return new _(obj);
51 this._wrapped = obj;
51 this._wrapped = obj;
52 };
52 };
53
53
54 // Export the Underscore object for **Node.js**, with
54 // Export the Underscore object for **Node.js**, with
55 // backwards-compatibility for the old `require()` API. If we're in
55 // backwards-compatibility for the old `require()` API. If we're in
56 // the browser, add `_` as a global object via a string identifier,
56 // the browser, add `_` as a global object via a string identifier,
57 // for Closure Compiler "advanced" mode.
57 // for Closure Compiler "advanced" mode.
58 if (typeof exports !== 'undefined') {
58 if (typeof exports !== 'undefined') {
59 if (typeof module !== 'undefined' && module.exports) {
59 if (typeof module !== 'undefined' && module.exports) {
60 exports = module.exports = _;
60 exports = module.exports = _;
61 }
61 }
62 exports._ = _;
62 exports._ = _;
63 } else {
63 } else {
64 root._ = _;
64 root._ = _;
65 }
65 }
66
66
67 // Current version.
67 // Current version.
68 _.VERSION = '1.6.0';
68 _.VERSION = '1.6.0';
69
69
70 // Collection Functions
70 // Collection Functions
71 // --------------------
71 // --------------------
72
72
73 // The cornerstone, an `each` implementation, aka `forEach`.
73 // The cornerstone, an `each` implementation, aka `forEach`.
74 // Handles objects with the built-in `forEach`, arrays, and raw objects.
74 // Handles objects with the built-in `forEach`, arrays, and raw objects.
75 // Delegates to **ECMAScript 5**'s native `forEach` if available.
75 // Delegates to **ECMAScript 5**'s native `forEach` if available.
76 var each = _.each = _.forEach = function(obj, iterator, context) {
76 var each = _.each = _.forEach = function(obj, iterator, context) {
77 if (obj == null) return obj;
77 if (obj == null) return obj;
78 if (nativeForEach && obj.forEach === nativeForEach) {
78 if (nativeForEach && obj.forEach === nativeForEach) {
79 obj.forEach(iterator, context);
79 obj.forEach(iterator, context);
80 } else if (obj.length === +obj.length) {
80 } else if (obj.length === +obj.length) {
81 for (var i = 0, length = obj.length; i < length; i++) {
81 for (var i = 0, length = obj.length; i < length; i++) {
82 if (iterator.call(context, obj[i], i, obj) === breaker) return;
82 if (iterator.call(context, obj[i], i, obj) === breaker) return;
83 }
83 }
84 } else {
84 } else {
85 var keys = _.keys(obj);
85 var keys = _.keys(obj);
86 for (var i = 0, length = keys.length; i < length; i++) {
86 for (var i = 0, length = keys.length; i < length; i++) {
87 if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
87 if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
88 }
88 }
89 }
89 }
90 return obj;
90 return obj;
91 };
91 };
92
92
93 // Return the results of applying the iterator to each element.
93 // Return the results of applying the iterator to each element.
94 // Delegates to **ECMAScript 5**'s native `map` if available.
94 // Delegates to **ECMAScript 5**'s native `map` if available.
95 _.map = _.collect = function(obj, iterator, context) {
95 _.map = _.collect = function(obj, iterator, context) {
96 var results = [];
96 var results = [];
97 if (obj == null) return results;
97 if (obj == null) return results;
98 if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
98 if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
99 each(obj, function(value, index, list) {
99 each(obj, function(value, index, list) {
100 results.push(iterator.call(context, value, index, list));
100 results.push(iterator.call(context, value, index, list));
101 });
101 });
102 return results;
102 return results;
103 };
103 };
104
104
105 var reduceError = 'Reduce of empty array with no initial value';
105 var reduceError = 'Reduce of empty array with no initial value';
106
106
107 // **Reduce** builds up a single result from a list of values, aka `inject`,
107 // **Reduce** builds up a single result from a list of values, aka `inject`,
108 // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
108 // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
109 _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
109 _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
110 var initial = arguments.length > 2;
110 var initial = arguments.length > 2;
111 if (obj == null) obj = [];
111 if (obj == null) obj = [];
112 if (nativeReduce && obj.reduce === nativeReduce) {
112 if (nativeReduce && obj.reduce === nativeReduce) {
113 if (context) iterator = _.bind(iterator, context);
113 if (context) iterator = _.bind(iterator, context);
114 return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
114 return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
115 }
115 }
116 each(obj, function(value, index, list) {
116 each(obj, function(value, index, list) {
117 if (!initial) {
117 if (!initial) {
118 memo = value;
118 memo = value;
119 initial = true;
119 initial = true;
120 } else {
120 } else {
121 memo = iterator.call(context, memo, value, index, list);
121 memo = iterator.call(context, memo, value, index, list);
122 }
122 }
123 });
123 });
124 if (!initial) throw new TypeError(reduceError);
124 if (!initial) throw new TypeError(reduceError);
125 return memo;
125 return memo;
126 };
126 };
127
127
128 // The right-associative version of reduce, also known as `foldr`.
128 // The right-associative version of reduce, also known as `foldr`.
129 // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
129 // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
130 _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
130 _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
131 var initial = arguments.length > 2;
131 var initial = arguments.length > 2;
132 if (obj == null) obj = [];
132 if (obj == null) obj = [];
133 if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
133 if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
134 if (context) iterator = _.bind(iterator, context);
134 if (context) iterator = _.bind(iterator, context);
135 return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
135 return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
136 }
136 }
137 var length = obj.length;
137 var length = obj.length;
138 if (length !== +length) {
138 if (length !== +length) {
139 var keys = _.keys(obj);
139 var keys = _.keys(obj);
140 length = keys.length;
140 length = keys.length;
141 }
141 }
142 each(obj, function(value, index, list) {
142 each(obj, function(value, index, list) {
143 index = keys ? keys[--length] : --length;
143 index = keys ? keys[--length] : --length;
144 if (!initial) {
144 if (!initial) {
145 memo = obj[index];
145 memo = obj[index];
146 initial = true;
146 initial = true;
147 } else {
147 } else {
148 memo = iterator.call(context, memo, obj[index], index, list);
148 memo = iterator.call(context, memo, obj[index], index, list);
149 }
149 }
150 });
150 });
151 if (!initial) throw new TypeError(reduceError);
151 if (!initial) throw new TypeError(reduceError);
152 return memo;
152 return memo;
153 };
153 };
154
154
155 // Return the first value which passes a truth test. Aliased as `detect`.
155 // Return the first value which passes a truth test. Aliased as `detect`.
156 _.find = _.detect = function(obj, predicate, context) {
156 _.find = _.detect = function(obj, predicate, context) {
157 var result;
157 var result;
158 any(obj, function(value, index, list) {
158 any(obj, function(value, index, list) {
159 if (predicate.call(context, value, index, list)) {
159 if (predicate.call(context, value, index, list)) {
160 result = value;
160 result = value;
161 return true;
161 return true;
162 }
162 }
163 });
163 });
164 return result;
164 return result;
165 };
165 };
166
166
167 // Return all the elements that pass a truth test.
167 // Return all the elements that pass a truth test.
168 // Delegates to **ECMAScript 5**'s native `filter` if available.
168 // Delegates to **ECMAScript 5**'s native `filter` if available.
169 // Aliased as `select`.
169 // Aliased as `select`.
170 _.filter = _.select = function(obj, predicate, context) {
170 _.filter = _.select = function(obj, predicate, context) {
171 var results = [];
171 var results = [];
172 if (obj == null) return results;
172 if (obj == null) return results;
173 if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);
173 if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);
174 each(obj, function(value, index, list) {
174 each(obj, function(value, index, list) {
175 if (predicate.call(context, value, index, list)) results.push(value);
175 if (predicate.call(context, value, index, list)) results.push(value);
176 });
176 });
177 return results;
177 return results;
178 };
178 };
179
179
180 // Return all the elements for which a truth test fails.
180 // Return all the elements for which a truth test fails.
181 _.reject = function(obj, predicate, context) {
181 _.reject = function(obj, predicate, context) {
182 return _.filter(obj, function(value, index, list) {
182 return _.filter(obj, function(value, index, list) {
183 return !predicate.call(context, value, index, list);
183 return !predicate.call(context, value, index, list);
184 }, context);
184 }, context);
185 };
185 };
186
186
187 // Determine whether all of the elements match a truth test.
187 // Determine whether all of the elements match a truth test.
188 // Delegates to **ECMAScript 5**'s native `every` if available.
188 // Delegates to **ECMAScript 5**'s native `every` if available.
189 // Aliased as `all`.
189 // Aliased as `all`.
190 _.every = _.all = function(obj, predicate, context) {
190 _.every = _.all = function(obj, predicate, context) {
191 predicate || (predicate = _.identity);
191 predicate || (predicate = _.identity);
192 var result = true;
192 var result = true;
193 if (obj == null) return result;
193 if (obj == null) return result;
194 if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context);
194 if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context);
195 each(obj, function(value, index, list) {
195 each(obj, function(value, index, list) {
196 if (!(result = result && predicate.call(context, value, index, list))) return breaker;
196 if (!(result = result && predicate.call(context, value, index, list))) return breaker;
197 });
197 });
198 return !!result;
198 return !!result;
199 };
199 };
200
200
201 // Determine if at least one element in the object matches a truth test.
201 // Determine if at least one element in the object matches a truth test.
202 // Delegates to **ECMAScript 5**'s native `some` if available.
202 // Delegates to **ECMAScript 5**'s native `some` if available.
203 // Aliased as `any`.
203 // Aliased as `any`.
204 var any = _.some = _.any = function(obj, predicate, context) {
204 var any = _.some = _.any = function(obj, predicate, context) {
205 predicate || (predicate = _.identity);
205 predicate || (predicate = _.identity);
206 var result = false;
206 var result = false;
207 if (obj == null) return result;
207 if (obj == null) return result;
208 if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);
208 if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);
209 each(obj, function(value, index, list) {
209 each(obj, function(value, index, list) {
210 if (result || (result = predicate.call(context, value, index, list))) return breaker;
210 if (result || (result = predicate.call(context, value, index, list))) return breaker;
211 });
211 });
212 return !!result;
212 return !!result;
213 };
213 };
214
214
215 // Determine if the array or object contains a given value (using `===`).
215 // Determine if the array or object contains a given value (using `===`).
216 // Aliased as `include`.
216 // Aliased as `include`.
217 _.contains = _.include = function(obj, target) {
217 _.contains = _.include = function(obj, target) {
218 if (obj == null) return false;
218 if (obj == null) return false;
219 if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
219 if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
220 return any(obj, function(value) {
220 return any(obj, function(value) {
221 return value === target;
221 return value === target;
222 });
222 });
223 };
223 };
224
224
225 // Invoke a method (with arguments) on every item in a collection.
225 // Invoke a method (with arguments) on every item in a collection.
226 _.invoke = function(obj, method) {
226 _.invoke = function(obj, method) {
227 var args = slice.call(arguments, 2);
227 var args = slice.call(arguments, 2);
228 var isFunc = _.isFunction(method);
228 var isFunc = _.isFunction(method);
229 return _.map(obj, function(value) {
229 return _.map(obj, function(value) {
230 return (isFunc ? method : value[method]).apply(value, args);
230 return (isFunc ? method : value[method]).apply(value, args);
231 });
231 });
232 };
232 };
233
233
234 // Convenience version of a common use case of `map`: fetching a property.
234 // Convenience version of a common use case of `map`: fetching a property.
235 _.pluck = function(obj, key) {
235 _.pluck = function(obj, key) {
236 return _.map(obj, _.property(key));
236 return _.map(obj, _.property(key));
237 };
237 };
238
238
239 // Convenience version of a common use case of `filter`: selecting only objects
239 // Convenience version of a common use case of `filter`: selecting only objects
240 // containing specific `key:value` pairs.
240 // containing specific `key:value` pairs.
241 _.where = function(obj, attrs) {
241 _.where = function(obj, attrs) {
242 return _.filter(obj, _.matches(attrs));
242 return _.filter(obj, _.matches(attrs));
243 };
243 };
244
244
245 // Convenience version of a common use case of `find`: getting the first object
245 // Convenience version of a common use case of `find`: getting the first object
246 // containing specific `key:value` pairs.
246 // containing specific `key:value` pairs.
247 _.findWhere = function(obj, attrs) {
247 _.findWhere = function(obj, attrs) {
248 return _.find(obj, _.matches(attrs));
248 return _.find(obj, _.matches(attrs));
249 };
249 };
250
250
251 // Return the maximum element or (element-based computation).
251 // Return the maximum element or (element-based computation).
252 // Can't optimize arrays of integers longer than 65,535 elements.
252 // Can't optimize arrays of integers longer than 65,535 elements.
253 // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)
253 // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)
254 _.max = function(obj, iterator, context) {
254 _.max = function(obj, iterator, context) {
255 if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
255 if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
256 return Math.max.apply(Math, obj);
256 return Math.max.apply(Math, obj);
257 }
257 }
258 var result = -Infinity, lastComputed = -Infinity;
258 var result = -Infinity, lastComputed = -Infinity;
259 each(obj, function(value, index, list) {
259 each(obj, function(value, index, list) {
260 var computed = iterator ? iterator.call(context, value, index, list) : value;
260 var computed = iterator ? iterator.call(context, value, index, list) : value;
261 if (computed > lastComputed) {
261 if (computed > lastComputed) {
262 result = value;
262 result = value;
263 lastComputed = computed;
263 lastComputed = computed;
264 }
264 }
265 });
265 });
266 return result;
266 return result;
267 };
267 };
268
268
269 // Return the minimum element (or element-based computation).
269 // Return the minimum element (or element-based computation).
270 _.min = function(obj, iterator, context) {
270 _.min = function(obj, iterator, context) {
271 if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
271 if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
272 return Math.min.apply(Math, obj);
272 return Math.min.apply(Math, obj);
273 }
273 }
274 var result = Infinity, lastComputed = Infinity;
274 var result = Infinity, lastComputed = Infinity;
275 each(obj, function(value, index, list) {
275 each(obj, function(value, index, list) {
276 var computed = iterator ? iterator.call(context, value, index, list) : value;
276 var computed = iterator ? iterator.call(context, value, index, list) : value;
277 if (computed < lastComputed) {
277 if (computed < lastComputed) {
278 result = value;
278 result = value;
279 lastComputed = computed;
279 lastComputed = computed;
280 }
280 }
281 });
281 });
282 return result;
282 return result;
283 };
283 };
284
284
285 // Shuffle an array, using the modern version of the
285 // Shuffle an array, using the modern version of the
286 // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
286 // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
287 _.shuffle = function(obj) {
287 _.shuffle = function(obj) {
288 var rand;
288 var rand;
289 var index = 0;
289 var index = 0;
290 var shuffled = [];
290 var shuffled = [];
291 each(obj, function(value) {
291 each(obj, function(value) {
292 rand = _.random(index++);
292 rand = _.random(index++);
293 shuffled[index - 1] = shuffled[rand];
293 shuffled[index - 1] = shuffled[rand];
294 shuffled[rand] = value;
294 shuffled[rand] = value;
295 });
295 });
296 return shuffled;
296 return shuffled;
297 };
297 };
298
298
299 // Sample **n** random values from a collection.
299 // Sample **n** random values from a collection.
300 // If **n** is not specified, returns a single random element.
300 // If **n** is not specified, returns a single random element.
301 // The internal `guard` argument allows it to work with `map`.
301 // The internal `guard` argument allows it to work with `map`.
302 _.sample = function(obj, n, guard) {
302 _.sample = function(obj, n, guard) {
303 if (n == null || guard) {
303 if (n == null || guard) {
304 if (obj.length !== +obj.length) obj = _.values(obj);
304 if (obj.length !== +obj.length) obj = _.values(obj);
305 return obj[_.random(obj.length - 1)];
305 return obj[_.random(obj.length - 1)];
306 }
306 }
307 return _.shuffle(obj).slice(0, Math.max(0, n));
307 return _.shuffle(obj).slice(0, Math.max(0, n));
308 };
308 };
309
309
310 // An internal function to generate lookup iterators.
310 // An internal function to generate lookup iterators.
311 var lookupIterator = function(value) {
311 var lookupIterator = function(value) {
312 if (value == null) return _.identity;
312 if (value == null) return _.identity;
313 if (_.isFunction(value)) return value;
313 if (_.isFunction(value)) return value;
314 return _.property(value);
314 return _.property(value);
315 };
315 };
316
316
317 // Sort the object's values by a criterion produced by an iterator.
317 // Sort the object's values by a criterion produced by an iterator.
318 _.sortBy = function(obj, iterator, context) {
318 _.sortBy = function(obj, iterator, context) {
319 iterator = lookupIterator(iterator);
319 iterator = lookupIterator(iterator);
320 return _.pluck(_.map(obj, function(value, index, list) {
320 return _.pluck(_.map(obj, function(value, index, list) {
321 return {
321 return {
322 value: value,
322 value: value,
323 index: index,
323 index: index,
324 criteria: iterator.call(context, value, index, list)
324 criteria: iterator.call(context, value, index, list)
325 };
325 };
326 }).sort(function(left, right) {
326 }).sort(function(left, right) {
327 var a = left.criteria;
327 var a = left.criteria;
328 var b = right.criteria;
328 var b = right.criteria;
329 if (a !== b) {
329 if (a !== b) {
330 if (a > b || a === void 0) return 1;
330 if (a > b || a === void 0) return 1;
331 if (a < b || b === void 0) return -1;
331 if (a < b || b === void 0) return -1;
332 }
332 }
333 return left.index - right.index;
333 return left.index - right.index;
334 }), 'value');
334 }), 'value');
335 };
335 };
336
336
337 // An internal function used for aggregate "group by" operations.
337 // An internal function used for aggregate "group by" operations.
338 var group = function(behavior) {
338 var group = function(behavior) {
339 return function(obj, iterator, context) {
339 return function(obj, iterator, context) {
340 var result = {};
340 var result = {};
341 iterator = lookupIterator(iterator);
341 iterator = lookupIterator(iterator);
342 each(obj, function(value, index) {
342 each(obj, function(value, index) {
343 var key = iterator.call(context, value, index, obj);
343 var key = iterator.call(context, value, index, obj);
344 behavior(result, key, value);
344 behavior(result, key, value);
345 });
345 });
346 return result;
346 return result;
347 };
347 };
348 };
348 };
349
349
350 // Groups the object's values by a criterion. Pass either a string attribute
350 // Groups the object's values by a criterion. Pass either a string attribute
351 // to group by, or a function that returns the criterion.
351 // to group by, or a function that returns the criterion.
352 _.groupBy = group(function(result, key, value) {
352 _.groupBy = group(function(result, key, value) {
353 _.has(result, key) ? result[key].push(value) : result[key] = [value];
353 _.has(result, key) ? result[key].push(value) : result[key] = [value];
354 });
354 });
355
355
356 // Indexes the object's values by a criterion, similar to `groupBy`, but for
356 // Indexes the object's values by a criterion, similar to `groupBy`, but for
357 // when you know that your index values will be unique.
357 // when you know that your index values will be unique.
358 _.indexBy = group(function(result, key, value) {
358 _.indexBy = group(function(result, key, value) {
359 result[key] = value;
359 result[key] = value;
360 });
360 });
361
361
362 // Counts instances of an object that group by a certain criterion. Pass
362 // Counts instances of an object that group by a certain criterion. Pass
363 // either a string attribute to count by, or a function that returns the
363 // either a string attribute to count by, or a function that returns the
364 // criterion.
364 // criterion.
365 _.countBy = group(function(result, key) {
365 _.countBy = group(function(result, key) {
366 _.has(result, key) ? result[key]++ : result[key] = 1;
366 _.has(result, key) ? result[key]++ : result[key] = 1;
367 });
367 });
368
368
369 // Use a comparator function to figure out the smallest index at which
369 // Use a comparator function to figure out the smallest index at which
370 // an object should be inserted so as to maintain order. Uses binary search.
370 // an object should be inserted so as to maintain order. Uses binary search.
371 _.sortedIndex = function(array, obj, iterator, context) {
371 _.sortedIndex = function(array, obj, iterator, context) {
372 iterator = lookupIterator(iterator);
372 iterator = lookupIterator(iterator);
373 var value = iterator.call(context, obj);
373 var value = iterator.call(context, obj);
374 var low = 0, high = array.length;
374 var low = 0, high = array.length;
375 while (low < high) {
375 while (low < high) {
376 var mid = (low + high) >>> 1;
376 var mid = (low + high) >>> 1;
377 iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
377 iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
378 }
378 }
379 return low;
379 return low;
380 };
380 };
381
381
382 // Safely create a real, live array from anything iterable.
382 // Safely create a real, live array from anything iterable.
383 _.toArray = function(obj) {
383 _.toArray = function(obj) {
384 if (!obj) return [];
384 if (!obj) return [];
385 if (_.isArray(obj)) return slice.call(obj);
385 if (_.isArray(obj)) return slice.call(obj);
386 if (obj.length === +obj.length) return _.map(obj, _.identity);
386 if (obj.length === +obj.length) return _.map(obj, _.identity);
387 return _.values(obj);
387 return _.values(obj);
388 };
388 };
389
389
390 // Return the number of elements in an object.
390 // Return the number of elements in an object.
391 _.size = function(obj) {
391 _.size = function(obj) {
392 if (obj == null) return 0;
392 if (obj == null) return 0;
393 return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
393 return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
394 };
394 };
395
395
396 // Array Functions
396 // Array Functions
397 // ---------------
397 // ---------------
398
398
399 // Get the first element of an array. Passing **n** will return the first N
399 // Get the first element of an array. Passing **n** will return the first N
400 // values in the array. Aliased as `head` and `take`. The **guard** check
400 // values in the array. Aliased as `head` and `take`. The **guard** check
401 // allows it to work with `_.map`.
401 // allows it to work with `_.map`.
402 _.first = _.head = _.take = function(array, n, guard) {
402 _.first = _.head = _.take = function(array, n, guard) {
403 if (array == null) return void 0;
403 if (array == null) return void 0;
404 if ((n == null) || guard) return array[0];
404 if ((n == null) || guard) return array[0];
405 if (n < 0) return [];
405 if (n < 0) return [];
406 return slice.call(array, 0, n);
406 return slice.call(array, 0, n);
407 };
407 };
408
408
409 // Returns everything but the last entry of the array. Especially useful on
409 // Returns everything but the last entry of the array. Especially useful on
410 // the arguments object. Passing **n** will return all the values in
410 // the arguments object. Passing **n** will return all the values in
411 // the array, excluding the last N. The **guard** check allows it to work with
411 // the array, excluding the last N. The **guard** check allows it to work with
412 // `_.map`.
412 // `_.map`.
413 _.initial = function(array, n, guard) {
413 _.initial = function(array, n, guard) {
414 return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
414 return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
415 };
415 };
416
416
417 // Get the last element of an array. Passing **n** will return the last N
417 // Get the last element of an array. Passing **n** will return the last N
418 // values in the array. The **guard** check allows it to work with `_.map`.
418 // values in the array. The **guard** check allows it to work with `_.map`.
419 _.last = function(array, n, guard) {
419 _.last = function(array, n, guard) {
420 if (array == null) return void 0;
420 if (array == null) return void 0;
421 if ((n == null) || guard) return array[array.length - 1];
421 if ((n == null) || guard) return array[array.length - 1];
422 return slice.call(array, Math.max(array.length - n, 0));
422 return slice.call(array, Math.max(array.length - n, 0));
423 };
423 };
424
424
425 // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
425 // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
426 // Especially useful on the arguments object. Passing an **n** will return
426 // Especially useful on the arguments object. Passing an **n** will return
427 // the rest N values in the array. The **guard**
427 // the rest N values in the array. The **guard**
428 // check allows it to work with `_.map`.
428 // check allows it to work with `_.map`.
429 _.rest = _.tail = _.drop = function(array, n, guard) {
429 _.rest = _.tail = _.drop = function(array, n, guard) {
430 return slice.call(array, (n == null) || guard ? 1 : n);
430 return slice.call(array, (n == null) || guard ? 1 : n);
431 };
431 };
432
432
433 // Trim out all falsy values from an array.
433 // Trim out all falsy values from an array.
434 _.compact = function(array) {
434 _.compact = function(array) {
435 return _.filter(array, _.identity);
435 return _.filter(array, _.identity);
436 };
436 };
437
437
438 // Internal implementation of a recursive `flatten` function.
438 // Internal implementation of a recursive `flatten` function.
439 var flatten = function(input, shallow, output) {
439 var flatten = function(input, shallow, output) {
440 if (shallow && _.every(input, _.isArray)) {
440 if (shallow && _.every(input, _.isArray)) {
441 return concat.apply(output, input);
441 return concat.apply(output, input);
442 }
442 }
443 each(input, function(value) {
443 each(input, function(value) {
444 if (_.isArray(value) || _.isArguments(value)) {
444 if (_.isArray(value) || _.isArguments(value)) {
445 shallow ? push.apply(output, value) : flatten(value, shallow, output);
445 shallow ? push.apply(output, value) : flatten(value, shallow, output);
446 } else {
446 } else {
447 output.push(value);
447 output.push(value);
448 }
448 }
449 });
449 });
450 return output;
450 return output;
451 };
451 };
452
452
453 // Flatten out an array, either recursively (by default), or just one level.
453 // Flatten out an array, either recursively (by default), or just one level.
454 _.flatten = function(array, shallow) {
454 _.flatten = function(array, shallow) {
455 return flatten(array, shallow, []);
455 return flatten(array, shallow, []);
456 };
456 };
457
457
458 // Return a version of the array that does not contain the specified value(s).
458 // Return a version of the array that does not contain the specified value(s).
459 _.without = function(array) {
459 _.without = function(array) {
460 return _.difference(array, slice.call(arguments, 1));
460 return _.difference(array, slice.call(arguments, 1));
461 };
461 };
462
462
463 // Split an array into two arrays: one whose elements all satisfy the given
463 // Split an array into two arrays: one whose elements all satisfy the given
464 // predicate, and one whose elements all do not satisfy the predicate.
464 // predicate, and one whose elements all do not satisfy the predicate.
465 _.partition = function(array, predicate) {
465 _.partition = function(array, predicate) {
466 var pass = [], fail = [];
466 var pass = [], fail = [];
467 each(array, function(elem) {
467 each(array, function(elem) {
468 (predicate(elem) ? pass : fail).push(elem);
468 (predicate(elem) ? pass : fail).push(elem);
469 });
469 });
470 return [pass, fail];
470 return [pass, fail];
471 };
471 };
472
472
473 // Produce a duplicate-free version of the array. If the array has already
473 // Produce a duplicate-free version of the array. If the array has already
474 // been sorted, you have the option of using a faster algorithm.
474 // been sorted, you have the option of using a faster algorithm.
475 // Aliased as `unique`.
475 // Aliased as `unique`.
476 _.uniq = _.unique = function(array, isSorted, iterator, context) {
476 _.uniq = _.unique = function(array, isSorted, iterator, context) {
477 if (_.isFunction(isSorted)) {
477 if (_.isFunction(isSorted)) {
478 context = iterator;
478 context = iterator;
479 iterator = isSorted;
479 iterator = isSorted;
480 isSorted = false;
480 isSorted = false;
481 }
481 }
482 var initial = iterator ? _.map(array, iterator, context) : array;
482 var initial = iterator ? _.map(array, iterator, context) : array;
483 var results = [];
483 var results = [];
484 var seen = [];
484 var seen = [];
485 each(initial, function(value, index) {
485 each(initial, function(value, index) {
486 if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
486 if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
487 seen.push(value);
487 seen.push(value);
488 results.push(array[index]);
488 results.push(array[index]);
489 }
489 }
490 });
490 });
491 return results;
491 return results;
492 };
492 };
493
493
494 // Produce an array that contains the union: each distinct element from all of
494 // Produce an array that contains the union: each distinct element from all of
495 // the passed-in arrays.
495 // the passed-in arrays.
496 _.union = function() {
496 _.union = function() {
497 return _.uniq(_.flatten(arguments, true));
497 return _.uniq(_.flatten(arguments, true));
498 };
498 };
499
499
500 // Produce an array that contains every item shared between all the
500 // Produce an array that contains every item shared between all the
501 // passed-in arrays.
501 // passed-in arrays.
502 _.intersection = function(array) {
502 _.intersection = function(array) {
503 var rest = slice.call(arguments, 1);
503 var rest = slice.call(arguments, 1);
504 return _.filter(_.uniq(array), function(item) {
504 return _.filter(_.uniq(array), function(item) {
505 return _.every(rest, function(other) {
505 return _.every(rest, function(other) {
506 return _.contains(other, item);
506 return _.contains(other, item);
507 });
507 });
508 });
508 });
509 };
509 };
510
510
511 // Take the difference between one array and a number of other arrays.
511 // Take the difference between one array and a number of other arrays.
512 // Only the elements present in just the first array will remain.
512 // Only the elements present in just the first array will remain.
513 _.difference = function(array) {
513 _.difference = function(array) {
514 var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
514 var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
515 return _.filter(array, function(value){ return !_.contains(rest, value); });
515 return _.filter(array, function(value){ return !_.contains(rest, value); });
516 };
516 };
517
517
518 // Zip together multiple lists into a single array -- elements that share
518 // Zip together multiple lists into a single array -- elements that share
519 // an index go together.
519 // an index go together.
520 _.zip = function() {
520 _.zip = function() {
521 var length = _.max(_.pluck(arguments, 'length').concat(0));
521 var length = _.max(_.pluck(arguments, 'length').concat(0));
522 var results = new Array(length);
522 var results = new Array(length);
523 for (var i = 0; i < length; i++) {
523 for (var i = 0; i < length; i++) {
524 results[i] = _.pluck(arguments, '' + i);
524 results[i] = _.pluck(arguments, '' + i);
525 }
525 }
526 return results;
526 return results;
527 };
527 };
528
528
529 // Converts lists into objects. Pass either a single array of `[key, value]`
529 // Converts lists into objects. Pass either a single array of `[key, value]`
530 // pairs, or two parallel arrays of the same length -- one of keys, and one of
530 // pairs, or two parallel arrays of the same length -- one of keys, and one of
531 // the corresponding values.
531 // the corresponding values.
532 _.object = function(list, values) {
532 _.object = function(list, values) {
533 if (list == null) return {};
533 if (list == null) return {};
534 var result = {};
534 var result = {};
535 for (var i = 0, length = list.length; i < length; i++) {
535 for (var i = 0, length = list.length; i < length; i++) {
536 if (values) {
536 if (values) {
537 result[list[i]] = values[i];
537 result[list[i]] = values[i];
538 } else {
538 } else {
539 result[list[i][0]] = list[i][1];
539 result[list[i][0]] = list[i][1];
540 }
540 }
541 }
541 }
542 return result;
542 return result;
543 };
543 };
544
544
545 // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
545 // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
546 // we need this function. Return the position of the first occurrence of an
546 // we need this function. Return the position of the first occurrence of an
547 // item in an array, or -1 if the item is not included in the array.
547 // item in an array, or -1 if the item is not included in the array.
548 // Delegates to **ECMAScript 5**'s native `indexOf` if available.
548 // Delegates to **ECMAScript 5**'s native `indexOf` if available.
549 // If the array is large and already in sort order, pass `true`
549 // If the array is large and already in sort order, pass `true`
550 // for **isSorted** to use binary search.
550 // for **isSorted** to use binary search.
551 _.indexOf = function(array, item, isSorted) {
551 _.indexOf = function(array, item, isSorted) {
552 if (array == null) return -1;
552 if (array == null) return -1;
553 var i = 0, length = array.length;
553 var i = 0, length = array.length;
554 if (isSorted) {
554 if (isSorted) {
555 if (typeof isSorted == 'number') {
555 if (typeof isSorted == 'number') {
556 i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);
556 i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);
557 } else {
557 } else {
558 i = _.sortedIndex(array, item);
558 i = _.sortedIndex(array, item);
559 return array[i] === item ? i : -1;
559 return array[i] === item ? i : -1;
560 }
560 }
561 }
561 }
562 if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
562 if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
563 for (; i < length; i++) if (array[i] === item) return i;
563 for (; i < length; i++) if (array[i] === item) return i;
564 return -1;
564 return -1;
565 };
565 };
566
566
567 // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
567 // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
568 _.lastIndexOf = function(array, item, from) {
568 _.lastIndexOf = function(array, item, from) {
569 if (array == null) return -1;
569 if (array == null) return -1;
570 var hasIndex = from != null;
570 var hasIndex = from != null;
571 if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
571 if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
572 return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
572 return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
573 }
573 }
574 var i = (hasIndex ? from : array.length);
574 var i = (hasIndex ? from : array.length);
575 while (i--) if (array[i] === item) return i;
575 while (i--) if (array[i] === item) return i;
576 return -1;
576 return -1;
577 };
577 };
578
578
579 // Generate an integer Array containing an arithmetic progression. A port of
579 // Generate an integer Array containing an arithmetic progression. A port of
580 // the native Python `range()` function. See
580 // the native Python `range()` function. See
581 // [the Python documentation](http://docs.python.org/library/functions.html#range).
581 // [the Python documentation](http://docs.python.org/library/functions.html#range).
582 _.range = function(start, stop, step) {
582 _.range = function(start, stop, step) {
583 if (arguments.length <= 1) {
583 if (arguments.length <= 1) {
584 stop = start || 0;
584 stop = start || 0;
585 start = 0;
585 start = 0;
586 }
586 }
587 step = arguments[2] || 1;
587 step = arguments[2] || 1;
588
588
589 var length = Math.max(Math.ceil((stop - start) / step), 0);
589 var length = Math.max(Math.ceil((stop - start) / step), 0);
590 var idx = 0;
590 var idx = 0;
591 var range = new Array(length);
591 var range = new Array(length);
592
592
593 while(idx < length) {
593 while(idx < length) {
594 range[idx++] = start;
594 range[idx++] = start;
595 start += step;
595 start += step;
596 }
596 }
597
597
598 return range;
598 return range;
599 };
599 };
600
600
601 // Function (ahem) Functions
601 // Function (ahem) Functions
602 // ------------------
602 // ------------------
603
603
604 // Reusable constructor function for prototype setting.
604 // Reusable constructor function for prototype setting.
605 var ctor = function(){};
605 var ctor = function(){};
606
606
607 // Create a function bound to a given object (assigning `this`, and arguments,
607 // Create a function bound to a given object (assigning `this`, and arguments,
608 // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
608 // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
609 // available.
609 // available.
610 _.bind = function(func, context) {
610 _.bind = function(func, context) {
611 var args, bound;
611 var args, bound;
612 if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
612 if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
613 if (!_.isFunction(func)) throw new TypeError;
613 if (!_.isFunction(func)) throw new TypeError;
614 args = slice.call(arguments, 2);
614 args = slice.call(arguments, 2);
615 return bound = function() {
615 return bound = function() {
616 if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
616 if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
617 ctor.prototype = func.prototype;
617 ctor.prototype = func.prototype;
618 var self = new ctor;
618 var self = new ctor;
619 ctor.prototype = null;
619 ctor.prototype = null;
620 var result = func.apply(self, args.concat(slice.call(arguments)));
620 var result = func.apply(self, args.concat(slice.call(arguments)));
621 if (Object(result) === result) return result;
621 if (Object(result) === result) return result;
622 return self;
622 return self;
623 };
623 };
624 };
624 };
625
625
626 // Partially apply a function by creating a version that has had some of its
626 // Partially apply a function by creating a version that has had some of its
627 // arguments pre-filled, without changing its dynamic `this` context. _ acts
627 // arguments pre-filled, without changing its dynamic `this` context. _ acts
628 // as a placeholder, allowing any combination of arguments to be pre-filled.
628 // as a placeholder, allowing any combination of arguments to be pre-filled.
629 _.partial = function(func) {
629 _.partial = function(func) {
630 var boundArgs = slice.call(arguments, 1);
630 var boundArgs = slice.call(arguments, 1);
631 return function() {
631 return function() {
632 var position = 0;
632 var position = 0;
633 var args = boundArgs.slice();
633 var args = boundArgs.slice();
634 for (var i = 0, length = args.length; i < length; i++) {
634 for (var i = 0, length = args.length; i < length; i++) {
635 if (args[i] === _) args[i] = arguments[position++];
635 if (args[i] === _) args[i] = arguments[position++];
636 }
636 }
637 while (position < arguments.length) args.push(arguments[position++]);
637 while (position < arguments.length) args.push(arguments[position++]);
638 return func.apply(this, args);
638 return func.apply(this, args);
639 };
639 };
640 };
640 };
641
641
642 // Bind a number of an object's methods to that object. Remaining arguments
642 // Bind a number of an object's methods to that object. Remaining arguments
643 // are the method names to be bound. Useful for ensuring that all callbacks
643 // are the method names to be bound. Useful for ensuring that all callbacks
644 // defined on an object belong to it.
644 // defined on an object belong to it.
645 _.bindAll = function(obj) {
645 _.bindAll = function(obj) {
646 var funcs = slice.call(arguments, 1);
646 var funcs = slice.call(arguments, 1);
647 if (funcs.length === 0) throw new Error('bindAll must be passed function names');
647 if (funcs.length === 0) throw new Error('bindAll must be passed function names');
648 each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
648 each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
649 return obj;
649 return obj;
650 };
650 };
651
651
652 // Memoize an expensive function by storing its results.
652 // Memoize an expensive function by storing its results.
653 _.memoize = function(func, hasher) {
653 _.memoize = function(func, hasher) {
654 var memo = {};
654 var memo = {};
655 hasher || (hasher = _.identity);
655 hasher || (hasher = _.identity);
656 return function() {
656 return function() {
657 var key = hasher.apply(this, arguments);
657 var key = hasher.apply(this, arguments);
658 return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
658 return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
659 };
659 };
660 };
660 };
661
661
662 // Delays a function for the given number of milliseconds, and then calls
662 // Delays a function for the given number of milliseconds, and then calls
663 // it with the arguments supplied.
663 // it with the arguments supplied.
664 _.delay = function(func, wait) {
664 _.delay = function(func, wait) {
665 var args = slice.call(arguments, 2);
665 var args = slice.call(arguments, 2);
666 return setTimeout(function(){ return func.apply(null, args); }, wait);
666 return setTimeout(function(){ return func.apply(null, args); }, wait);
667 };
667 };
668
668
669 // Defers a function, scheduling it to run after the current call stack has
669 // Defers a function, scheduling it to run after the current call stack has
670 // cleared.
670 // cleared.
671 _.defer = function(func) {
671 _.defer = function(func) {
672 return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
672 return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
673 };
673 };
674
674
675 // Returns a function, that, when invoked, will only be triggered at most once
675 // Returns a function, that, when invoked, will only be triggered at most once
676 // during a given window of time. Normally, the throttled function will run
676 // during a given window of time. Normally, the throttled function will run
677 // as much as it can, without ever going more than once per `wait` duration;
677 // as much as it can, without ever going more than once per `wait` duration;
678 // but if you'd like to disable the execution on the leading edge, pass
678 // but if you'd like to disable the execution on the leading edge, pass
679 // `{leading: false}`. To disable execution on the trailing edge, ditto.
679 // `{leading: false}`. To disable execution on the trailing edge, ditto.
680 _.throttle = function(func, wait, options) {
680 _.throttle = function(func, wait, options) {
681 var context, args, result;
681 var context, args, result;
682 var timeout = null;
682 var timeout = null;
683 var previous = 0;
683 var previous = 0;
684 options || (options = {});
684 options || (options = {});
685 var later = function() {
685 var later = function() {
686 previous = options.leading === false ? 0 : _.now();
686 previous = options.leading === false ? 0 : _.now();
687 timeout = null;
687 timeout = null;
688 result = func.apply(context, args);
688 result = func.apply(context, args);
689 context = args = null;
689 context = args = null;
690 };
690 };
691 return function() {
691 return function() {
692 var now = _.now();
692 var now = _.now();
693 if (!previous && options.leading === false) previous = now;
693 if (!previous && options.leading === false) previous = now;
694 var remaining = wait - (now - previous);
694 var remaining = wait - (now - previous);
695 context = this;
695 context = this;
696 args = arguments;
696 args = arguments;
697 if (remaining <= 0) {
697 if (remaining <= 0) {
698 clearTimeout(timeout);
698 clearTimeout(timeout);
699 timeout = null;
699 timeout = null;
700 previous = now;
700 previous = now;
701 result = func.apply(context, args);
701 result = func.apply(context, args);
702 context = args = null;
702 context = args = null;
703 } else if (!timeout && options.trailing !== false) {
703 } else if (!timeout && options.trailing !== false) {
704 timeout = setTimeout(later, remaining);
704 timeout = setTimeout(later, remaining);
705 }
705 }
706 return result;
706 return result;
707 };
707 };
708 };
708 };
709
709
710 // Returns a function, that, as long as it continues to be invoked, will not
710 // Returns a function, that, as long as it continues to be invoked, will not
711 // be triggered. The function will be called after it stops being called for
711 // be triggered. The function will be called after it stops being called for
712 // N milliseconds. If `immediate` is passed, trigger the function on the
712 // N milliseconds. If `immediate` is passed, trigger the function on the
713 // leading edge, instead of the trailing.
713 // leading edge, instead of the trailing.
714 _.debounce = function(func, wait, immediate) {
714 _.debounce = function(func, wait, immediate) {
715 var timeout, args, context, timestamp, result;
715 var timeout, args, context, timestamp, result;
716
716
717 var later = function() {
717 var later = function() {
718 var last = _.now() - timestamp;
718 var last = _.now() - timestamp;
719 if (last < wait) {
719 if (last < wait) {
720 timeout = setTimeout(later, wait - last);
720 timeout = setTimeout(later, wait - last);
721 } else {
721 } else {
722 timeout = null;
722 timeout = null;
723 if (!immediate) {
723 if (!immediate) {
724 result = func.apply(context, args);
724 result = func.apply(context, args);
725 context = args = null;
725 context = args = null;
726 }
726 }
727 }
727 }
728 };
728 };
729
729
730 return function() {
730 return function() {
731 context = this;
731 context = this;
732 args = arguments;
732 args = arguments;
733 timestamp = _.now();
733 timestamp = _.now();
734 var callNow = immediate && !timeout;
734 var callNow = immediate && !timeout;
735 if (!timeout) {
735 if (!timeout) {
736 timeout = setTimeout(later, wait);
736 timeout = setTimeout(later, wait);
737 }
737 }
738 if (callNow) {
738 if (callNow) {
739 result = func.apply(context, args);
739 result = func.apply(context, args);
740 context = args = null;
740 context = args = null;
741 }
741 }
742
742
743 return result;
743 return result;
744 };
744 };
745 };
745 };
746
746
747 // Returns a function that will be executed at most one time, no matter how
747 // Returns a function that will be executed at most one time, no matter how
748 // often you call it. Useful for lazy initialization.
748 // often you call it. Useful for lazy initialization.
749 _.once = function(func) {
749 _.once = function(func) {
750 var ran = false, memo;
750 var ran = false, memo;
751 return function() {
751 return function() {
752 if (ran) return memo;
752 if (ran) return memo;
753 ran = true;
753 ran = true;
754 memo = func.apply(this, arguments);
754 memo = func.apply(this, arguments);
755 func = null;
755 func = null;
756 return memo;
756 return memo;
757 };
757 };
758 };
758 };
759
759
760 // Returns the first function passed as an argument to the second,
760 // Returns the first function passed as an argument to the second,
761 // allowing you to adjust arguments, run code before and after, and
761 // allowing you to adjust arguments, run code before and after, and
762 // conditionally execute the original function.
762 // conditionally execute the original function.
763 _.wrap = function(func, wrapper) {
763 _.wrap = function(func, wrapper) {
764 return _.partial(wrapper, func);
764 return _.partial(wrapper, func);
765 };
765 };
766
766
767 // Returns a function that is the composition of a list of functions, each
767 // Returns a function that is the composition of a list of functions, each
768 // consuming the return value of the function that follows.
768 // consuming the return value of the function that follows.
769 _.compose = function() {
769 _.compose = function() {
770 var funcs = arguments;
770 var funcs = arguments;
771 return function() {
771 return function() {
772 var args = arguments;
772 var args = arguments;
773 for (var i = funcs.length - 1; i >= 0; i--) {
773 for (var i = funcs.length - 1; i >= 0; i--) {
774 args = [funcs[i].apply(this, args)];
774 args = [funcs[i].apply(this, args)];
775 }
775 }
776 return args[0];
776 return args[0];
777 };
777 };
778 };
778 };
779
779
780 // Returns a function that will only be executed after being called N times.
780 // Returns a function that will only be executed after being called N times.
781 _.after = function(times, func) {
781 _.after = function(times, func) {
782 return function() {
782 return function() {
783 if (--times < 1) {
783 if (--times < 1) {
784 return func.apply(this, arguments);
784 return func.apply(this, arguments);
785 }
785 }
786 };
786 };
787 };
787 };
788
788
789 // Object Functions
789 // Object Functions
790 // ----------------
790 // ----------------
791
791
792 // Retrieve the names of an object's properties.
792 // Retrieve the names of an object's properties.
793 // Delegates to **ECMAScript 5**'s native `Object.keys`
793 // Delegates to **ECMAScript 5**'s native `Object.keys`
794 _.keys = function(obj) {
794 _.keys = function(obj) {
795 if (!_.isObject(obj)) return [];
795 if (!_.isObject(obj)) return [];
796 if (nativeKeys) return nativeKeys(obj);
796 if (nativeKeys) return nativeKeys(obj);
797 var keys = [];
797 var keys = [];
798 for (var key in obj) if (_.has(obj, key)) keys.push(key);
798 for (var key in obj) if (_.has(obj, key)) keys.push(key);
799 return keys;
799 return keys;
800 };
800 };
801
801
802 // Retrieve the values of an object's properties.
802 // Retrieve the values of an object's properties.
803 _.values = function(obj) {
803 _.values = function(obj) {
804 var keys = _.keys(obj);
804 var keys = _.keys(obj);
805 var length = keys.length;
805 var length = keys.length;
806 var values = new Array(length);
806 var values = new Array(length);
807 for (var i = 0; i < length; i++) {
807 for (var i = 0; i < length; i++) {
808 values[i] = obj[keys[i]];
808 values[i] = obj[keys[i]];
809 }
809 }
810 return values;
810 return values;
811 };
811 };
812
812
813 // Convert an object into a list of `[key, value]` pairs.
813 // Convert an object into a list of `[key, value]` pairs.
814 _.pairs = function(obj) {
814 _.pairs = function(obj) {
815 var keys = _.keys(obj);
815 var keys = _.keys(obj);
816 var length = keys.length;
816 var length = keys.length;
817 var pairs = new Array(length);
817 var pairs = new Array(length);
818 for (var i = 0; i < length; i++) {
818 for (var i = 0; i < length; i++) {
819 pairs[i] = [keys[i], obj[keys[i]]];
819 pairs[i] = [keys[i], obj[keys[i]]];
820 }
820 }
821 return pairs;
821 return pairs;
822 };
822 };
823
823
824 // Invert the keys and values of an object. The values must be serializable.
824 // Invert the keys and values of an object. The values must be serializable.
825 _.invert = function(obj) {
825 _.invert = function(obj) {
826 var result = {};
826 var result = {};
827 var keys = _.keys(obj);
827 var keys = _.keys(obj);
828 for (var i = 0, length = keys.length; i < length; i++) {
828 for (var i = 0, length = keys.length; i < length; i++) {
829 result[obj[keys[i]]] = keys[i];
829 result[obj[keys[i]]] = keys[i];
830 }
830 }
831 return result;
831 return result;
832 };
832 };
833
833
834 // Return a sorted list of the function names available on the object.
834 // Return a sorted list of the function names available on the object.
835 // Aliased as `methods`
835 // Aliased as `methods`
836 _.functions = _.methods = function(obj) {
836 _.functions = _.methods = function(obj) {
837 var names = [];
837 var names = [];
838 for (var key in obj) {
838 for (var key in obj) {
839 if (_.isFunction(obj[key])) names.push(key);
839 if (_.isFunction(obj[key])) names.push(key);
840 }
840 }
841 return names.sort();
841 return names.sort();
842 };
842 };
843
843
844 // Extend a given object with all the properties in passed-in object(s).
844 // Extend a given object with all the properties in passed-in object(s).
845 _.extend = function(obj) {
845 _.extend = function(obj) {
846 each(slice.call(arguments, 1), function(source) {
846 each(slice.call(arguments, 1), function(source) {
847 if (source) {
847 if (source) {
848 for (var prop in source) {
848 for (var prop in source) {
849 obj[prop] = source[prop];
849 obj[prop] = source[prop];
850 }
850 }
851 }
851 }
852 });
852 });
853 return obj;
853 return obj;
854 };
854 };
855
855
856 // Return a copy of the object only containing the whitelisted properties.
856 // Return a copy of the object only containing the whitelisted properties.
857 _.pick = function(obj) {
857 _.pick = function(obj) {
858 var copy = {};
858 var copy = {};
859 var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
859 var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
860 each(keys, function(key) {
860 each(keys, function(key) {
861 if (key in obj) copy[key] = obj[key];
861 if (key in obj) copy[key] = obj[key];
862 });
862 });
863 return copy;
863 return copy;
864 };
864 };
865
865
866 // Return a copy of the object without the blacklisted properties.
866 // Return a copy of the object without the blacklisted properties.
867 _.omit = function(obj) {
867 _.omit = function(obj) {
868 var copy = {};
868 var copy = {};
869 var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
869 var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
870 for (var key in obj) {
870 for (var key in obj) {
871 if (!_.contains(keys, key)) copy[key] = obj[key];
871 if (!_.contains(keys, key)) copy[key] = obj[key];
872 }
872 }
873 return copy;
873 return copy;
874 };
874 };
875
875
876 // Fill in a given object with default properties.
876 // Fill in a given object with default properties.
877 _.defaults = function(obj) {
877 _.defaults = function(obj) {
878 each(slice.call(arguments, 1), function(source) {
878 each(slice.call(arguments, 1), function(source) {
879 if (source) {
879 if (source) {
880 for (var prop in source) {
880 for (var prop in source) {
881 if (obj[prop] === void 0) obj[prop] = source[prop];
881 if (obj[prop] === void 0) obj[prop] = source[prop];
882 }
882 }
883 }
883 }
884 });
884 });
885 return obj;
885 return obj;
886 };
886 };
887
887
888 // Create a (shallow-cloned) duplicate of an object.
888 // Create a (shallow-cloned) duplicate of an object.
889 _.clone = function(obj) {
889 _.clone = function(obj) {
890 if (!_.isObject(obj)) return obj;
890 if (!_.isObject(obj)) return obj;
891 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
891 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
892 };
892 };
893
893
894 // Invokes interceptor with the obj, and then returns obj.
894 // Invokes interceptor with the obj, and then returns obj.
895 // The primary purpose of this method is to "tap into" a method chain, in
895 // The primary purpose of this method is to "tap into" a method chain, in
896 // order to perform operations on intermediate results within the chain.
896 // order to perform operations on intermediate results within the chain.
897 _.tap = function(obj, interceptor) {
897 _.tap = function(obj, interceptor) {
898 interceptor(obj);
898 interceptor(obj);
899 return obj;
899 return obj;
900 };
900 };
901
901
902 // Internal recursive comparison function for `isEqual`.
902 // Internal recursive comparison function for `isEqual`.
903 var eq = function(a, b, aStack, bStack) {
903 var eq = function(a, b, aStack, bStack) {
904 // Identical objects are equal. `0 === -0`, but they aren't identical.
904 // Identical objects are equal. `0 === -0`, but they aren't identical.
905 // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
905 // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
906 if (a === b) return a !== 0 || 1 / a == 1 / b;
906 if (a === b) return a !== 0 || 1 / a == 1 / b;
907 // A strict comparison is necessary because `null == undefined`.
907 // A strict comparison is necessary because `null == undefined`.
908 if (a == null || b == null) return a === b;
908 if (a == null || b == null) return a === b;
909 // Unwrap any wrapped objects.
909 // Unwrap any wrapped objects.
910 if (a instanceof _) a = a._wrapped;
910 if (a instanceof _) a = a._wrapped;
911 if (b instanceof _) b = b._wrapped;
911 if (b instanceof _) b = b._wrapped;
912 // Compare `[[Class]]` names.
912 // Compare `[[Class]]` names.
913 var className = toString.call(a);
913 var className = toString.call(a);
914 if (className != toString.call(b)) return false;
914 if (className != toString.call(b)) return false;
915 switch (className) {
915 switch (className) {
916 // Strings, numbers, dates, and booleans are compared by value.
916 // Strings, numbers, dates, and booleans are compared by value.
917 case '[object String]':
917 case '[object String]':
918 // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
918 // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
919 // equivalent to `new String("5")`.
919 // equivalent to `new String("5")`.
920 return a == String(b);
920 return a == String(b);
921 case '[object Number]':
921 case '[object Number]':
922 // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
922 // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
923 // other numeric values.
923 // other numeric values.
924 return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
924 return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
925 case '[object Date]':
925 case '[object Date]':
926 case '[object Boolean]':
926 case '[object Boolean]':
927 // Coerce dates and booleans to numeric primitive values. Dates are compared by their
927 // Coerce dates and booleans to numeric primitive values. Dates are compared by their
928 // millisecond representations. Note that invalid dates with millisecond representations
928 // millisecond representations. Note that invalid dates with millisecond representations
929 // of `NaN` are not equivalent.
929 // of `NaN` are not equivalent.
930 return +a == +b;
930 return +a == +b;
931 // RegExps are compared by their source patterns and flags.
931 // RegExps are compared by their source patterns and flags.
932 case '[object RegExp]':
932 case '[object RegExp]':
933 return a.source == b.source &&
933 return a.source == b.source &&
934 a.global == b.global &&
934 a.global == b.global &&
935 a.multiline == b.multiline &&
935 a.multiline == b.multiline &&
936 a.ignoreCase == b.ignoreCase;
936 a.ignoreCase == b.ignoreCase;
937 }
937 }
938 if (typeof a != 'object' || typeof b != 'object') return false;
938 if (typeof a != 'object' || typeof b != 'object') return false;
939 // Assume equality for cyclic structures. The algorithm for detecting cyclic
939 // Assume equality for cyclic structures. The algorithm for detecting cyclic
940 // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
940 // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
941 var length = aStack.length;
941 var length = aStack.length;
942 while (length--) {
942 while (length--) {
943 // Linear search. Performance is inversely proportional to the number of
943 // Linear search. Performance is inversely proportional to the number of
944 // unique nested structures.
944 // unique nested structures.
945 if (aStack[length] == a) return bStack[length] == b;
945 if (aStack[length] == a) return bStack[length] == b;
946 }
946 }
947 // Objects with different constructors are not equivalent, but `Object`s
947 // Objects with different constructors are not equivalent, but `Object`s
948 // from different frames are.
948 // from different frames are.
949 var aCtor = a.constructor, bCtor = b.constructor;
949 var aCtor = a.constructor, bCtor = b.constructor;
950 if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
950 if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
951 _.isFunction(bCtor) && (bCtor instanceof bCtor))
951 _.isFunction(bCtor) && (bCtor instanceof bCtor))
952 && ('constructor' in a && 'constructor' in b)) {
952 && ('constructor' in a && 'constructor' in b)) {
953 return false;
953 return false;
954 }
954 }
955 // Add the first object to the stack of traversed objects.
955 // Add the first object to the stack of traversed objects.
956 aStack.push(a);
956 aStack.push(a);
957 bStack.push(b);
957 bStack.push(b);
958 var size = 0, result = true;
958 var size = 0, result = true;
959 // Recursively compare objects and arrays.
959 // Recursively compare objects and arrays.
960 if (className == '[object Array]') {
960 if (className == '[object Array]') {
961 // Compare array lengths to determine if a deep comparison is necessary.
961 // Compare array lengths to determine if a deep comparison is necessary.
962 size = a.length;
962 size = a.length;
963 result = size == b.length;
963 result = size == b.length;
964 if (result) {
964 if (result) {
965 // Deep compare the contents, ignoring non-numeric properties.
965 // Deep compare the contents, ignoring non-numeric properties.
966 while (size--) {
966 while (size--) {
967 if (!(result = eq(a[size], b[size], aStack, bStack))) break;
967 if (!(result = eq(a[size], b[size], aStack, bStack))) break;
968 }
968 }
969 }
969 }
970 } else {
970 } else {
971 // Deep compare objects.
971 // Deep compare objects.
972 for (var key in a) {
972 for (var key in a) {
973 if (_.has(a, key)) {
973 if (_.has(a, key)) {
974 // Count the expected number of properties.
974 // Count the expected number of properties.
975 size++;
975 size++;
976 // Deep compare each member.
976 // Deep compare each member.
977 if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
977 if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
978 }
978 }
979 }
979 }
980 // Ensure that both objects contain the same number of properties.
980 // Ensure that both objects contain the same number of properties.
981 if (result) {
981 if (result) {
982 for (key in b) {
982 for (key in b) {
983 if (_.has(b, key) && !(size--)) break;
983 if (_.has(b, key) && !(size--)) break;
984 }
984 }
985 result = !size;
985 result = !size;
986 }
986 }
987 }
987 }
988 // Remove the first object from the stack of traversed objects.
988 // Remove the first object from the stack of traversed objects.
989 aStack.pop();
989 aStack.pop();
990 bStack.pop();
990 bStack.pop();
991 return result;
991 return result;
992 };
992 };
993
993
994 // Perform a deep comparison to check if two objects are equal.
994 // Perform a deep comparison to check if two objects are equal.
995 _.isEqual = function(a, b) {
995 _.isEqual = function(a, b) {
996 return eq(a, b, [], []);
996 return eq(a, b, [], []);
997 };
997 };
998
998
999 // Is a given array, string, or object empty?
999 // Is a given array, string, or object empty?
1000 // An "empty" object has no enumerable own-properties.
1000 // An "empty" object has no enumerable own-properties.
1001 _.isEmpty = function(obj) {
1001 _.isEmpty = function(obj) {
1002 if (obj == null) return true;
1002 if (obj == null) return true;
1003 if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
1003 if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
1004 for (var key in obj) if (_.has(obj, key)) return false;
1004 for (var key in obj) if (_.has(obj, key)) return false;
1005 return true;
1005 return true;
1006 };
1006 };
1007
1007
1008 // Is a given value a DOM element?
1008 // Is a given value a DOM element?
1009 _.isElement = function(obj) {
1009 _.isElement = function(obj) {
1010 return !!(obj && obj.nodeType === 1);
1010 return !!(obj && obj.nodeType === 1);
1011 };
1011 };
1012
1012
1013 // Is a given value an array?
1013 // Is a given value an array?
1014 // Delegates to ECMA5's native Array.isArray
1014 // Delegates to ECMA5's native Array.isArray
1015 _.isArray = nativeIsArray || function(obj) {
1015 _.isArray = nativeIsArray || function(obj) {
1016 return toString.call(obj) == '[object Array]';
1016 return toString.call(obj) == '[object Array]';
1017 };
1017 };
1018
1018
1019 // Is a given variable an object?
1019 // Is a given variable an object?
1020 _.isObject = function(obj) {
1020 _.isObject = function(obj) {
1021 return obj === Object(obj);
1021 return obj === Object(obj);
1022 };
1022 };
1023
1023
1024 // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
1024 // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
1025 each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
1025 each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
1026 _['is' + name] = function(obj) {
1026 _['is' + name] = function(obj) {
1027 return toString.call(obj) == '[object ' + name + ']';
1027 return toString.call(obj) == '[object ' + name + ']';
1028 };
1028 };
1029 });
1029 });
1030
1030
1031 // Define a fallback version of the method in browsers (ahem, IE), where
1031 // Define a fallback version of the method in browsers (ahem, IE), where
1032 // there isn't any inspectable "Arguments" type.
1032 // there isn't any inspectable "Arguments" type.
1033 if (!_.isArguments(arguments)) {
1033 if (!_.isArguments(arguments)) {
1034 _.isArguments = function(obj) {
1034 _.isArguments = function(obj) {
1035 return !!(obj && _.has(obj, 'callee'));
1035 return !!(obj && _.has(obj, 'callee'));
1036 };
1036 };
1037 }
1037 }
1038
1038
1039 // Optimize `isFunction` if appropriate.
1039 // Optimize `isFunction` if appropriate.
1040 if (typeof (/./) !== 'function') {
1040 if (typeof (/./) !== 'function') {
1041 _.isFunction = function(obj) {
1041 _.isFunction = function(obj) {
1042 return typeof obj === 'function';
1042 return typeof obj === 'function';
1043 };
1043 };
1044 }
1044 }
1045
1045
1046 // Is a given object a finite number?
1046 // Is a given object a finite number?
1047 _.isFinite = function(obj) {
1047 _.isFinite = function(obj) {
1048 return isFinite(obj) && !isNaN(parseFloat(obj));
1048 return isFinite(obj) && !isNaN(parseFloat(obj));
1049 };
1049 };
1050
1050
1051 // Is the given value `NaN`? (NaN is the only number which does not equal itself).
1051 // Is the given value `NaN`? (NaN is the only number which does not equal itself).
1052 _.isNaN = function(obj) {
1052 _.isNaN = function(obj) {
1053 return _.isNumber(obj) && obj != +obj;
1053 return _.isNumber(obj) && obj != +obj;
1054 };
1054 };
1055
1055
1056 // Is a given value a boolean?
1056 // Is a given value a boolean?
1057 _.isBoolean = function(obj) {
1057 _.isBoolean = function(obj) {
1058 return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
1058 return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
1059 };
1059 };
1060
1060
1061 // Is a given value equal to null?
1061 // Is a given value equal to null?
1062 _.isNull = function(obj) {
1062 _.isNull = function(obj) {
1063 return obj === null;
1063 return obj === null;
1064 };
1064 };
1065
1065
1066 // Is a given variable undefined?
1066 // Is a given variable undefined?
1067 _.isUndefined = function(obj) {
1067 _.isUndefined = function(obj) {
1068 return obj === void 0;
1068 return obj === void 0;
1069 };
1069 };
1070
1070
1071 // Shortcut function for checking if an object has a given property directly
1071 // Shortcut function for checking if an object has a given property directly
1072 // on itself (in other words, not on a prototype).
1072 // on itself (in other words, not on a prototype).
1073 _.has = function(obj, key) {
1073 _.has = function(obj, key) {
1074 return hasOwnProperty.call(obj, key);
1074 return hasOwnProperty.call(obj, key);
1075 };
1075 };
1076
1076
1077 // Utility Functions
1077 // Utility Functions
1078 // -----------------
1078 // -----------------
1079
1079
1080 // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
1080 // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
1081 // previous owner. Returns a reference to the Underscore object.
1081 // previous owner. Returns a reference to the Underscore object.
1082 _.noConflict = function() {
1082 _.noConflict = function() {
1083 root._ = previousUnderscore;
1083 root._ = previousUnderscore;
1084 return this;
1084 return this;
1085 };
1085 };
1086
1086
1087 // Keep the identity function around for default iterators.
1087 // Keep the identity function around for default iterators.
1088 _.identity = function(value) {
1088 _.identity = function(value) {
1089 return value;
1089 return value;
1090 };
1090 };
1091
1091
1092 _.constant = function(value) {
1092 _.constant = function(value) {
1093 return function () {
1093 return function () {
1094 return value;
1094 return value;
1095 };
1095 };
1096 };
1096 };
1097
1097
1098 _.property = function(key) {
1098 _.property = function(key) {
1099 return function(obj) {
1099 return function(obj) {
1100 return obj[key];
1100 return obj[key];
1101 };
1101 };
1102 };
1102 };
1103
1103
1104 // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
1104 // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
1105 _.matches = function(attrs) {
1105 _.matches = function(attrs) {
1106 return function(obj) {
1106 return function(obj) {
1107 if (obj === attrs) return true; //avoid comparing an object to itself.
1107 if (obj === attrs) return true; //avoid comparing an object to itself.
1108 for (var key in attrs) {
1108 for (var key in attrs) {
1109 if (attrs[key] !== obj[key])
1109 if (attrs[key] !== obj[key])
1110 return false;
1110 return false;
1111 }
1111 }
1112 return true;
1112 return true;
1113 }
1113 }
1114 };
1114 };
1115
1115
1116 // Run a function **n** times.
1116 // Run a function **n** times.
1117 _.times = function(n, iterator, context) {
1117 _.times = function(n, iterator, context) {
1118 var accum = Array(Math.max(0, n));
1118 var accum = Array(Math.max(0, n));
1119 for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
1119 for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
1120 return accum;
1120 return accum;
1121 };
1121 };
1122
1122
1123 // Return a random integer between min and max (inclusive).
1123 // Return a random integer between min and max (inclusive).
1124 _.random = function(min, max) {
1124 _.random = function(min, max) {
1125 if (max == null) {
1125 if (max == null) {
1126 max = min;
1126 max = min;
1127 min = 0;
1127 min = 0;
1128 }
1128 }
1129 return min + Math.floor(Math.random() * (max - min + 1));
1129 return min + Math.floor(Math.random() * (max - min + 1));
1130 };
1130 };
1131
1131
1132 // A (possibly faster) way to get the current timestamp as an integer.
1132 // A (possibly faster) way to get the current timestamp as an integer.
1133 _.now = Date.now || function() { return new Date().getTime(); };
1133 _.now = Date.now || function() { return new Date().getTime(); };
1134
1134
1135 // List of HTML entities for escaping.
1135 // List of HTML entities for escaping.
1136 var entityMap = {
1136 var entityMap = {
1137 escape: {
1137 escape: {
1138 '&': '&amp;',
1138 '&': '&amp;',
1139 '<': '&lt;',
1139 '<': '&lt;',
1140 '>': '&gt;',
1140 '>': '&gt;',
1141 '"': '&quot;',
1141 '"': '&quot;',
1142 "'": '&#x27;'
1142 "'": '&#x27;'
1143 }
1143 }
1144 };
1144 };
1145 entityMap.unescape = _.invert(entityMap.escape);
1145 entityMap.unescape = _.invert(entityMap.escape);
1146
1146
1147 // Regexes containing the keys and values listed immediately above.
1147 // Regexes containing the keys and values listed immediately above.
1148 var entityRegexes = {
1148 var entityRegexes = {
1149 escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
1149 escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
1150 unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
1150 unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
1151 };
1151 };
1152
1152
1153 // Functions for escaping and unescaping strings to/from HTML interpolation.
1153 // Functions for escaping and unescaping strings to/from HTML interpolation.
1154 _.each(['escape', 'unescape'], function(method) {
1154 _.each(['escape', 'unescape'], function(method) {
1155 _[method] = function(string) {
1155 _[method] = function(string) {
1156 if (string == null) return '';
1156 if (string == null) return '';
1157 return ('' + string).replace(entityRegexes[method], function(match) {
1157 return ('' + string).replace(entityRegexes[method], function(match) {
1158 return entityMap[method][match];
1158 return entityMap[method][match];
1159 });
1159 });
1160 };
1160 };
1161 });
1161 });
1162
1162
1163 // If the value of the named `property` is a function then invoke it with the
1163 // If the value of the named `property` is a function then invoke it with the
1164 // `object` as context; otherwise, return it.
1164 // `object` as context; otherwise, return it.
1165 _.result = function(object, property) {
1165 _.result = function(object, property) {
1166 if (object == null) return void 0;
1166 if (object == null) return void 0;
1167 var value = object[property];
1167 var value = object[property];
1168 return _.isFunction(value) ? value.call(object) : value;
1168 return _.isFunction(value) ? value.call(object) : value;
1169 };
1169 };
1170
1170
1171 // Add your own custom functions to the Underscore object.
1171 // Add your own custom functions to the Underscore object.
1172 _.mixin = function(obj) {
1172 _.mixin = function(obj) {
1173 each(_.functions(obj), function(name) {
1173 each(_.functions(obj), function(name) {
1174 var func = _[name] = obj[name];
1174 var func = _[name] = obj[name];
1175 _.prototype[name] = function() {
1175 _.prototype[name] = function() {
1176 var args = [this._wrapped];
1176 var args = [this._wrapped];
1177 push.apply(args, arguments);
1177 push.apply(args, arguments);
1178 return result.call(this, func.apply(_, args));
1178 return result.call(this, func.apply(_, args));
1179 };
1179 };
1180 });
1180 });
1181 };
1181 };
1182
1182
1183 // Generate a unique integer id (unique within the entire client session).
1183 // Generate a unique integer id (unique within the entire client session).
1184 // Useful for temporary DOM ids.
1184 // Useful for temporary DOM ids.
1185 var idCounter = 0;
1185 var idCounter = 0;
1186 _.uniqueId = function(prefix) {
1186 _.uniqueId = function(prefix) {
1187 var id = ++idCounter + '';
1187 var id = ++idCounter + '';
1188 return prefix ? prefix + id : id;
1188 return prefix ? prefix + id : id;
1189 };
1189 };
1190
1190
1191 // By default, Underscore uses ERB-style template delimiters, change the
1191 // By default, Underscore uses ERB-style template delimiters, change the
1192 // following template settings to use alternative delimiters.
1192 // following template settings to use alternative delimiters.
1193 _.templateSettings = {
1193 _.templateSettings = {
1194 evaluate : /<%([\s\S]+?)%>/g,
1194 evaluate : /<%([\s\S]+?)%>/g,
1195 interpolate : /<%=([\s\S]+?)%>/g,
1195 interpolate : /<%=([\s\S]+?)%>/g,
1196 escape : /<%-([\s\S]+?)%>/g
1196 escape : /<%-([\s\S]+?)%>/g
1197 };
1197 };
1198
1198
1199 // When customizing `templateSettings`, if you don't want to define an
1199 // When customizing `templateSettings`, if you don't want to define an
1200 // interpolation, evaluation or escaping regex, we need one that is
1200 // interpolation, evaluation or escaping regex, we need one that is
1201 // guaranteed not to match.
1201 // guaranteed not to match.
1202 var noMatch = /(.)^/;
1202 var noMatch = /(.)^/;
1203
1203
1204 // Certain characters need to be escaped so that they can be put into a
1204 // Certain characters need to be escaped so that they can be put into a
1205 // string literal.
1205 // string literal.
1206 var escapes = {
1206 var escapes = {
1207 "'": "'",
1207 "'": "'",
1208 '\\': '\\',
1208 '\\': '\\',
1209 '\r': 'r',
1209 '\r': 'r',
1210 '\n': 'n',
1210 '\n': 'n',
1211 '\t': 't',
1211 '\t': 't',
1212 '\u2028': 'u2028',
1212 '\u2028': 'u2028',
1213 '\u2029': 'u2029'
1213 '\u2029': 'u2029'
1214 };
1214 };
1215
1215
1216 var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
1216 var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
1217
1217
1218 // JavaScript micro-templating, similar to John Resig's implementation.
1218 // JavaScript micro-templating, similar to John Resig's implementation.
1219 // Underscore templating handles arbitrary delimiters, preserves whitespace,
1219 // Underscore templating handles arbitrary delimiters, preserves whitespace,
1220 // and correctly escapes quotes within interpolated code.
1220 // and correctly escapes quotes within interpolated code.
1221 _.template = function(text, data, settings) {
1221 _.template = function(text, data, settings) {
1222 var render;
1222 var render;
1223 settings = _.defaults({}, settings, _.templateSettings);
1223 settings = _.defaults({}, settings, _.templateSettings);
1224
1224
1225 // Combine delimiters into one regular expression via alternation.
1225 // Combine delimiters into one regular expression via alternation.
1226 var matcher = new RegExp([
1226 var matcher = new RegExp([
1227 (settings.escape || noMatch).source,
1227 (settings.escape || noMatch).source,
1228 (settings.interpolate || noMatch).source,
1228 (settings.interpolate || noMatch).source,
1229 (settings.evaluate || noMatch).source
1229 (settings.evaluate || noMatch).source
1230 ].join('|') + '|$', 'g');
1230 ].join('|') + '|$', 'g');
1231
1231
1232 // Compile the template source, escaping string literals appropriately.
1232 // Compile the template source, escaping string literals appropriately.
1233 var index = 0;
1233 var index = 0;
1234 var source = "__p+='";
1234 var source = "__p+='";
1235 text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
1235 text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
1236 source += text.slice(index, offset)
1236 source += text.slice(index, offset)
1237 .replace(escaper, function(match) { return '\\' + escapes[match]; });
1237 .replace(escaper, function(match) { return '\\' + escapes[match]; });
1238
1238
1239 if (escape) {
1239 if (escape) {
1240 source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
1240 source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
1241 }
1241 }
1242 if (interpolate) {
1242 if (interpolate) {
1243 source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
1243 source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
1244 }
1244 }
1245 if (evaluate) {
1245 if (evaluate) {
1246 source += "';\n" + evaluate + "\n__p+='";
1246 source += "';\n" + evaluate + "\n__p+='";
1247 }
1247 }
1248 index = offset + match.length;
1248 index = offset + match.length;
1249 return match;
1249 return match;
1250 });
1250 });
1251 source += "';\n";
1251 source += "';\n";
1252
1252
1253 // If a variable is not specified, place data values in local scope.
1253 // If a variable is not specified, place data values in local scope.
1254 if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
1254 if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
1255
1255
1256 source = "var __t,__p='',__j=Array.prototype.join," +
1256 source = "var __t,__p='',__j=Array.prototype.join," +
1257 "print=function(){__p+=__j.call(arguments,'');};\n" +
1257 "print=function(){__p+=__j.call(arguments,'');};\n" +
1258 source + "return __p;\n";
1258 source + "return __p;\n";
1259
1259
1260 try {
1260 try {
1261 render = new Function(settings.variable || 'obj', '_', source);
1261 render = new Function(settings.variable || 'obj', '_', source);
1262 } catch (e) {
1262 } catch (e) {
1263 e.source = source;
1263 e.source = source;
1264 throw e;
1264 throw e;
1265 }
1265 }
1266
1266
1267 if (data) return render(data, _);
1267 if (data) return render(data, _);
1268 var template = function(data) {
1268 var template = function(data) {
1269 return render.call(this, data, _);
1269 return render.call(this, data, _);
1270 };
1270 };
1271
1271
1272 // Provide the compiled function source as a convenience for precompilation.
1272 // Provide the compiled function source as a convenience for precompilation.
1273 template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
1273 template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
1274
1274
1275 return template;
1275 return template;
1276 };
1276 };
1277
1277
1278 // Add a "chain" function, which will delegate to the wrapper.
1278 // Add a "chain" function, which will delegate to the wrapper.
1279 _.chain = function(obj) {
1279 _.chain = function(obj) {
1280 return _(obj).chain();
1280 return _(obj).chain();
1281 };
1281 };
1282
1282
1283 // OOP
1283 // OOP
1284 // ---------------
1284 // ---------------
1285 // If Underscore is called as a function, it returns a wrapped object that
1285 // If Underscore is called as a function, it returns a wrapped object that
1286 // can be used OO-style. This wrapper holds altered versions of all the
1286 // can be used OO-style. This wrapper holds altered versions of all the
1287 // underscore functions. Wrapped objects may be chained.
1287 // underscore functions. Wrapped objects may be chained.
1288
1288
1289 // Helper function to continue chaining intermediate results.
1289 // Helper function to continue chaining intermediate results.
1290 var result = function(obj) {
1290 var result = function(obj) {
1291 return this._chain ? _(obj).chain() : obj;
1291 return this._chain ? _(obj).chain() : obj;
1292 };
1292 };
1293
1293
1294 // Add all of the Underscore functions to the wrapper object.
1294 // Add all of the Underscore functions to the wrapper object.
1295 _.mixin(_);
1295 _.mixin(_);
1296
1296
1297 // Add all mutator Array functions to the wrapper.
1297 // Add all mutator Array functions to the wrapper.
1298 each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1298 each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1299 var method = ArrayProto[name];
1299 var method = ArrayProto[name];
1300 _.prototype[name] = function() {
1300 _.prototype[name] = function() {
1301 var obj = this._wrapped;
1301 var obj = this._wrapped;
1302 method.apply(obj, arguments);
1302 method.apply(obj, arguments);
1303 if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
1303 if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
1304 return result.call(this, obj);
1304 return result.call(this, obj);
1305 };
1305 };
1306 });
1306 });
1307
1307
1308 // Add all accessor Array functions to the wrapper.
1308 // Add all accessor Array functions to the wrapper.
1309 each(['concat', 'join', 'slice'], function(name) {
1309 each(['concat', 'join', 'slice'], function(name) {
1310 var method = ArrayProto[name];
1310 var method = ArrayProto[name];
1311 _.prototype[name] = function() {
1311 _.prototype[name] = function() {
1312 return result.call(this, method.apply(this._wrapped, arguments));
1312 return result.call(this, method.apply(this._wrapped, arguments));
1313 };
1313 };
1314 });
1314 });
1315
1315
1316 _.extend(_.prototype, {
1316 _.extend(_.prototype, {
1317
1317
1318 // Start chaining a wrapped Underscore object.
1318 // Start chaining a wrapped Underscore object.
1319 chain: function() {
1319 chain: function() {
1320 this._chain = true;
1320 this._chain = true;
1321 return this;
1321 return this;
1322 },
1322 },
1323
1323
1324 // Extracts the result from a wrapped and chained object.
1324 // Extracts the result from a wrapped and chained object.
1325 value: function() {
1325 value: function() {
1326 return this._wrapped;
1326 return this._wrapped;
1327 }
1327 }
1328
1328
1329 });
1329 });
1330
1330
1331 // AMD registration happens at the end for compatibility with AMD loaders
1331 // AMD registration happens at the end for compatibility with AMD loaders
1332 // that may not enforce next-turn semantics on modules. Even though general
1332 // that may not enforce next-turn semantics on modules. Even though general
1333 // practice for AMD registration is to be anonymous, underscore registers
1333 // practice for AMD registration is to be anonymous, underscore registers
1334 // as a named module because, like jQuery, it is a base library that is
1334 // as a named module because, like jQuery, it is a base library that is
1335 // popular enough to be bundled in a third party lib, but not be part of
1335 // popular enough to be bundled in a third party lib, but not be part of
1336 // an AMD load request. Those cases could generate an error when an
1336 // an AMD load request. Those cases could generate an error when an
1337 // anonymous define() is called outside of a loader request.
1337 // anonymous define() is called outside of a loader request.
1338 if (typeof define === 'function' && define.amd) {
1338 if (typeof define === 'function' && define.amd) {
1339 define('underscore', [], function() {
1339 define('underscore', [], function() {
1340 return _;
1340 return _;
1341 });
1341 });
1342 }
1342 }
1343 }).call(this);
1343 }).call(this);
1344
1344
1345 ;/*
1345 ;/*
1346 AngularJS v1.7.7
1346 AngularJS v1.7.7
1347 (c) 2010-2018 Google, Inc. http://angularjs.org
1347 (c) 2010-2018 Google, Inc. http://angularjs.org
1348 License: MIT
1348 License: MIT
1349 */
1349 */
1350 (function(C){'use strict';function re(a){if(D(a))w(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return W(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.7.7/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent,
1350 (function(C){'use strict';function re(a){if(D(a))w(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return W(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.7.7/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent,
1351 f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function ya(a){if(null==a||$a(a))return!1;if(H(a)||A(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return W(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)||
1351 f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function ya(a){if(null==a||$a(a))return!1;if(H(a)||A(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return W(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)||
1352 ya(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Yb(a){return function(b,d){a(d,b)}}function se(){return++pb}
1352 ya(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Yb(a){return function(b,d){a(d,b)}}function se(){return++pb}
1353 function Zb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):$b(p)?a[m]=p.clone():(D(a[m])||(a[m]=H(p)?[]:{}),Zb(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return Zb(a,Ha.call(arguments,1),!1)}function te(a){return Zb(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a,
1353 function Zb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):$b(p)?a[m]=p.clone():(D(a[m])||(a[m]=H(p)?[]:{}),Zb(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return Zb(a,Ha.call(arguments,1),!1)}function te(a){return Zb(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a,
1354 10)}function ac(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function bc(a){return B(a.toString)&&a.toString!==la}function z(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Nc(a){return null!==a&&"object"===typeof a&&!Pc(a)}function A(a){return"string"===typeof a}function W(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)}
1354 10)}function ac(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function bc(a){return B(a.toString)&&a.toString!==la}function z(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Nc(a){return null!==a&&"object"===typeof a&&!Pc(a)}function A(a){return"string"===typeof a}function W(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)}
1355 function H(a){return Array.isArray(a)||a instanceof Array}function cc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ue(a){return a&&W(a.length)&&ve.test(la.call(a))}
1355 function H(a){return Array.isArray(a)||a instanceof Array}function cc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ue(a){return a&&W(a.length)&&ve.test(la.call(a))}
1356 function $b(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function we(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Nc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&
1356 function $b(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function we(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Nc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&
1357 (b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw pa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Pc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer),
1357 (b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw pa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Pc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer),
1358 a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)}
1358 a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)}
1359 var g=[],k=[];d=Xb(d)?d:NaN;if(b){if(ue(b)||"[object ArrayBuffer]"===la.call(b))throw pa("cpta");if(a===b)throw pa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function dc(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c],
1359 var g=[],k=[];d=Xb(d)?d:NaN;if(b){if(ue(b)||"[object ArrayBuffer]"===la.call(b))throw pa("cpta");if(a===b)throw pa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function dc(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c],
1360 b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?dc(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof
1360 b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?dc(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof
1361 RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Qc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&C.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!z(a))return W(b)||(b=b?2:null),JSON.stringify(a,Qc,b)}function Rc(a){return A(a)?JSON.parse(a):a}function ec(a,b){a=a.replace(xe,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+
1361 RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Qc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&C.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!z(a))return W(b)||(b=b?2:null),JSON.stringify(a,Qc,b)}function Rc(a){return A(a)?JSON.parse(a):a}function ec(a,b){a=a.replace(xe,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+
1362 a)/6E4;return X(d)?b:d}function Sc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function fc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=ec(b,c);return Sc(a,d*(b-c))}function za(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Tc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};r((a||"").split("&"),
1362 a)/6E4;return X(d)?b:d}function Sc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function fc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=ec(b,c);return Sc(a,d*(b-c))}function za(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Tc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};r((a||"").split("&"),
1363 function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Tc(e),w(e)&&(f=w(f)?Tc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function ye(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function hc(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,
1363 function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Tc(e),w(e)&&(f=w(f)?Tc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function ye(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function hc(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,
1364 b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ze(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,A(d=a.getAttribute(d)))return d;return null}function Ae(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});
1364 b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ze(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,A(d=a.getAttribute(d)))return d;return null}function Ae(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});
1365 d&&(Be?(e.strictDi=null!==ze(d,"strict-di"),b(d,c?[c]:[],e)):C.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===C.document?"document":za(a);throw pa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",
1365 d&&(Be?(e.strictDi=null!==ze(d,"strict-di"),b(d,c?[c]:[],e)):C.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===C.document?"document":za(a);throw pa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",
1366 function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&&
1366 function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&&
1367 ca.resumeDeferredBootstrap()}function Ce(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function De(a){a=ca.element(a).injector();if(!a)throw pa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ee,function(a,c){return(c?b:"")+a.toLowerCase()})}function Fe(){var a;if(!Wc){var b=qb();(rb=z(b)?C.jQuery:b?C[b]:void 0)&&rb.fn.on?(x=rb,S(rb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})):
1367 ca.resumeDeferredBootstrap()}function Ce(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function De(a){a=ca.element(a).injector();if(!a)throw pa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ee,function(a,c){return(c?b:"")+a.toLowerCase()})}function Fe(){var a;if(!Wc){var b=qb();(rb=z(b)?C.jQuery:b?C[b]:void 0)&&rb.fn.on?(x=rb,S(rb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})):
1368 x=Y;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Wc=!0}}function gb(a,b,d){if(!a)throw pa("areq",b||"?",d||"required");return a}function sb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw pa("badname",b);}function Ge(a,b,d){if(!b)return a;b=b.split(".");
1368 x=Y;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Wc=!0}}function gb(a,b,d){if(!a)throw pa("areq",b||"?",d||"required");return a}function sb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw pa("badname",b);}function Ge(a,b,d){if(!b)return a;b=b.split(".");
1369 for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function tb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function ic(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!bc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function He(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=F("$injector"),
1369 for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function tb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function ic(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!bc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function He(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=F("$injector"),
1370 c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod",f);var e=[],n=[],s=[],G=a("$injector","invoke",
1370 c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod",f);var e=[],n=[],s=[],G=a("$injector","invoke",
1371 "push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider",
1371 "push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider",
1372 "directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ie(a,b){var d=[];Xb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Qc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})}function Je(a){S(a,{errorHandlingConfig:re,
1372 "directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ie(a,b){var d=[];Xb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Qc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})}function Je(a){S(a,{errorHandlingConfig:re,
1373 bootstrap:Uc,copy:Ia,extend:S,merge:te,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Rc,identity:Ta,isUndefined:z,isDefined:w,isString:A,isFunction:B,isObject:D,isNumber:W,isElement:$b,isArray:H,version:Ke,isDate:ha,callbacks:{$$counter:0},getTestability:De,reloadWithDebugInfo:Ce,$$minErr:F,$$csp:Aa,$$encodeUriSegment:hc,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:ic,$$uppercase:ub});kc=He(C);kc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Le});
1373 bootstrap:Uc,copy:Ia,extend:S,merge:te,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Rc,identity:Ta,isUndefined:z,isDefined:w,isString:A,isFunction:B,isObject:D,isNumber:W,isElement:$b,isArray:H,version:Ke,isDate:ha,callbacks:{$$counter:0},getTestability:De,reloadWithDebugInfo:Ce,$$minErr:F,$$csp:Aa,$$encodeUriSegment:hc,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:ic,$$uppercase:ub});kc=He(C);kc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Le});
1374 a.provider("$compile",Xc).directive({a:Me,input:Yc,textarea:Yc,form:Ne,script:Oe,select:Pe,option:Qe,ngBind:Re,ngBindHtml:Se,ngBindTemplate:Te,ngClass:Ue,ngClassEven:Ve,ngClassOdd:We,ngCloak:Xe,ngController:Ye,ngForm:Ze,ngHide:$e,ngIf:af,ngInclude:bf,ngInit:cf,ngNonBindable:df,ngPluralize:ef,ngRef:ff,ngRepeat:gf,ngShow:hf,ngStyle:jf,ngSwitch:kf,ngSwitchWhen:lf,ngSwitchDefault:mf,ngOptions:nf,ngTransclude:of,ngModel:pf,ngList:qf,ngChange:rf,pattern:Zc,ngPattern:Zc,required:$c,ngRequired:$c,minlength:ad,
1374 a.provider("$compile",Xc).directive({a:Me,input:Yc,textarea:Yc,form:Ne,script:Oe,select:Pe,option:Qe,ngBind:Re,ngBindHtml:Se,ngBindTemplate:Te,ngClass:Ue,ngClassEven:Ve,ngClassOdd:We,ngCloak:Xe,ngController:Ye,ngForm:Ze,ngHide:$e,ngIf:af,ngInclude:bf,ngInit:cf,ngNonBindable:df,ngPluralize:ef,ngRef:ff,ngRepeat:gf,ngShow:hf,ngStyle:jf,ngSwitch:kf,ngSwitchWhen:lf,ngSwitchDefault:mf,ngOptions:nf,ngTransclude:of,ngModel:pf,ngList:qf,ngChange:rf,pattern:Zc,ngPattern:Zc,required:$c,ngRequired:$c,minlength:ad,
1375 ngMinlength:ad,maxlength:bd,ngMaxlength:bd,ngValue:sf,ngModelOptions:tf}).directive({ngInclude:uf,input:vf}).directive(vb).directive(cd);a.provider({$anchorScroll:wf,$animate:xf,$animateCss:yf,$$animateJs:zf,$$animateQueue:Af,$$AnimateRunner:Bf,$$animateAsyncRun:Cf,$browser:Df,$cacheFactory:Ef,$controller:Ff,$document:Gf,$$isDocumentHidden:Hf,$exceptionHandler:If,$filter:dd,$$forceReflow:Jf,$interpolate:Kf,$interval:Lf,$$intervalFactory:Mf,$http:Nf,$httpParamSerializer:Of,$httpParamSerializerJQLike:Pf,
1375 ngMinlength:ad,maxlength:bd,ngMaxlength:bd,ngValue:sf,ngModelOptions:tf}).directive({ngInclude:uf,input:vf}).directive(vb).directive(cd);a.provider({$anchorScroll:wf,$animate:xf,$animateCss:yf,$$animateJs:zf,$$animateQueue:Af,$$AnimateRunner:Bf,$$animateAsyncRun:Cf,$browser:Df,$cacheFactory:Ef,$controller:Ff,$document:Gf,$$isDocumentHidden:Hf,$exceptionHandler:If,$filter:dd,$$forceReflow:Jf,$interpolate:Kf,$interval:Lf,$$intervalFactory:Mf,$http:Nf,$httpParamSerializer:Of,$httpParamSerializerJQLike:Pf,
1376 $httpBackend:Qf,$xhrFactory:Rf,$jsonpCallbacks:Sf,$location:Tf,$log:Uf,$parse:Vf,$rootScope:Wf,$q:Xf,$$q:Yf,$sce:Zf,$sceDelegate:$f,$sniffer:ag,$$taskTrackerFactory:bg,$templateCache:cg,$templateRequest:dg,$$testability:eg,$timeout:fg,$window:gg,$$rAF:hg,$$jqLite:ig,$$Map:jg,$$cookieReader:kg})}]).info({angularVersion:"1.7.7"})}function wb(a,b){return b.toUpperCase()}function xb(a){return a.replace(lg,wb)}function lc(a){a=a.nodeType;return 1===a||!a||9===a}function ed(a,b){var d,c,e=b.createDocumentFragment(),
1376 $httpBackend:Qf,$xhrFactory:Rf,$jsonpCallbacks:Sf,$location:Tf,$log:Uf,$parse:Vf,$rootScope:Wf,$q:Xf,$$q:Yf,$sce:Zf,$sceDelegate:$f,$sniffer:ag,$$taskTrackerFactory:bg,$templateCache:cg,$templateRequest:dg,$$testability:eg,$timeout:fg,$window:gg,$$rAF:hg,$$jqLite:ig,$$Map:jg,$$cookieReader:kg})}]).info({angularVersion:"1.7.7"})}function wb(a,b){return b.toUpperCase()}function xb(a){return a.replace(lg,wb)}function lc(a){a=a.nodeType;return 1===a||!a||9===a}function ed(a,b){var d,c,e=b.createDocumentFragment(),
1377 f=[];if(mc.test(a)){d=e.appendChild(b.createElement("div"));c=(mg.exec(a)||["",""])[1].toLowerCase();c=oa[c]||oa._default;d.innerHTML=c[1]+a.replace(ng,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function Y(a){if(a instanceof Y)return a;var b;A(a)&&(a=U(a),b=!0);if(!(this instanceof Y)){if(b&&"<"!==a.charAt(0))throw nc("nosel");return new Y(a)}if(b){b=
1377 f=[];if(mc.test(a)){d=e.appendChild(b.createElement("div"));c=(mg.exec(a)||["",""])[1].toLowerCase();c=oa[c]||oa._default;d.innerHTML=c[1]+a.replace(ng,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function Y(a){if(a instanceof Y)return a;var b;A(a)&&(a=U(a),b=!0);if(!(this instanceof Y)){if(b&&"<"!==a.charAt(0))throw nc("nosel");return new Y(a)}if(b){b=
1378 C.document;var d;a=(d=og.exec(a))?[b.createElement(d[1])]:(d=ed(a,b))?d.childNodes:[];oc(this,a)}else B(a)?fd(a):oc(this,a)}function pc(a){return a.cloneNode(!0)}function yb(a,b){!b&&lc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function gd(a){for(var b in a)return!1;return!0}function hd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!gd(d)||c&&!gd(c)||(delete Ka[b],a.ng339=void 0)}function id(a,b,d,c){if(w(c))throw nc("offargs");var e=(c=zb(a))&&c.events,
1378 C.document;var d;a=(d=og.exec(a))?[b.createElement(d[1])]:(d=ed(a,b))?d.childNodes:[];oc(this,a)}else B(a)?fd(a):oc(this,a)}function pc(a){return a.cloneNode(!0)}function yb(a,b){!b&&lc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function gd(a){for(var b in a)return!1;return!0}function hd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!gd(d)||c&&!gd(c)||(delete Ka[b],a.ng339=void 0)}function id(a,b,d,c){if(w(c))throw nc("offargs");var e=(c=zb(a))&&c.events,
1379 f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Ab[a]&&g(Ab[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];hd(a)}}function qc(a,b){var d=a.ng339;if(d=d&&Ka[d])b?delete d.data[b]:d.data={},hd(a)}function zb(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++pg,d=Ka[d]={events:{},data:{},handle:void 0});return d}function rc(a,b,d){if(lc(a)){var c,e=w(d),
1379 f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Ab[a]&&g(Ab[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];hd(a)}}function qc(a,b){var d=a.ng339;if(d=d&&Ka[d])b?delete d.data[b]:d.data={},hd(a)}function zb(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++pg,d=Ka[d]={events:{},data:{},handle:void 0});return d}function rc(a,b,d){if(lc(a)){var c,e=w(d),
1380 f=!e&&b&&!D(b),g=!b;a=(a=zb(a,!f))&&a.data;if(e)a[xb(b)]=d;else{if(g)return a;if(f)return a&&a[xb(b)];for(c in b)a[xb(c)]=b[c]}}}function Bb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Cb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",U(c))}}function Db(a,b){if(b&&a.setAttribute){var d=
1380 f=!e&&b&&!D(b),g=!b;a=(a=zb(a,!f))&&a.data;if(e)a[xb(b)]=d;else{if(g)return a;if(f)return a&&a[xb(b)];for(c in b)a[xb(c)]=b[c]}}}function Bb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Cb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",U(c))}}function Db(a,b){if(b&&a.setAttribute){var d=
1381 (" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",U(c))}}function oc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function jd(a,b){return Eb(a,"$"+(b||"ngController")+"Controller")}function Eb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=
1381 (" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",U(c))}}function oc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function jd(a,b){return Eb(a,"$"+(b||"ngController")+"Controller")}function Eb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=
1382 0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function kd(a){for(yb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Fb(a,b){b||yb(a);var d=a.parentNode;d&&d.removeChild(a)}function qg(a,b){b=b||C;if("complete"===b.document.readyState)b.setTimeout(a);else x(b).on("load",a)}function fd(a){function b(){C.document.removeEventListener("DOMContentLoaded",b);C.removeEventListener("load",b);a()}"complete"===C.document.readyState?C.setTimeout(a):(C.document.addEventListener("DOMContentLoaded",
1382 0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function kd(a){for(yb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Fb(a,b){b||yb(a);var d=a.parentNode;d&&d.removeChild(a)}function qg(a,b){b=b||C;if("complete"===b.document.readyState)b.setTimeout(a);else x(b).on("load",a)}function fd(a){function b(){C.document.removeEventListener("DOMContentLoaded",b);C.removeEventListener("load",b);a()}"complete"===C.document.readyState?C.setTimeout(a):(C.document.addEventListener("DOMContentLoaded",
1383 b),C.addEventListener("load",b))}function ld(a,b){var d=Gb[b.toLowerCase()];return d&&md[ua(a)]&&d}function rg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(z(c.immediatePropagationStopped)){var k=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};
1383 b),C.addEventListener("load",b))}function ld(a,b){var d=Gb[b.toLowerCase()];return d&&md[ua(a)]&&d}function rg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(z(c.immediatePropagationStopped)){var k=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};
1384 var h=f.specialHandlerWrapper||sg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function sg(a,b,d){d.call(a,b)}function tg(a,b,d){var c=b.relatedTarget;c&&(c===a||ug.call(a,c))||d.call(a,b)}function ig(){this.$get=function(){return S(Y,{hasClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;
1384 var h=f.specialHandlerWrapper||sg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function sg(a,b,d){d.call(a,b)}function tg(a,b,d){var c=b.relatedTarget;c&&(c===a||ug.call(a,c))||d.call(a,b)}function ig(){this.$get=function(){return S(Y,{hasClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;
1385 if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||se)():d+":"+a}function nd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function od(a){a=Function.prototype.toString.call(a).replace(vg,"");return a.match(wg)||a.match(xg)}function yg(a){return(a=od(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Yb(a));else return a(b,
1385 if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||se)():d+":"+a}function nd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function od(a){a=Function.prototype.toString.call(a).replace(vg,"");return a.match(wg)||a.match(xg)}function yg(a){return(a=od(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Yb(a));else return a(b,
1386 c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ba("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(z(c))throw Ba("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(z(a)||H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{A(a)?(c=kc(a),
1386 c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ba("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(z(c))throw Ba("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(z(a)||H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{A(a)?(c=kc(a),
1387 t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):sb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ba("modulerr",a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ba("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),
1387 t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):sb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ba("modulerr",a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ba("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),
1388 a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ba("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(Ca||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?
1388 a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ba("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(Ca||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?
1389 (c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var h={},l=[],m=new Hb,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,
1389 (c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var h={},l=[],m=new Hb,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,
1390 ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ba("unpr",l.join(" <- "));}),s={},G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,
1390 ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ba("unpr",l.join(" <- "));}),s={},G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,
1391 function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function wf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():$b(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):W(c)||
1391 function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function wf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():$b(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):W(c)||
1392 (c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=A(a)?a:W(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||qg(function(){c.$evalAsync(g)})});return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function zg(a){A(a)&&
1392 (c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=A(a)?a:W(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||qg(function(){c.$evalAsync(g)})});return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function zg(a){A(a)&&
1393 (a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Ag(a,b,d,c,e){function f(){qa=null;k()}function g(){t=y();t=z(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})}var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=
1393 (a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Ag(a,b,d,c,e){function f(){qa=null;k()}function g(){t=y();t=z(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})}var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=
1394 G.notifyWhenNoPendingTasks;var t,N,v=l.href,jc=b.find("base"),qa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){z(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h;var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(qa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(qa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());
1394 G.notifyWhenNoPendingTasks;var t,N,v=l.href,jc=b.find("base"),qa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){z(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h;var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(qa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(qa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());
1395 qa&&(qa=b);return h}return(qa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate",f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=jc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];
1395 qa&&(qa=b);return h}return(qa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate",f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=jc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];
1396 G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function Df(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Ag(a,c,b,d,e)}]}function Ef(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",
1396 G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function Df(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Ag(a,c,b,d,e)}]}function Ef(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",
1397 a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!z(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();
1397 a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!z(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();
1398 p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function cg(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Xc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":
1398 p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function cg(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Xc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":
1399 "isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&&a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=we("ngSrc,ngSrcset,src,srcset"),
1399 "isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&&a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=we("ngSrc,ngSrcset,src,srcset"),
1400 l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function qa(b,d){gb(b,"name");Ja(b,"directive");A(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f,g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!A(l)||!/[EACM]/.test(l)))throw $("badrestrict",
1400 l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function qa(b,d){gb(b,"name");Ja(b,"directive");A(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f,g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!A(l)||!/[EACM]/.test(l)))throw $("badrestrict",
1401 l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Yb(qa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Bg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",
1401 l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Yb(qa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Bg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",
1402 require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!A(a))return r(a,Yb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};
1402 require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!A(a))return r(a,Yb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};
1403 var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length?(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();
1403 var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length?(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();
1404 if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(V.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(V.CSS,["*|style"]);a(V.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(V.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));a(V.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();
1404 if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(V.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(V.CSS,["*|style"]);a(V.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(V.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));a(V.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();
1405 this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua=void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!A(a))throw $("srcset",b,a.toString());for(var c="",d=U(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/
1405 this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua=void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!A(a))throw $("srcset",b,a.toString());for(var c="",d=U(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/
1406 2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(U(d[g])),c=c+(" "+U(d[g+1]));d=U(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(U(d[0]));2===d.length&&(c+=" "+U(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}
1406 2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(U(d[g])),c=c+(" "+U(d[g+1]));d=U(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(U(d[0]));2===d.length&&(c+=" "+U(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}
1407 function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):
1407 function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):
1408 a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m<p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,
1408 a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m<p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,
1409 void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===Ca&&ib(a,t,k);m=sc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function ib(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:
1409 void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===Ca&&ib(a,t,k);m=sc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function ib(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:
1410 a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function sc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);X(b,wa(h),"E",e,f);for(var l,m,
1410 a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function sc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);X(b,wa(h),"E",e,f);for(var l,m,
1411 n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=wa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(pd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})):(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(qd(p,L,c,n,m,!1));else{n=wa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=
1411 n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=wa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(pd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})):(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(qd(p,L,c,n,m,!1));else{n=wa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=
1412 t,ld(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);X(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(A(g)&&""!==g)for(;a=k.exec(g);)n=wa(a[2]),X(b,n,"C",e,f)&&(d[n]=U(a[3])),g=g.substr(a.index+a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=wa(f[1]);X(b,h,"M",d,e)&&(c[h]=U(f[2]))}}catch(k){}}
1412 t,ld(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);X(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(A(g)&&""!==g)for(;a=k.exec(g);)n=wa(a[2]),X(b,n,"C",e,f)&&(d[n]=U(a[3])),g=g.substr(a.index+a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=wa(f[1]);X(b,h,"M",d,e)&&(c[h]=U(f[2]))}}catch(k){}}
1413 function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function Y(a,b,c){return function(d,e,f,g,h){e=V(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=
1413 function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function Y(a,b,c){return function(d,e,f,g,h){e=V(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=
1414 Y(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Aa(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Y(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Aa(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)||(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(z(f))throw $("noslot",d,za(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=
1414 Y(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Aa(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Y(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Aa(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)||(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(z(f))throw $("noslot",d,za(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=
1415 x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings,u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Cg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);
1415 x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings,u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Cg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);
1416 L.bindingInfo=Da(G,g,L.instance,Cg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,W(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&&(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,
1416 L.bindingInfo=Da(G,g,L.instance,Cg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,W(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&&(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,
1417 L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,
1417 L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,
1418 M,R=e,q,ma=!1,Ib=!1,O,sa=0,A=a.length;sa<A;sa++){u=a[sa];var E=u.$$start,ib=u.$$end;E&&(y=V(b,E,ib));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Ib=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",
1418 M,R=e,q,ma=!1,Ib=!1,O,sa=0,A=a.length;sa<A;sa++){u=a[sa];var E=u.$$start,ib=u.$$end;E&&(y=V(b,E,ib));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Ib=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",
1419 J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],pa(f,Ha.call(M,0),b),R=Z(Ib,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=C.document.createDocumentFragment();var Xa=T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[wa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||C.document.createDocumentFragment(),
1419 J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],pa(f,Ha.call(M,0),b),R=Z(Ib,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=C.document.createDocumentFragment();var Xa=T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[wa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||C.document.createDocumentFragment(),
1420 ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Ib,R,e));M=x(M.childNodes)}else M=x(pc(b)).contents();y.empty();R=Z(Ib,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=mc.test(O)?rd(ja(u.templateNamespace,U(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",
1420 ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Ib,R,e));M=x(M.childNodes)}else M=x(pc(b)).contents();y.empty();R=Z(Ib,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=mc.test(O)?rd(ja(u.templateNamespace,U(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",
1421 Q,"");pa(f,y,b);A={$attr:{}};O=sc(b,[],A);var Dg=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Dg);ga(d,A);A=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),A=a.length;else if(u.compile)try{q=u.compile(y,d,R);var X=u.$$originalDirective||u;B(q)?m(null,Va(X,q),E,ib):
1421 Q,"");pa(f,y,b);A={$attr:{}};O=sc(b,[],A);var Dg=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Dg);ga(d,A);A=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),A=a.length;else if(u.compile)try{q=u.compile(y,d,R);var X=u.$$originalDirective||u;B(q)?m(null,Va(X,q),E,ib):
1422 q&&m(Va(X,q.pre),Va(X,q.post),E,ib)}catch(ca){c(ca,za(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function W(a,b,c,d){var e;if(A(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&
1422 q&&m(Va(X,q.pre),Va(X,q.post),E,ib)}catch(ca){c(ca,za(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function W(a,b,c,d){var e;if(A(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&
1423 !f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=W(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=W(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"===p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=ac(a[d],{$$isolateScope:b,
1423 !f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=W(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=W(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"===p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=ac(a[d],{$$isolateScope:b,
1424 $$newScope:c})}function X(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(z(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,
1424 $$newScope:c})}function X(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(z(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,
1425 t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c=b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||
1425 t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c=b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||
1426 "$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=ac(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e,I;c=Na(c);if(u.replace){c=mc.test(c)?rd(ja(L,U(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};pa(f,b,e);var v=sc(e,[],c);D(u.scope)&&fa(v,!0);a=
1426 "$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=ac(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e,I;c=Na(c);if(u.replace){c=mc.test(c)?rd(ja(L,U(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};pa(f,b,e);var v=sc(e,[],c);D(u.scope)&&fa(v,!0);a=
1427 v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=pc(e));pa(y,x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){cc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,
1427 v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=pc(e));pa(y,x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){cc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,
1428 c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,za(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();
1428 c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,za(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();
1429 b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=C.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function oa(a,b){if("srcdoc"===b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:
1429 b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=C.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function oa(a,b){if("srcdoc"===b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:
1430 "a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function xa(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function ya(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=xa(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=ya;b.push({priority:100,compile:function(a,b){var e=
1430 "a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function xa(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function ya(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=xa(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=ya;b.push({priority:100,compile:function(a,b){var e=
1431 p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=oa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",za(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&
1431 p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=oa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",za(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&
1432 f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function pa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=C.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));
1432 f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function pa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=C.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));
1433 for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Aa(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ba(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,za(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&&!dc(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Jb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,
1433 for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Aa(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ba(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,za(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&&!dc(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Jb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,
1434 I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(A(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];A(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Jb(tc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:dc;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=
1434 I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(A(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];A(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Jb(tc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:dc;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=
1435 b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Jb(tc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t,function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,
1435 b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Jb(tc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t,function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,
1436 b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=C.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:wa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=sd(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=sd(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=
1436 b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=C.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:wa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=sd(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=sd(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=
1437 ld(this.$$element[0],a),g=td[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Vc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||z(b)?this.$$element.removeAttr(e):Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,
1437 ld(this.$$element[0],a),g=td[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Vc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||z(b)?this.$$element.removeAttr(e):Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,
1438 d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||z(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra=/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,
1438 d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||z(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra=/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,
1439 "ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return C.document.createComment(c)};return da}]}function Jb(a,b){this.previousValue=a;this.currentValue=b}function wa(a){return a.replace(pd,"").replace(Eg,function(a,d,c){return c?d.toUpperCase():d})}function sd(a,b){var d=
1439 "ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return C.document.createComment(c)};return da}]}function Jb(a,b){this.previousValue=a;this.currentValue=b}function wa(a){return a.replace(pd,"").replace(Eg,function(a,d,c){return c?d.toUpperCase():d})}function sd(a,b){var d=
1440 "",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function rd(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Fg.call(a,b,1)}return a}function Bg(a,b){if(b&&A(b))return b;if(A(a)){var d=ud.exec(a);if(d)return d[3]}}function Ff(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,
1440 "",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function rd(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Fg.call(a,b,1)}return a}function Bg(a,b){if(b&&A(b))return b;if(A(a)){var d=ud.exec(a);if(d)return d[3]}}function Ff(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,
1441 "controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&A(g)&&(l=g);if(A(c)){g=c.match(ud);if(!g)throw vd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ge(e.$scope,h,!0);if(!c)throw vd("ctrlreg",h);sb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);
1441 "controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&A(g)&&(l=g);if(A(c)){g=c.match(ud);if(!g)throw vd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ge(e.$scope,h,!0);if(!c)throw vd("ctrlreg",h);sb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);
1442 a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Gf(){this.$get=["$window",function(a){return x(a.document)}]}function Hf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function If(){this.$get=["$log",function(a){return function(b,
1442 a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Gf(){this.$get=["$window",function(a){return x(a.document)}]}function Hf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function If(){this.$get=["$log",function(a){return function(b,
1443 d){a.error.apply(a,arguments)}}]}function uc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Of(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||z(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(uc(a)))}):b.push(ba(c)+"="+ba(uc(a))))});return b.join("&")}}}function Pf(){this.$get=function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):
1443 d){a.error.apply(a,arguments)}}]}function uc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Of(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||z(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(uc(a)))}):b.push(ba(c)+"="+ba(uc(a))))});return b.join("&")}}}function Pf(){this.$get=function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):
1444 (B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(A(a)){var d=a.replace(Gg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(wd),e;(e=c)||(e=(e=d.match(Hg))&&Ig[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function xd(a){var b=T(),d;A(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(U(a.substr(0,d)));a=U(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&
1444 (B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(A(a)){var d=a.replace(Gg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(wd),e;(e=c)||(e=(e=d.match(Hg))&&Ig[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function xd(a){var b=T(),d;A(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(U(a.substr(0,d)));a=U(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&
1445 r(a,function(a,d){var f=K(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function yd(a){var b;return function(d){b||(b=xd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function zd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Nf(){var a=this.defaults={transformResponse:[vc],transformRequest:[function(a){return D(a)&&"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
1445 r(a,function(a,d){var f=K(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function yd(a){var b;return function(d){b||(b=xd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function zd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Nf(){var a=this.defaults={transformResponse:[vc],transformRequest:[function(a){return D(a)&&"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
1446 post:ja(wc),put:ja(wc),patch:ja(wc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];
1446 post:ja(wc),put:ja(wc),patch:ja(wc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];
1447 a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=zd(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!A(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},
1447 a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=zd(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!A(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},
1448 b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=ub(g.method);g.paramSerializer=A(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});
1448 b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=ub(g.method);g.paramSerializer=A(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});
1449 b=c(b,h);b=b.then(function(b){var c=b.headers,d=zd(b.data,yd(c),void 0,b.transformRequest);z(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});z(b.withCredentials)&&!z(a.withCredentials)&&(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,
1449 b=c(b,h);b=b.then(function(b){var c=b.headers,d=zd(b.data,yd(c),void 0,b.transformRequest);z(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});z(b.withCredentials)&&!z(a.withCredentials)&&(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,
1450 c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,xd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?L.resolve:L.reject)({data:a,status:b,headers:yd(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),
1450 c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,xd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?L.resolve:L.reject)({data:a,status:b,headers:yd(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),
1451 O=c.url;x?O=p.getTrustedResourceUrl(O):A(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));z(q)&&((q=jc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=
1451 O=c.url;x?O=p.getTrustedResourceUrl(O):A(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));z(q)&&((q=jc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=
1452 q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")?"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Kb("badjsonp",a);c=gc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Kb("badjsonp",a);if(d===b)throw Kb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=A(a.paramSerializer)?m.get(a.paramSerializer):
1452 q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")?"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Kb("badjsonp",a);c=gc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Kb("badjsonp",a);if(d===b)throw Kb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=A(a.paramSerializer)?m.get(a.paramSerializer):
1453 a.paramSerializer;var v=[];r(d,function(a){v.unshift(A(a)?m.get(a):m.invoke(a))});var jc=Jg(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]=function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Rf(){this.$get=function(){return function(){return new C.XMLHttpRequest}}}function Qf(){this.$get=
1453 a.paramSerializer;var v=[];r(d,function(a){v.unshift(A(a)?m.get(a):m.invoke(a))});var jc=Jg(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]=function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Rf(){this.$get=function(){return function(){return new C.XMLHttpRequest}}}function Qf(){this.$get=
1454 ["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Kg(a,c,a.defer,b,d[0])}]}function Kg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",
1454 ["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Kg(a,c,a.defer,b,d[0])}]}function Kg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",
1455 m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;qa&&qa();y&&y.abort()}function v(a,b,c,e,f,g){w(P)&&d.cancel(P);qa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),qa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||
1455 m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;qa&&qa();y&&y.abort()}function v(a,b,c,e,f,g){w(P)&&d.cancel(P);qa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),qa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||
1456 "",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")};y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==
1456 "",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")};y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==
1457 s)throw I;}y.send(z(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Kf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}
1457 s)throw I;}y.send(z(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Kf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}
1458 function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:ic(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length||-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),
1458 function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:ic(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length||-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),
1459 M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b=0,c=I.length;b<c;b++){if(p&&z(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,
1459 M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b=0,c=I.length;b<c;b++){if(p&&z(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,
1460 b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Lf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Lg("badprom");
1460 b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Lf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Lg("badprom");
1461 if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled");c(a);return!0};return e}]}function Mf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);
1461 if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled");c(a);return!0};return e}]}function Mf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);
1462 0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Ad(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Mg[d.protocol]||null}function Bd(a,b,d){if(Ng.test(a))throw jb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=gc(a.search);
1462 0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Ad(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Mg[d.protocol]||null}function Bd(a,b,d){if(Ng.test(a))throw jb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=gc(a.search);
1463 b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function xa(a,b){if(xc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=xa(b,a);if(!A(d))throw jb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};
1463 b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function xa(a,b){if(xc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=xa(b,a);if(!A(d))throw jb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};
1464 this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=xa(a,c))?(g=f,g=d&&w(f=xa(d,f))?b+(xa("/",f)||f):a+g):w(f=xa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=xa(a,c)||xa(b,c),f;z(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",z(e)&&(a=c,this.replace())):(f=xa(d,e),z(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?
1464 this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=xa(a,c))?(g=f,g=d&&w(f=xa(d,f))?b+(xa("/",f)||f):a+g):w(f=xa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=xa(a,c)||xa(b,c),f;z(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",z(e)&&(a=c,this.replace())):(f=xa(d,e),z(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?
1465 f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Cd(a,b,d){this.$$html5=!0;zc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=xa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Lb(a){return function(){return this[a]}}function Dd(a,
1465 f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Cd(a,b,d){this.$$html5=!0;zc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=xa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Lb(a){return function(){return this[a]}}function Dd(a,
1466 b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Tf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||A(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer",
1466 b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Tf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||A(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer",
1467 "$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw jb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?yc:Cd}else s=Da(n),p=zc;var r=s.substr(0,
1467 "$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw jb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?yc:Cd}else s=Da(n),p=zc;var r=s.substr(0,
1468 Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!A(e)||!z(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||
1468 Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!A(e)||!z(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||
1469 a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){xc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=
1469 a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){xc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=
1470 !1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Uf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&&
1470 !1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Uf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&&
1471 f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,
1471 f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,
1472 arguments)}}()}}]}function Og(a){return a+""}function Pg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Qg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Fd:b}function Z(a,b,d){var c,e,f=a.isPure=Qg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,
1472 arguments)}}()}}]}function Og(a){return a+""}function Pg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Qg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Fd:b}function Z(a,b,d){var c,e,f=a.isPure=Qg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,
1473 b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,
1473 b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,
1474 b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,
1474 b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,
1475 a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,
1475 a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,
1476 a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Gd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Hd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}
1476 a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Gd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Hd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}
1477 function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return B(a.valueOf)?a.valueOf():Rg.call(a)}function Vf(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Nb(G),
1477 function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return B(a.valueOf)?a.valueOf():Rg.call(a)}function Vf(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Nb(G),
1478 d=(new Mb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Ac(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Ac(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=
1478 d=(new Mb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Ac(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Ac(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=
1479 !1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Ac(k)}b&&(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}
1479 !1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Ac(k)}b&&(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}
1480 function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant?a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=
1480 function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant?a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=
1481 b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs?a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Fd?function(b){return a(b)}:a})));return p(d)}var G={csp:Aa().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Nb(G);return(new Mb(b,e,G)).getAst(a).ast};return f}]}function Xf(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Ld(function(a){b.$evalAsync(a)},
1481 b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs?a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Fd?function(b){return a(b)}:a})));return p(d)}var G={csp:Aa().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Nb(G);return(new Mb(b,e,G)).getAst(a).ast};return f}]}function Xf(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Ld(function(a){b.$evalAsync(a)},
1482 d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Yf(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Ld(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Ld(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&
1482 d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Yf(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Ld(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Ld(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&
1483 x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):z(c)?"undefined":"string"!==typeof c?Ie(c,void 0):c);cc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=
1483 x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):z(c)?"undefined":"string"!==typeof c?Ie(c,void 0):c);cc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=
1484 !0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f,p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,
1484 !0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f,p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,
1485 b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c,d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,
1485 b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c,d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,
1486 d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b}var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(z(a)&&z(b)&&z(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},
1486 d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b}var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(z(a)&&z(b)&&z(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},
1487 b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c=0,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function hg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
1487 b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c=0,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function hg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
1488 a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function Wf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++pb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=
1488 a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function Wf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++pb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=
1489 function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===Ca&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++pb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=
1489 function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===Ca&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++pb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=
1490 this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},
1490 this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},
1491 null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l=
1491 null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l=
1492 {fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l);k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=
1492 {fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l);k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=
1493 !1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a,b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!z(e)){if(D(e))if(ya(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,
1493 !1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a,b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!z(e)){if(D(e))if(ya(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,
1494 b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(ya(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,
1494 b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(ya(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,
1495 g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],z,A;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e),t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{A=w[n],l=A.fn,l(A.scope,A.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):X(g)&&X(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(z=4-r,N[z]||
1495 g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],z,A;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e),t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{A=w[n],l=A.fn,l(A.scope,A.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):X(g)&&X(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(z=4-r,N[z]||
1496 (N[z]=[]),N[z].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},
1496 (N[z]=[]),N[z].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},
1497 $resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=
1497 $resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=
1498 this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=
1498 this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=
1499 null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=
1499 null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=
1500 !0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,
1500 !0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,
1501 1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Le(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;
1501 1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Le(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;
1502 this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Sg(a){if("self"===a)return a;if(A(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Md(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");
1502 this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Sg(a){if("self"===a)return a;if(A(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Md(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");
1503 }function Nd(a){var b=[];w(a)&&r(a,function(a){b.push(Sg(a))});return b}function $f(){this.SCE_CONTEXTS=V;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=Nd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=Nd(a));return b};this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Bc(b,Od))||(C.document.baseURI?c=C.document.baseURI:(Na||(Na=C.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),
1503 }function Nd(a){var b=[];w(a)&&r(a,function(a){b.push(Sg(a))});return b}function $f(){this.SCE_CONTEXTS=V;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=Nd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=Nd(a));return b};this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Bc(b,Od))||(C.document.baseURI?c=C.document.baseURI:(Na||(Na=C.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),
1504 c=Bc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[V.HTML]=f(k);h[V.CSS]=f(k);h[V.MEDIA_URL]=f(k);h[V.URL]=f(h[V.MEDIA_URL]);h[V.JS]=f(k);h[V.RESOURCE_URL]=
1504 c=Bc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[V.HTML]=f(k);h[V.CSS]=f(k);h[V.MEDIA_URL]=f(k);h[V.URL]=f(h[V.MEDIA_URL]);h[V.JS]=f(k);h[V.RESOURCE_URL]=
1505 f(h[V.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||z(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||z(f)||""===f)return f;var k=h.hasOwnProperty(d)?h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===V.MEDIA_URL||d===V.URL)return c(f.toString(),d===V.MEDIA_URL);if(d===V.RESOURCE_URL){var k=
1505 f(h[V.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||z(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||z(f)||""===f)return f;var k=h.hasOwnProperty(d)?h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===V.MEDIA_URL||d===V.URL)return c(f.toString(),d===V.MEDIA_URL);if(d===V.RESOURCE_URL){var k=
1506 ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===V.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue():a}}}]}function Zf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ca)throw Ea("iequirks");var c=ja(V);c.isEnabled=function(){return a};
1506 ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===V.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue():a}}}]}function Zf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ca)throw Ea("iequirks");var c=ja(V);c.isEnabled=function(){return a};
1507 c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(V,function(a,b){var d=K(b);c[("parse_as_"+d).replace(Cc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Cc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Cc,wb)]=function(b){return g(a,b)}});
1507 c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(V,function(a,b){var d=K(b);c[("parse_as_"+d).replace(Cc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Cc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Cc,wb)]=function(b){return g(a,b)}});
1508 return c}]}function ag(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||
1508 return c}]}function ag(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||
1509 4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Aa(),transitions:h,animations:l,android:e}}]}function bg(){this.$get=ia(function(a){return new Tg(a)})}function Tg(a){function b(){var a=e.pop();return a&&a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,
1509 4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Aa(),transitions:h,animations:l,android:e}}]}function bg(){this.$get=ia(function(a){return new Tg(a)})}function Tg(a){function b(){var a=e.pop();return a&&a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,
1510 h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):a()}}function dg(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!A(k)||
1510 h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):a()}}function dg(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!A(k)||
1511 z(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},function(a){h||(a=Ug("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function eg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,
1511 z(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},function(a){h||(a=Ug("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function eg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,
1512 b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Md(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},
1512 b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Md(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},
1513 whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function fg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r;r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw Vg("badprom");
1513 whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function fg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r;r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw Vg("badprom");
1514 if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!A(a))return a;Ca&&(aa.setAttribute("href",a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!Wg&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,
1514 if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!A(a))return a;Ca&&(aa.setAttribute("href",a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!Wg&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,
1515 ""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Jg(a){var b=[Od].concat(a.map(ga));return function(a){a=ga(a);return b.some(Bc.bind(null,a))}}function Bc(a,b){a=ga(a);b=ga(b);return a.protocol===b.protocol&&a.host===b.host}function gg(){this.$get=ia(C)}function Pd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=
1515 ""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Jg(a){var b=[Od].concat(a.map(ga));return function(a){a=ga(a);return b.some(Bc.bind(null,a))}}function Bc(a,b){a=ga(a);b=ga(b);return a.protocol===b.protocol&&a.host===b.host}function gg(){this.$get=ia(C)}function Pd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=
1516 e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),z(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function kg(){this.$get=Pd}function dd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Qd);b("date",Rd);b("filter",Xg);b("json",Yg);b("limitTo",Zg);b("lowercase",$g);b("number",Sd);b("orderBy",
1516 e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),z(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function kg(){this.$get=Pd}function dd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Qd);b("date",Rd);b("filter",Xg);b("json",Yg);b("limitTo",Zg);b("lowercase",$g);b("number",Sd);b("orderBy",
1517 Td);b("uppercase",ah)}function Xg(){return function(a,b,d,c){if(!ya(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Dc(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=bh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,b)}}function bh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(z(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!bc(a))return!1;a=K(""+a);b=K(""+
1517 Td);b("uppercase",ah)}function Xg(){return function(a,b,d,c){if(!ya(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Dc(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=bh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,b)}}function bh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(z(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!bc(a))return!1;a=K(""+a);b=K(""+
1518 b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Dc(a),k=Dc(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&&"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!z(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,
1518 b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Dc(a),k=Dc(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&&"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!z(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,
1519 b);case "function":return!1;default:return d(a,b)}}function Dc(a){return null===a?"null":typeof a}function Qd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){z(c)&&(c=b.CURRENCY_SYM);z(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Ud(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f,c)}}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Ud(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function ch(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Vd))&&
1519 b);case "function":return!1;default:return d(a,b)}}function Dc(a){return null===a?"null":typeof a}function Qd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){z(c)&&(c=b.CURRENCY_SYM);z(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Ud(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f,c)}}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Ud(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function ch(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Vd))&&
1520 (a=a.replace(Vd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Ec;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Ec;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function dh(a,b,d,c){var e=a.d,f=e.length-a.i;b=z(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=
1520 (a=a.replace(Vd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Ec;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Ec;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function dh(a,b,d,c){var e=a.d,f=e.length-a.i;b=z(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=
1521 1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Ud(a,b,d,c,e){if(!A(a)&&!W(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=ch(k);dh(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},
1521 1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Ud(a,b,d,c,e){if(!A(a)&&!W(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=ch(k);dh(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},
1522 !0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+h+b.posSuf}function Ob(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Ec+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,
1522 !0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+h+b.posSuf}function Ob(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Ec+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,
1523 b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Ob(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Fc(a,b){return 0>=
1523 b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Ob(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Fc(a,b){return 0>=
1524 a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,
1524 a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,
1525 d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;A(c)&&(c=eh.test(c)?fa(c):b(c));W(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=fh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));r(k,function(b){h=gh[b];g+=h?h(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Yg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Zg(){return function(a,
1525 d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;A(c)&&(c=eh.test(c)?fa(c):b(c));W(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=fh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));r(k,function(b){h=gh[b];g+=h?h(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Yg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Zg(){return function(a,
1526 b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(X(b))return a;W(a)&&(a=a.toString());if(!ya(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Gc(a,d,d+b):0===d?Gc(a,b,a.length):Gc(a,Math.max(0,d+b),d)}}function Gc(a,b,d){return A(a)?a.slice(b,d):Ha.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=Ta;if(B(b))d=b;else if(A(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=
1526 b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(X(b))return a;W(a)&&(a=a.toString());if(!ya(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Gc(a,d,d+b):0===d?Gc(a,b,a.length):Gc(a,Math.max(0,d+b),d)}}function Gc(a,b,d){return A(a)?a.slice(b,d):Ha.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=Ta;if(B(b))d=b;else if(A(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=
1527 d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!ya(a))throw F("orderBy")("notarray",
1527 d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!ya(a))throw F("orderBy")("notarray",
1528 a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a;bc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*
1528 a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a;bc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*
1529 h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Pb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name||b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=lb;this.$$element=a;this.$$animate=c;Zd(this)}function Zd(a){a.$$classCache=
1529 h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Pb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name||b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=lb;this.$$element=a;this.$$animate=c;Zd(this)}function Zd(a){a.$$classCache=
1530 {};a.$$classCache[$d]=!(a.$$classCache[mb]=a.$$element.hasClass(mb))}function ae(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Vc(c,"-"):"";b(a,mb+c,!0===d);b(a,$d+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){z(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,
1530 {};a.$$classCache[$d]=!(a.$$classCache[mb]=a.$$element.hasClass(mb))}function ae(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Vc(c,"-"):"";b(a,mb+c,!0===d);b(a,$d+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){z(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,
1531 a,k),be(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid=be(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,
1531 a,k),be(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid=be(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,
1532 g,this)}}function be(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Hc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate",function(a){if(z(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&
1532 g,this)}}function be(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Hc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate",function(a){if(z(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&
1533 "false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,
1533 "false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,
1534 c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Qb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(A(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(hh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),
1534 c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Qb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(A(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(hh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),
1535 ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function nb(a,b,d,c){return function(e,f,g,k,h,l,m,p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Sc(b,ec(v)));var e=d(a,
1535 ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function nb(a,b,d,c){return function(e,f,g,k,h,l,m,p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Sc(b,ec(v)));var e=d(a,
1536 b);!isNaN(e)&&c&&(e=fc(e,c));return e}Ic(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw ob("datefmt",a);if(n(a)){q=a;var b=k.$options.getOption("timezone");b&&(v=b,q=fc(q,b,!0));var d=c;t&&A(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,
1536 b);!isNaN(e)&&c&&(e=fc(e,c));return e}Ic(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw ob("datefmt",a);if(n(a)){q=a;var b=k.$options.getOption("timezone");b&&(v=b,q=fc(q,b,!0));var d=c;t&&A(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,
1537 d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),B=s(x);k.$validators.min=function(a){return!n(a)||z(B)||d(a)>=B};g.$observe("min",function(a){a!==x&&(B=s(a),x=a,k.$validate())})}if(w(g.max)||g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||z(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Ic(a,b,d,
1537 d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),B=s(x);k.$validators.min=function(a){return!n(a)||z(B)||d(a)>=B};g.$observe("min",function(a){a!==x&&(B=s(a),x=a,k.$validate())})}if(w(g.max)||g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||z(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Ic(a,b,d,
1538 c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function de(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(ih.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!W(b))throw ob("numfmt",b);b=b.toString()}return b})}function na(a){w(a)&&!W(a)&&(a=parseFloat(a));return X(a)?void 0:a}function Jc(a){var b=a.toString(),
1538 c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function de(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(ih.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!W(b))throw ob("numfmt",b);b=b.toString()}return b})}function na(a){w(a)&&!W(a)&&(a=parseFloat(a));return X(a)?void 0:a}function Jc(a){var b=a.toString(),
1539 d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Jc(a):0,k=e?Jc(b):0,h=f?Jc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function fe(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw ob("constexpr",d,c);return a(b)}return e}function Kc(a,b){function d(a,b){if(!a||!a.length)return[];
1539 d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Jc(a):0,k=e?Jc(b):0,h=f?Jc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function fe(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw ob("constexpr",d,c);return a(b)}return e}function Kc(a,b){function d(a,b){if(!a||!a.length)return[];
1540 if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):A(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g,k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===
1540 if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):A(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g,k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===
1541 b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1),c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function qd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,
1541 b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1),c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function qd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,
1542 c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Rb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=
1542 c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Rb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=
1543 void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=lb;this.$options=Sb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce=null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;
1543 void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=lb;this.$options=Sb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce=null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;
1544 this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;Zd(this);jh(this)}function jh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Lc(a){this.$$options=a}function ge(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})}function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function he(a,b,d){if(a){A(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",
1544 this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;Zd(this);jh(this)}function jh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Lc(a){this.$$options=a}function ge(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})}function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function he(a,b,d){if(a){A(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",
1545 b,a,za(d));return a}}function Tb(a){a=fa(a);return X(a)?-1:a}var Wb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ie=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return A(a)?a.toLowerCase():a},ub=function(a){return A(a)?a.toUpperCase():a},Ca,x,rb,Ha=[].slice,Fg=[].splice,kh=[].push,la=Object.prototype.toString,Pc=Object.getPrototypeOf,pa=F("ng"),ca=C.angular||(C.angular={}),kc,pb=0;Ca=C.document.documentMode;var X=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=
1545 b,a,za(d));return a}}function Tb(a){a=fa(a);return X(a)?-1:a}var Wb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ie=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return A(a)?a.toLowerCase():a},ub=function(a){return A(a)?a.toUpperCase():a},Ca,x,rb,Ha=[].slice,Fg=[].splice,kh=[].push,la=Object.prototype.toString,Pc=Object.getPrototypeOf,pa=F("ng"),ca=C.angular||(C.angular={}),kc,pb=0;Ca=C.document.documentMode;var X=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=
1546 [];var ve=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,U=function(a){return A(a)?a.trim():a},Md=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Aa=function(){if(!w(Aa.rules)){var a=C.document.querySelector("[ng-csp]")||C.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Aa.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==
1546 [];var ve=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,U=function(a){return A(a)?a.trim():a},Md=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Aa=function(){if(!w(Aa.rules)){var a=C.document.querySelector("[ng-csp]")||C.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Aa.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==
1547 b.indexOf("no-inline-style")}}else{a=Aa;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Aa.rules},qb=function(){if(w(qb.name_))return qb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=C.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return qb.name_=e},xe=/:/g,Qa=["ng-","data-ng-","ng:","x-ng-"],Be=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof C.HTMLScriptElement||b instanceof C.SVGScriptElement))return!1;
1547 b.indexOf("no-inline-style")}}else{a=Aa;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Aa.rules},qb=function(){if(w(qb.name_))return qb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=C.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return qb.name_=e},xe=/:/g,Qa=["ng-","data-ng-","ng:","x-ng-"],Be=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof C.HTMLScriptElement||b instanceof C.SVGScriptElement))return!1;
1548 b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(C.document),Ee=/[A-Z]/g,Wc=!1,Pa=3,Ke={full:"1.7.7",major:1,minor:7,dot:7,codeName:"kingly-exiting"};Y.expando="ng339";var Ka=Y.cache={},pg=
1548 b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(C.document),Ee=/[A-Z]/g,Wc=!1,Pa=3,Ke={full:"1.7.7",major:1,minor:7,dot:7,codeName:"kingly-exiting"};Y.expando="ng339";var Ka=Y.cache={},pg=
1549 1;Y._data=function(a){return this.cache[a[this.expando]]||{}};var lg=/-([a-z])/g,lh=/^-ms-/,Ab={mouseleave:"mouseout",mouseenter:"mouseover"},nc=F("jqLite"),og=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,mc=/<|&#?\w+;/,mg=/<([\w:-]+)/,ng=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oa={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>",
1549 1;Y._data=function(a){return this.cache[a[this.expando]]||{}};var lg=/-([a-z])/g,lh=/^-ms-/,Ab={mouseleave:"mouseout",mouseenter:"mouseover"},nc=F("jqLite"),og=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,mc=/<|&#?\w+;/,mg=/<([\w:-]+)/,ng=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oa={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>",
1550 "</tr></tbody></table>"],_default:[0,"",""]};oa.optgroup=oa.option;oa.tbody=oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;var ug=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=Y.prototype={ready:fd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:kh,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "),
1550 "</tr></tbody></table>"],_default:[0,"",""]};oa.optgroup=oa.option;oa.tbody=oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;var ug=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=Y.prototype={ready:fd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:kh,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "),
1551 function(a){Gb[K(a)]=a});var md={};r("input select option textarea button form details".split(" "),function(a){md[a]=!0});var td={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:rc,removeData:qc,hasData:function(a){for(var b in Ka[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)qc(a[b]),id(a[b])}},function(a,b){Y[b]=a});r({data:rc,inheritedData:Eb,scope:function(a){return x.data(a,"$scope")||Eb(a.parentNode||
1551 function(a){Gb[K(a)]=a});var md={};r("input select option textarea button form details".split(" "),function(a){md[a]=!0});var td={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:rc,removeData:qc,hasData:function(a){for(var b in Ka[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)qc(a[b]),id(a[b])}},function(a,b){Y[b]=a});r({data:rc,inheritedData:Eb,scope:function(a){return x.data(a,"$scope")||Eb(a.parentNode||
1552 a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:jd,injector:function(a){return Eb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Bb,css:function(a,b,d){b=xb(b.replace(lh,"ms-"));if(w(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Gb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,
1552 a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:jd,injector:function(a){return Eb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Bb,css:function(a,b,d){b=xb(b.replace(lh,"ms-"));if(w(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Gb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,
1553 e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(z(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(z(b)){if(a.multiple&&"select"===ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(z(b))return a.innerHTML;yb(a,!0);a.innerHTML=b},
1553 e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(z(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(z(b)){if(a.multiple&&"select"===ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(z(b))return a.innerHTML;yb(a,!0);a.innerHTML=b},
1554 empty:kd},function(a,b){Y.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==kd&&z(2===a.length&&a!==Bb&&a!==jd?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===rc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=z(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});r({removeData:qc,on:function(a,b,d,c){if(w(c))throw nc("onargs");if(lc(a)){c=zb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=rg(a,e));c=0<=b.indexOf(" ")?
1554 empty:kd},function(a,b){Y.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==kd&&z(2===a.length&&a!==Bb&&a!==jd?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===rc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=z(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});r({removeData:qc,on:function(a,b,d,c){if(w(c))throw nc("onargs");if(lc(a)){c=zb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=rg(a,e));c=0<=b.indexOf(" ")?
1555 b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Ab[b]?(k(Ab[b],tg),k(b,void 0,!0)):k(b)}},off:id,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;yb(a);r(new Y(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===
1555 b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Ab[b]?(k(Ab[b],tg),k(b,void 0,!0)):k(b)}},off:id,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;yb(a);r(new Y(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===
1556 a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new Y(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new Y(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Fb,detach:function(a){Fb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;
1556 a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new Y(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new Y(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Fb,detach:function(a){Fb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;
1557 if(c){b=new Y(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Db,removeClass:Cb,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;z(e)&&(e=!Bb(a,b));(e?Db:Cb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:pc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=zb(a);if(g=(g=g&&g.events)&&
1557 if(c){b=new Y(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Db,removeClass:Cb,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;z(e)&&(e=!Bb(a,b));(e?Db:Cb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:pc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=zb(a);if(g=(g=g&&g.events)&&
1558 g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c,b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){Y.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<
1558 g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c,b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){Y.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<
1559 k;g++)z(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):oc(f,a(this[g],b,c,e));return w(f)?f:this}});Y.prototype.bind=Y.prototype.on;Y.prototype.unbind=Y.prototype.off;var mh=Object.create(null);nd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return X(a)?mh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},
1559 k;g++)z(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):oc(f,a(this[g],b,c,e));return w(f)?f:this}});Y.prototype.bind=Y.prototype.on;Y.prototype.unbind=Y.prototype.off;var mh=Object.create(null);nd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return X(a)?mh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},
1560 set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Hb=nd,jg=[function(){this.$get=[function(){return Hb}]}],wg=/^([^(]+?)=>/,xg=/^[^(]*\(\s*([^)]*)\)/m,nh=/,/,oh=/^\s*(_?)(\S+?)\1\s*$/,vg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=F("$injector");
1560 set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Hb=nd,jg=[function(){this.$get=[function(){return Hb}]}],wg=/^([^(]+?)=>/,xg=/^[^(]*\(\s*([^)]*)\)/m,nh=/,/,oh=/^\s*(_?)(\S+?)\1\s*$/,vg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=F("$injector");
1561 fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw A(d)&&d||(d=a.name||yg(a)),Ba("strictdi",d);b=od(a);r(b[1].split(nh),function(a){a.replace(oh,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var je=F("$animate"),zf=function(){this.$get=E},Af=function(){var a=new Hb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=A(b)?b.split(" "):
1561 fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw A(d)&&d||(d=a.name||yg(a)),Ba("strictdi",d);b=od(a);r(b[1].split(nh),function(a){a.replace(oh,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var je=F("$animate"),zf=function(){this.$get=E},Af=function(){var a=new Hb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=A(b)?b.split(" "):
1562 H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=zg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),
1562 H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=zg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),
1563 k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},xf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw je("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?
1563 k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},xf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw je("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?
1564 a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,je("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,
1564 a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,je("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,
1565 "enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=hb(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=hb(d.removeClass,c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=hb(f.addClass,c);f.removeClass=hb(f.removeClass,d);return a.push(b,"setClass",
1565 "enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=hb(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=hb(d.removeClass,c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=hb(f.addClass,c);f.removeClass=hb(f.removeClass,d);return a.push(b,"setClass",
1566 f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=hb(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Cf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Bf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,
1566 f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=hb(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Cf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Bf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,
1567 b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})};f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=
1567 b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})};f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=
1568 this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},
1568 this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},
1569 complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},yf=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||
1569 complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},yf=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||
1570 h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),tc=new function(){};Xc.$inject=["$provide","$$sanitizeUriProvider"];Jb.prototype.isFirstChange=function(){return this.previousValue===tc};var pd=/^((?:x|data)[:\-_])/i,Eg=/[:\-_]+(.)/g,vd=F("$controller"),ud=/^(\S+)(\s+as\s+([\w$]+))?$/,Jf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&
1570 h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),tc=new function(){};Xc.$inject=["$provide","$$sanitizeUriProvider"];Jb.prototype.isFirstChange=function(){return this.previousValue===tc};var pd=/^((?:x|data)[:\-_])/i,Eg=/[:\-_]+(.)/g,vd=F("$controller"),ud=/^(\S+)(\s+as\s+([\w$]+))?$/,Jf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&
1571 b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},wd="application/json",wc={"Content-Type":wd+";charset=utf-8"},Hg=/^\[|^\{(?!\{)/,Ig={"[":/]$/,"{":/}$/},Gg=/^\)]\}',?\n/,Kb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())};var Lg=F("$interval"),Sf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,
1571 b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},wd="application/json",wc={"Content-Type":wd+";charset=utf-8"},Hg=/^\[|^\{(?!\{)/,Ig={"[":/]$/,"{":/}$/},Gg=/^\)]\}',?\n/,Kb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())};var Lg=F("$interval"),Sf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,
1572 d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},ph=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Mg={http:80,https:443,ftp:21},jb=F("$location"),Ng=/^\s*[\\/]{2,}/,qh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=ye(this.$$search),b=b?
1572 d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},ph=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Mg={http:80,https:443,ftp:21},jb=F("$location"),Ng=/^\s*[\\/]{2,}/,qh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=ye(this.$$search),b=b?
1573 "#"+hc(b):"",a=a.split("/"),c=a.length;c--;)a[c]=hc(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Lb("$$absUrl"),url:function(a){if(z(a))return this.$$url;var b=ph.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Lb("$$protocol"),host:Lb("$$host"),port:Lb("$$port"),path:Dd("$$path",function(a){a=null!==
1573 "#"+hc(b):"",a=a.split("/"),c=a.length;c--;)a[c]=hc(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Lb("$$absUrl"),url:function(a){if(z(a))return this.$$url;var b=ph.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Lb("$$protocol"),host:Lb("$$host"),port:Lb("$$port"),path:Dd("$$path",function(a){a=null!==
1574 a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(A(a)||W(a))a=a.toString(),this.$$search=gc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw jb("isrcharg");break;default:z(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:Dd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};
1574 a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(A(a)||W(a))a=a.toString(),this.$$search=gc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw jb("isrcharg");break;default:z(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:Dd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};
1575 r([Cd,zc,yc],function(a){a.prototype=Object.create(qh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==yc||!this.$$html5)throw jb("nostate");this.$$state=z(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Rg={}.constructor.prototype.valueOf,Ub=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var rh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb,
1575 r([Cd,zc,yc],function(a){a.prototype=Object.create(qh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==yc||!this.$$html5)throw jb("nostate");this.$$state=z(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Rg={}.constructor.prototype.valueOf,Ub=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var rh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb,
1576 lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Ub[b],e=Ub[d];Ub[a]||
1576 lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Ub[b],e=Ub[d];Ub[a]||
1577 c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?
1577 c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?
1578 this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):
1578 this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):
1579 (a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<
1579 (a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<
1580 this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<
1580 this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<
1581 this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,
1581 this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,
1582 16))):d+=rh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression="ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";
1582 16))):d+=rh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression="ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";
1583 q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},
1583 q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},
1584 program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Hd(a))throw Ya("lval");
1584 program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Hd(a))throw Ya("lval");
1585 a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a=
1585 a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a=
1586 {type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,
1586 {type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,
1587 operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?
1587 operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?
1588 a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):
1588 a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):
1589 "["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))
1589 "["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))
1590 }return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;
1590 }return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;
1591 b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");
1591 b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");
1592 return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,
1592 return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,
1593 e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Fd=2;Jd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Id(a))this.state.computing=
1593 e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Fd=2;Jd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Id(a))this.state.computing=
1594 "assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+
1594 "assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+
1595 d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Og,Pg,Ed);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,
1595 d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Og,Pg,Ed);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,
1596 b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,
1596 b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,
1597 this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,
1597 this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,
1598 void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,
1598 void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,
1599 b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",
1599 b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",
1600 a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,
1600 a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,
1601 a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?
1601 a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?
1602 void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,
1602 void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,
1603 a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:
1603 a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:
1604 h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,
1604 h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,
1605 b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},
1605 b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},
1606 not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=
1606 not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=
1607 this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(A(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(W(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,
1607 this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(A(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(W(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,
1608 b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=
1608 b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=
1609 d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),
1609 d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),
1610 this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),
1610 this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),
1611 a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b?{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=
1611 a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b?{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=
1612 c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,
1612 c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,
1613 c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,
1613 c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,
1614 e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Ed(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,
1614 e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Ed(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,
1615 e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,
1615 e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,
1616 e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=
1616 e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=
1617 a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:
1617 a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:
1618 e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b=
1618 e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b=
1619 this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var Ea=F("$sce"),V={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",
1619 this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var Ea=F("$sce"),V={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",
1620 JS:"js"},Cc=/_([a-z])/g,Ug=F("$templateRequest"),Vg=F("$timeout"),aa=C.document.createElement("a"),Od=ga(C.location.href),Na;aa.href="http://[::1]";var Wg="[::1]"===aa.hostname;Pd.$inject=["$document"];dd.$inject=["$provide"];var Wd=22,Vd=".",Ec="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var gh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:kb("Month",!1,!0),dd:ea("Date",2),
1620 JS:"js"},Cc=/_([a-z])/g,Ug=F("$templateRequest"),Vg=F("$timeout"),aa=C.document.createElement("a"),Od=ga(C.location.href),Na;aa.href="http://[::1]";var Wg="[::1]"===aa.hostname;Pd.$inject=["$document"];dd.$inject=["$provide"];var Wd=22,Vd=".",Ec="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var gh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:kb("Month",!1,!0),dd:ea("Date",2),
1621 d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ob(Math[0<a?"floor":"ceil"](a/60),2)+Ob(Math.abs(a%60),2))},ww:Yd(2),w:Yd(1),G:Fc,GG:Fc,GGG:Fc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},
1621 d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ob(Math[0<a?"floor":"ceil"](a/60),2)+Ob(Math.abs(a%60),2))},ww:Yd(2),w:Yd(1),G:Fc,GG:Fc,GGG:Fc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},
1622 fh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,eh=/^-?\d+$/;Rd.$inject=["$locale"];var $g=ia(K),ah=ia(ub);Td.$inject=["$parse"];var Me=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c],
1622 fh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,eh=/^-?\d+$/;Rd.$inject=["$locale"];var $g=ia(K),ah=ia(ub);Td.$inject=["$parse"];var Me=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c],
1623 function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(td,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ie))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=wa("ng-"+a);vb[b]=
1623 function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(td,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ie))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=wa("ng-"+a);vb[b]=
1624 ["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),Ca&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var lb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Pb.$inject=
1624 ["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),Ca&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var lb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Pb.$inject=
1625 ["$element","$attrs","$scope","$animate","$interpolate"];Pb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&
1625 ["$element","$attrs","$scope","$animate","$interpolate"];Pb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&
1626 this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=lb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,
1626 this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=lb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,
1627 Za,Vb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==lb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ae({clazz:Pb,set:function(a,
1627 Za,Vb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==lb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ae({clazz:Pb,set:function(a,
1628 b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var ke=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Pb,compile:function(d,f){d.addClass(Za).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();
1628 b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var ke=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Pb,compile:function(d,f){d.addClass(Za).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();
1629 p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,lb)})}}}}}]},Ne=ke(),Ze=ke(!0),hh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,
1629 p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,lb)})}}}}}]},Ne=ke(),Ze=ke(!0),hh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,
1630 sh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,th=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ih=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,le=/^(\d{4,})-(\d{2})-(\d{2})$/,me=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mc=/^(\d{4,})-W(\d\d)$/,ne=/^(\d{4,})-(\d\d)$/,
1630 sh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,th=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ih=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,le=/^(\d{4,})-(\d{2})-(\d{2})$/,me=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mc=/^(\d{4,})-W(\d\d)$/,ne=/^(\d{4,})-(\d\d)$/,
1631 oe=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=T();r(["date","datetime-local","month","time","week"],function(a){ce[a]=!0});var pe={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c)},date:nb("date",le,Qb(le,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":nb("datetimelocal",me,Qb(me,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:nb("time",oe,Qb(oe,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:nb("week",Mc,function(a,b){if(ha(a))return a;if(A(a)){Mc.lastIndex=0;var d=Mc.exec(a);
1631 oe=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=T();r(["date","datetime-local","month","time","week"],function(a){ce[a]=!0});var pe={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c)},date:nb("date",le,Qb(le,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":nb("datetimelocal",me,Qb(me,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:nb("time",oe,Qb(oe,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:nb("week",Mc,function(a,b){if(ha(a))return a;if(A(a)){Mc.lastIndex=0;var d=Mc.exec(a);
1632 if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Xd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:nb("month",ne,Qb(ne,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Ic(a,b,d,c,"number");de(c);Sa(a,b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||z(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),
1632 if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Xd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:nb("month",ne,Qb(ne,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Ic(a,b,d,c,"number");de(c);Sa(a,b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||z(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),
1633 l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||z(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||z(s)||ee(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.url=function(a,b){var d=
1633 l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||z(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||z(s)||ee(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.url=function(a,b){var d=
1634 a||b;return c.$isEmpty(d)||sh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||th.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==U(d.ngTrim);z(d.name)&&b.attr("name",++pb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=U(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=U(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,
1634 a||b;return c.$isEmpty(d)||sh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||th.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==U(d.ngTrim);z(d.name)&&b.attr("name",++pb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=U(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=U(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,
1635 c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);X(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);X(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s=na(a);X(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Ic(a,b,d,c,"range");de(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?
1635 c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);X(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);X(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s=na(a);X(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Ic(a,b,d,c,"range");de(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?
1636 0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(p)||b>=p},g("min",k));e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:
1636 0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(p)||b>=p},g("min",k));e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:
1637 function(a,b){return c.$isEmpty(b)||z(s)||ee(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=fe(k,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},Yc=["$browser","$sniffer",
1637 function(a,b){return c.$isEmpty(b)||z(s)||ee(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=fe(k,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},Yc=["$browser","$sniffer",
1638 "$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(pe[K(g.type)]||pe.text)(e,f,g,k[0],b,a,d,c)}}}}],vf=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&
1638 "$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(pe[K(g.type)]||pe.text)(e,f,g,k[0],b,a,d,c)}}}}],vf=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&
1639 Object.defineProperty(b,"value",a)}}}}},uh=/^(true|false|\d+)$/,sf=function(){function a(a,d,c){var e=w(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return uh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Re=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];
1639 Object.defineProperty(b,"value",a)}}}}},uh=/^(true|false|\d+)$/,sf=function(){function a(a,d,c){var e=w(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return uh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Re=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];
1640 b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Te=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=z(a)?"":a})}}}}],Se=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);
1640 b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Te=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=z(a)?"":a})}}}}],Se=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);
1641 return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],rf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ue=Kc("",!0),We=Kc("Odd",0),Ve=Kc("Even",1),Xe=Ra({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ye=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cd={},vh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
1641 return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],rf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ue=Kc("",!0),We=Kc("Odd",0),Ve=Kc("Even",1),Xe=Ra({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ye=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cd={},vh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
1642 function(a){var b=wa("ng-"+a);cd[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return qd(d,c,e,b,a,vh[a])}]});var af=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=tb(k.clone),
1642 function(a){var b=wa("ng-"+a);cd[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return qd(d,c,e,b,a,vh[a])}]});var af=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=tb(k.clone),
1643 a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],bf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===
1643 a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],bf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===
1644 a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],uf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?
1644 a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],uf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?
1645 (d.empty(),a(ed(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],cf=Ra({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),qf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!z(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});
1645 (d.empty(),a(ed(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],cf=Ra({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),qf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!z(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});
1646 c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",$d="ng-invalid",Za="ng-pristine",Vb="ng-dirty",ob=F("ngModel");Rb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Rb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=
1646 c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",$d="ng-invalid",Za="ng-pristine",Vb="ng-dirty",ob=F("ngModel");Rb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Rb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=
1647 function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw ob("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:E,$isEmpty:function(a){return z(a)||""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,
1647 function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw ob("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:E,$isEmpty:function(a){return z(a)||""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,
1648 "ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=
1648 "ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=
1649 !0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!X(this.$modelValue)){var a=this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==
1649 !0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!X(this.$modelValue)){var a=this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==
1650 c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!B(h.then))throw ob("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&
1650 c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!B(h.then))throw ob("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&
1651 h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(z(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==
1651 h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(z(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==
1652 a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=z(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),z(a)){this.$$parserValid=!1;break}X(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));
1652 a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=z(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),z(a)){this.$$parserValid=!1;break}X(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));
1653 var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue=d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=
1653 var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue=d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=
1654 a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");W(b[a])?b=b[a]:W(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)?b=b["default"]:W(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},
1654 a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");W(b[a])?b=b[a]:W(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)?b=b["default"]:W(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},
1655 $overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue=a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=
1655 $overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue=a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=
1656 void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents,this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ae({clazz:Rb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var pf=["$rootScope",function(a){return{restrict:"A",require:["ngModel",
1656 void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents,this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ae({clazz:Rb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var pf=["$rootScope",function(a){return{restrict:"A",require:["ngModel",
1657 "^?form","^?ngModelOptions"],controller:Rb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",
1657 "^?form","^?ngModelOptions"],controller:Rb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",
1658 function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Sb,wh=/(\s+|^)default(\s+|$)/;Lc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]=this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=U(d.replace(wh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ge(a,this.$$options));ge(a,Sb.$$options);
1658 function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Sb,wh=/(\s+|^)default(\s+|$)/;Lc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]=this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=U(d.replace(wh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ge(a,this.$$options));ge(a,Sb.$$options);
1659 return new Lc(a)}};Sb=new Lc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var tf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a=this.parentCtrl?this.parentCtrl.$options:Sb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},df=Ra({terminal:!0,
1659 return new Lc(a)}};Sb=new Lc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var tf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a=this.parentCtrl?this.parentCtrl.$options:Sb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},df=Ra({terminal:!0,
1660 priority:1E3}),xh=F("ngOptions"),yh=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,nf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&ya(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&
1660 priority:1E3}),xh=F("ngOptions"),yh=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,nf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&ya(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&
1661 "$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(yh);if(!p)throw xh("iexp",a,za(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)},x=function(a,b){return v(a,A(a,b))},z=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),B={},A=r?function(a,b){B[r]=b;B[n]=a;return B}:function(a){B[n]=a;return B};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=
1661 "$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(yh);if(!p)throw xh("iexp",a,za(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)},x=function(a,b){return v(a,A(a,b))},z=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),B={},A=r?function(a,b){B[r]=b;B[n]=a;return B}:function(a){B[n]=a;return B};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=
1662 f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=A(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=z(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d===g?n:g[n],r=A(d[p],p),s=t(c,r),p=v(s,r),w=z(c,r),B=y(c,r),r=J(c,r),s=new e(p,s,w,B,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}
1662 f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=A(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=z(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d===g?n:g[n],r=A(d[p],p),s=t(c,r),p=v(s,r),w=z(c,r),B=y(c,r),r=J(c,r),s=new e(p,s,w,B,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}
1663 var e=C.document.createElement("option"),f=C.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&&a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],z=h.multiple;l=0;for(var t=k.children(),
1663 var e=C.document.createElement("option"),f=C.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&&a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],z=h.multiple;l=0;for(var t=k.children(),
1664 B=t.length;l<B;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,A=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};z?(n.writeValue=function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&
1664 B=t.length;l<B;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,A=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};z?(n.writeValue=function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&
1665 !a.disabled&&b.push(v.getViewValueFromOption(a))});return b},A.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return A.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex],c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},
1665 !a.disabled&&b.push(v.getViewValueFromOption(a))});return b},A.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return A.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex],c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},
1666 n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},A.trackBy&&d.$watch(function(){return A.getTrackByValue(q.$viewValue)},function(){q.$render()}));l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",
1666 n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},A.trackBy&&d.$watch(function(){return A.getTrackByValue(q.$viewValue)},function(){q.$render()}));l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",
1667 function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(A.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c=v.items[b];w(c.group)?Fb(c.element.parentNode):Fb(c.element)}v=A.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);
1667 function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(A.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c=v.items[b];w(c.group)?Fb(c.element.parentNode):Fb(c.element)}v=A.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);
1668 var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(A.trackBy||z?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],ef=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+
1668 var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(A.trackBy||z?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],ef=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+
1669 p+t,v=ca.noop,A;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=X(c);e||c in n||(c=a.pluralCat(c-p));c===A||e&&X(A)||(v(),e=q[c],z(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),A=c)})}}}],qe=F("ngRef"),ff=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=wa(ua(b)),e=a(d.ngRef),f=e.assign||
1669 p+t,v=ca.noop,A;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=X(c);e||c in n||(c=a.pluralCat(c-p));c===A||e&&X(A)||(v(),e=q[c],z(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),A=c)})}}}],qe=F("ngRef"),ff=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=wa(ua(b)),e=a(d.ngRef),f=e.assign||
1670 function(){throw qe("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw qe("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l=l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],gf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||
1670 function(){throw qe("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw qe("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l=l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],gf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||
1671 a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat",l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",
1671 a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat",l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",
1672 n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var z;if(t){var A={$id:La},y=a(t);z=function(a,b,c,d){v&&(A[v]=b);A[x]=c;A.$index=d;return y(a,A)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(ya(h))H=h,q=z||f;else for(K in q=z||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);
1672 n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var z;if(t){var A={$id:La},y=a(t);z=function(a,b,c,d){v&&(A[v]=b);A[x]=c;A.$index=d;return y(a,A)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(ya(h))H=h,q=z||f;else for(K in q=z||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);
1673 B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}A&&(A[x]=void 0);for(s in p){F=p[s];D=tb(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==
1673 B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}A&&(A[x]=void 0);for(s in p){F=p[s];D=tb(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==
1674 s&&b.move(tb(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],hf=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],$e=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,
1674 s&&b.move(tb(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],hf=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],$e=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,
1675 d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],jf=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&(a||(a={}),r(d,function(b,d){null==a[d]&&(a[d]="")}));a&&b.css(a)})}),kf=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||
1675 d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],jf=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&(a||(a={}),r(d,function(b,d){null==a[d]&&(a[d]="")}));a&&b.css(a)})}),kf=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||
1676 e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=tb(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],lf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,
1676 e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=tb(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],lf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,
1677 b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),mf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),zh=F("ngTransclude"),of=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw zh("orphan",
1677 b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),mf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),zh=F("ngTransclude"),of=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw zh("orphan",
1678 za(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())},null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Oe=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Ah={$setViewValue:E,$render:E},Bh=["$element",
1678 za(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())},null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Oe=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Ah={$setViewValue:E,$render:E},Bh=["$element",
1679 "$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Hb;e.selectValueMap={};e.ngModelCtrl=Ah;e.multiple=!1;e.unknownOption=x(C.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);
1679 "$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Hb;e.selectValueMap={};e.ngModelCtrl=Ah;e.multiple=!1;e.unknownOption=x(C.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);
1680 a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&&e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",
1680 a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&&e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",
1681 function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap?c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=
1681 function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap?c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=
1682 b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]===e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==
1682 b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]===e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==
1683 a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r],d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");
1683 a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r],d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");
1684 w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())});b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Pe=function(){return{restrict:"E",
1684 w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())});b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Pe=function(){return{restrict:"E",
1685 require:["select","?ngModel"],controller:Bh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&&(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,
1685 require:["select","?ngModel"],controller:Bh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&&(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,
1686 b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e=c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Qe=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||
1686 b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e=c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Qe=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||
1687 (w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],$c=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.required||a(c.ngRequired)(b);c.required=!0;e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],Zc=["$parse",
1687 (w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],$c=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.required||a(c.ngRequired)(b);c.required=!0;e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],Zc=["$parse",
1688 function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ie.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern;var m=he(l,c,b);d.$observe("pattern",function(a){var d=m;m=he(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||z(m)||m.test(b)}}}}}}],bd=["$parse",
1688 function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ie.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern;var m=he(l,c,b);d.$observe("pattern",function(a){var d=m;m=he(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||z(m)||m.test(b)}}}}}}],bd=["$parse",
1689 function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Tb(f);c.$observe("maxlength",function(a){f!==a&&(g=Tb(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Tb(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Tb(a)||-1,f=a,e.$validate())});
1689 function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Tb(f);c.$observe("maxlength",function(a){f!==a&&(g=Tb(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Tb(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Tb(a)||-1,f=a,e.$validate())});
1690 e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Fe(),Je(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,
1690 e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Fe(),Je(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,
1691 MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",
1691 MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",
1692 shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ae(C.document,Uc)}))})(window);
1692 shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ae(C.document,Uc)}))})(window);
1693 !window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
1693 !window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
1694 //# sourceMappingURL=angular.min.js.map
1694 //# sourceMappingURL=angular.min.js.map
1695
1695
1696 ;/*
1696 ;/*
1697 AngularJS v1.7.7
1697 AngularJS v1.7.7
1698 (c) 2010-2018 Google, Inc. http://angularjs.org
1698 (c) 2010-2018 Google, Inc. http://angularjs.org
1699 License: MIT
1699 License: MIT
1700 */
1700 */
1701 (function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096<c&&k.warn("Cookie '"+f+"' possibly not set or overflowed because it was too large ("+
1701 (function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096<c&&k.warn("Cookie '"+f+"' possibly not set or overflowed because it was too large ("+
1702 c+" > 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.7.7"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject=
1702 c+" > 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.7.7"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject=
1703 ["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular);
1703 ["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular);
1704 //# sourceMappingURL=angular-cookies.min.js.map
1704 //# sourceMappingURL=angular-cookies.min.js.map
1705
1705
1706 ;/*
1706 ;/*
1707 AngularJS v1.7.7
1707 AngularJS v1.7.7
1708 (c) 2010-2018 Google, Inc. http://angularjs.org
1708 (c) 2010-2018 Google, Inc. http://angularjs.org
1709 License: MIT
1709 License: MIT
1710 */
1710 */
1711 (function(I,b){'use strict';function z(b,h){var d=[],c=b.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(b,c,h,k){b="?"===k||"*?"===k;k="*"===k||"*?"===k;d.push({name:h,optional:b});c=c||"";return(b?"(?:"+c:c+"(?:")+(k?"(.+?)":"([^/]+)")+(b?"?)?":")")}).replace(/([/$*])/g,"\\$1");h.ignoreTrailingSlashes&&(c=c.replace(/\/+$/,"")+"/*");return{keys:d,regexp:new RegExp("^"+c+"(?:[?#]|$)",h.caseInsensitiveMatch?"i":"")}}function A(b){p&&b.get("$route")}function v(u,h,d){return{restrict:"ECA",
1711 (function(I,b){'use strict';function z(b,h){var d=[],c=b.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(b,c,h,k){b="?"===k||"*?"===k;k="*"===k||"*?"===k;d.push({name:h,optional:b});c=c||"";return(b?"(?:"+c:c+"(?:")+(k?"(.+?)":"([^/]+)")+(b?"?)?":")")}).replace(/([/$*])/g,"\\$1");h.ignoreTrailingSlashes&&(c=c.replace(/\/+$/,"")+"/*");return{keys:d,regexp:new RegExp("^"+c+"(?:[?#]|$)",h.caseInsensitiveMatch?"i":"")}}function A(b){p&&b.get("$route")}function v(u,h,d){return{restrict:"ECA",
1712 terminal:!0,priority:400,transclude:"element",link:function(c,f,g,l,k){function q(){r&&(d.cancel(r),r=null);m&&(m.$destroy(),m=null);s&&(r=d.leave(s),r.done(function(b){!1!==b&&(r=null)}),s=null)}function C(){var g=u.current&&u.current.locals;if(b.isDefined(g&&g.$template)){var g=c.$new(),l=u.current;s=k(g,function(g){d.enter(g,null,s||f).done(function(d){!1===d||!b.isDefined(w)||w&&!c.$eval(w)||h()});q()});m=l.scope=g;m.$emit("$viewContentLoaded");m.$eval(p)}else q()}var m,s,r,w=g.autoscroll,p=g.onload||
1712 terminal:!0,priority:400,transclude:"element",link:function(c,f,g,l,k){function q(){r&&(d.cancel(r),r=null);m&&(m.$destroy(),m=null);s&&(r=d.leave(s),r.done(function(b){!1!==b&&(r=null)}),s=null)}function C(){var g=u.current&&u.current.locals;if(b.isDefined(g&&g.$template)){var g=c.$new(),l=u.current;s=k(g,function(g){d.enter(g,null,s||f).done(function(d){!1===d||!b.isDefined(w)||w&&!c.$eval(w)||h()});q()});m=l.scope=g;m.$emit("$viewContentLoaded");m.$eval(p)}else q()}var m,s,r,w=g.autoscroll,p=g.onload||
1713 "";c.$on("$routeChangeSuccess",C);C()}}}function x(b,h,d){return{restrict:"ECA",priority:-400,link:function(c,f){var g=d.current,l=g.locals;f.html(l.$template);var k=b(f.contents());if(g.controller){l.$scope=c;var q=h(g.controller,l);g.controllerAs&&(c[g.controllerAs]=q);f.data("$ngControllerController",q);f.children().data("$ngControllerController",q)}c[g.resolveAs||"$resolve"]=l;k(c)}}}var D,E,F,G,y=b.module("ngRoute",[]).info({angularVersion:"1.7.7"}).provider("$route",function(){function u(d,
1713 "";c.$on("$routeChangeSuccess",C);C()}}}function x(b,h,d){return{restrict:"ECA",priority:-400,link:function(c,f){var g=d.current,l=g.locals;f.html(l.$template);var k=b(f.contents());if(g.controller){l.$scope=c;var q=h(g.controller,l);g.controllerAs&&(c[g.controllerAs]=q);f.data("$ngControllerController",q);f.children().data("$ngControllerController",q)}c[g.resolveAs||"$resolve"]=l;k(c)}}}var D,E,F,G,y=b.module("ngRoute",[]).info({angularVersion:"1.7.7"}).provider("$route",function(){function u(d,
1714 c){return b.extend(Object.create(d),c)}D=b.isArray;E=b.isObject;F=b.isDefined;G=b.noop;var h={};this.when=function(d,c){var f;f=void 0;if(D(c)){f=f||[];for(var g=0,l=c.length;g<l;g++)f[g]=c[g]}else if(E(c))for(g in f=f||{},c)if("$"!==g.charAt(0)||"$"!==g.charAt(1))f[g]=c[g];f=f||c;b.isUndefined(f.reloadOnUrl)&&(f.reloadOnUrl=!0);b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0);b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch);h[d]=b.extend(f,{originalPath:d},
1714 c){return b.extend(Object.create(d),c)}D=b.isArray;E=b.isObject;F=b.isDefined;G=b.noop;var h={};this.when=function(d,c){var f;f=void 0;if(D(c)){f=f||[];for(var g=0,l=c.length;g<l;g++)f[g]=c[g]}else if(E(c))for(g in f=f||{},c)if("$"!==g.charAt(0)||"$"!==g.charAt(1))f[g]=c[g];f=f||c;b.isUndefined(f.reloadOnUrl)&&(f.reloadOnUrl=!0);b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0);b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch);h[d]=b.extend(f,{originalPath:d},
1715 d&&z(d,f));d&&(g="/"===d[d.length-1]?d.substr(0,d.length-1):d+"/",h[g]=b.extend({originalPath:d,redirectTo:d},z(g,f)));return this};this.caseInsensitiveMatch=!1;this.otherwise=function(b){"string"===typeof b&&(b={redirectTo:b});this.when(null,b);return this};p=!0;this.eagerInstantiationEnabled=function(b){return F(b)?(p=b,this):p};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(d,c,f,g,l,k,q,p){function m(a){var e=t.current;n=A();(x=
1715 d&&z(d,f));d&&(g="/"===d[d.length-1]?d.substr(0,d.length-1):d+"/",h[g]=b.extend({originalPath:d,redirectTo:d},z(g,f)));return this};this.caseInsensitiveMatch=!1;this.otherwise=function(b){"string"===typeof b&&(b={redirectTo:b});this.when(null,b);return this};p=!0;this.eagerInstantiationEnabled=function(b){return F(b)?(p=b,this):p};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(d,c,f,g,l,k,q,p){function m(a){var e=t.current;n=A();(x=
1716 !B&&n&&e&&n.$$route===e.$$route&&(!n.reloadOnUrl||!n.reloadOnSearch&&b.equals(n.pathParams,e.pathParams)))||!e&&!n||d.$broadcast("$routeChangeStart",n,e).defaultPrevented&&a&&a.preventDefault()}function s(){var a=t.current,e=n;if(x)a.params=e.params,b.copy(a.params,f),d.$broadcast("$routeUpdate",a);else if(e||a){B=!1;t.current=e;var c=g.resolve(e);p.$$incOutstandingRequestCount("$route");c.then(r).then(w).then(function(g){return g&&c.then(y).then(function(c){e===t.current&&(e&&(e.locals=c,b.copy(e.params,
1716 !B&&n&&e&&n.$$route===e.$$route&&(!n.reloadOnUrl||!n.reloadOnSearch&&b.equals(n.pathParams,e.pathParams)))||!e&&!n||d.$broadcast("$routeChangeStart",n,e).defaultPrevented&&a&&a.preventDefault()}function s(){var a=t.current,e=n;if(x)a.params=e.params,b.copy(a.params,f),d.$broadcast("$routeUpdate",a);else if(e||a){B=!1;t.current=e;var c=g.resolve(e);p.$$incOutstandingRequestCount("$route");c.then(r).then(w).then(function(g){return g&&c.then(y).then(function(c){e===t.current&&(e&&(e.locals=c,b.copy(e.params,
1717 f)),d.$broadcast("$routeChangeSuccess",e,a))})}).catch(function(b){e===t.current&&d.$broadcast("$routeChangeError",e,a,b)}).finally(function(){p.$$completeOutstandingRequest(G,"$route")})}}function r(a){var e={route:a,hasRedirection:!1};if(a)if(a.redirectTo)if(b.isString(a.redirectTo))e.path=v(a.redirectTo,a.params),e.search=a.params,e.hasRedirection=!0;else{var d=c.path(),f=c.search();a=a.redirectTo(a.pathParams,d,f);b.isDefined(a)&&(e.url=a,e.hasRedirection=!0)}else if(a.resolveRedirectTo)return g.resolve(l.invoke(a.resolveRedirectTo)).then(function(a){b.isDefined(a)&&
1717 f)),d.$broadcast("$routeChangeSuccess",e,a))})}).catch(function(b){e===t.current&&d.$broadcast("$routeChangeError",e,a,b)}).finally(function(){p.$$completeOutstandingRequest(G,"$route")})}}function r(a){var e={route:a,hasRedirection:!1};if(a)if(a.redirectTo)if(b.isString(a.redirectTo))e.path=v(a.redirectTo,a.params),e.search=a.params,e.hasRedirection=!0;else{var d=c.path(),f=c.search();a=a.redirectTo(a.pathParams,d,f);b.isDefined(a)&&(e.url=a,e.hasRedirection=!0)}else if(a.resolveRedirectTo)return g.resolve(l.invoke(a.resolveRedirectTo)).then(function(a){b.isDefined(a)&&
1718 (e.url=a,e.hasRedirection=!0);return e});return e}function w(a){var b=!0;if(a.route!==t.current)b=!1;else if(a.hasRedirection){var g=c.url(),d=a.url;d?c.url(d).replace():d=c.path(a.path).search(a.search).replace().url();d!==g&&(b=!1)}return b}function y(a){if(a){var e=b.extend({},a.resolve);b.forEach(e,function(a,c){e[c]=b.isString(a)?l.get(a):l.invoke(a,null,null,c)});a=z(a);b.isDefined(a)&&(e.$template=a);return g.all(e)}}function z(a){var e,c;b.isDefined(e=a.template)?b.isFunction(e)&&(e=e(a.params)):
1718 (e.url=a,e.hasRedirection=!0);return e});return e}function w(a){var b=!0;if(a.route!==t.current)b=!1;else if(a.hasRedirection){var g=c.url(),d=a.url;d?c.url(d).replace():d=c.path(a.path).search(a.search).replace().url();d!==g&&(b=!1)}return b}function y(a){if(a){var e=b.extend({},a.resolve);b.forEach(e,function(a,c){e[c]=b.isString(a)?l.get(a):l.invoke(a,null,null,c)});a=z(a);b.isDefined(a)&&(e.$template=a);return g.all(e)}}function z(a){var e,c;b.isDefined(e=a.template)?b.isFunction(e)&&(e=e(a.params)):
1719 b.isDefined(c=a.templateUrl)&&(b.isFunction(c)&&(c=c(a.params)),b.isDefined(c)&&(a.loadedTemplateUrl=q.valueOf(c),e=k(c)));return e}function A(){var a,e;b.forEach(h,function(d,g){var f;if(f=!e){var h=c.path();f=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,p=h.length;k<p;++k){var m=f[k-1],n=h[k];m&&n&&(l[m.name]=n)}f=l}else f=null;else f=null;f=a=f}f&&(e=u(d,{params:b.extend({},c.search(),a),pathParams:a}),e.$$route=d)});return e||h[null]&&u(h[null],{params:{},pathParams:{}})}function v(a,
1719 b.isDefined(c=a.templateUrl)&&(b.isFunction(c)&&(c=c(a.params)),b.isDefined(c)&&(a.loadedTemplateUrl=q.valueOf(c),e=k(c)));return e}function A(){var a,e;b.forEach(h,function(d,g){var f;if(f=!e){var h=c.path();f=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,p=h.length;k<p;++k){var m=f[k-1],n=h[k];m&&n&&(l[m.name]=n)}f=l}else f=null;else f=null;f=a=f}f&&(e=u(d,{params:b.extend({},c.search(),a),pathParams:a}),e.$$route=d)});return e||h[null]&&u(h[null],{params:{},pathParams:{}})}function v(a,
1720 c){var d=[];b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];d.push(c[g]);d.push(f[2]||"");delete c[g]}});return d.join("")}var B=!1,n,x,t={routes:h,reload:function(){B=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;B=!1}};d.$evalAsync(function(){m(a);a.defaultPrevented||s()})},updateParams:function(a){if(this.current&&this.current.$$route)a=b.extend({},this.current.params,a),c.path(v(this.current.$$route.originalPath,
1720 c){var d=[];b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];d.push(c[g]);d.push(f[2]||"");delete c[g]}});return d.join("")}var B=!1,n,x,t={routes:h,reload:function(){B=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;B=!1}};d.$evalAsync(function(){m(a);a.defaultPrevented||s()})},updateParams:function(a){if(this.current&&this.current.$$route)a=b.extend({},this.current.params,a),c.path(v(this.current.$$route.originalPath,
1721 a)),c.search(a);else throw H("norout");}};d.$on("$locationChangeStart",m);d.$on("$locationChangeSuccess",s);return t}]}).run(A),H=b.$$minErr("ngRoute"),p;A.$inject=["$injector"];y.provider("$routeParams",function(){this.$get=function(){return{}}});y.directive("ngView",v);y.directive("ngView",x);v.$inject=["$route","$anchorScroll","$animate"];x.$inject=["$compile","$controller","$route"]})(window,window.angular);
1721 a)),c.search(a);else throw H("norout");}};d.$on("$locationChangeStart",m);d.$on("$locationChangeSuccess",s);return t}]}).run(A),H=b.$$minErr("ngRoute"),p;A.$inject=["$injector"];y.provider("$routeParams",function(){this.$get=function(){return{}}});y.directive("ngView",v);y.directive("ngView",x);v.$inject=["$route","$anchorScroll","$animate"];x.$inject=["$compile","$controller","$route"]})(window,window.angular);
1722 //# sourceMappingURL=angular-route.min.js.map
1722 //# sourceMappingURL=angular-route.min.js.map
1723
1723
1724 ;/*
1724 ;/*
1725 AngularJS v1.7.7
1725 AngularJS v1.7.7
1726 (c) 2010-2018 Google, Inc. http://angularjs.org
1726 (c) 2010-2018 Google, Inc. http://angularjs.org
1727 License: MIT
1727 License: MIT
1728 */
1728 */
1729 (function(T,a){'use strict';function M(m,f){f=f||{};a.forEach(f,function(a,d){delete f[d]});for(var d in m)!m.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(f[d]=m[d]);return f}var B=a.$$minErr("$resource"),H=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;a.module("ngResource",["ng"]).info({angularVersion:"1.7.7"}).provider("$resource",function(){var m=/^https?:\/\/\[[^\]]*][^/]*/,f=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",
1729 (function(T,a){'use strict';function M(m,f){f=f||{};a.forEach(f,function(a,d){delete f[d]});for(var d in m)!m.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(f[d]=m[d]);return f}var B=a.$$minErr("$resource"),H=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;a.module("ngResource",["ng"]).info({angularVersion:"1.7.7"}).provider("$resource",function(){var m=/^https?:\/\/\[[^\]]*][^/]*/,f=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",
1730 isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(d,F,G,N){function C(a,d){this.template=a;this.defaults=n({},f.defaults,d);this.urlParams={}}var O=a.noop,r=a.forEach,n=a.extend,R=a.copy,P=a.isArray,D=a.isDefined,x=a.isFunction,I=a.isNumber,y=a.$$encodeUriQuery,S=a.$$encodeUriSegment;C.prototype={setUrlParams:function(a,d,f){var g=this,c=f||g.template,s,h,n="",b=g.urlParams=Object.create(null);r(c.split(/\W/),function(a){if("hasOwnProperty"===
1730 isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(d,F,G,N){function C(a,d){this.template=a;this.defaults=n({},f.defaults,d);this.urlParams={}}var O=a.noop,r=a.forEach,n=a.extend,R=a.copy,P=a.isArray,D=a.isDefined,x=a.isFunction,I=a.isNumber,y=a.$$encodeUriQuery,S=a.$$encodeUriSegment;C.prototype={setUrlParams:function(a,d,f){var g=this,c=f||g.template,s,h,n="",b=g.urlParams=Object.create(null);r(c.split(/\W/),function(a){if("hasOwnProperty"===
1731 a)throw B("badname");!/^\d+$/.test(a)&&a&&(new RegExp("(^|[^\\\\]):"+a+"(\\W|$)")).test(c)&&(b[a]={isQueryParamValue:(new RegExp("\\?.*=:"+a+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(m,function(b){n=b;return""});d=d||{};r(g.urlParams,function(b,a){s=d.hasOwnProperty(a)?d[a]:g.defaults[a];D(s)&&null!==s?(h=b.isQueryParamValue?y(s,!0):S(s),c=c.replace(new RegExp(":"+a+"(\\W|$)","g"),function(b,a){return h+a})):c=c.replace(new RegExp("(/?):"+a+"(\\W|$)","g"),function(b,a,e){return"/"===
1731 a)throw B("badname");!/^\d+$/.test(a)&&a&&(new RegExp("(^|[^\\\\]):"+a+"(\\W|$)")).test(c)&&(b[a]={isQueryParamValue:(new RegExp("\\?.*=:"+a+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(m,function(b){n=b;return""});d=d||{};r(g.urlParams,function(b,a){s=d.hasOwnProperty(a)?d[a]:g.defaults[a];D(s)&&null!==s?(h=b.isQueryParamValue?y(s,!0):S(s),c=c.replace(new RegExp(":"+a+"(\\W|$)","g"),function(b,a){return h+a})):c=c.replace(new RegExp("(/?):"+a+"(\\W|$)","g"),function(b,a,e){return"/"===
1732 e.charAt(0)?e:a+e})});g.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");a.url=n+c.replace(/\/(\\|%5C)\./,"/.");r(d,function(b,c){g.urlParams[c]||(a.params=a.params||{},a.params[c]=b)})}};return function(m,y,z,g){function c(b,c){var d={};c=n({},y,c);r(c,function(c,f){x(c)&&(c=c(b));var e;if(c&&c.charAt&&"@"===c.charAt(0)){e=b;var k=c.substr(1);if(null==k||""===k||"hasOwnProperty"===k||!H.test("."+k))throw B("badmember",k);for(var k=k.split("."),h=0,
1732 e.charAt(0)?e:a+e})});g.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");a.url=n+c.replace(/\/(\\|%5C)\./,"/.");r(d,function(b,c){g.urlParams[c]||(a.params=a.params||{},a.params[c]=b)})}};return function(m,y,z,g){function c(b,c){var d={};c=n({},y,c);r(c,function(c,f){x(c)&&(c=c(b));var e;if(c&&c.charAt&&"@"===c.charAt(0)){e=b;var k=c.substr(1);if(null==k||""===k||"hasOwnProperty"===k||!H.test("."+k))throw B("badmember",k);for(var k=k.split("."),h=0,
1733 n=k.length;h<n&&a.isDefined(e);h++){var g=k[h];e=null!==e?e[g]:void 0}}else e=c;d[f]=e});return d}function s(b){return b.resource}function h(b){M(b||{},this)}var Q=new C(m,g);z=n({},f.defaults.actions,z);h.prototype.toJSON=function(){var b=n({},this);delete b.$promise;delete b.$resolved;delete b.$cancelRequest;return b};r(z,function(b,a){var f=!0===b.hasBody||!1!==b.hasBody&&/^(POST|PUT|PATCH)$/i.test(b.method),g=b.timeout,m=D(b.cancellable)?b.cancellable:Q.defaults.cancellable;g&&!I(g)&&(F.debug("ngResource:\n Only numeric values are allowed as `timeout`.\n Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),
1733 n=k.length;h<n&&a.isDefined(e);h++){var g=k[h];e=null!==e?e[g]:void 0}}else e=c;d[f]=e});return d}function s(b){return b.resource}function h(b){M(b||{},this)}var Q=new C(m,g);z=n({},f.defaults.actions,z);h.prototype.toJSON=function(){var b=n({},this);delete b.$promise;delete b.$resolved;delete b.$cancelRequest;return b};r(z,function(b,a){var f=!0===b.hasBody||!1!==b.hasBody&&/^(POST|PUT|PATCH)$/i.test(b.method),g=b.timeout,m=D(b.cancellable)?b.cancellable:Q.defaults.cancellable;g&&!I(g)&&(F.debug("ngResource:\n Only numeric values are allowed as `timeout`.\n Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),
1734 delete b.timeout,g=null);h[a]=function(e,k,J,y){function z(a){p.catch(O);null!==u&&u.resolve(a)}var K={},v,t,w;switch(arguments.length){case 4:w=y,t=J;case 3:case 2:if(x(k)){if(x(e)){t=e;w=k;break}t=k;w=J}else{K=e;v=k;t=J;break}case 1:x(e)?t=e:f?v=e:K=e;break;case 0:break;default:throw B("badargs",arguments.length);}var E=this instanceof h,l=E?v:b.isArray?[]:new h(v),q={},C=b.interceptor&&b.interceptor.request||void 0,D=b.interceptor&&b.interceptor.requestError||void 0,F=b.interceptor&&b.interceptor.response||
1734 delete b.timeout,g=null);h[a]=function(e,k,J,y){function z(a){p.catch(O);null!==u&&u.resolve(a)}var K={},v,t,w;switch(arguments.length){case 4:w=y,t=J;case 3:case 2:if(x(k)){if(x(e)){t=e;w=k;break}t=k;w=J}else{K=e;v=k;t=J;break}case 1:x(e)?t=e:f?v=e:K=e;break;case 0:break;default:throw B("badargs",arguments.length);}var E=this instanceof h,l=E?v:b.isArray?[]:new h(v),q={},C=b.interceptor&&b.interceptor.request||void 0,D=b.interceptor&&b.interceptor.requestError||void 0,F=b.interceptor&&b.interceptor.response||
1735 s,H=b.interceptor&&b.interceptor.responseError||G.reject,I=t?function(a){t(a,A.headers,A.status,A.statusText)}:void 0;w=w||void 0;var u,L,A;r(b,function(a,b){switch(b){default:q[b]=R(a);case "params":case "isArray":case "interceptor":case "cancellable":}});!E&&m&&(u=G.defer(),q.timeout=u.promise,g&&(L=N(u.resolve,g)));f&&(q.data=v);Q.setUrlParams(q,n({},c(v,b.params||{}),K),b.url);var p=G.resolve(q).then(C).catch(D).then(d),p=p.then(function(c){var e=c.data;if(e){if(P(e)!==!!b.isArray)throw B("badcfg",
1735 s,H=b.interceptor&&b.interceptor.responseError||G.reject,I=t?function(a){t(a,A.headers,A.status,A.statusText)}:void 0;w=w||void 0;var u,L,A;r(b,function(a,b){switch(b){default:q[b]=R(a);case "params":case "isArray":case "interceptor":case "cancellable":}});!E&&m&&(u=G.defer(),q.timeout=u.promise,g&&(L=N(u.resolve,g)));f&&(q.data=v);Q.setUrlParams(q,n({},c(v,b.params||{}),K),b.url);var p=G.resolve(q).then(C).catch(D).then(d),p=p.then(function(c){var e=c.data;if(e){if(P(e)!==!!b.isArray)throw B("badcfg",
1736 a,b.isArray?"array":"object",P(e)?"array":"object",q.method,q.url);if(b.isArray)l.length=0,r(e,function(a){"object"===typeof a?l.push(new h(a)):l.push(a)});else{var d=l.$promise;M(e,l);l.$promise=d}}c.resource=l;A=c;return F(c)},function(a){a.resource=l;A=a;return H(a)}),p=p["finally"](function(){l.$resolved=!0;!E&&m&&(l.$cancelRequest=O,N.cancel(L),u=L=q.timeout=null)});p.then(I,w);return E?p:(l.$promise=p,l.$resolved=!1,m&&(l.$cancelRequest=z),l)};h.prototype["$"+a]=function(b,c,d){x(b)&&(d=c,c=
1736 a,b.isArray?"array":"object",P(e)?"array":"object",q.method,q.url);if(b.isArray)l.length=0,r(e,function(a){"object"===typeof a?l.push(new h(a)):l.push(a)});else{var d=l.$promise;M(e,l);l.$promise=d}}c.resource=l;A=c;return F(c)},function(a){a.resource=l;A=a;return H(a)}),p=p["finally"](function(){l.$resolved=!0;!E&&m&&(l.$cancelRequest=O,N.cancel(L),u=L=q.timeout=null)});p.then(I,w);return E?p:(l.$promise=p,l.$resolved=!1,m&&(l.$cancelRequest=z),l)};h.prototype["$"+a]=function(b,c,d){x(b)&&(d=c,c=
1737 b,b={});b=h[a].call(this,b,this,c,d);return b.$promise||b}});return h}}]})})(window,window.angular);
1737 b,b={});b=h[a].call(this,b,this,c,d);return b.$promise||b}});return h}}]})})(window,window.angular);
1738 //# sourceMappingURL=angular-resource.min.js.map
1738 //# sourceMappingURL=angular-resource.min.js.map
1739
1739
1740 ;/*
1740 ;/*
1741 AngularJS v1.7.7
1741 AngularJS v1.7.7
1742 (c) 2010-2018 Google, Inc. http://angularjs.org
1742 (c) 2010-2018 Google, Inc. http://angularjs.org
1743 License: MIT
1743 License: MIT
1744 */
1744 */
1745 (function(Y,z){'use strict';function Fa(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Ga(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Z(a)&&(a=a.join(" "));Z(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function $(a,b,c){var d="";a=Z(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,k){a&&0<a.length&&(d+=0<k?" ":"",d+=c?b+a:a+b)});return d}function Ha(a){if(a instanceof A)switch(a.length){case 0:return a;
1745 (function(Y,z){'use strict';function Fa(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Ga(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Z(a)&&(a=a.join(" "));Z(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function $(a,b,c){var d="";a=Z(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,k){a&&0<a.length&&(d+=0<k?" ":"",d+=c?b+a:a+b)});return d}function Ha(a){if(a instanceof A)switch(a.length){case 0:return a;
1746 case 1:if(1===a[0].nodeType)return a;break;default:return A(va(a))}if(1===a.nodeType)return A(a)}function va(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Ra(a,b,c){s(b,function(b){a.addClass(b,c)})}function Sa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function aa(a){return function(b,c){c.addClass&&(Ra(a,b,c.addClass),c.addClass=null);c.removeClass&&(Sa(a,b,c.removeClass),c.removeClass=null)}}function pa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
1746 case 1:if(1===a[0].nodeType)return a;break;default:return A(va(a))}if(1===a.nodeType)return A(a)}function va(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Ra(a,b,c){s(b,function(b){a.addClass(b,c)})}function Sa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function aa(a){return function(b,c){c.addClass&&(Ra(a,b,c.addClass),c.addClass=null);c.removeClass&&(Sa(a,b,c.removeClass),c.removeClass=null)}}function pa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
1747 N;a.domOperation=function(){a.$$domOperationFired=!0;b();b=N};a.$$prepared=!0}return a}function ha(a,b){Ia(a,b);Ja(a,b)}function Ia(a,b){b.from&&(a.css(b.from),b.from=null)}function Ja(a,b){b.to&&(a.css(b.to),b.to=null)}function T(a,b,c){var d=b.options||{};c=c.options||{};var f=(d.addClass||"")+" "+(c.addClass||""),k=(d.removeClass||"")+" "+(c.removeClass||"");a=Ta(a.attr("class"),f,k);c.preparationClasses&&(d.preparationClasses=ba(c.preparationClasses,d.preparationClasses),delete c.preparationClasses);
1747 N;a.domOperation=function(){a.$$domOperationFired=!0;b();b=N};a.$$prepared=!0}return a}function ha(a,b){Ia(a,b);Ja(a,b)}function Ia(a,b){b.from&&(a.css(b.from),b.from=null)}function Ja(a,b){b.to&&(a.css(b.to),b.to=null)}function T(a,b,c){var d=b.options||{};c=c.options||{};var f=(d.addClass||"")+" "+(c.addClass||""),k=(d.removeClass||"")+" "+(c.removeClass||"");a=Ta(a.attr("class"),f,k);c.preparationClasses&&(d.preparationClasses=ba(c.preparationClasses,d.preparationClasses),delete c.preparationClasses);
1748 f=d.domOperation!==N?d.domOperation:null;wa(d,c);f&&(d.domOperation=f);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ta(a,b,c){function d(a){G(a)&&(a=a.split(" "));var c={};s(a,function(a){a.length&&(c[a]=!0)});return c}var f={};a=d(a);b=d(b);s(b,function(a,c){f[c]=1});c=d(c);s(c,function(a,c){f[c]=1===f[c]?null:-1});var k={addClass:"",removeClass:""};s(f,function(c,b){var d,f;1===c?(d="addClass",
1748 f=d.domOperation!==N?d.domOperation:null;wa(d,c);f&&(d.domOperation=f);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ta(a,b,c){function d(a){G(a)&&(a=a.split(" "));var c={};s(a,function(a){a.length&&(c[a]=!0)});return c}var f={};a=d(a);b=d(b);s(b,function(a,c){f[c]=1});c=d(c);s(c,function(a,c){f[c]=1===f[c]?null:-1});var k={addClass:"",removeClass:""};s(f,function(c,b){var d,f;1===c?(d="addClass",
1749 f=!a[b]||a[b+"-remove"]):-1===c&&(d="removeClass",f=a[b]||a[b+"-add"]);f&&(k[d].length&&(k[d]+=" "),k[d]+=b)});return k}function K(a){return a instanceof A?a[0]:a}function Ua(a,b,c,d){a="";c&&(a=$(c,"ng-",!0));d.addClass&&(a=ba(a,$(d.addClass,"-add")));d.removeClass&&(a=ba(a,$(d.removeClass,"-remove")));a.length&&(d.preparationClasses=a,b.addClass(a))}function xa(a,b){var c=b?"paused":"",d=ca+"PlayState";ma(a,[d,c]);return[d,c]}function ma(a,b){a.style[b[0]]=b[1]}function ba(a,b){return a?b?a+" "+
1749 f=!a[b]||a[b+"-remove"]):-1===c&&(d="removeClass",f=a[b]||a[b+"-add"]);f&&(k[d].length&&(k[d]+=" "),k[d]+=b)});return k}function K(a){return a instanceof A?a[0]:a}function Ua(a,b,c,d){a="";c&&(a=$(c,"ng-",!0));d.addClass&&(a=ba(a,$(d.addClass,"-add")));d.removeClass&&(a=ba(a,$(d.removeClass,"-remove")));a.length&&(d.preparationClasses=a,b.addClass(a))}function xa(a,b){var c=b?"paused":"",d=ca+"PlayState";ma(a,[d,c]);return[d,c]}function ma(a,b){a.style[b[0]]=b[1]}function ba(a,b){return a?b?a+" "+
1750 b:a:b}function Ka(a,b,c){var d=Object.create(null),f=a.getComputedStyle(b)||{};s(c,function(a,c){var b=f[a];if(b){var L=b.charAt(0);if("-"===L||"+"===L||0<=L)b=Va(b);0===b&&(b=null);d[c]=b}});return d}function Va(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function ya(a){return 0===a||null!=a}function La(a,b){var c=M,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ma(a,b,c){s(c,
1750 b:a:b}function Ka(a,b,c){var d=Object.create(null),f=a.getComputedStyle(b)||{};s(c,function(a,c){var b=f[a];if(b){var L=b.charAt(0);if("-"===L||"+"===L||0<=L)b=Va(b);0===b&&(b=null);d[c]=b}});return d}function Va(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function ya(a){return 0===a||null!=a}function La(a,b){var c=M,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ma(a,b,c){s(c,
1751 function(c){a[c]=za(a[c])?a[c]:b.style.getPropertyValue(c)})}var M,Aa,ca,Ba;void 0===Y.ontransitionend&&void 0!==Y.onwebkittransitionend?(M="WebkitTransition",Aa="webkitTransitionEnd transitionend"):(M="transition",Aa="transitionend");void 0===Y.onanimationend&&void 0!==Y.onwebkitanimationend?(ca="WebkitAnimation",Ba="webkitAnimationEnd animationend"):(ca="animation",Ba="animationend");var qa=ca+"Delay",Ca=ca+"Duration",na=M+"Delay",Na=M+"Duration",Pa=z.$$minErr("ng"),ra={blockTransitions:function(a,
1751 function(c){a[c]=za(a[c])?a[c]:b.style.getPropertyValue(c)})}var M,Aa,ca,Ba;void 0===Y.ontransitionend&&void 0!==Y.onwebkittransitionend?(M="WebkitTransition",Aa="webkitTransitionEnd transitionend"):(M="transition",Aa="transitionend");void 0===Y.onanimationend&&void 0!==Y.onwebkitanimationend?(ca="WebkitAnimation",Ba="webkitAnimationEnd animationend"):(ca="animation",Ba="animationend");var qa=ca+"Delay",Ca=ca+"Duration",na=M+"Delay",Na=M+"Duration",Pa=z.$$minErr("ng"),ra={blockTransitions:function(a,
1752 b){var c=b?"-"+b+"s":"";ma(a,[na,c]);return[na,c]}},Wa={transitionDuration:Na,transitionDelay:na,transitionProperty:M+"Property",animationDuration:Ca,animationDelay:qa,animationIterationCount:ca+"IterationCount"},Xa={transitionDuration:Na,transitionDelay:na,animationDuration:Ca,animationDelay:qa},Da,wa,s,Z,za,sa,Ea,ta,G,R,A,N;z.module("ngAnimate",[],function(){N=z.noop;Da=z.copy;wa=z.extend;A=z.element;s=z.forEach;Z=z.isArray;G=z.isString;ta=z.isObject;R=z.isUndefined;za=z.isDefined;Ea=z.isFunction;
1752 b){var c=b?"-"+b+"s":"";ma(a,[na,c]);return[na,c]}},Wa={transitionDuration:Na,transitionDelay:na,transitionProperty:M+"Property",animationDuration:Ca,animationDelay:qa,animationIterationCount:ca+"IterationCount"},Xa={transitionDuration:Na,transitionDelay:na,animationDuration:Ca,animationDelay:qa},Da,wa,s,Z,za,sa,Ea,ta,G,R,A,N;z.module("ngAnimate",[],function(){N=z.noop;Da=z.copy;wa=z.extend;A=z.element;s=z.forEach;Z=z.isArray;G=z.isString;ta=z.isObject;R=z.isUndefined;za=z.isDefined;Ea=z.isFunction;
1753 sa=z.isElement}).info({angularVersion:"1.7.7"}).directive("ngAnimateSwap",["$animate",function(a){return{restrict:"A",transclude:"element",terminal:!0,priority:550,link:function(b,c,d,f,k){var e,Q;b.$watchCollection(d.ngAnimateSwap||d["for"],function(b){e&&a.leave(e);Q&&(Q.$destroy(),Q=null);(b||0===b)&&k(function(b,d){e=b;Q=d;a.enter(b,null,c)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function f(a){c.data("$$ngAnimateChildren","on"===a||"true"===
1753 sa=z.isElement}).info({angularVersion:"1.7.7"}).directive("ngAnimateSwap",["$animate",function(a){return{restrict:"A",transclude:"element",terminal:!0,priority:550,link:function(b,c,d,f,k){var e,Q;b.$watchCollection(d.ngAnimateSwap||d["for"],function(b){e&&a.leave(e);Q&&(Q.$destroy(),Q=null);(b||0===b)&&k(function(b,d){e=b;Q=d;a.enter(b,null,c)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function f(a){c.data("$$ngAnimateChildren","on"===a||"true"===
1754 a)}var k=d.ngAnimateChildren;G(k)&&0===k.length?c.data("$$ngAnimateChildren",!0):(f(a(k)(b)),d.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),e=0;e<b.length;e++)b[e]();f||a(function(){f||c()})}}var d,f;d=b.queue=[];b.waitUntilQuiet=function(b){f&&f();f=a(function(){f=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){return{addClass:a.addClass,
1754 a)}var k=d.ngAnimateChildren;G(k)&&0===k.length?c.data("$$ngAnimateChildren",!0):(f(a(k)(b)),d.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),e=0;e<b.length;e++)b[e]();f||a(function(){f||c()})}}var d,f;d=b.queue=[];b.waitUntilQuiet=function(b){f&&f();f=a(function(){f=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){return{addClass:a.addClass,
1755 removeClass:a.removeClass,from:a.from,to:a.to}}function c(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function d(a,b){if(a&&b){var d=c(b);return a.split(" ").some(function(a){return d[a]})}}function f(a,b,c){return e[a].some(function(a){return a(b,c)})}function k(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&k(a)});
1755 removeClass:a.removeClass,from:a.from,to:a.to}}function c(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function d(a,b){if(a&&b){var d=c(b);return a.split(" ").some(function(a){return d[a]})}}function f(a,b,c){return e[a].some(function(a){return a(b,c)})}function k(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&k(a)});
1756 e.skip.push(function(a,b){return!a.structural&&!k(a)});e.skip.push(function(a,b){return"leave"===b.event&&a.structural});e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural});e.cancel.push(function(a,b){return b.structural&&a.structural});e.cancel.push(function(a,b){return 2===b.state&&a.structural});e.cancel.push(function(a,b){if(b.structural)return!1;var c=a.addClass,f=a.removeClass,k=b.addClass,e=b.removeClass;return R(c)&&R(f)||R(k)&&R(e)?!1:d(c,e)||d(f,k)});this.$get=["$$rAF",
1756 e.skip.push(function(a,b){return!a.structural&&!k(a)});e.skip.push(function(a,b){return"leave"===b.event&&a.structural});e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural});e.cancel.push(function(a,b){return b.structural&&a.structural});e.cancel.push(function(a,b){return 2===b.state&&a.structural});e.cancel.push(function(a,b){if(b.structural)return!1;var c=a.addClass,f=a.removeClass,k=b.addClass,e=b.removeClass;return R(c)&&R(f)||R(k)&&R(e)?!1:d(c,e)||d(f,k)});this.$get=["$$rAF",
1757 "$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(c,d,e,C,U,oa,H,u,t,I,da){function ia(a){O.delete(a.target)}function v(){var a=!1;return function(b){a?b():d.$$postDigest(function(){a=!0;b()})}}function ua(a,b,c){var g=[],l=m[c];l&&s(l,function(l){Oa.call(l.node,b)?g.push(l.callback):"leave"===c&&Oa.call(l.node,a)&&g.push(l.callback)});return g}function h(a,b,c){var l=va(b);return a.filter(function(a){return!(a.node===
1757 "$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(c,d,e,C,U,oa,H,u,t,I,da){function ia(a){O.delete(a.target)}function v(){var a=!1;return function(b){a?b():d.$$postDigest(function(){a=!0;b()})}}function ua(a,b,c){var g=[],l=m[c];l&&s(l,function(l){Oa.call(l.node,b)?g.push(l.callback):"leave"===c&&Oa.call(l.node,a)&&g.push(l.callback)});return g}function h(a,b,c){var l=va(b);return a.filter(function(a){return!(a.node===
1758 l&&(!c||a.callback===c))})}function q(a,J,w){function e(a,b,l,g){u(function(){var a=ua(ia,m,b);a.length?c(function(){s(a,function(a){a(h,l,g)});"close"!==l||m.parentNode||D.off(m)}):"close"!==l||m.parentNode||D.off(m)});a.progress(b,l,g)}function I(a){var b=h,c=n;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null);c.activeClasses&&(b.removeClass(c.activeClasses),c.activeClasses=null);W(h,n);ha(h,n);n.domOperation();q.complete(!a)}var n=Da(w),h=Ha(a),m=K(h),ia=m&&
1758 l&&(!c||a.callback===c))})}function q(a,J,w){function e(a,b,l,g){u(function(){var a=ua(ia,m,b);a.length?c(function(){s(a,function(a){a(h,l,g)});"close"!==l||m.parentNode||D.off(m)}):"close"!==l||m.parentNode||D.off(m)});a.progress(b,l,g)}function I(a){var b=h,c=n;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null);c.activeClasses&&(b.removeClass(c.activeClasses),c.activeClasses=null);W(h,n);ha(h,n);n.domOperation();q.complete(!a)}var n=Da(w),h=Ha(a),m=K(h),ia=m&&
1759 m.parentNode,n=pa(n),q=new H,u=v();Z(n.addClass)&&(n.addClass=n.addClass.join(" "));n.addClass&&!G(n.addClass)&&(n.addClass=null);Z(n.removeClass)&&(n.removeClass=n.removeClass.join(" "));n.removeClass&&!G(n.removeClass)&&(n.removeClass=null);n.from&&!ta(n.from)&&(n.from=null);n.to&&!ta(n.to)&&(n.to=null);if(!(B&&m&&fa(m,J,w)&&Ya(m,n)))return I(),q;var x=0<=["enter","move","leave"].indexOf(J),r=da(),P=r||O.get(m);w=!P&&y.get(m)||{};var p=!!w.state;P||p&&1===w.state||(P=!E(m,ia,J));if(P)return r&&
1759 m.parentNode,n=pa(n),q=new H,u=v();Z(n.addClass)&&(n.addClass=n.addClass.join(" "));n.addClass&&!G(n.addClass)&&(n.addClass=null);Z(n.removeClass)&&(n.removeClass=n.removeClass.join(" "));n.removeClass&&!G(n.removeClass)&&(n.removeClass=null);n.from&&!ta(n.from)&&(n.from=null);n.to&&!ta(n.to)&&(n.to=null);if(!(B&&m&&fa(m,J,w)&&Ya(m,n)))return I(),q;var x=0<=["enter","move","leave"].indexOf(J),r=da(),P=r||O.get(m);w=!P&&y.get(m)||{};var p=!!w.state;P||p&&1===w.state||(P=!E(m,ia,J));if(P)return r&&
1760 e(q,J,"start",b(n)),I(),r&&e(q,J,"close",b(n)),q;x&&F(m);r={structural:x,element:h,event:J,addClass:n.addClass,removeClass:n.removeClass,close:I,options:n,runner:q};if(p){if(f("skip",r,w)){if(2===w.state)return I(),q;T(h,w,r);return w.runner}if(f("cancel",r,w))if(2===w.state)w.runner.end();else if(w.structural)w.close();else return T(h,w,r),w.runner;else if(f("join",r,w))if(2===w.state)T(h,r,{});else return Ua(t,h,x?J:null,n),J=r.event=w.event,n=T(h,w,r),w.runner}else T(h,r,{});(p=r.structural)||
1760 e(q,J,"start",b(n)),I(),r&&e(q,J,"close",b(n)),q;x&&F(m);r={structural:x,element:h,event:J,addClass:n.addClass,removeClass:n.removeClass,close:I,options:n,runner:q};if(p){if(f("skip",r,w)){if(2===w.state)return I(),q;T(h,w,r);return w.runner}if(f("cancel",r,w))if(2===w.state)w.runner.end();else if(w.structural)w.close();else return T(h,w,r),w.runner;else if(f("join",r,w))if(2===w.state)T(h,r,{});else return Ua(t,h,x?J:null,n),J=r.event=w.event,n=T(h,w,r),w.runner}else T(h,r,{});(p=r.structural)||
1761 (p="animate"===r.event&&0<Object.keys(r.options.to||{}).length||k(r));if(!p)return I(),g(m),q;var C=(w.counter||0)+1;r.counter=C;l(m,1,r);d.$$postDigest(function(){h=Ha(a);var c=y.get(m),d=!c,c=c||{},t=0<(h.parent()||[]).length&&("animate"===c.event||c.structural||k(c));if(d||c.counter!==C||!t){d&&(W(h,n),ha(h,n));if(d||x&&c.event!==J)n.domOperation(),q.end();t||g(m)}else J=!c.structural&&k(c,!0)?"setClass":c.event,l(m,2),c=oa(h,J,c.options),q.setHost(c),e(q,J,"start",b(n)),c.done(function(a){I(!a);
1761 (p="animate"===r.event&&0<Object.keys(r.options.to||{}).length||k(r));if(!p)return I(),g(m),q;var C=(w.counter||0)+1;r.counter=C;l(m,1,r);d.$$postDigest(function(){h=Ha(a);var c=y.get(m),d=!c,c=c||{},t=0<(h.parent()||[]).length&&("animate"===c.event||c.structural||k(c));if(d||c.counter!==C||!t){d&&(W(h,n),ha(h,n));if(d||x&&c.event!==J)n.domOperation(),q.end();t||g(m)}else J=!c.structural&&k(c,!0)?"setClass":c.event,l(m,2),c=oa(h,J,c.options),q.setHost(c),e(q,J,"start",b(n)),c.done(function(a){I(!a);
1762 (a=y.get(m))&&a.counter===C&&g(m);e(q,J,"close",b(n))})});return q}function F(a){a=a.querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=y.get(a);if(c)switch(b){case 2:c.runner.end();case 1:y.delete(a)}})}function g(a){a.removeAttribute("data-ng-animate");y.delete(a)}function E(a,b,c){c=C[0].body;var l=K(e),g=a===c||"HTML"===a.nodeName,d=a===l,t=!1,m=O.get(a),h;for((a=A.data(a,"$ngAnimatePin"))&&(b=K(a));b;){d||(d=b===l);if(1!==b.nodeType)break;
1762 (a=y.get(m))&&a.counter===C&&g(m);e(q,J,"close",b(n))})});return q}function F(a){a=a.querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=y.get(a);if(c)switch(b){case 2:c.runner.end();case 1:y.delete(a)}})}function g(a){a.removeAttribute("data-ng-animate");y.delete(a)}function E(a,b,c){c=C[0].body;var l=K(e),g=a===c||"HTML"===a.nodeName,d=a===l,t=!1,m=O.get(a),h;for((a=A.data(a,"$ngAnimatePin"))&&(b=K(a));b;){d||(d=b===l);if(1!==b.nodeType)break;
1763 a=y.get(b)||{};if(!t){var f=O.get(b);if(!0===f&&!1!==m){m=!0;break}else!1===f&&(m=!1);t=a.structural}if(R(h)||!0===h)a=A.data(b,"$$ngAnimateChildren"),za(a)&&(h=a);if(t&&!1===h)break;g||(g=b===c);if(g&&d)break;if(!d&&(a=A.data(b,"$ngAnimatePin"))){b=K(a);continue}b=b.parentNode}return(!t||h)&&!0!==m&&d&&g}function l(a,b,c){c=c||{};c.state=b;a.setAttribute("data-ng-animate",b);c=(b=y.get(a))?wa(b,c):c;y.set(a,c)}var y=new U,O=new U,B=null,P=d.$watch(function(){return 0===u.totalPendingRequests},function(a){a&&
1763 a=y.get(b)||{};if(!t){var f=O.get(b);if(!0===f&&!1!==m){m=!0;break}else!1===f&&(m=!1);t=a.structural}if(R(h)||!0===h)a=A.data(b,"$$ngAnimateChildren"),za(a)&&(h=a);if(t&&!1===h)break;g||(g=b===c);if(g&&d)break;if(!d&&(a=A.data(b,"$ngAnimatePin"))){b=K(a);continue}b=b.parentNode}return(!t||h)&&!0!==m&&d&&g}function l(a,b,c){c=c||{};c.state=b;a.setAttribute("data-ng-animate",b);c=(b=y.get(a))?wa(b,c):c;y.set(a,c)}var y=new U,O=new U,B=null,P=d.$watch(function(){return 0===u.totalPendingRequests},function(a){a&&
1764 (P(),d.$$postDigest(function(){d.$$postDigest(function(){null===B&&(B=!0)})}))}),m=Object.create(null);U=a.customFilter();var la=a.classNameFilter();I=function(){return!0};var fa=U||I,Ya=la?function(a,b){var c=[a.getAttribute("class"),b.addClass,b.removeClass].join(" ");return la.test(c)}:I,W=aa(t),Oa=Y.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},D={on:function(a,b,c){var l=va(b);m[a]=m[a]||[];m[a].push({node:l,callback:c});A(b).on("$destroy",function(){y.get(l)||
1764 (P(),d.$$postDigest(function(){d.$$postDigest(function(){null===B&&(B=!0)})}))}),m=Object.create(null);U=a.customFilter();var la=a.classNameFilter();I=function(){return!0};var fa=U||I,Ya=la?function(a,b){var c=[a.getAttribute("class"),b.addClass,b.removeClass].join(" ");return la.test(c)}:I,W=aa(t),Oa=Y.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},D={on:function(a,b,c){var l=va(b);m[a]=m[a]||[];m[a].push({node:l,callback:c});A(b).on("$destroy",function(){y.get(l)||
1765 D.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var l=m[a];l&&(m[a]=1===arguments.length?null:h(l,b,c))}else for(l in b=arguments[0],m)m[l]=h(m[l],b)},pin:function(a,b){Fa(sa(a),"element","not an element");Fa(sa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,l){c=c||{};c.domOperation=l;return q(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!B;else if(sa(a)){var l=K(a);if(1===c)b=!O.get(l);else{if(!O.has(l))A(a).on("$destroy",
1765 D.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var l=m[a];l&&(m[a]=1===arguments.length?null:h(l,b,c))}else for(l in b=arguments[0],m)m[l]=h(m[l],b)},pin:function(a,b){Fa(sa(a),"element","not an element");Fa(sa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,l){c=c||{};c.domOperation=l;return q(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!B;else if(sa(a)){var l=K(a);if(1===c)b=!O.get(l);else{if(!O.has(l))A(a).on("$destroy",
1766 ia);O.set(l,!b)}}else b=B=!!a;return b}};return D}]}]).provider("$$animateCache",function(){var a=0,b=Object.create(null);this.$get=[function(){return{cacheKey:function(b,d,f,k){var e=b.parentNode;b=[e.$$ngAnimateParentKey||(e.$$ngAnimateParentKey=++a),d,b.getAttribute("class")];f&&b.push(f);k&&b.push(k);return b.join(" ")},containsCachedAnimationWithoutDuration:function(a){return(a=b[a])&&!a.isValid||!1},flush:function(){b=Object.create(null)},count:function(a){return(a=b[a])?a.total:0},get:function(a){return(a=
1766 ia);O.set(l,!b)}}else b=B=!!a;return b}};return D}]}]).provider("$$animateCache",function(){var a=0,b=Object.create(null);this.$get=[function(){return{cacheKey:function(b,d,f,k){var e=b.parentNode;b=[e.$$ngAnimateParentKey||(e.$$ngAnimateParentKey=++a),d,b.getAttribute("class")];f&&b.push(f);k&&b.push(k);return b.join(" ")},containsCachedAnimationWithoutDuration:function(a){return(a=b[a])&&!a.isValid||!1},flush:function(){b=Object.create(null)},count:function(a){return(a=b[a])?a.total:0},get:function(a){return(a=
1767 b[a])&&a.value},put:function(a,d,f){b[a]?(b[a].total++,b[a].value=d):b[a]={total:1,value:d,isValid:f}}}}]}).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler","$$animateCache",function(a,d,f,k,e,Q,L){function x(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,t=d.parentNode;f.set(d,a);for(var h;t;){if(h=f.get(t)){h.processed||(h=b(h));break}t=t.parentNode}(h||
1767 b[a])&&a.value},put:function(a,d,f){b[a]?(b[a].total++,b[a].value=d):b[a]={total:1,value:d,isValid:f}}}}]}).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler","$$animateCache",function(a,d,f,k,e,Q,L){function x(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,t=d.parentNode;f.set(d,a);for(var h;t;){if(h=f.get(t)){h.processed||(h=b(h));break}t=t.parentNode}(h||
1768 c).children.push(a);return a}var c={children:[]},d,f=new e;for(d=0;d<a.length;d++){var da=a[d];f.set(da.domNode,a[d]={domNode:da.domNode,element:da.element,fn:da.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var t=0,f=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e,
1768 c).children.push(a);return a}var c={children:[]},d,f=new e;for(d=0;d<a.length;d++){var da=a[d];f.set(da.domNode,a[d]={domNode:da.domNode,element:da.element,fn:da.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var t=0,f=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e,
1769 H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c,
1769 H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c,
1770 t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" ");
1770 t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" ");
1771 b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var g=a[d];if("ng-"!==g.substring(0,3))for(var t=0;t<b.length;t++)if(g===b[t]){c.push(g);break}}return c.join(" ")}function ia(a){for(var c=b.length-1;0<=c;c--){var d=f.get(b[c])(a);if(d)return d}}function v(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function ua(){var a=e.data("$$animationRunner");!a||"leave"===H&&u.$$domOperationFired||a.end()}function h(b){e.off("$destroy",
1771 b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var g=a[d];if("ng-"!==g.substring(0,3))for(var t=0;t<b.length;t++)if(g===b[t]){c.push(g);break}}return c.join(" ")}function ia(a){for(var c=b.length-1;0<=c;c--){var d=f.get(b[c])(a);if(d)return d}}function v(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function ua(){var a=e.data("$$animationRunner");!a||"leave"===H&&u.$$domOperationFired||a.end()}function h(b){e.off("$destroy",
1772 ua);e.removeData("$$animationRunner");U(e,u);ha(e,u);u.domOperation();E&&a.removeClass(e,E);F.complete(!b)}u=pa(u);var q=0<=["enter","move","leave"].indexOf(H),F=new k({end:function(){h()},cancel:function(){h(!0)}});if(!b.length)return h(),F;var g=Ga(e.attr("class"),Ga(u.addClass,u.removeClass)),E=u.tempClasses;E&&(g+=" "+E,u.tempClasses=null);q&&e.data("$$animatePrepareClasses","ng-"+H+"-prepare");e.data("$$animationRunner",F);C.push({element:e,classes:g,event:H,structural:q,options:u,beforeStart:function(){E=
1772 ua);e.removeData("$$animationRunner");U(e,u);ha(e,u);u.domOperation();E&&a.removeClass(e,E);F.complete(!b)}u=pa(u);var q=0<=["enter","move","leave"].indexOf(H),F=new k({end:function(){h()},cancel:function(){h(!0)}});if(!b.length)return h(),F;var g=Ga(e.attr("class"),Ga(u.addClass,u.removeClass)),E=u.tempClasses;E&&(g+=" "+E,u.tempClasses=null);q&&e.data("$$animatePrepareClasses","ng-"+H+"-prepare");e.data("$$animationRunner",F);C.push({element:e,classes:g,event:H,structural:q,options:u,beforeStart:function(){E=
1773 (E?E+" ":"")+"ng-animate";a.addClass(e,E);var b=e.data("$$animatePrepareClasses");b&&a.removeClass(e,b)},close:h});e.on("$destroy",ua);if(1<C.length)return F;d.$$postDigest(function(){var b=[];s(C,function(a){a.element.data("$$animationRunner")?b.push(a):a.close()});C.length=0;var d=I(b),g=[];s(d,function(a){var b=a.from?a.from.element:a.element,c=u.addClass,d=L.cacheKey(b[0],a.event,(c?c+" ":"")+"ng-animate",u.removeClass);g.push({element:b,domNode:K(b),fn:function(){var b,c=a.close;if(L.containsCachedAnimationWithoutDuration(d))c();
1773 (E?E+" ":"")+"ng-animate";a.addClass(e,E);var b=e.data("$$animatePrepareClasses");b&&a.removeClass(e,b)},close:h});e.on("$destroy",ua);if(1<C.length)return F;d.$$postDigest(function(){var b=[];s(C,function(a){a.element.data("$$animationRunner")?b.push(a):a.close()});C.length=0;var d=I(b),g=[];s(d,function(a){var b=a.from?a.from.element:a.element,c=u.addClass,d=L.cacheKey(b[0],a.event,(c?c+" ":"")+"ng-animate",u.removeClass);g.push({element:b,domNode:K(b),fn:function(){var b,c=a.close;if(L.containsCachedAnimationWithoutDuration(d))c();
1774 else{a.beforeStart();if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var g=ia(a);g&&(b=g.start)}b?(b=b(),b.done(function(a){c(!a)}),v(a,b)):c()}}})});for(var d=x(g),t=0;t<d.length;t++)for(var f=d[t],e=0;e<f.length;e++){var h=f[e],k=h.element;d[t][e]=h.fn;0===t?k.removeData("$$animatePrepareClasses"):(h=k.data("$$animatePrepareClasses"))&&a.addClass(k,h)}Q(d)});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){this.$get=["$window","$$jqLite","$$AnimateRunner",
1774 else{a.beforeStart();if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var g=ia(a);g&&(b=g.start)}b?(b=b(),b.done(function(a){c(!a)}),v(a,b)):c()}}})});for(var d=x(g),t=0;t<d.length;t++)for(var f=d[t],e=0;e<f.length;e++){var h=f[e],k=h.element;d[t][e]=h.fn;0===t?k.removeData("$$animatePrepareClasses"):(h=k.data("$$animatePrepareClasses"))&&a.addClass(k,h)}Q(d)});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){this.$get=["$window","$$jqLite","$$AnimateRunner",
1775 "$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,c,d,f,k,e,Q,L,x){function C(d,f,e,x){var v,s="stagger-"+e;0<k.count(e)&&(v=k.get(s),v||(f=$(f,"-stagger"),c.addClass(d,f),v=Ka(a,d,x),v.animationDuration=Math.max(v.animationDuration,0),v.transitionDuration=Math.max(v.transitionDuration,0),c.removeClass(d,f),k.put(s,v,!0)));return v||{}}function U(a){u.push(a);L.waitUntilQuiet(function(){k.flush();for(var a=e(),b=0;b<u.length;b++)u[b](a);u.length=0})}
1775 "$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,c,d,f,k,e,Q,L,x){function C(d,f,e,x){var v,s="stagger-"+e;0<k.count(e)&&(v=k.get(s),v||(f=$(f,"-stagger"),c.addClass(d,f),v=Ka(a,d,x),v.animationDuration=Math.max(v.animationDuration,0),v.transitionDuration=Math.max(v.transitionDuration,0),c.removeClass(d,f),k.put(s,v,!0)));return v||{}}function U(a){u.push(a);L.waitUntilQuiet(function(){k.flush();for(var a=e(),b=0;b<u.length;b++)u[b](a);u.length=0})}
1776 function z(c,d,f,e){d=k.get(f);d||(d=Ka(a,c,Wa),"infinite"===d.animationIterationCount&&(d.animationIterationCount=1));k.put(f,d,e||0<d.transitionDuration||0<d.animationDuration);c=d;f=c.animationDelay;e=c.transitionDelay;c.maxDelay=f&&e?Math.max(f,e):f||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var H=aa(c),u=[];return function(a,b){function e(){v()}function L(){v(!0)}function v(b){if(!(P||la&&m)){P=!0;m=!1;V&&!g.$$skipPreparationClasses&&
1776 function z(c,d,f,e){d=k.get(f);d||(d=Ka(a,c,Wa),"infinite"===d.animationIterationCount&&(d.animationIterationCount=1));k.put(f,d,e||0<d.transitionDuration||0<d.animationDuration);c=d;f=c.animationDelay;e=c.transitionDelay;c.maxDelay=f&&e?Math.max(f,e):f||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var H=aa(c),u=[];return function(a,b){function e(){v()}function L(){v(!0)}function v(b){if(!(P||la&&m)){P=!0;m=!1;V&&!g.$$skipPreparationClasses&&
1777 c.removeClass(a,V);ba&&c.removeClass(a,ba);xa(l,!1);ra.blockTransitions(l,!1);s(y,function(a){l.style[a[0]]=""});H(a,g);ha(a,g);Object.keys(E).length&&s(E,function(a,b){a?l.style.setProperty(b,a):l.style.removeProperty(b)});if(g.onDone)g.onDone();w&&w.length&&a.off(w.join(" "),q);var d=a.data("$$animateCss");d&&(f.cancel(d[0].timer),a.removeData("$$animateCss"));fa&&fa.complete(!b)}}function u(a){p.blockTransition&&ra.blockTransitions(l,a);p.blockKeyframeAnimation&&xa(l,!!a)}function h(){fa=new d({end:e,
1777 c.removeClass(a,V);ba&&c.removeClass(a,ba);xa(l,!1);ra.blockTransitions(l,!1);s(y,function(a){l.style[a[0]]=""});H(a,g);ha(a,g);Object.keys(E).length&&s(E,function(a,b){a?l.style.setProperty(b,a):l.style.removeProperty(b)});if(g.onDone)g.onDone();w&&w.length&&a.off(w.join(" "),q);var d=a.data("$$animateCss");d&&(f.cancel(d[0].timer),a.removeData("$$animateCss"));fa&&fa.complete(!b)}}function u(a){p.blockTransition&&ra.blockTransitions(l,a);p.blockKeyframeAnimation&&xa(l,!!a)}function h(){fa=new d({end:e,
1778 cancel:L});U(N);v();return{$$willAnimate:!1,start:function(){return fa},end:e}}function q(a){a.stopPropagation();var b=a.originalEvent||a;b.target===l&&(a=b.$manualTimeStamp||Date.now(),b=parseFloat(b.elapsedTime.toFixed(3)),Math.max(a-J,0)>=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W=
1778 cancel:L});U(N);v();return{$$willAnimate:!1,start:function(){return fa},end:e}}function q(a){a.stopPropagation();var b=a.originalEvent||a;b.target===l&&(a=b.$manualTimeStamp||Date.now(),b=parseFloat(b.elapsedTime.toFixed(3)),Math.max(a-J,0)>=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W=
1779 Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration}p.applyAnimationDelay&&(ga="boolean"!==typeof g.delay&&ya(g.delay)?parseFloat(g.delay):ga,W=Math.max(ga,0),r.animationDelay=ga,ea=[qa,ga+"s"],y.push(ea),l.style[ea[0]]=ea[1]);G=1E3*W;R=1E3*D;if(g.easing){var e,h=g.easing;p.hasTransitions&&(e=M+"TimingFunction",y.push([e,h]),l.style[e]=h);p.hasAnimations&&(e=ca+"TimingFunction",y.push([e,h]),l.style[e]=h)}r.transitionDuration&&
1779 Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration}p.applyAnimationDelay&&(ga="boolean"!==typeof g.delay&&ya(g.delay)?parseFloat(g.delay):ga,W=Math.max(ga,0),r.animationDelay=ga,ea=[qa,ga+"s"],y.push(ea),l.style[ea[0]]=ea[1]);G=1E3*W;R=1E3*D;if(g.easing){var e,h=g.easing;p.hasTransitions&&(e=M+"TimingFunction",y.push([e,h]),l.style[e]=h);p.hasAnimations&&(e=ca+"TimingFunction",y.push([e,h]),l.style[e]=h)}r.transitionDuration&&
1780 w.push(Aa);r.animationDuration&&w.push(Ba);J=Date.now();var m=G+1.5*R;e=J+m;var h=a.data("$$animateCss")||[],F=!0;if(h.length){var n=h[0];(F=e>n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}if(!P)if(l.parentNode){var e=
1780 w.push(Aa);r.animationDuration&&w.push(Ba);J=Date.now();var m=G+1.5*R;e=J+m;var h=a.data("$$animateCss")||[],F=!0;if(h.length){var n=h[0];(F=e>n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}if(!P)if(l.parentNode){var e=
1781 function(a){if(la)m&&a&&(m=!1,v());else if(m=!a,r.animationDuration)if(a=xa(l,m),m)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},h=0<aa&&(r.transitionDuration&&0===X.transitionDuration||r.animationDuration&&0===X.animationDuration)&&Math.max(X.animationDelay,X.transitionDelay);h?f(b,Math.floor(h*aa*1E3),!1):b();A.resume=function(){e(!0)};A.pause=function(){e(!1)}}else v()}var g=b||{};g.$$prepared||(g=pa(Da(g)));var E={},l=K(a);if(!l||!l.parentNode||!x.enabled())return h();var y=[],O=
1781 function(a){if(la)m&&a&&(m=!1,v());else if(m=!a,r.animationDuration)if(a=xa(l,m),m)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},h=0<aa&&(r.transitionDuration&&0===X.transitionDuration||r.animationDuration&&0===X.animationDuration)&&Math.max(X.animationDelay,X.transitionDelay);h?f(b,Math.floor(h*aa*1E3),!1):b();A.resume=function(){e(!0)};A.pause=function(){e(!1)}}else v()}var g=b||{};g.$$prepared||(g=pa(Da(g)));var E={},l=K(a);if(!l||!l.parentNode||!x.enabled())return h();var y=[],O=
1782 a.attr("class"),B=Qa(g),P,m,la,fa,A,W,G,D,R,J,w=[];if(0===g.duration||!Q.animations&&!Q.transitions)return h();var ja=g.event&&Z(g.event)?g.event.join(" "):g.event,Y=ja&&g.structural,n="",S="";Y?n=$(ja,"ng-",!0):ja&&(n=ja);g.addClass&&(S+=$(g.addClass,"-add"));g.removeClass&&(S.length&&(S+=" "),S+=$(g.removeClass,"-remove"));g.applyClassesEarly&&S.length&&H(a,g);var V=[n,S].join(" ").trim(),T=O+" "+V,O=B.to&&0<Object.keys(B.to).length;if(!(0<(g.keyframeStyle||"").length||O||V))return h();var X,ka=
1782 a.attr("class"),B=Qa(g),P,m,la,fa,A,W,G,D,R,J,w=[];if(0===g.duration||!Q.animations&&!Q.transitions)return h();var ja=g.event&&Z(g.event)?g.event.join(" "):g.event,Y=ja&&g.structural,n="",S="";Y?n=$(ja,"ng-",!0):ja&&(n=ja);g.addClass&&(S+=$(g.addClass,"-add"));g.removeClass&&(S.length&&(S+=" "),S+=$(g.removeClass,"-remove"));g.applyClassesEarly&&S.length&&H(a,g);var V=[n,S].join(" ").trim(),T=O+" "+V,O=B.to&&0<Object.keys(B.to).length;if(!(0<(g.keyframeStyle||"").length||O||V))return h();var X,ka=
1783 k.cacheKey(l,ja,g.addClass,g.removeClass);if(k.containsCachedAnimationWithoutDuration(ka))return V=null,h();0<g.stagger?(B=parseFloat(g.stagger),X={transitionDelay:B,animationDelay:B,transitionDuration:0,animationDuration:0}):X=C(l,V,ka,Xa);g.$$skipPreparationClasses||c.addClass(a,V);g.transitionStyle&&(B=[M,g.transitionStyle],ma(l,B),y.push(B));0<=g.duration&&(B=0<l.style[M].length,B=La(g.duration,B),ma(l,B),y.push(B));g.keyframeStyle&&(B=[ca,g.keyframeStyle],ma(l,B),y.push(B));var aa=X?0<=g.staggerIndex?
1783 k.cacheKey(l,ja,g.addClass,g.removeClass);if(k.containsCachedAnimationWithoutDuration(ka))return V=null,h();0<g.stagger?(B=parseFloat(g.stagger),X={transitionDelay:B,animationDelay:B,transitionDuration:0,animationDuration:0}):X=C(l,V,ka,Xa);g.$$skipPreparationClasses||c.addClass(a,V);g.transitionStyle&&(B=[M,g.transitionStyle],ma(l,B),y.push(B));0<=g.duration&&(B=0<l.style[M].length,B=La(g.duration,B),ma(l,B),y.push(B));g.keyframeStyle&&(B=[ca,g.keyframeStyle],ma(l,B),y.push(B));var aa=X?0<=g.staggerIndex?
1784 g.staggerIndex:k.count(ka):0;(n=0===aa)&&!g.skipBlocking&&ra.blockTransitions(l,9999);var r=z(l,T,ka,!Y),ga=r.maxDelay;W=Math.max(ga,0);D=r.maxDuration;var p={};p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"===r.transitionProperty;p.applyTransitionDuration=O&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=g.duration&&p.hasAnimations;p.applyTransitionDelay=ya(g.delay)&&(p.applyTransitionDuration||
1784 g.staggerIndex:k.count(ka):0;(n=0===aa)&&!g.skipBlocking&&ra.blockTransitions(l,9999);var r=z(l,T,ka,!Y),ga=r.maxDelay;W=Math.max(ga,0);D=r.maxDuration;var p={};p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"===r.transitionProperty;p.applyTransitionDuration=O&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=g.duration&&p.hasAnimations;p.applyTransitionDelay=ya(g.delay)&&(p.applyTransitionDuration||
1785 p.hasTransitions);p.applyAnimationDelay=ya(g.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<S.length;if(p.applyTransitionDuration||p.applyAnimationDuration)D=g.duration?parseFloat(g.duration):D,p.applyTransitionDuration&&(p.hasTransitions=!0,r.transitionDuration=D,B=0<l.style[M+"Property"].length,y.push(La(D,B))),p.applyAnimationDuration&&(p.hasAnimations=!0,r.animationDuration=D,y.push([Ca,D+"s"]));if(0===D&&!p.recalculateTimingStyles)return h();var ba=$(V,"-active");if(null!=g.delay){var ea;
1785 p.hasTransitions);p.applyAnimationDelay=ya(g.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<S.length;if(p.applyTransitionDuration||p.applyAnimationDuration)D=g.duration?parseFloat(g.duration):D,p.applyTransitionDuration&&(p.hasTransitions=!0,r.transitionDuration=D,B=0<l.style[M+"Property"].length,y.push(La(D,B))),p.applyAnimationDuration&&(p.hasAnimations=!0,r.animationDuration=D,y.push([Ca,D+"s"]));if(0===D&&!p.recalculateTimingStyles)return h();var ba=$(V,"-active");if(null!=g.delay){var ea;
1786 "boolean"!==typeof g.delay&&(ea=parseFloat(g.delay),W=Math.max(ea,0));p.applyTransitionDelay&&y.push([na,ea+"s"]);p.applyAnimationDelay&&y.push([qa,ea+"s"])}null==g.duration&&0<r.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||n);G=1E3*W;R=1E3*D;g.skipBlocking||(p.blockTransition=0<r.transitionDuration,p.blockKeyframeAnimation=0<r.animationDuration&&0<X.animationDelay&&0===X.animationDuration);g.from&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.from)),Ia(a,g));p.blockTransition||
1786 "boolean"!==typeof g.delay&&(ea=parseFloat(g.delay),W=Math.max(ea,0));p.applyTransitionDelay&&y.push([na,ea+"s"]);p.applyAnimationDelay&&y.push([qa,ea+"s"])}null==g.duration&&0<r.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||n);G=1E3*W;R=1E3*D;g.skipBlocking||(p.blockTransition=0<r.transitionDuration,p.blockKeyframeAnimation=0<r.animationDuration&&0<X.animationDelay&&0===X.animationDuration);g.from&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.from)),Ia(a,g));p.blockTransition||
1787 p.blockKeyframeAnimation?u(D):g.skipBlocking||ra.blockTransitions(l,!1);return{$$willAnimate:!0,end:e,start:function(){if(!P)return A={end:e,cancel:L,resume:null,pause:null},fa=new d(A),U(F),fa}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,f,k,e,Q){function L(a){return a.replace(/\bng-\S+\b/g,"")}function x(a,b){G(a)&&
1787 p.blockKeyframeAnimation?u(D):g.skipBlocking||ra.blockTransitions(l,!1);return{$$willAnimate:!0,end:e,start:function(){if(!P)return A={end:e,cancel:L,resume:null,pause:null},fa=new d(A),U(F),fa}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,f,k,e,Q){function L(a){return a.replace(/\bng-\S+\b/g,"")}function x(a,b){G(a)&&
1788 (a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function C(c,e,f){function k(a){var b={},c=K(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=H.scrollTop;break;case "left":d+=H.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function v(){var c=L(f.attr("class")||""),d=x(c,q),c=x(q,c),d=a(h,{to:k(f),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?
1788 (a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function C(c,e,f){function k(a){var b={},c=K(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=H.scrollTop;break;case "left":d+=H.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function v(){var c=L(f.attr("class")||""),d=x(c,q),c=x(q,c),d=a(h,{to:k(f),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?
1789 d:null}function C(){h.remove();e.removeClass("ng-animate-shim");f.removeClass("ng-animate-shim")}var h=A(K(e).cloneNode(!0)),q=L(h.attr("class")||"");e.addClass("ng-animate-shim");f.addClass("ng-animate-shim");h.addClass("ng-anchor");u.append(h);var F;c=function(){var c=a(h,{addClass:"ng-anchor-out",delay:!0,from:k(e)});return c.$$willAnimate?c:null}();if(!c&&(F=v(),!F))return C();var g=c||F;return{start:function(){function a(){c&&c.end()}var b,c=g.start();c.done(function(){c=null;if(!F&&(F=v()))return c=
1789 d:null}function C(){h.remove();e.removeClass("ng-animate-shim");f.removeClass("ng-animate-shim")}var h=A(K(e).cloneNode(!0)),q=L(h.attr("class")||"");e.addClass("ng-animate-shim");f.addClass("ng-animate-shim");h.addClass("ng-anchor");u.append(h);var F;c=function(){var c=a(h,{addClass:"ng-anchor-out",delay:!0,from:k(e)});return c.$$willAnimate?c:null}();if(!c&&(F=v(),!F))return C();var g=c||F;return{start:function(){function a(){c&&c.end()}var b,c=g.start();c.done(function(){c=null;if(!F&&(F=v()))return c=
1790 F.start(),c.done(function(){c=null;C();b.complete()}),c;C();b.complete()});return b=new d({end:a,cancel:a})}}}function z(a,b,c,e){var f=oa(a,N),k=oa(b,N),h=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&h.push(a)});if(f||k||0!==h.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];f&&b.push(f.start());k&&b.push(k.start());s(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function oa(c){var d=c.element,e=c.options||
1790 F.start(),c.done(function(){c=null;C();b.complete()}),c;C();b.complete()});return b=new d({end:a,cancel:a})}}}function z(a,b,c,e){var f=oa(a,N),k=oa(b,N),h=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&h.push(a)});if(f||k||0!==h.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];f&&b.push(f.start());k&&b.push(k.start());s(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function oa(c){var d=c.element,e=c.options||
1791 {};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=e.domOperation));e.preparationClasses&&(e.event=ba(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!k.animations&&!k.transitions)return N;var H=Q[0].body;c=K(f);var u=A(c.parentNode&&11===c.parentNode.nodeType||H.contains(c)?c:H);return function(a){return a.from&&a.to?z(a.from,a.to,a.classes,a.anchors):oa(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=
1791 {};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=e.domOperation));e.preparationClasses&&(e.event=ba(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!k.animations&&!k.transitions)return N;var H=Q[0].body;c=K(f);var u=A(c.parentNode&&11===c.parentNode.nodeType||H.contains(c)?c:H);return function(a){return a.from&&a.to?z(a.from,a.to,a.classes,a.anchors):oa(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=
1792 ["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function f(c){c=Z(c)?c:c.split(" ");for(var d=[],f={},k=0;k<c.length;k++){var s=c[k],z=a.$$registeredAnimations[s];z&&!f[s]&&(d.push(b.get(z)),f[s]=!0)}return d}var k=aa(d);return function(a,b,d,x){function C(){x.domOperation();k(a,x)}function z(a,b,d,f,e){switch(d){case "animate":b=[b,f.from,f.to,e];break;case "setClass":b=[b,t,I,e];break;case "addClass":b=[b,t,e];break;case "removeClass":b=[b,I,e];break;default:b=[b,e]}b.push(f);if(a=a.apply(a,
1792 ["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function f(c){c=Z(c)?c:c.split(" ");for(var d=[],f={},k=0;k<c.length;k++){var s=c[k],z=a.$$registeredAnimations[s];z&&!f[s]&&(d.push(b.get(z)),f[s]=!0)}return d}var k=aa(d);return function(a,b,d,x){function C(){x.domOperation();k(a,x)}function z(a,b,d,f,e){switch(d){case "animate":b=[b,f.from,f.to,e];break;case "setClass":b=[b,t,I,e];break;case "addClass":b=[b,t,e];break;case "removeClass":b=[b,I,e];break;default:b=[b,e]}b.push(f);if(a=a.apply(a,
1793 b))if(Ea(a.start)&&(a=a.start()),a instanceof c)a.done(e);else if(Ea(a))return a;return N}function A(a,b,d,e,f){var h=[];s(e,function(e){var l=e[f];l&&h.push(function(){var e,f,h=!1,k=function(a){h||(h=!0,(f||N)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=z(l,a,b,d,function(a){k(!1===a)});return e})});return h}function H(a,b,d,e,f){var h=A(a,b,d,e,f);if(0===h.length){var k,q;"beforeSetClass"===f?(k=A(a,"removeClass",d,e,"beforeRemoveClass"),q=A(a,"addClass",d,e,"beforeAddClass")):
1793 b))if(Ea(a.start)&&(a=a.start()),a instanceof c)a.done(e);else if(Ea(a))return a;return N}function A(a,b,d,e,f){var h=[];s(e,function(e){var l=e[f];l&&h.push(function(){var e,f,h=!1,k=function(a){h||(h=!0,(f||N)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=z(l,a,b,d,function(a){k(!1===a)});return e})});return h}function H(a,b,d,e,f){var h=A(a,b,d,e,f);if(0===h.length){var k,q;"beforeSetClass"===f?(k=A(a,"removeClass",d,e,"beforeRemoveClass"),q=A(a,"addClass",d,e,"beforeAddClass")):
1794 "setClass"===f&&(k=A(a,"removeClass",d,e,"removeClass"),q=A(a,"addClass",d,e,"addClass"));k&&(h=h.concat(k));q&&(h=h.concat(q))}if(0!==h.length)return function(a){var b=[];h.length&&s(h,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var u=!1;3===arguments.length&&ta(d)&&(x=d,d=null);x=pa(x);d||(d=a.attr("class")||"",x.addClass&&(d+=" "+x.addClass),x.removeClass&&(d+=" "+x.removeClass));var t=x.addClass,I=x.removeClass,G=f(d),K,v;if(G.length){var M,
1794 "setClass"===f&&(k=A(a,"removeClass",d,e,"removeClass"),q=A(a,"addClass",d,e,"addClass"));k&&(h=h.concat(k));q&&(h=h.concat(q))}if(0!==h.length)return function(a){var b=[];h.length&&s(h,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var u=!1;3===arguments.length&&ta(d)&&(x=d,d=null);x=pa(x);d||(d=a.attr("class")||"",x.addClass&&(d+=" "+x.addClass),x.removeClass&&(d+=" "+x.removeClass));var t=x.addClass,I=x.removeClass,G=f(d),K,v;if(G.length){var M,
1795 h;"leave"===b?(h="leave",M="afterLeave"):(h="before"+b.charAt(0).toUpperCase()+b.substr(1),M=b);"enter"!==b&&"move"!==b&&(K=H(a,b,x,G,h));v=H(a,b,x,G,M)}if(K||v){var q;return{$$willAnimate:!0,end:function(){q?q.end():(u=!0,C(),ha(a,x),q=new c,q.complete(!0));return q},start:function(){function b(c){u=!0;C();ha(a,x);q.complete(c)}if(q)return q;q=new c;var d,f=[];K&&f.push(function(a){d=K(a)});f.length?f.push(function(a){C();a(!0)}):C();v&&f.push(function(a){d=v(a)});q.setHost({end:function(){u||((d||
1795 h;"leave"===b?(h="leave",M="afterLeave"):(h="before"+b.charAt(0).toUpperCase()+b.substr(1),M=b);"enter"!==b&&"move"!==b&&(K=H(a,b,x,G,h));v=H(a,b,x,G,M)}if(K||v){var q;return{$$willAnimate:!0,end:function(){q?q.end():(u=!0,C(),ha(a,x),q=new c,q.complete(!0));return q},start:function(){function b(c){u=!0;C();ha(a,x);q.complete(c)}if(q)return q;q=new c;var d,f=[];K&&f.push(function(a){d=K(a)});f.length?f.push(function(a){C();a(!0)}):C();v&&f.push(function(a){d=v(a)});q.setHost({end:function(){u||((d||
1796 N)(void 0),b(void 0))},cancel:function(){u||((d||N)(!0),b(!0))}});c.chain(f,b);return q}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),e=d(a.to);if(b||e)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());e&&
1796 N)(void 0),b(void 0))},cancel:function(){u||((d||N)(!0),b(!0))}});c.chain(f,b);return q}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),e=d(a.to);if(b||e)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());e&&
1797 d.push(e.start());c.all(d,function(a){f.complete(a)});var f=new c({end:a(),cancel:a()});return f}}}else return d(a)}}]}])})(window,window.angular);
1797 d.push(e.start());c.all(d,function(a){f.complete(a)});var f=new c({end:a(),cancel:a()});return f}}}else return d(a)}}]}])})(window,window.angular);
1798 //# sourceMappingURL=angular-animate.min.js.map
1798 //# sourceMappingURL=angular-animate.min.js.map
1799
1799
1800 ;/*
1800 ;/*
1801 * angular-ui-bootstrap
1801 * angular-ui-bootstrap
1802 * http://angular-ui.github.io/bootstrap/
1802 * http://angular-ui.github.io/bootstrap/
1803
1803
1804 * Version: 1.3.2 - 2016-04-14
1804 * Version: 1.3.2 - 2016-04-14
1805 * License: MIT
1805 * License: MIT
1806 */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){if(a){var c=angular.element(b[0].querySelector("[uib-accordion-header]"));c.html(""),c.append(a)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;t.length;)t.shift()}function g(a){for(var b=0;b<q.length;b++)q[b].slide.active=b===a}function h(c,d,i){if(!u){if(angular.extend(c,{direction:i}),angular.extend(q[s].slide||{},{direction:i}),e.enabled(b)&&!a.$currentTransition&&q[d].element&&p.slides.length>1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b<q.length;b++)if(q[b].slide===a)return b}function j(){n&&(c.cancel(n),n=null)}function k(b){b.length||(a.$currentTransition=null,f())}function l(){j();var b=+a.interval;!isNaN(b)&&b>0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a<q.length;a++)if(q[a].slide.index===s)return a},p.next=a.next=function(){var b=(p.getCurrentIndex()+1)%q.length;return 0===b&&a.noWrap()?void a.pause():p.select(q[b],"next")},p.prev=a.prev=function(){var b=p.getCurrentIndex()-1<0?q.length-1:p.getCurrentIndex()-1;return a.noWrap()&&b===q.length-1?void a.pause():p.select(q[b],"prev")},p.removeSlide=function(b){var c=i(b),d=t.indexOf(q[c]);-1!==d&&t.splice(d,1),q.splice(c,1),q.length>0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===q.length-1&&a.noWrap()},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b<q.length;b++)if(q[b].slide.index===a){a=b;break}var c=q[a];c&&(g(a),p.select(q[a]),s=a)}})}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h<a.length;h++)g?("'"===a[h]&&(h+1<a.length&&"'"===a[h+1]?(a[h+1]="$",e[h+1]=""):(e[h]="",g=!1)),a[h]="$"):"'"===a[h]&&(a[h]="$",e[h]="",g=!0);a=a.join("")}return angular.forEach(n,function(d){var f=a.indexOf(d.key);if(f>-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,""));var h=d===f.length-1?g:"";return c.apply?b+c.apply.call(null,a)+h:b+h},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}var m=this,n={$setViewValue:angular.noop},o={},p=[];!!b.datepickerOptions;a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:h.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?m.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?m[b]=k.fromTimezone(new Date(a),o.timezone):(i&&f.warn("Literal date support has been deprecated, please switch to date object usage"),m[b]=new Date(g(a,"medium"))):m[b]=h[b]?k.fromTimezone(new Date(h[b]),o.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){m[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)<m.modes.indexOf(m[b])||"maxMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)>m.modes.indexOf(m[b]))&&(a.datepickerMode=m[b],a.datepickerOptions.datepickerMode=m[b])}):m[b]=a[b]=h[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&p.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,m.refreshView()})),a.isActive=function(b){return 0===m.compare(b.date,m.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){n=b,o=b.$options||h.ngModelOptions,a.datepickerOptions.initDate?(m.activeDate=k.fromTimezone(a.datepickerOptions.initDate,o.timezone)||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(m.activeDate=k.fromTimezone(a,o.timezone),m.refreshView())})):m.activeDate=new Date,this.activeDate=n.$modelValue?k.fromTimezone(new Date(n.$modelValue),o.timezone):k.fromTimezone(new Date,o.timezone),n.$render=function(){m.render()}},this.render=function(){if(n.$viewValue){var a=new Date(n.$viewValue),b=!isNaN(a);b?this.activeDate=k.fromTimezone(a,o.timezone):j||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=n.$viewValue?new Date(n.$viewValue):null;b=k.fromTimezone(b,o.timezone),n.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=n.$viewValue?new Date(n.$viewValue):null;d=k.fromTimezone(d,o.timezone);var e=new Date;e=k.fromTimezone(e,o.timezone);var f=this.compare(b,e),g={date:b,label:k.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),m.activeDate&&0===this.compare(g.date,m.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===m.minMode){var c=n.$viewValue?k.fromTimezone(new Date(n.$viewValue),o.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=k.toTimezone(c,o.timezone),n.$setViewValue(c),n.$render()}else m.activeDate=b,l(m.modes[m.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=m.activeDate.getFullYear()+a*(m.step.years||0),c=m.activeDate.getMonth()+a*(m.step.months||0);m.activeDate.setFullYear(b,c,1),m.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===m.maxMode&&1===b||a.datepickerMode===m.minMode&&-1===b||(l(m.modes[m.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var q=function(){m.element[0].focus()};a.$on("uib:datepicker.focus",q),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),m.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(m.isDisabled(m.activeDate))return;a.select(m.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(m.handleKeyDown(c,b),m.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(f,g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX);
1806 */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){if(a){var c=angular.element(b[0].querySelector("[uib-accordion-header]"));c.html(""),c.append(a)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;t.length;)t.shift()}function g(a){for(var b=0;b<q.length;b++)q[b].slide.active=b===a}function h(c,d,i){if(!u){if(angular.extend(c,{direction:i}),angular.extend(q[s].slide||{},{direction:i}),e.enabled(b)&&!a.$currentTransition&&q[d].element&&p.slides.length>1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b<q.length;b++)if(q[b].slide===a)return b}function j(){n&&(c.cancel(n),n=null)}function k(b){b.length||(a.$currentTransition=null,f())}function l(){j();var b=+a.interval;!isNaN(b)&&b>0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a<q.length;a++)if(q[a].slide.index===s)return a},p.next=a.next=function(){var b=(p.getCurrentIndex()+1)%q.length;return 0===b&&a.noWrap()?void a.pause():p.select(q[b],"next")},p.prev=a.prev=function(){var b=p.getCurrentIndex()-1<0?q.length-1:p.getCurrentIndex()-1;return a.noWrap()&&b===q.length-1?void a.pause():p.select(q[b],"prev")},p.removeSlide=function(b){var c=i(b),d=t.indexOf(q[c]);-1!==d&&t.splice(d,1),q.splice(c,1),q.length>0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===q.length-1&&a.noWrap()},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b<q.length;b++)if(q[b].slide.index===a){a=b;break}var c=q[a];c&&(g(a),p.select(q[a]),s=a)}})}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h<a.length;h++)g?("'"===a[h]&&(h+1<a.length&&"'"===a[h+1]?(a[h+1]="$",e[h+1]=""):(e[h]="",g=!1)),a[h]="$"):"'"===a[h]&&(a[h]="$",e[h]="",g=!0);a=a.join("")}return angular.forEach(n,function(d){var f=a.indexOf(d.key);if(f>-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,""));var h=d===f.length-1?g:"";return c.apply?b+c.apply.call(null,a)+h:b+h},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}var m=this,n={$setViewValue:angular.noop},o={},p=[];!!b.datepickerOptions;a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:h.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?m.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?m[b]=k.fromTimezone(new Date(a),o.timezone):(i&&f.warn("Literal date support has been deprecated, please switch to date object usage"),m[b]=new Date(g(a,"medium"))):m[b]=h[b]?k.fromTimezone(new Date(h[b]),o.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){m[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)<m.modes.indexOf(m[b])||"maxMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)>m.modes.indexOf(m[b]))&&(a.datepickerMode=m[b],a.datepickerOptions.datepickerMode=m[b])}):m[b]=a[b]=h[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&p.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,m.refreshView()})),a.isActive=function(b){return 0===m.compare(b.date,m.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){n=b,o=b.$options||h.ngModelOptions,a.datepickerOptions.initDate?(m.activeDate=k.fromTimezone(a.datepickerOptions.initDate,o.timezone)||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(m.activeDate=k.fromTimezone(a,o.timezone),m.refreshView())})):m.activeDate=new Date,this.activeDate=n.$modelValue?k.fromTimezone(new Date(n.$modelValue),o.timezone):k.fromTimezone(new Date,o.timezone),n.$render=function(){m.render()}},this.render=function(){if(n.$viewValue){var a=new Date(n.$viewValue),b=!isNaN(a);b?this.activeDate=k.fromTimezone(a,o.timezone):j||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=n.$viewValue?new Date(n.$viewValue):null;b=k.fromTimezone(b,o.timezone),n.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=n.$viewValue?new Date(n.$viewValue):null;d=k.fromTimezone(d,o.timezone);var e=new Date;e=k.fromTimezone(e,o.timezone);var f=this.compare(b,e),g={date:b,label:k.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),m.activeDate&&0===this.compare(g.date,m.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===m.minMode){var c=n.$viewValue?k.fromTimezone(new Date(n.$viewValue),o.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=k.toTimezone(c,o.timezone),n.$setViewValue(c),n.$render()}else m.activeDate=b,l(m.modes[m.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=m.activeDate.getFullYear()+a*(m.step.years||0),c=m.activeDate.getMonth()+a*(m.step.months||0);m.activeDate.setFullYear(b,c,1),m.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===m.maxMode&&1===b||a.datepickerMode===m.minMode&&-1===b||(l(m.modes[m.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var q=function(){m.element[0].focus()};a.$on("uib:datepicker.focus",q),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),m.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(m.isDisabled(m.activeDate))return;a.select(m.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(m.handleKeyDown(c,b),m.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(f,g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX);
1807 },scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,w,a.date);if(isNaN(c))for(var d=0;d<I.length;d++)if(c=l.parse(b,I[d],a.date),!isNaN(c))return c;return c}function r(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=q(a);if(!isNaN(b))return l.toTimezone(b,J)}return F.$options&&F.$options.allowInvalid?a:void 0}function s(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(q(b)):!1:!0):!0}function t(c){if(a.isOpen||!a.disabled){var d=H[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function u(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function v(){if(a.isOpen){var d=angular.element(H[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,y);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K=!1,L=[];this.init=function(e){if(F=e,G=e.$options,x=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,y=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,z=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,A=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,B=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,I=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(w=m.html5Types[c.type],K=!0):(w=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==w&&(w=c,F.$modelValue=null,!w))throw new Error("uibDatepickerPopup must have a date format specified.")})),!w)throw new Error("uibDatepickerPopup must have a date format specified.");if(K&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");C=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),G?(J=G.timezone,a.ngModelOptions=angular.copy(G),a.ngModelOptions.timezone=null,a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),C.attr("ng-model-options","ngModelOptions")):J=null,C.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),D=angular.element(C.children()[0]),D.attr("template-url",B),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),D.attr("datepicker-options","datepickerOptions"),K?F.$formatters.push(function(b){return a.date=l.fromTimezone(b,J),b}):(F.$$parserName="date",F.$validators.date=s,F.$parsers.unshift(r),F.$formatters.push(function(b){return F.$isEmpty(b)?(a.date=b,b):(a.date=l.fromTimezone(b,J),angular.isNumber(a.date)&&(a.date=new Date(a.date)),l.filter(a.date,w))})),F.$viewChangeListeners.push(function(){a.date=q(F.$viewValue)}),b.on("keydown",u),H=d(C)(a),C.remove(),y?h.find("body").append(H):b.after(H),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),H.remove(),b.off("keydown",u),h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,J));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=l.fromTimezone(new Date(a.datepickerOptions[b]),J):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?l.filter(a.date,w):null;b.val(d),F.$setViewValue(d),x&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),z&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;y||j.parsePlacement(d)[2]?(E=E||angular.element(j.scrollParent(b)),E&&E.on("scroll",v)):E=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b,f){c||(a.on("click",d),f.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b,f){c===b&&(c=null,a.off("click",d),f.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(a.stopPropagation(),c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b,x=w.hasClass(u?p:q);if(x===!c&&g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o,b);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var y=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(y),n.dropdownMenu=y}f.close(o,b),n.selectedOption=null}angular.isFunction(r)&&r(a,c)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap","ui.bootstrap.position"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{replace:!0,templateUrl:"uib/template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowClass||""),f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();g.$observe("modalRender",function(a){"true"===a&&h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(a,b,c,d,e,f,g,h,i){function j(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function k(){for(var a=-1,b=v.keys(),c=0;c<b.length;c++)v.get(b[c]).value.backdrop&&(a=c);return a>-1&&y>a&&(a=y),a}function l(a,b){var c=v.get(a).value,d=c.appendTo;v.remove(a),z=v.top(),z&&(y=parseInt(z.value.modalDomEl.attr("index"),10)),o(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||u;w.remove(b,a);var e=w.hasKey(b);d.toggleClass(b,e),!e&&t&&t.heightOverflow&&t.scrollbarWidth&&(t.originalRight?d.css({paddingRight:t.originalRight+"px"}):d.css({paddingRight:""}),t=null),m(!0)},c.closedDeferred),n(),b&&b.focus?b.focus():d.focus&&d.focus()}function m(a){var b;v.length()>0&&(b=v.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function n(){if(r&&-1===k()){var a=s;o(r,s,function(){a=null}),r=void 0,s=void 0}}function o(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){b.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(x.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function p(a){if(a.isDefaultPrevented())return a;var b=v.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){x.dismiss(b.key,"escape key press")}));break;case 9:var c=x.loadFocusElementList(b),d=!1;a.shiftKey?(x.isFocusInFirstItem(a,c)||x.isModalFocused(a,b))&&(d=x.focusLastFocusableElement(c)):x.isFocusInLastItem(a,c)&&(d=x.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function q(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var r,s,t,u="modal-open",v=h.createNew(),w=g.createNew(),x={NOW_CLOSING_EVENT:"modal.stack.now-closing"},y=0,z=null,A="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(k,function(a){s&&(s.index=a)}),c.on("keydown",p),e.$on("$destroy",function(){c.off("keydown",p)}),x.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||u;m(!1),z=v.top(),v.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),w.put(h,b);var j=f.appendTo,l=k();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!r&&(s=e.$new(!0),s.modalOptions=f,s.index=l,r=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),r.attr("backdrop-class",f.backdropClass),f.animation&&r.attr("modal-animation","true"),d(r)(s),a.enter(r,j),t=i.scrollbarPadding(j),t.heightOverflow&&t.scrollbarWidth&&j.css({paddingRight:t.right+"px"})),y=z?parseInt(z.value.modalDomEl.attr("index"),10)+1:0;var n=angular.element('<div uib-modal-window="modal-window"></div>');n.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:y,animate:"animate"}).html(f.content),f.animation&&n.attr("modal-animation","true"),j.addClass(h),a.enter(d(n)(f.scope),j),v.top().value.modalDomEl=n,v.top().value.modalOpener=g},x.close=function(a,b){var c=v.get(a);return c&&q(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),l(a,c.value.modalOpener),!0):!c},x.dismiss=function(a,b){var c=v.get(a);return c&&q(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),l(a,c.value.modalOpener),!0):!c},x.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},x.getTop=function(){return v.top()},x.modalRendered=function(a){var b=v.get(a);b&&b.value.renderDeferred.resolve()},x.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},x.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},x.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},x.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},x.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},x.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(A);return c?Array.prototype.filter.call(c,function(a){return j(a)}):c}}},x}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a}),i=f(e.controller,j,!0),e.controllerAs?(g=i.instance,e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),g=i(),d[e.controllerAs]=g):g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"Β« Previous",nextText:"Next Β»",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup uib-title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen" origin-scope="origScope" class="uib-position-measure"></div>';
1807 },scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,w,a.date);if(isNaN(c))for(var d=0;d<I.length;d++)if(c=l.parse(b,I[d],a.date),!isNaN(c))return c;return c}function r(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=q(a);if(!isNaN(b))return l.toTimezone(b,J)}return F.$options&&F.$options.allowInvalid?a:void 0}function s(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(q(b)):!1:!0):!0}function t(c){if(a.isOpen||!a.disabled){var d=H[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function u(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function v(){if(a.isOpen){var d=angular.element(H[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,y);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K=!1,L=[];this.init=function(e){if(F=e,G=e.$options,x=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,y=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,z=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,A=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,B=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,I=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(w=m.html5Types[c.type],K=!0):(w=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==w&&(w=c,F.$modelValue=null,!w))throw new Error("uibDatepickerPopup must have a date format specified.")})),!w)throw new Error("uibDatepickerPopup must have a date format specified.");if(K&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");C=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),G?(J=G.timezone,a.ngModelOptions=angular.copy(G),a.ngModelOptions.timezone=null,a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),C.attr("ng-model-options","ngModelOptions")):J=null,C.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),D=angular.element(C.children()[0]),D.attr("template-url",B),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),D.attr("datepicker-options","datepickerOptions"),K?F.$formatters.push(function(b){return a.date=l.fromTimezone(b,J),b}):(F.$$parserName="date",F.$validators.date=s,F.$parsers.unshift(r),F.$formatters.push(function(b){return F.$isEmpty(b)?(a.date=b,b):(a.date=l.fromTimezone(b,J),angular.isNumber(a.date)&&(a.date=new Date(a.date)),l.filter(a.date,w))})),F.$viewChangeListeners.push(function(){a.date=q(F.$viewValue)}),b.on("keydown",u),H=d(C)(a),C.remove(),y?h.find("body").append(H):b.after(H),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),H.remove(),b.off("keydown",u),h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,J));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=l.fromTimezone(new Date(a.datepickerOptions[b]),J):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?l.filter(a.date,w):null;b.val(d),F.$setViewValue(d),x&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),z&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;y||j.parsePlacement(d)[2]?(E=E||angular.element(j.scrollParent(b)),E&&E.on("scroll",v)):E=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b,f){c||(a.on("click",d),f.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b,f){c===b&&(c=null,a.off("click",d),f.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(a.stopPropagation(),c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b,x=w.hasClass(u?p:q);if(x===!c&&g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o,b);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var y=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(y),n.dropdownMenu=y}f.close(o,b),n.selectedOption=null}angular.isFunction(r)&&r(a,c)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap","ui.bootstrap.position"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{replace:!0,templateUrl:"uib/template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowClass||""),f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();g.$observe("modalRender",function(a){"true"===a&&h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(a,b,c,d,e,f,g,h,i){function j(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function k(){for(var a=-1,b=v.keys(),c=0;c<b.length;c++)v.get(b[c]).value.backdrop&&(a=c);return a>-1&&y>a&&(a=y),a}function l(a,b){var c=v.get(a).value,d=c.appendTo;v.remove(a),z=v.top(),z&&(y=parseInt(z.value.modalDomEl.attr("index"),10)),o(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||u;w.remove(b,a);var e=w.hasKey(b);d.toggleClass(b,e),!e&&t&&t.heightOverflow&&t.scrollbarWidth&&(t.originalRight?d.css({paddingRight:t.originalRight+"px"}):d.css({paddingRight:""}),t=null),m(!0)},c.closedDeferred),n(),b&&b.focus?b.focus():d.focus&&d.focus()}function m(a){var b;v.length()>0&&(b=v.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function n(){if(r&&-1===k()){var a=s;o(r,s,function(){a=null}),r=void 0,s=void 0}}function o(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){b.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(x.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function p(a){if(a.isDefaultPrevented())return a;var b=v.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){x.dismiss(b.key,"escape key press")}));break;case 9:var c=x.loadFocusElementList(b),d=!1;a.shiftKey?(x.isFocusInFirstItem(a,c)||x.isModalFocused(a,b))&&(d=x.focusLastFocusableElement(c)):x.isFocusInLastItem(a,c)&&(d=x.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function q(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var r,s,t,u="modal-open",v=h.createNew(),w=g.createNew(),x={NOW_CLOSING_EVENT:"modal.stack.now-closing"},y=0,z=null,A="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(k,function(a){s&&(s.index=a)}),c.on("keydown",p),e.$on("$destroy",function(){c.off("keydown",p)}),x.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||u;m(!1),z=v.top(),v.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),w.put(h,b);var j=f.appendTo,l=k();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!r&&(s=e.$new(!0),s.modalOptions=f,s.index=l,r=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),r.attr("backdrop-class",f.backdropClass),f.animation&&r.attr("modal-animation","true"),d(r)(s),a.enter(r,j),t=i.scrollbarPadding(j),t.heightOverflow&&t.scrollbarWidth&&j.css({paddingRight:t.right+"px"})),y=z?parseInt(z.value.modalDomEl.attr("index"),10)+1:0;var n=angular.element('<div uib-modal-window="modal-window"></div>');n.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:y,animate:"animate"}).html(f.content),f.animation&&n.attr("modal-animation","true"),j.addClass(h),a.enter(d(n)(f.scope),j),v.top().value.modalDomEl=n,v.top().value.modalOpener=g},x.close=function(a,b){var c=v.get(a);return c&&q(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),l(a,c.value.modalOpener),!0):!c},x.dismiss=function(a,b){var c=v.get(a);return c&&q(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),l(a,c.value.modalOpener),!0):!c},x.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},x.getTop=function(){return v.top()},x.modalRendered=function(a){var b=v.get(a);b&&b.value.renderDeferred.resolve()},x.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},x.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},x.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},x.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},x.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},x.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(A);return c?Array.prototype.filter.call(c,function(a){return j(a)}):c}}},x}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a}),i=f(e.controller,j,!0),e.controllerAs?(g=i.instance,e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),g=i(),d[e.controllerAs]=g):g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"Β« Previous",nextText:"Next Β»",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup uib-title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen" origin-scope="origScope" class="uib-position-measure"></div>';
1808 return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){M&&!a.$eval(d[k+"Enable"])||(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement,N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];T(),L=p(a),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K);D.css({top:a.top+"px",left:a.left+"px"}),D.hasClass(a.placement.split("-")[0])||(D.removeClass(J.split("-")[0]),D.addClass(a.placement.split("-")[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{uibTitle:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",uibTitle:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{uibTitle:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a,f){if(!e){var g=b(c),h=d.tabs[g];if(h){if(h.tab.onDeselect({$event:f}),f&&f.isDefaultPrevented())return;h.tab.active=!1}var i=d.tabs[a];i?(i.tab.onSelect({$event:f}),i.tab.active=!0,d.active=i.index,c=i.index):!i&&angular.isNumber(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isNumber(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){for(var b,c=0;c<d.tabs.length;c++)if(d.tabs[c].tab===a){b=c;break}if(d.tabs[b].index===d.active){var e=b===d.tabs.length-1?b-1:b+1%d.tabs.length;d.select(e)}d.tabs.splice(b,1)},a.$watch("tabset.active",function(a){angular.isNumber(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1,angular.isUndefined(c.active)&&(a.active=0)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(a){if(!b.disabled){for(var c,d=0;d<e.tabs.length;d++)if(e.tabs[d].tab===b){c=d;break}e.select(c,a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===v[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),u.$setViewValue(new Date(s)),n(a)}function m(){u.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(u.$modelValue){var c=s.getHours(),d=s.getMinutes(),e=s.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!w),"m"!==b&&(a.minutes=k(d)),a.meridian=s.getHours()<12?v[0]:v[1],"s"!==b&&(a.seconds=k(e)),a.meridian=s.getHours()<12?v[0]:v[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=v[0]}function o(a){s=q(s,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s=new Date,t=[],u={$setViewValue:angular.noop},v=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,w=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){u=b,u.$render=this.render,u.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var x=g.hourStep;c.hourStep&&t.push(a.$parent.$watch(d(c.hourStep),function(a){x=+a}));var y=g.minuteStep;c.minuteStep&&t.push(a.$parent.$watch(d(c.minuteStep),function(a){y=+a}));var z;t.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);z=isNaN(b)?void 0:b}));var A;t.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);A=isNaN(b)?void 0:b}));var B=!1;c.ngDisabled&&t.push(a.$parent.$watch(d(c.ngDisabled),function(a){B=a})),a.noIncrementHours=function(){var a=p(s,60*x);return B||a>A||s>a&&z>a},a.noDecrementHours=function(){var a=p(s,60*-x);return B||z>a||a>s&&a>A},a.noIncrementMinutes=function(){var a=p(s,y);return B||a>A||s>a&&z>a},a.noDecrementMinutes=function(){var a=p(s,-y);return B||z>a||a>s&&a>A},a.noIncrementSeconds=function(){var a=q(s,C);return B||a>A||s>a&&z>a},a.noDecrementSeconds=function(){var a=q(s,-C);return B||z>a||a>s&&a>A},a.noToggleMeridian=function(){return s.getHours()<12?B||p(s,720)>A:B||p(s,-720)<z};var C=g.secondStep;c.secondStep&&t.push(a.$parent.$watch(d(c.secondStep),function(a){C=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&t.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&t.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,u.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(s.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){u.$setViewValue(null),u.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(a),s.setMinutes(b),z>s||s>A?e(!0):l("h")):e(!0)},b.bind("blur",function(b){u.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!w)})}),a.updateMinutes=function(){var a=i(),b=h();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(b),s.setMinutes(a),z>s||s>A?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){u.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();u.$setDirty(),angular.isDefined(a)?(s.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=u.$viewValue;isNaN(b)?(u.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(s=b),z>s||s>A?(u.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*x*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-x*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*y)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-y)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(C)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-C)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(s.getHours()<12?60:-60)):a.meridian=a.meridian===v[0]?v[1]:v[0])},a.blur=function(){u.$setTouched()},a.$on("$destroy",function(){for(;t.length;)t.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("<div></div>"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.attr("tabindex","-1"),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("<div uib-typeahead-popup></div>");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h<f.length;h++)e[M.itemName]=f[h],N.matches.push({id:V(h),label:M.viewMapper(N,e),model:f[h]});if(N.query=c,o(),b.attr("aria-expanded",!0),G&&1===N.matches.length&&W(c,0)&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(0,d)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(0,d)),I){var i=N.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==N.matches.length&&-1!==r.indexOf(b.which)){if(-1===N.activeIdx&&(9===b.which||13===b.which)||9===b.which&&b.shiftKey)return U(),void N.$digest();b.preventDefault();var c;switch(b.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,b)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,b)});break;case 27:b.stopPropagation(),U(),a.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$setViewValue(),p.$setValidity("editable",!0),p.$setValidity("parse",!0),b.val("")),w=!1,x=!1});var aa=function(c){b[0]!==c.target&&3!==c.which&&0!==N.matches.length&&(U(),j.$$phase||a.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div class="panel" ng-class="panelClass || \'panel-default\'">\n <div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>\n');
1808 return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){M&&!a.$eval(d[k+"Enable"])||(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement,N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];T(),L=p(a),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K);D.css({top:a.top+"px",left:a.left+"px"}),D.hasClass(a.placement.split("-")[0])||(D.removeClass(J.split("-")[0]),D.addClass(a.placement.split("-")[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{uibTitle:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",uibTitle:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{uibTitle:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a,f){if(!e){var g=b(c),h=d.tabs[g];if(h){if(h.tab.onDeselect({$event:f}),f&&f.isDefaultPrevented())return;h.tab.active=!1}var i=d.tabs[a];i?(i.tab.onSelect({$event:f}),i.tab.active=!0,d.active=i.index,c=i.index):!i&&angular.isNumber(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isNumber(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){for(var b,c=0;c<d.tabs.length;c++)if(d.tabs[c].tab===a){b=c;break}if(d.tabs[b].index===d.active){var e=b===d.tabs.length-1?b-1:b+1%d.tabs.length;d.select(e)}d.tabs.splice(b,1)},a.$watch("tabset.active",function(a){angular.isNumber(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1,angular.isUndefined(c.active)&&(a.active=0)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(a){if(!b.disabled){for(var c,d=0;d<e.tabs.length;d++)if(e.tabs[d].tab===b){c=d;break}e.select(c,a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===v[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),u.$setViewValue(new Date(s)),n(a)}function m(){u.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(u.$modelValue){var c=s.getHours(),d=s.getMinutes(),e=s.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!w),"m"!==b&&(a.minutes=k(d)),a.meridian=s.getHours()<12?v[0]:v[1],"s"!==b&&(a.seconds=k(e)),a.meridian=s.getHours()<12?v[0]:v[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=v[0]}function o(a){s=q(s,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s=new Date,t=[],u={$setViewValue:angular.noop},v=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,w=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){u=b,u.$render=this.render,u.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var x=g.hourStep;c.hourStep&&t.push(a.$parent.$watch(d(c.hourStep),function(a){x=+a}));var y=g.minuteStep;c.minuteStep&&t.push(a.$parent.$watch(d(c.minuteStep),function(a){y=+a}));var z;t.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);z=isNaN(b)?void 0:b}));var A;t.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);A=isNaN(b)?void 0:b}));var B=!1;c.ngDisabled&&t.push(a.$parent.$watch(d(c.ngDisabled),function(a){B=a})),a.noIncrementHours=function(){var a=p(s,60*x);return B||a>A||s>a&&z>a},a.noDecrementHours=function(){var a=p(s,60*-x);return B||z>a||a>s&&a>A},a.noIncrementMinutes=function(){var a=p(s,y);return B||a>A||s>a&&z>a},a.noDecrementMinutes=function(){var a=p(s,-y);return B||z>a||a>s&&a>A},a.noIncrementSeconds=function(){var a=q(s,C);return B||a>A||s>a&&z>a},a.noDecrementSeconds=function(){var a=q(s,-C);return B||z>a||a>s&&a>A},a.noToggleMeridian=function(){return s.getHours()<12?B||p(s,720)>A:B||p(s,-720)<z};var C=g.secondStep;c.secondStep&&t.push(a.$parent.$watch(d(c.secondStep),function(a){C=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&t.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&t.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,u.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(s.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){u.$setViewValue(null),u.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(a),s.setMinutes(b),z>s||s>A?e(!0):l("h")):e(!0)},b.bind("blur",function(b){u.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!w)})}),a.updateMinutes=function(){var a=i(),b=h();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(b),s.setMinutes(a),z>s||s>A?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){u.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();u.$setDirty(),angular.isDefined(a)?(s.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=u.$viewValue;isNaN(b)?(u.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(s=b),z>s||s>A?(u.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*x*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-x*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*y)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-y)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(C)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-C)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(s.getHours()<12?60:-60)):a.meridian=a.meridian===v[0]?v[1]:v[0])},a.blur=function(){u.$setTouched()},a.$on("$destroy",function(){for(;t.length;)t.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("<div></div>"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.attr("tabindex","-1"),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("<div uib-typeahead-popup></div>");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h<f.length;h++)e[M.itemName]=f[h],N.matches.push({id:V(h),label:M.viewMapper(N,e),model:f[h]});if(N.query=c,o(),b.attr("aria-expanded",!0),G&&1===N.matches.length&&W(c,0)&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(0,d)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(0,d)),I){var i=N.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==N.matches.length&&-1!==r.indexOf(b.which)){if(-1===N.activeIdx&&(9===b.which||13===b.which)||9===b.which&&b.shiftKey)return U(),void N.$digest();b.preventDefault();var c;switch(b.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,b)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,b)});break;case 27:b.stopPropagation(),U(),a.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$setViewValue(),p.$setValidity("editable",!0),p.$setValidity("parse",!0),b.val("")),w=!1,x=!1});var aa=function(c){b[0]!==c.target&&3!==c.which&&0!==N.matches.length&&(U(),j.$$phase||a.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div class="panel" ng-class="panelClass || \'panel-default\'">\n <div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>\n');
1809 }]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div class="uib-datepicker" ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table class="uib-daypicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table class="uib-monthpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table class="uib-yearpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'<div>\n <ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n </ul>\n</div>\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'<div class="modal-backdrop"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog {{size ? \'modal-\' + size : \'\'}}"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0});
1809 }]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div class="uib-datepicker" ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table class="uib-daypicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table class="uib-monthpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table class="uib-yearpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'<div>\n <ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n </ul>\n</div>\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'<div class="modal-backdrop"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog {{size ? \'modal-\' + size : \'\'}}"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0});
1810 ;/*!
1810 ;/*!
1811 * State-based routing for AngularJS
1811 * State-based routing for AngularJS
1812 * @version v1.0.0-beta.3
1812 * @version v1.0.0-beta.3
1813 * @link https://ui-router.github.io
1813 * @link https://ui-router.github.io
1814 * @license MIT License, http://www.opensource.org/licenses/MIT
1814 * @license MIT License, http://www.opensource.org/licenses/MIT
1815 */
1815 */
1816 !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("angular")):"function"==typeof define&&define.amd?define("angular-ui-router",["angular"],e):"object"==typeof exports?exports["angular-ui-router"]=e(require("angular")):t["angular-ui-router"]=e(t.angular)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(1)),n(r(53)),n(r(55)),n(r(58)),r(60),r(61),r(62),r(63),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="ui.router"},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(2)),n(r(46)),n(r(47)),n(r(48)),n(r(49)),n(r(50)),n(r(51)),n(r(52)),n(r(44));var i=r(25);e.UIRouter=i.UIRouter},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(3)),n(r(6)),n(r(7)),n(r(5)),n(r(4)),n(r(8)),n(r(9)),n(r(12))},function(t,e,r){"use strict";function n(t,e,r,n){return void 0===n&&(n=Object.keys(t)),n.filter(function(e){return"function"==typeof t[e]}).forEach(function(n){return e[n]=t[n].bind(r)})}function i(t){void 0===t&&(t={});for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.apply(null,[{}].concat(r));return e.extend({},i,c(t||{},Object.keys(i)))}function o(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.forEach(r,function(r){e.forEach(r,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function a(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function s(t,e,r){void 0===r&&(r=Object.keys(t));for(var n=0;n<r.length;n++){var i=r[n];if(t[i]!=e[i])return!1}return!0}function u(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={};for(var o in e)t(r,o)&&(i[o]=e[o]);return i}function c(t){return u.apply(null,[e.inArray].concat(T(arguments)))}function f(t){var r=function(t,r){return!e.inArray(t,r)};return u.apply(null,[r].concat(T(arguments)))}function l(t,e){return v(t,P.prop(e))}function p(t,r){var n=k.isArray(t),i=n?[]:{},o=n?function(t){return i.push(t)}:function(t,e){return i[e]=t};return e.forEach(t,function(t,e){r(t,e)&&o(t,e)}),i}function h(t,r){var n;return e.forEach(t,function(t,e){n||r(t,e)&&(n=t)}),n}function v(t,r){var n=k.isArray(t)?[]:{};return e.forEach(t,function(t,e){return n[e]=r(t,e)}),n}function d(t,e){return t.push(e),t}function m(t,e){return void 0===e&&(e="assert failure"),function(r){if(!t(r))throw new Error(k.isFunction(e)?e(r):e);return!0}}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(0===t.length)return[];var r=t.reduce(function(t,e){return Math.min(e.length,t)},9007199254740991);return Array.apply(null,Array(r)).map(function(e,r){return t.map(function(t){return t[r]})})}function y(t,e){var r,n;if(k.isArray(e)&&(r=e[0],n=e[1]),!k.isString(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function w(t){return t.length&&t[t.length-1]||void 0}function b(t,r){return r&&Object.keys(r).forEach(function(t){return delete r[t]}),r||(r={}),e.extend(r,t)}function $(t,e,r){return k.isArray(t)?t.forEach(e,r):void Object.keys(t).forEach(function(r){return e(t[r],r)})}function R(t,e){return Object.keys(e).forEach(function(r){return t[r]=e[r]}),t}function S(t){return T(arguments,1).filter(e.identity).reduce(R,t)}function E(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r=typeof t,n=typeof e;if(r!==n||"object"!==r)return!1;var i=[t,e];if(P.all(k.isArray)(i))return x(t,e);if(P.all(k.isDate)(i))return t.getTime()===e.getTime();if(P.all(k.isRegExp)(i))return t.toString()===e.toString();if(P.all(k.isFunction)(i))return!0;var o=[k.isFunction,k.isArray,k.isDate,k.isRegExp];if(o.map(P.any).reduce(function(t,e){return t||!!e(i)},!1))return!1;var a,s={};for(a in t){if(!E(t[a],e[a]))return!1;s[a]=!0}for(a in e)if(!s[a])return!1;return!0}function x(t,e){return t.length===e.length&&g(t,e).reduce(function(t,e){return t&&E(e[0],e[1])},!0)}var k=r(4),P=r(5),_=r(6),C="undefined"==typeof window?{}:window,O=C.angular||{};e.fromJson=O.fromJson||JSON.parse.bind(JSON),e.toJson=O.toJson||JSON.stringify.bind(JSON),e.copy=O.copy||b,e.forEach=O.forEach||$,e.extend=O.extend||S,e.equals=O.equals||E,e.identity=function(t){return t},e.noop=function(){},e.bindFunctions=n,e.inherit=function(t,r){return e.extend(new(e.extend(function(){},{prototype:t})),r)};var T=function(t,e){return void 0===e&&(e=0),Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(t,e))};e.inArray=function(t,e){return t.indexOf(e)!==-1},e.removeFrom=P.curry(function(t,e){var r=t.indexOf(e);return r>=0&&t.splice(r,1),t}),e.defaults=i,e.merge=o,e.mergeR=function(t,r){return e.extend(t,r)},e.ancestors=a,e.equalForKeys=s,e.pick=c,e.omit=f,e.pluck=l,e.filter=p,e.find=h,e.mapObj=v,e.map=v,e.values=function(t){return Object.keys(t).map(function(e){return t[e]})},e.allTrueR=function(t,e){return t&&e},e.anyTrueR=function(t,e){return t||e},e.unnestR=function(t,e){return t.concat(e)},e.flattenR=function(t,r){return k.isArray(r)?t.concat(r.reduce(e.flattenR,[])):d(t,r)},e.pushR=d,e.uniqR=function(t,r){return e.inArray(t,r)?t:d(t,r)},e.unnest=function(t){return t.reduce(e.unnestR,[])},e.flatten=function(t){return t.reduce(e.flattenR,[])},e.assertPredicate=m,e.pairs=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})},e.arrayTuples=g,e.applyPairs=y,e.tail=w,e.silenceUncaughtInPromise=function(t){return t["catch"](function(t){return 0})&&t},e.silentRejection=function(t){return e.silenceUncaughtInPromise(_.services.$q.reject(t))}},function(t,e,r){"use strict";function n(t){if(e.isArray(t)&&t.length){var r=t.slice(0,-1),n=t.slice(-1);return!(r.filter(i.not(e.isString)).length||n.filter(i.not(e.isFunction)).length)}return e.isFunction(t)}var i=r(5),o=Object.prototype.toString,a=function(t){return function(e){return typeof e===t}};e.isUndefined=a("undefined"),e.isDefined=i.not(e.isUndefined),e.isNull=function(t){return null===t},e.isFunction=a("function"),e.isNumber=a("number"),e.isString=a("string"),e.isObject=function(t){return null!==t&&"object"==typeof t},e.isArray=Array.isArray,e.isDate=function(t){return"[object Date]"===o.call(t)},e.isRegExp=function(t){return"[object RegExp]"===o.call(t)},e.isInjectable=n,e.isPromise=i.and(e.isObject,i.pipe(i.prop("then"),e.isFunction))},function(t,e){"use strict";function r(t){function e(r){return r.length>=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}var r=[].slice.apply(arguments,[1]),n=t.length;return e(r)}function n(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n.apply(null,[].slice.call(arguments).reverse())}function o(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)&&e.apply(null,r)}}function a(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)||e.apply(null,r)}}function s(t,e){return function(r){return r[t].apply(r,e)}}function u(t){return function(e){for(var r=0;r<t.length;r++)if(t[r][0](e))return t[r][1](e)}}e.curry=r,e.compose=n,e.pipe=i,e.prop=function(t){return function(e){return e&&e[t]}},e.propEq=r(function(t,e,r){return r&&r[t]===e}),e.parse=function(t){return i.apply(null,t.split(".").map(e.prop))},e.not=function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return!t.apply(null,e)}},e.and=o,e.or=a,e.all=function(t){return function(e){return e.reduce(function(e,r){return e&&!!t(r)},!0)}},e.any=function(t){return function(e){return e.reduce(function(e,r){return e||!!t(r)},!1)}},e.is=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},e.eq=function(t){return function(e){return t===e}},e.val=function(t){return function(){return t}},e.invoke=s,e.pattern=u},function(t,e){"use strict";var r=function(t){return function(){throw new Error(t+"(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']")}},n={$q:void 0,$injector:void 0,location:{},locationConfig:{},template:{}};e.services=n,["setUrl","path","search","hash","onChange"].forEach(function(t){return n.location[t]=r(t)}),["port","protocol","host","baseHref","html5Mode","hashPrefix"].forEach(function(t){return n.locationConfig[t]=r(t)})},function(t,e){"use strict";var r=function(){function t(t){this.text=t,this.glob=t.split(".");var e=this.text.split(".").map(function(t){return"**"===t?"(?:|(?:\\.[^.]*)*)":"*"===t?"\\.[^.]*":"\\."+t}).join("");this.regexp=new RegExp("^"+e+"$")}return t.prototype.matches=function(t){return this.regexp.test("."+t)},t.is=function(t){return t.indexOf("*")>-1},t.fromString=function(e){return this.is(e)?new t(e):null},t}();e.Glob=r},function(t,e){"use strict";var r=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=null),this._items=t,this._limit=e}return t.prototype.enqueue=function(t){var e=this._items;return e.push(t),this._limit&&e.length>this._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();e.Queue=r},function(t,e,r){"use strict";function n(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function i(t,e){for(;e.length<t;)e+=" ";return e}function o(t){return t.replace(/^([A-Z])/,function(t){return t.toLowerCase()}).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function a(t){var e=s(t),r=e.match(/^(function [^ ]+\([^)]*\))/),n=r?r[1]:e,i=t.name||"";return i&&n.match(/function \(/)?"function "+i+n.substr(9):n}function s(t){var e=c.isArray(t)?t.slice(-1)[0]:t;return e&&e.toString()||"undefined"}function u(t){function e(t){if(c.isObject(t)){if(r.indexOf(t)!==-1)return"[circular ref]";r.push(t)}return m(t)}var r=[];return JSON.stringify(t,function(t,r){return e(r)}).replace(/\\"/g,'"')}var c=r(4),f=r(10),l=r(3),p=r(5),h=r(11),v=r(19);e.maxLength=n,e.padString=i,e.kebobString=o,e.functionToString=a,e.fnToString=s;var d=null,m=function(t){var e=f.Rejection.isTransitionRejectionPromise;return(d=d||p.pattern([[p.not(c.isDefined),p.val("undefined")],[c.isNull,p.val("null")],[c.isPromise,p.val("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[p.is(f.Rejection),p.invoke("toString")],[p.is(h.Transition),p.invoke("toString")],[p.is(v.Resolvable),p.invoke("toString")],[c.isInjectable,a],[p.val(!0),l.identity]]))(t)};e.stringify=u,e.beforeAfterSubstr=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return r===-1?[e,""]:[e.substr(0,r),e.substr(r+1)]}}},function(t,e,r){"use strict";var n=r(3),i=r(9);!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(e.RejectType||(e.RejectType={}));var o=e.RejectType,a=function(){function t(t,e,r){this.type=t,this.message=e,this.detail=r}return t.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():i.stringify(t)},e=this.type,r=this.message,n=t(this.detail);return"TransitionRejection(type: "+e+", message: "+r+", detail: "+n+")"},t.prototype.toPromise=function(){return n.extend(n.silentRejection(this),{_transitionRejection:this})},t.isTransitionRejectionPromise=function(e){return e&&"function"==typeof e.then&&e._transitionRejection instanceof t},t.superseded=function(e,r){var n="The transition has been superseded by a different transition",i=new t(o.SUPERSEDED,n,e);return r&&r.redirected&&(i.redirected=!0),i},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){var r="This transition is invalid";return new t(o.INVALID,r,e)},t.ignored=function(e){var r="The transition was ignored";return new t(o.IGNORED,r,e)},t.aborted=function(e){var r="The transition has been aborted";return new t(o.ABORTED,r,e)},t.errored=function(e){var r="The transition errored";return new t(o.ERROR,r,e)},t}();e.Rejection=a},function(t,e,r){"use strict";var n=r(9),i=r(12),o=r(6),a=r(3),s=r(4),u=r(5),c=r(13),f=r(15),l=r(16),p=r(21),h=r(20),v=r(14),d=r(22),m=r(19),g=r(10),y=r(17),w=r(25),b=0,$=u.prop("self"),R=function(){function t(e,r,n){var i=this;if(this._deferred=o.services.$q.defer(),this.promise=this._deferred.promise,this.treeChanges=function(){return i._treeChanges},this.isActive=function(){return i===i._options.current()},this.router=n,this._targetState=r,!r.valid())throw new Error(r.error());f.HookRegistry.mixin(new f.HookRegistry,this),this._options=a.extend({current:u.val(this)},r.options()),this.$id=b++;var s=h.PathFactory.buildToPath(e,r);this._treeChanges=h.PathFactory.treeChanges(e,s,this._options.reloadState);var c=this._treeChanges.entering.map(function(t){return t.state});h.PathFactory.applyViewConfigs(n.transitionService.$view,this._treeChanges.to,c);var l=[new m.Resolvable(w.UIRouter,function(){return n},[],(void 0),n),new m.Resolvable(t,function(){return i},[],(void 0),this),new m.Resolvable("$transition$",function(){return i},[],(void 0),this),new m.Resolvable("$stateParams",function(){return i.params()},[],(void 0),this.params())],p=this._treeChanges.to[0],v=new y.ResolveContext(this._treeChanges.to);v.addResolvables(l,p.state)}return t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.$from=function(){return a.tail(this._treeChanges.from).state},t.prototype.$to=function(){return a.tail(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!f.matchState(this.$to(),e.to)||e.from&&!f.matchState(this.$from(),e.from))},t.prototype.params=function(t){return void 0===t&&(t="to"),this._treeChanges[t].map(u.prop("paramValues")).reduce(a.mergeR,{})},t.prototype.injector=function(t){var e=this.treeChanges().to;return t&&(e=h.PathFactory.subPath(e,function(e){return e.state===t||e.state.name===t})),new y.ResolveContext(e).injector()},t.prototype.getResolveTokens=function(){return new y.ResolveContext(this._treeChanges.to).getTokens()},t.prototype.getResolveValue=function(t){var e=new y.ResolveContext(this._treeChanges.to),r=function(t){var r=e.getResolvable(t);if(void 0===r)throw new Error("Dependency Injection token not found: "+n.stringify(t));return r.data};return s.isArray(t)?t.map(r):r(t)},t.prototype.getResolvable=function(t){return new y.ResolveContext(this._treeChanges.to).getResolvable(t)},t.prototype.addResolvable=function(t,e){void 0===e&&(e="");var r="string"==typeof e?e:e.name,n=this._treeChanges.to,i=a.find(n,function(t){return t.state.name===r}),o=new y.ResolveContext(n);o.addResolvables([t],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return a.map(this._treeChanges.entering,u.prop("state")).map($)},t.prototype.exiting=function(){return a.map(this._treeChanges.exiting,u.prop("state")).map($).reverse()},t.prototype.retained=function(){return a.map(this._treeChanges.retained,u.prop("state")).map($)},t.prototype.views=function(t,e){void 0===t&&(t="entering");var r=this._treeChanges[t];return r=e?r.filter(u.propEq("state",e)):r,r.map(u.prop("views")).filter(a.identity).reduce(a.unnestR,[])},t.prototype.redirect=function(t){var e=a.extend({},this.options(),t.options(),{redirectedFrom:this,source:"redirect"});t=new v.TargetState(t.identifier(),t.$state(),t.params(),e);var r=this.router.transitionService.create(this._treeChanges.from,t),n=this.treeChanges().entering,i=r.treeChanges().entering,o=function(t){return function(e){return t&&e.state.includes[t.name]}},s=p.PathNode.matching(i,n).filter(u.not(o(t.options().reloadState)));return s.forEach(function(t,e){t.resolvables=n[e].resolvables}),r},t.prototype._changedParams=function(){var t=this._treeChanges,e=t.to,r=t.from;if(!this._options.reload&&a.tail(e).state===a.tail(r).state){var n=e.map(function(t){return t.paramSchema}),i=[e,r].map(function(t){return t.map(function(t){return t.paramValues})}),o=i[0],s=i[1],u=a.arrayTuples(n,o,s);return u.map(function(t){var e=t[0],r=t[1],n=t[2];return d.Param.changed(e,r,n)}).reduce(a.unnestR,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(a.anyTrueR,!1)},t.prototype.ignored=function(){var t=this._changedParams();return!!t&&0===t.length},t.prototype.hookBuilder=function(){return new l.HookBuilder(this.router.transitionService,this,{transition:this,current:this._options.current})},t.prototype.run=function(){var t=this,e=c.TransitionHook.runSynchronousHooks,r=this.hookBuilder(),n=this.router.globals;n.transitionHistory.enqueue(this);var o=e(r.getOnBeforeHooks());if(g.Rejection.isTransitionRejectionPromise(o)){o["catch"](function(){return 0});var a=o._transitionRejection;return this._deferred.reject(a),this.promise}if(!this.valid()){var s=new Error(this.error());return this._deferred.reject(s),this.promise}if(this.ignored())return i.trace.traceTransitionIgnored(this),this._deferred.reject(g.Rejection.ignored()),this.promise;var u=function(){i.trace.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),e(r.getOnSuccessHooks(),!0)},f=function(n){i.trace.traceError(n,t),t.success=!1,t._deferred.reject(n),t._error=n,e(r.getOnErrorHooks(),!0)};i.trace.traceTransitionStart(this);var l=function(t,e){return t.then(function(){return e.invokeHook()})};return r.asyncHooks().reduce(l,o).then(u,f),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.error=function(){for(var t=this.$to(),e=0,r=this;null!=(r=r.redirectedFrom());)if(++e>20)return"Too many Transition redirects (20+)";return t.self["abstract"]?"Cannot transition to abstract state '"+t.name+"'":d.Param.validates(t.parameters(),this.params())?this.success===!1?this._error:void 0:"Param values not valid for state '"+t.name+"'"},t.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:a.omit(t,"#")},n=this.$id,i=s.isObject(t)?t.name:t,o=a.toJson(r(this._treeChanges.from.map(u.prop("paramValues")).reduce(a.mergeR,{}))),c=this.valid()?"":"(X) ",f=s.isObject(e)?e.name:e,l=a.toJson(r(this.params()));return"Transition#"+n+"( '"+i+"'"+o+" -> "+c+"'"+f+"'"+l+" )"},t.diToken=t,t}();e.Transition=R},function(t,e,r){"use strict";function n(t){return t?"[ui-view#"+t.id+" tag "+("in template from '"+(t.creationContext&&t.creationContext.name||"(root)")+"' state]: ")+("fqn: '"+t.fqn+"', ")+("name: '"+t.name+"@"+t.creationContext+"')"):"ui-view (defunct)"}function i(t){return a.isNumber(t)?c[t]:c[c[t]]}var o=r(5),a=r(4),s=r(9),u=function(t){return"[ViewConfig#"+t.$id+" from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.UIVIEW=3]="UIVIEW",t[t.VIEWCONFIG=4]="VIEWCONFIG"}(e.Category||(e.Category={}));var c=e.Category,f=function(){function t(){this._enabled={},this.approximateDigests=0}return t.prototype._set=function(t,e){var r=this;e.length||(e=Object.keys(c).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(t){return c[t]})),e.map(i).forEach(function(e){return r._enabled[e]=t})},t.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!0,t)},t.prototype.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!1,t)},t.prototype.enabled=function(t){return!!this._enabled[i(t)]},t.prototype.traceTransitionStart=function(t){if(this.enabled(c.TRANSITION)){var e=t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Started -> "+n)}},t.prototype.traceTransitionIgnored=function(t){if(this.enabled(c.TRANSITION)){var e=t&&t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Ignored <> "+n)}},t.prototype.traceHookInvocation=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=o.parse("traceData.hookType")(e)||"internal",a=o.parse("traceData.context.state.name")(e)||o.parse("traceData.context")(e)||"unknown",u=s.functionToString(t.eventHook.callback);console.log("Transition #"+r+" Digest #"+n+": Hook -> "+i+" context: "+a+", "+s.maxLength(200,u))}},t.prototype.traceHookResult=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=s.stringify(t);console.log("Transition #"+r+" Digest #"+n+": <- Hook returned: "+s.maxLength(200,i))}},t.prototype.traceResolvePath=function(t,e,r){if(this.enabled(c.RESOLVE)){var n=r&&r.$id,i=this.approximateDigests,o=t&&t.toString();console.log("Transition #"+n+" Digest #"+i+": Resolving "+o+" ("+e+")")}},t.prototype.traceResolvableResolved=function(t,e){if(this.enabled(c.RESOLVE)){var r=e&&e.$id,n=this.approximateDigests,i=t&&t.toString(),o=s.stringify(t.data);console.log("Transition #"+r+" Digest #"+n+": <- Resolved "+i+" to: "+s.maxLength(200,o))}},t.prototype.traceError=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Rejected "+i+", reason: "+t)}},t.prototype.traceSuccess=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=t.name,o=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Success "+o+", final state: "+i)}},t.prototype.traceUIViewEvent=function(t,e,r){void 0===r&&(r=""),this.enabled(c.UIVIEW)&&console.log("ui-view: "+s.padString(30,t)+" "+n(e)+r)},t.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUIViewFill=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+s.maxLength(200,e))},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+u(e))},t.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+n(e))},t}();e.Trace=f;var l=new f;e.trace=l},function(t,e,r){"use strict";var n=r(3),i=r(9),o=r(4),a=r(5),s=r(12),u=r(6),c=r(10),f=r(14),l={async:!0,rejectIfSuperseded:!0,current:n.noop,transition:null,traceData:{},bind:null},p=function(){function t(t,e,r,i){var o=this;this.transition=t,this.stateContext=e,this.eventHook=r,this.options=i,this.isSuperseded=function(){return o.options.current()!==o.options.transition},this.options=n.defaults(i,l)}return t.prototype.invokeHook=function(){var t=this,e=t.options,r=t.eventHook;if(s.trace.traceHookInvocation(this,e),e.rejectIfSuperseded&&this.isSuperseded())return c.Rejection.superseded(e.current()).toPromise();var n=r._deregistered?void 0:r.callback.call(e.bind,this.transition,this.stateContext);return this.handleHookResult(n)},t.prototype.handleHookResult=function(t){if(this.isSuperseded())return c.Rejection.superseded(this.options.current()).toPromise();if(o.isPromise(t))return t.then(this.handleHookResult.bind(this));if(s.trace.traceHookResult(t,this.options),t===!1)return c.Rejection.aborted("Hook aborted transition").toPromise();var e=a.is(f.TargetState);return e(t)?c.Rejection.redirected(t).toPromise():void 0},t.prototype.toString=function(){var t=this,e=t.options,r=t.eventHook,n=a.parse("traceData.hookType")(e)||"internal",o=a.parse("traceData.context.state.name")(e)||a.parse("traceData.context")(e)||"unknown",s=i.fnToString(r.callback);return n+" context: "+o+", "+i.maxLength(200,s)},t.runSynchronousHooks=function(t,e){void 0===e&&(e=!1);for(var r=[],n=0;n<t.length;n++){var i=t[n];try{r.push(i.invokeHook())}catch(s){if(!e)return c.Rejection.errored(s).toPromise();var f=i.transition.router.stateService.defaultErrorHandler();f(s)}}var l=r.filter(c.Rejection.isTransitionRejectionPromise);return l.length?l[0]:r.filter(o.isPromise).reduce(function(t,e){return t.then(a.val(e))},u.services.$q.when())},t}();e.TransitionHook=p},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),this._identifier=t,this._definition=e,this._options=n,this._params=r||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+n.toJson(this.params())},t}();e.TargetState=i},function(t,e,r){"use strict";function n(t,e){function r(t){for(var e=n,r=0;r<e.length;r++){var i=s.Glob.fromString(e[r]);if(i&&i.matches(t.name)||!i&&e[r]===t.name)return!0}return!1}var n=a.isString(e)?[e]:e,i=a.isFunction(n)?n:r;return!!i(t)}function i(t,e){return function(r,n,i){void 0===i&&(i={});var a=new u(r,n,i);return t[e].push(a),function(){a._deregistered=!0,o.removeFrom(t[e])(a)}}}var o=r(3),a=r(4),s=r(7);e.matchState=n;var u=function(){function t(t,e,r){void 0===r&&(r={}),this.callback=e,this.matchCriteria=o.extend({to:!0,from:!0,exiting:!0,retained:!0,entering:!0},t),this.priority=r.priority||0,this.bind=r.bind||null,this._deregistered=!1}return t._matchingNodes=function(t,e){if(e===!0)return t;var r=t.filter(function(t){return n(t.state,e)});return r.length?r:null},t.prototype.matches=function(e){var r=this.matchCriteria,n=t._matchingNodes,i={to:n([o.tail(e.to)],r.to),from:n([o.tail(e.from)],r.from),exiting:n(e.exiting,r.exiting),retained:n(e.retained,r.retained),entering:n(e.entering,r.entering)},a=["to","from","exiting","retained","entering"].map(function(t){return i[t]}).reduce(o.allTrueR,!0);return a?i:null},t}();e.EventHook=u;var c=function(){function t(){var t=this;this._transitionEvents={onBefore:[],onStart:[],onEnter:[],onRetain:[],onExit:[],onFinish:[],onSuccess:[],onError:[]},this.getHooks=function(e){return t._transitionEvents[e]},this.onBefore=i(this._transitionEvents,"onBefore"),this.onStart=i(this._transitionEvents,"onStart"),this.onEnter=i(this._transitionEvents,"onEnter"),this.onRetain=i(this._transitionEvents,"onRetain"),this.onExit=i(this._transitionEvents,"onExit"),this.onFinish=i(this._transitionEvents,"onFinish"),this.onSuccess=i(this._transitionEvents,"onSuccess"),this.onError=i(this._transitionEvents,"onError")}return t.mixin=function(t,e){Object.keys(t._transitionEvents).concat(["getHooks"]).forEach(function(r){return e[r]=t[r]})},t}();e.HookRegistry=c},function(t,e,r){"use strict";function n(t){return void 0===t&&(t=!1),function(e,r){var n=t?-1:1,i=(e.node.state.path.length-r.node.state.path.length)*n;return 0!==i?i:r.hook.priority-e.hook.priority}}var i=r(3),o=r(4),a=r(13),s=r(17),u=function(){function t(t,e,r){var o=this;this.$transitions=t,this.transition=e,this.baseHookOptions=r,this.getOnBeforeHooks=function(){return o._buildNodeHooks("onBefore","to",n(),{async:!1})},this.getOnStartHooks=function(){return o._buildNodeHooks("onStart","to",n())},this.getOnExitHooks=function(){return o._buildNodeHooks("onExit","exiting",n(!0),{stateHook:!0})},this.getOnRetainHooks=function(){return o._buildNodeHooks("onRetain","retained",n(!1),{stateHook:!0})},this.getOnEnterHooks=function(){return o._buildNodeHooks("onEnter","entering",n(!1),{stateHook:!0})},this.getOnFinishHooks=function(){return o._buildNodeHooks("onFinish","to",n())},this.getOnSuccessHooks=function(){return o._buildNodeHooks("onSuccess","to",n(),{async:!1,rejectIfSuperseded:!1})},this.getOnErrorHooks=function(){return o._buildNodeHooks("onError","to",n(),{async:!1,rejectIfSuperseded:!1})},this.treeChanges=e.treeChanges(),this.toState=i.tail(this.treeChanges.to).state,this.fromState=i.tail(this.treeChanges.from).state,this.transitionOptions=e.options()}return t.prototype.asyncHooks=function(){var t=this.getOnStartHooks(),e=this.getOnExitHooks(),r=this.getOnRetainHooks(),n=this.getOnEnterHooks(),o=this.getOnFinishHooks(),a=[t,e,r,n,o];return a.reduce(i.unnestR,[]).filter(i.identity)},t.prototype._buildNodeHooks=function(t,e,r,n){var o=this,u=this._matchingHooks(t,this.treeChanges);if(!u)return[];var c=function(r){var u=r.matches(o.treeChanges),c=u[e],f="exiting"===e?o.treeChanges.from:o.treeChanges.to;new s.ResolveContext(f);return c.map(function(e){var s=i.extend({bind:r.bind,traceData:{hookType:t,context:e}},o.baseHookOptions,n),u=s.stateHook?e.state:null,c=new a.TransitionHook(o.transition,u,r,s);return{hook:r,node:e,transitionHook:c}})};return u.map(c).reduce(i.unnestR,[]).sort(r).map(function(t){return t.transitionHook})},t.prototype._matchingHooks=function(t,e){return[this.transition,this.$transitions].map(function(e){return e.getHooks(t)}).filter(i.assertPredicate(o.isArray,"broken event named: "+t)).reduce(i.unnestR,[]).filter(function(t){return t.matches(e)})},t}();e.HookBuilder=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(12),a=r(6),s=r(18),u=r(19),c=r(20),f=r(9),l=s.resolvePolicies.when,p=[l.EAGER,l.LAZY],h=[l.EAGER];e.NATIVE_INJECTOR_TOKEN="Native Injector";var v=function(){function t(t){this._path=t}return t.prototype.getTokens=function(){return this._path.reduce(function(t,e){return t.concat(e.resolvables.map(function(t){return t.token}))},[]).reduce(n.uniqR,[])},t.prototype.getResolvable=function(t){var e=this._path.map(function(t){return t.resolvables}).reduce(n.unnestR,[]).filter(function(e){return e.token===t});return n.tail(e)},t.prototype.subContext=function(e){return new t(c.PathFactory.subPath(this._path,function(t){return t.state===e}))},t.prototype.addResolvables=function(t,e){var r=n.find(this._path,i.propEq("state",e)),o=t.map(function(t){return t.token});r.resolvables=r.resolvables.filter(function(t){return o.indexOf(t.token)===-1}).concat(t)},t.prototype.resolvePath=function(t,e){var r=this;void 0===t&&(t="LAZY");var i=n.inArray(p,t)?t:"LAZY",u=i===s.resolvePolicies.when.EAGER?h:p;o.trace.traceResolvePath(this._path,t,e);var c=this._path.reduce(function(t,i){var o=function(t){return n.inArray(u,t.getPolicy(i.state).when)},a=i.resolvables.filter(o),s=r.subContext(i.state),c=function(t){return t.get(s,e).then(function(e){return{token:t.token,value:e}})};return t.concat(a.map(c))},[]);return a.services.$q.all(c)},t.prototype.injector=function(){
1816 !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("angular")):"function"==typeof define&&define.amd?define("angular-ui-router",["angular"],e):"object"==typeof exports?exports["angular-ui-router"]=e(require("angular")):t["angular-ui-router"]=e(t.angular)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(1)),n(r(53)),n(r(55)),n(r(58)),r(60),r(61),r(62),r(63),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="ui.router"},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(2)),n(r(46)),n(r(47)),n(r(48)),n(r(49)),n(r(50)),n(r(51)),n(r(52)),n(r(44));var i=r(25);e.UIRouter=i.UIRouter},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(3)),n(r(6)),n(r(7)),n(r(5)),n(r(4)),n(r(8)),n(r(9)),n(r(12))},function(t,e,r){"use strict";function n(t,e,r,n){return void 0===n&&(n=Object.keys(t)),n.filter(function(e){return"function"==typeof t[e]}).forEach(function(n){return e[n]=t[n].bind(r)})}function i(t){void 0===t&&(t={});for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.apply(null,[{}].concat(r));return e.extend({},i,c(t||{},Object.keys(i)))}function o(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.forEach(r,function(r){e.forEach(r,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function a(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function s(t,e,r){void 0===r&&(r=Object.keys(t));for(var n=0;n<r.length;n++){var i=r[n];if(t[i]!=e[i])return!1}return!0}function u(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={};for(var o in e)t(r,o)&&(i[o]=e[o]);return i}function c(t){return u.apply(null,[e.inArray].concat(T(arguments)))}function f(t){var r=function(t,r){return!e.inArray(t,r)};return u.apply(null,[r].concat(T(arguments)))}function l(t,e){return v(t,P.prop(e))}function p(t,r){var n=k.isArray(t),i=n?[]:{},o=n?function(t){return i.push(t)}:function(t,e){return i[e]=t};return e.forEach(t,function(t,e){r(t,e)&&o(t,e)}),i}function h(t,r){var n;return e.forEach(t,function(t,e){n||r(t,e)&&(n=t)}),n}function v(t,r){var n=k.isArray(t)?[]:{};return e.forEach(t,function(t,e){return n[e]=r(t,e)}),n}function d(t,e){return t.push(e),t}function m(t,e){return void 0===e&&(e="assert failure"),function(r){if(!t(r))throw new Error(k.isFunction(e)?e(r):e);return!0}}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(0===t.length)return[];var r=t.reduce(function(t,e){return Math.min(e.length,t)},9007199254740991);return Array.apply(null,Array(r)).map(function(e,r){return t.map(function(t){return t[r]})})}function y(t,e){var r,n;if(k.isArray(e)&&(r=e[0],n=e[1]),!k.isString(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function w(t){return t.length&&t[t.length-1]||void 0}function b(t,r){return r&&Object.keys(r).forEach(function(t){return delete r[t]}),r||(r={}),e.extend(r,t)}function $(t,e,r){return k.isArray(t)?t.forEach(e,r):void Object.keys(t).forEach(function(r){return e(t[r],r)})}function R(t,e){return Object.keys(e).forEach(function(r){return t[r]=e[r]}),t}function S(t){return T(arguments,1).filter(e.identity).reduce(R,t)}function E(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r=typeof t,n=typeof e;if(r!==n||"object"!==r)return!1;var i=[t,e];if(P.all(k.isArray)(i))return x(t,e);if(P.all(k.isDate)(i))return t.getTime()===e.getTime();if(P.all(k.isRegExp)(i))return t.toString()===e.toString();if(P.all(k.isFunction)(i))return!0;var o=[k.isFunction,k.isArray,k.isDate,k.isRegExp];if(o.map(P.any).reduce(function(t,e){return t||!!e(i)},!1))return!1;var a,s={};for(a in t){if(!E(t[a],e[a]))return!1;s[a]=!0}for(a in e)if(!s[a])return!1;return!0}function x(t,e){return t.length===e.length&&g(t,e).reduce(function(t,e){return t&&E(e[0],e[1])},!0)}var k=r(4),P=r(5),_=r(6),C="undefined"==typeof window?{}:window,O=C.angular||{};e.fromJson=O.fromJson||JSON.parse.bind(JSON),e.toJson=O.toJson||JSON.stringify.bind(JSON),e.copy=O.copy||b,e.forEach=O.forEach||$,e.extend=O.extend||S,e.equals=O.equals||E,e.identity=function(t){return t},e.noop=function(){},e.bindFunctions=n,e.inherit=function(t,r){return e.extend(new(e.extend(function(){},{prototype:t})),r)};var T=function(t,e){return void 0===e&&(e=0),Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(t,e))};e.inArray=function(t,e){return t.indexOf(e)!==-1},e.removeFrom=P.curry(function(t,e){var r=t.indexOf(e);return r>=0&&t.splice(r,1),t}),e.defaults=i,e.merge=o,e.mergeR=function(t,r){return e.extend(t,r)},e.ancestors=a,e.equalForKeys=s,e.pick=c,e.omit=f,e.pluck=l,e.filter=p,e.find=h,e.mapObj=v,e.map=v,e.values=function(t){return Object.keys(t).map(function(e){return t[e]})},e.allTrueR=function(t,e){return t&&e},e.anyTrueR=function(t,e){return t||e},e.unnestR=function(t,e){return t.concat(e)},e.flattenR=function(t,r){return k.isArray(r)?t.concat(r.reduce(e.flattenR,[])):d(t,r)},e.pushR=d,e.uniqR=function(t,r){return e.inArray(t,r)?t:d(t,r)},e.unnest=function(t){return t.reduce(e.unnestR,[])},e.flatten=function(t){return t.reduce(e.flattenR,[])},e.assertPredicate=m,e.pairs=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})},e.arrayTuples=g,e.applyPairs=y,e.tail=w,e.silenceUncaughtInPromise=function(t){return t["catch"](function(t){return 0})&&t},e.silentRejection=function(t){return e.silenceUncaughtInPromise(_.services.$q.reject(t))}},function(t,e,r){"use strict";function n(t){if(e.isArray(t)&&t.length){var r=t.slice(0,-1),n=t.slice(-1);return!(r.filter(i.not(e.isString)).length||n.filter(i.not(e.isFunction)).length)}return e.isFunction(t)}var i=r(5),o=Object.prototype.toString,a=function(t){return function(e){return typeof e===t}};e.isUndefined=a("undefined"),e.isDefined=i.not(e.isUndefined),e.isNull=function(t){return null===t},e.isFunction=a("function"),e.isNumber=a("number"),e.isString=a("string"),e.isObject=function(t){return null!==t&&"object"==typeof t},e.isArray=Array.isArray,e.isDate=function(t){return"[object Date]"===o.call(t)},e.isRegExp=function(t){return"[object RegExp]"===o.call(t)},e.isInjectable=n,e.isPromise=i.and(e.isObject,i.pipe(i.prop("then"),e.isFunction))},function(t,e){"use strict";function r(t){function e(r){return r.length>=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}var r=[].slice.apply(arguments,[1]),n=t.length;return e(r)}function n(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n.apply(null,[].slice.call(arguments).reverse())}function o(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)&&e.apply(null,r)}}function a(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)||e.apply(null,r)}}function s(t,e){return function(r){return r[t].apply(r,e)}}function u(t){return function(e){for(var r=0;r<t.length;r++)if(t[r][0](e))return t[r][1](e)}}e.curry=r,e.compose=n,e.pipe=i,e.prop=function(t){return function(e){return e&&e[t]}},e.propEq=r(function(t,e,r){return r&&r[t]===e}),e.parse=function(t){return i.apply(null,t.split(".").map(e.prop))},e.not=function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return!t.apply(null,e)}},e.and=o,e.or=a,e.all=function(t){return function(e){return e.reduce(function(e,r){return e&&!!t(r)},!0)}},e.any=function(t){return function(e){return e.reduce(function(e,r){return e||!!t(r)},!1)}},e.is=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},e.eq=function(t){return function(e){return t===e}},e.val=function(t){return function(){return t}},e.invoke=s,e.pattern=u},function(t,e){"use strict";var r=function(t){return function(){throw new Error(t+"(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']")}},n={$q:void 0,$injector:void 0,location:{},locationConfig:{},template:{}};e.services=n,["setUrl","path","search","hash","onChange"].forEach(function(t){return n.location[t]=r(t)}),["port","protocol","host","baseHref","html5Mode","hashPrefix"].forEach(function(t){return n.locationConfig[t]=r(t)})},function(t,e){"use strict";var r=function(){function t(t){this.text=t,this.glob=t.split(".");var e=this.text.split(".").map(function(t){return"**"===t?"(?:|(?:\\.[^.]*)*)":"*"===t?"\\.[^.]*":"\\."+t}).join("");this.regexp=new RegExp("^"+e+"$")}return t.prototype.matches=function(t){return this.regexp.test("."+t)},t.is=function(t){return t.indexOf("*")>-1},t.fromString=function(e){return this.is(e)?new t(e):null},t}();e.Glob=r},function(t,e){"use strict";var r=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=null),this._items=t,this._limit=e}return t.prototype.enqueue=function(t){var e=this._items;return e.push(t),this._limit&&e.length>this._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();e.Queue=r},function(t,e,r){"use strict";function n(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function i(t,e){for(;e.length<t;)e+=" ";return e}function o(t){return t.replace(/^([A-Z])/,function(t){return t.toLowerCase()}).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function a(t){var e=s(t),r=e.match(/^(function [^ ]+\([^)]*\))/),n=r?r[1]:e,i=t.name||"";return i&&n.match(/function \(/)?"function "+i+n.substr(9):n}function s(t){var e=c.isArray(t)?t.slice(-1)[0]:t;return e&&e.toString()||"undefined"}function u(t){function e(t){if(c.isObject(t)){if(r.indexOf(t)!==-1)return"[circular ref]";r.push(t)}return m(t)}var r=[];return JSON.stringify(t,function(t,r){return e(r)}).replace(/\\"/g,'"')}var c=r(4),f=r(10),l=r(3),p=r(5),h=r(11),v=r(19);e.maxLength=n,e.padString=i,e.kebobString=o,e.functionToString=a,e.fnToString=s;var d=null,m=function(t){var e=f.Rejection.isTransitionRejectionPromise;return(d=d||p.pattern([[p.not(c.isDefined),p.val("undefined")],[c.isNull,p.val("null")],[c.isPromise,p.val("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[p.is(f.Rejection),p.invoke("toString")],[p.is(h.Transition),p.invoke("toString")],[p.is(v.Resolvable),p.invoke("toString")],[c.isInjectable,a],[p.val(!0),l.identity]]))(t)};e.stringify=u,e.beforeAfterSubstr=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return r===-1?[e,""]:[e.substr(0,r),e.substr(r+1)]}}},function(t,e,r){"use strict";var n=r(3),i=r(9);!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(e.RejectType||(e.RejectType={}));var o=e.RejectType,a=function(){function t(t,e,r){this.type=t,this.message=e,this.detail=r}return t.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():i.stringify(t)},e=this.type,r=this.message,n=t(this.detail);return"TransitionRejection(type: "+e+", message: "+r+", detail: "+n+")"},t.prototype.toPromise=function(){return n.extend(n.silentRejection(this),{_transitionRejection:this})},t.isTransitionRejectionPromise=function(e){return e&&"function"==typeof e.then&&e._transitionRejection instanceof t},t.superseded=function(e,r){var n="The transition has been superseded by a different transition",i=new t(o.SUPERSEDED,n,e);return r&&r.redirected&&(i.redirected=!0),i},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){var r="This transition is invalid";return new t(o.INVALID,r,e)},t.ignored=function(e){var r="The transition was ignored";return new t(o.IGNORED,r,e)},t.aborted=function(e){var r="The transition has been aborted";return new t(o.ABORTED,r,e)},t.errored=function(e){var r="The transition errored";return new t(o.ERROR,r,e)},t}();e.Rejection=a},function(t,e,r){"use strict";var n=r(9),i=r(12),o=r(6),a=r(3),s=r(4),u=r(5),c=r(13),f=r(15),l=r(16),p=r(21),h=r(20),v=r(14),d=r(22),m=r(19),g=r(10),y=r(17),w=r(25),b=0,$=u.prop("self"),R=function(){function t(e,r,n){var i=this;if(this._deferred=o.services.$q.defer(),this.promise=this._deferred.promise,this.treeChanges=function(){return i._treeChanges},this.isActive=function(){return i===i._options.current()},this.router=n,this._targetState=r,!r.valid())throw new Error(r.error());f.HookRegistry.mixin(new f.HookRegistry,this),this._options=a.extend({current:u.val(this)},r.options()),this.$id=b++;var s=h.PathFactory.buildToPath(e,r);this._treeChanges=h.PathFactory.treeChanges(e,s,this._options.reloadState);var c=this._treeChanges.entering.map(function(t){return t.state});h.PathFactory.applyViewConfigs(n.transitionService.$view,this._treeChanges.to,c);var l=[new m.Resolvable(w.UIRouter,function(){return n},[],(void 0),n),new m.Resolvable(t,function(){return i},[],(void 0),this),new m.Resolvable("$transition$",function(){return i},[],(void 0),this),new m.Resolvable("$stateParams",function(){return i.params()},[],(void 0),this.params())],p=this._treeChanges.to[0],v=new y.ResolveContext(this._treeChanges.to);v.addResolvables(l,p.state)}return t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.$from=function(){return a.tail(this._treeChanges.from).state},t.prototype.$to=function(){return a.tail(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!f.matchState(this.$to(),e.to)||e.from&&!f.matchState(this.$from(),e.from))},t.prototype.params=function(t){return void 0===t&&(t="to"),this._treeChanges[t].map(u.prop("paramValues")).reduce(a.mergeR,{})},t.prototype.injector=function(t){var e=this.treeChanges().to;return t&&(e=h.PathFactory.subPath(e,function(e){return e.state===t||e.state.name===t})),new y.ResolveContext(e).injector()},t.prototype.getResolveTokens=function(){return new y.ResolveContext(this._treeChanges.to).getTokens()},t.prototype.getResolveValue=function(t){var e=new y.ResolveContext(this._treeChanges.to),r=function(t){var r=e.getResolvable(t);if(void 0===r)throw new Error("Dependency Injection token not found: "+n.stringify(t));return r.data};return s.isArray(t)?t.map(r):r(t)},t.prototype.getResolvable=function(t){return new y.ResolveContext(this._treeChanges.to).getResolvable(t)},t.prototype.addResolvable=function(t,e){void 0===e&&(e="");var r="string"==typeof e?e:e.name,n=this._treeChanges.to,i=a.find(n,function(t){return t.state.name===r}),o=new y.ResolveContext(n);o.addResolvables([t],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return a.map(this._treeChanges.entering,u.prop("state")).map($)},t.prototype.exiting=function(){return a.map(this._treeChanges.exiting,u.prop("state")).map($).reverse()},t.prototype.retained=function(){return a.map(this._treeChanges.retained,u.prop("state")).map($)},t.prototype.views=function(t,e){void 0===t&&(t="entering");var r=this._treeChanges[t];return r=e?r.filter(u.propEq("state",e)):r,r.map(u.prop("views")).filter(a.identity).reduce(a.unnestR,[])},t.prototype.redirect=function(t){var e=a.extend({},this.options(),t.options(),{redirectedFrom:this,source:"redirect"});t=new v.TargetState(t.identifier(),t.$state(),t.params(),e);var r=this.router.transitionService.create(this._treeChanges.from,t),n=this.treeChanges().entering,i=r.treeChanges().entering,o=function(t){return function(e){return t&&e.state.includes[t.name]}},s=p.PathNode.matching(i,n).filter(u.not(o(t.options().reloadState)));return s.forEach(function(t,e){t.resolvables=n[e].resolvables}),r},t.prototype._changedParams=function(){var t=this._treeChanges,e=t.to,r=t.from;if(!this._options.reload&&a.tail(e).state===a.tail(r).state){var n=e.map(function(t){return t.paramSchema}),i=[e,r].map(function(t){return t.map(function(t){return t.paramValues})}),o=i[0],s=i[1],u=a.arrayTuples(n,o,s);return u.map(function(t){var e=t[0],r=t[1],n=t[2];return d.Param.changed(e,r,n)}).reduce(a.unnestR,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(a.anyTrueR,!1)},t.prototype.ignored=function(){var t=this._changedParams();return!!t&&0===t.length},t.prototype.hookBuilder=function(){return new l.HookBuilder(this.router.transitionService,this,{transition:this,current:this._options.current})},t.prototype.run=function(){var t=this,e=c.TransitionHook.runSynchronousHooks,r=this.hookBuilder(),n=this.router.globals;n.transitionHistory.enqueue(this);var o=e(r.getOnBeforeHooks());if(g.Rejection.isTransitionRejectionPromise(o)){o["catch"](function(){return 0});var a=o._transitionRejection;return this._deferred.reject(a),this.promise}if(!this.valid()){var s=new Error(this.error());return this._deferred.reject(s),this.promise}if(this.ignored())return i.trace.traceTransitionIgnored(this),this._deferred.reject(g.Rejection.ignored()),this.promise;var u=function(){i.trace.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),e(r.getOnSuccessHooks(),!0)},f=function(n){i.trace.traceError(n,t),t.success=!1,t._deferred.reject(n),t._error=n,e(r.getOnErrorHooks(),!0)};i.trace.traceTransitionStart(this);var l=function(t,e){return t.then(function(){return e.invokeHook()})};return r.asyncHooks().reduce(l,o).then(u,f),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.error=function(){for(var t=this.$to(),e=0,r=this;null!=(r=r.redirectedFrom());)if(++e>20)return"Too many Transition redirects (20+)";return t.self["abstract"]?"Cannot transition to abstract state '"+t.name+"'":d.Param.validates(t.parameters(),this.params())?this.success===!1?this._error:void 0:"Param values not valid for state '"+t.name+"'"},t.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:a.omit(t,"#")},n=this.$id,i=s.isObject(t)?t.name:t,o=a.toJson(r(this._treeChanges.from.map(u.prop("paramValues")).reduce(a.mergeR,{}))),c=this.valid()?"":"(X) ",f=s.isObject(e)?e.name:e,l=a.toJson(r(this.params()));return"Transition#"+n+"( '"+i+"'"+o+" -> "+c+"'"+f+"'"+l+" )"},t.diToken=t,t}();e.Transition=R},function(t,e,r){"use strict";function n(t){return t?"[ui-view#"+t.id+" tag "+("in template from '"+(t.creationContext&&t.creationContext.name||"(root)")+"' state]: ")+("fqn: '"+t.fqn+"', ")+("name: '"+t.name+"@"+t.creationContext+"')"):"ui-view (defunct)"}function i(t){return a.isNumber(t)?c[t]:c[c[t]]}var o=r(5),a=r(4),s=r(9),u=function(t){return"[ViewConfig#"+t.$id+" from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.UIVIEW=3]="UIVIEW",t[t.VIEWCONFIG=4]="VIEWCONFIG"}(e.Category||(e.Category={}));var c=e.Category,f=function(){function t(){this._enabled={},this.approximateDigests=0}return t.prototype._set=function(t,e){var r=this;e.length||(e=Object.keys(c).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(t){return c[t]})),e.map(i).forEach(function(e){return r._enabled[e]=t})},t.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!0,t)},t.prototype.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!1,t)},t.prototype.enabled=function(t){return!!this._enabled[i(t)]},t.prototype.traceTransitionStart=function(t){if(this.enabled(c.TRANSITION)){var e=t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Started -> "+n)}},t.prototype.traceTransitionIgnored=function(t){if(this.enabled(c.TRANSITION)){var e=t&&t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Ignored <> "+n)}},t.prototype.traceHookInvocation=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=o.parse("traceData.hookType")(e)||"internal",a=o.parse("traceData.context.state.name")(e)||o.parse("traceData.context")(e)||"unknown",u=s.functionToString(t.eventHook.callback);console.log("Transition #"+r+" Digest #"+n+": Hook -> "+i+" context: "+a+", "+s.maxLength(200,u))}},t.prototype.traceHookResult=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=s.stringify(t);console.log("Transition #"+r+" Digest #"+n+": <- Hook returned: "+s.maxLength(200,i))}},t.prototype.traceResolvePath=function(t,e,r){if(this.enabled(c.RESOLVE)){var n=r&&r.$id,i=this.approximateDigests,o=t&&t.toString();console.log("Transition #"+n+" Digest #"+i+": Resolving "+o+" ("+e+")")}},t.prototype.traceResolvableResolved=function(t,e){if(this.enabled(c.RESOLVE)){var r=e&&e.$id,n=this.approximateDigests,i=t&&t.toString(),o=s.stringify(t.data);console.log("Transition #"+r+" Digest #"+n+": <- Resolved "+i+" to: "+s.maxLength(200,o))}},t.prototype.traceError=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Rejected "+i+", reason: "+t)}},t.prototype.traceSuccess=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=t.name,o=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Success "+o+", final state: "+i)}},t.prototype.traceUIViewEvent=function(t,e,r){void 0===r&&(r=""),this.enabled(c.UIVIEW)&&console.log("ui-view: "+s.padString(30,t)+" "+n(e)+r)},t.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUIViewFill=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+s.maxLength(200,e))},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+u(e))},t.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+n(e))},t}();e.Trace=f;var l=new f;e.trace=l},function(t,e,r){"use strict";var n=r(3),i=r(9),o=r(4),a=r(5),s=r(12),u=r(6),c=r(10),f=r(14),l={async:!0,rejectIfSuperseded:!0,current:n.noop,transition:null,traceData:{},bind:null},p=function(){function t(t,e,r,i){var o=this;this.transition=t,this.stateContext=e,this.eventHook=r,this.options=i,this.isSuperseded=function(){return o.options.current()!==o.options.transition},this.options=n.defaults(i,l)}return t.prototype.invokeHook=function(){var t=this,e=t.options,r=t.eventHook;if(s.trace.traceHookInvocation(this,e),e.rejectIfSuperseded&&this.isSuperseded())return c.Rejection.superseded(e.current()).toPromise();var n=r._deregistered?void 0:r.callback.call(e.bind,this.transition,this.stateContext);return this.handleHookResult(n)},t.prototype.handleHookResult=function(t){if(this.isSuperseded())return c.Rejection.superseded(this.options.current()).toPromise();if(o.isPromise(t))return t.then(this.handleHookResult.bind(this));if(s.trace.traceHookResult(t,this.options),t===!1)return c.Rejection.aborted("Hook aborted transition").toPromise();var e=a.is(f.TargetState);return e(t)?c.Rejection.redirected(t).toPromise():void 0},t.prototype.toString=function(){var t=this,e=t.options,r=t.eventHook,n=a.parse("traceData.hookType")(e)||"internal",o=a.parse("traceData.context.state.name")(e)||a.parse("traceData.context")(e)||"unknown",s=i.fnToString(r.callback);return n+" context: "+o+", "+i.maxLength(200,s)},t.runSynchronousHooks=function(t,e){void 0===e&&(e=!1);for(var r=[],n=0;n<t.length;n++){var i=t[n];try{r.push(i.invokeHook())}catch(s){if(!e)return c.Rejection.errored(s).toPromise();var f=i.transition.router.stateService.defaultErrorHandler();f(s)}}var l=r.filter(c.Rejection.isTransitionRejectionPromise);return l.length?l[0]:r.filter(o.isPromise).reduce(function(t,e){return t.then(a.val(e))},u.services.$q.when())},t}();e.TransitionHook=p},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),this._identifier=t,this._definition=e,this._options=n,this._params=r||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+n.toJson(this.params())},t}();e.TargetState=i},function(t,e,r){"use strict";function n(t,e){function r(t){for(var e=n,r=0;r<e.length;r++){var i=s.Glob.fromString(e[r]);if(i&&i.matches(t.name)||!i&&e[r]===t.name)return!0}return!1}var n=a.isString(e)?[e]:e,i=a.isFunction(n)?n:r;return!!i(t)}function i(t,e){return function(r,n,i){void 0===i&&(i={});var a=new u(r,n,i);return t[e].push(a),function(){a._deregistered=!0,o.removeFrom(t[e])(a)}}}var o=r(3),a=r(4),s=r(7);e.matchState=n;var u=function(){function t(t,e,r){void 0===r&&(r={}),this.callback=e,this.matchCriteria=o.extend({to:!0,from:!0,exiting:!0,retained:!0,entering:!0},t),this.priority=r.priority||0,this.bind=r.bind||null,this._deregistered=!1}return t._matchingNodes=function(t,e){if(e===!0)return t;var r=t.filter(function(t){return n(t.state,e)});return r.length?r:null},t.prototype.matches=function(e){var r=this.matchCriteria,n=t._matchingNodes,i={to:n([o.tail(e.to)],r.to),from:n([o.tail(e.from)],r.from),exiting:n(e.exiting,r.exiting),retained:n(e.retained,r.retained),entering:n(e.entering,r.entering)},a=["to","from","exiting","retained","entering"].map(function(t){return i[t]}).reduce(o.allTrueR,!0);return a?i:null},t}();e.EventHook=u;var c=function(){function t(){var t=this;this._transitionEvents={onBefore:[],onStart:[],onEnter:[],onRetain:[],onExit:[],onFinish:[],onSuccess:[],onError:[]},this.getHooks=function(e){return t._transitionEvents[e]},this.onBefore=i(this._transitionEvents,"onBefore"),this.onStart=i(this._transitionEvents,"onStart"),this.onEnter=i(this._transitionEvents,"onEnter"),this.onRetain=i(this._transitionEvents,"onRetain"),this.onExit=i(this._transitionEvents,"onExit"),this.onFinish=i(this._transitionEvents,"onFinish"),this.onSuccess=i(this._transitionEvents,"onSuccess"),this.onError=i(this._transitionEvents,"onError")}return t.mixin=function(t,e){Object.keys(t._transitionEvents).concat(["getHooks"]).forEach(function(r){return e[r]=t[r]})},t}();e.HookRegistry=c},function(t,e,r){"use strict";function n(t){return void 0===t&&(t=!1),function(e,r){var n=t?-1:1,i=(e.node.state.path.length-r.node.state.path.length)*n;return 0!==i?i:r.hook.priority-e.hook.priority}}var i=r(3),o=r(4),a=r(13),s=r(17),u=function(){function t(t,e,r){var o=this;this.$transitions=t,this.transition=e,this.baseHookOptions=r,this.getOnBeforeHooks=function(){return o._buildNodeHooks("onBefore","to",n(),{async:!1})},this.getOnStartHooks=function(){return o._buildNodeHooks("onStart","to",n())},this.getOnExitHooks=function(){return o._buildNodeHooks("onExit","exiting",n(!0),{stateHook:!0})},this.getOnRetainHooks=function(){return o._buildNodeHooks("onRetain","retained",n(!1),{stateHook:!0})},this.getOnEnterHooks=function(){return o._buildNodeHooks("onEnter","entering",n(!1),{stateHook:!0})},this.getOnFinishHooks=function(){return o._buildNodeHooks("onFinish","to",n())},this.getOnSuccessHooks=function(){return o._buildNodeHooks("onSuccess","to",n(),{async:!1,rejectIfSuperseded:!1})},this.getOnErrorHooks=function(){return o._buildNodeHooks("onError","to",n(),{async:!1,rejectIfSuperseded:!1})},this.treeChanges=e.treeChanges(),this.toState=i.tail(this.treeChanges.to).state,this.fromState=i.tail(this.treeChanges.from).state,this.transitionOptions=e.options()}return t.prototype.asyncHooks=function(){var t=this.getOnStartHooks(),e=this.getOnExitHooks(),r=this.getOnRetainHooks(),n=this.getOnEnterHooks(),o=this.getOnFinishHooks(),a=[t,e,r,n,o];return a.reduce(i.unnestR,[]).filter(i.identity)},t.prototype._buildNodeHooks=function(t,e,r,n){var o=this,u=this._matchingHooks(t,this.treeChanges);if(!u)return[];var c=function(r){var u=r.matches(o.treeChanges),c=u[e],f="exiting"===e?o.treeChanges.from:o.treeChanges.to;new s.ResolveContext(f);return c.map(function(e){var s=i.extend({bind:r.bind,traceData:{hookType:t,context:e}},o.baseHookOptions,n),u=s.stateHook?e.state:null,c=new a.TransitionHook(o.transition,u,r,s);return{hook:r,node:e,transitionHook:c}})};return u.map(c).reduce(i.unnestR,[]).sort(r).map(function(t){return t.transitionHook})},t.prototype._matchingHooks=function(t,e){return[this.transition,this.$transitions].map(function(e){return e.getHooks(t)}).filter(i.assertPredicate(o.isArray,"broken event named: "+t)).reduce(i.unnestR,[]).filter(function(t){return t.matches(e)})},t}();e.HookBuilder=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(12),a=r(6),s=r(18),u=r(19),c=r(20),f=r(9),l=s.resolvePolicies.when,p=[l.EAGER,l.LAZY],h=[l.EAGER];e.NATIVE_INJECTOR_TOKEN="Native Injector";var v=function(){function t(t){this._path=t}return t.prototype.getTokens=function(){return this._path.reduce(function(t,e){return t.concat(e.resolvables.map(function(t){return t.token}))},[]).reduce(n.uniqR,[])},t.prototype.getResolvable=function(t){var e=this._path.map(function(t){return t.resolvables}).reduce(n.unnestR,[]).filter(function(e){return e.token===t});return n.tail(e)},t.prototype.subContext=function(e){return new t(c.PathFactory.subPath(this._path,function(t){return t.state===e}))},t.prototype.addResolvables=function(t,e){var r=n.find(this._path,i.propEq("state",e)),o=t.map(function(t){return t.token});r.resolvables=r.resolvables.filter(function(t){return o.indexOf(t.token)===-1}).concat(t)},t.prototype.resolvePath=function(t,e){var r=this;void 0===t&&(t="LAZY");var i=n.inArray(p,t)?t:"LAZY",u=i===s.resolvePolicies.when.EAGER?h:p;o.trace.traceResolvePath(this._path,t,e);var c=this._path.reduce(function(t,i){var o=function(t){return n.inArray(u,t.getPolicy(i.state).when)},a=i.resolvables.filter(o),s=r.subContext(i.state),c=function(t){return t.get(s,e).then(function(e){return{token:t.token,value:e}})};return t.concat(a.map(c))},[]);return a.services.$q.all(c)},t.prototype.injector=function(){
1817 return this._injector||(this._injector=new d(this))},t.prototype.findNode=function(t){return n.find(this._path,function(e){return n.inArray(e.resolvables,t)})},t.prototype.getDependencies=function(t){var e=this,r=this.findNode(t),i=c.PathFactory.subPath(this._path,function(t){return t===r})||this._path,o=i.reduce(function(t,e){return t.concat(e.resolvables)},[]).filter(function(e){return e!==t}),a=function(t){var r=o.filter(function(e){return e.token===t});if(r.length)return n.tail(r);var i=e.injector().getNative(t);if(!i)throw new Error("Could not find Dependency Injection token: "+f.stringify(t));return new u.Resolvable(t,function(){return i},[],i)};return t.deps.map(a)},t}();e.ResolveContext=v;var d=function(){function t(t){this.context=t,this["native"]=this.get(e.NATIVE_INJECTOR_TOKEN)||a.services.$injector}return t.prototype.get=function(t){var e=this.context.getResolvable(t);if(e){if(!e.resolved)throw new Error("Resolvable async .get() not complete:"+f.stringify(e.token));return e.data}return this["native"]&&this["native"].get(t)},t.prototype.getAsync=function(t){var e=this.context.getResolvable(t);return e?e.get(this.context):a.services.$q.when(this["native"].get(t))},t.prototype.getNative=function(t){return this["native"].get(t)},t}()},function(t,e){"use strict";e.resolvePolicies={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=r(12),a=r(9),s=r(4);e.defaultResolvePolicy={when:"LAZY",async:"WAIT"};var u=function(){function t(e,r,o,a,u){if(this.resolved=!1,this.promise=void 0,e instanceof t)n.extend(this,e);else if(s.isFunction(r)){if(null==e||void 0==e)throw new Error("new Resolvable(): token argument is required");if(!s.isFunction(r))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=a,this.resolveFn=r,this.deps=o||[],this.data=u,this.resolved=void 0!==u,this.promise=this.resolved?i.services.$q.when(this.data):void 0}else if(s.isObject(e)&&e.token&&s.isFunction(e.resolveFn)){var c=e;return new t(c.token,c.resolveFn,c.deps,c.policy,c.data)}}return t.prototype.getPolicy=function(t){var r=this.policy||{},n=t&&t.resolvePolicy||{};return{when:r.when||n.when||e.defaultResolvePolicy.when,async:r.async||n.async||e.defaultResolvePolicy.async}},t.prototype.resolve=function(t,e){var r=this,a=i.services.$q,s=function(){return a.all(t.getDependencies(r).map(function(r){return r.get(t,e)}))},u=function(t){return r.resolveFn.apply(null,t)},c=function(t){var e=t.cache(1);return e.take(1).toPromise().then(function(){return e})},f=t.findNode(this),l=f&&f.state,p="RXWAIT"===this.getPolicy(l).async?c:n.identity,h=function(t){return r.data=t,r.resolved=!0,o.trace.traceResolvableResolved(r,e),r.data};return this.promise=a.when().then(s).then(u).then(p).then(h)},t.prototype.get=function(t,e){return this.promise||this.resolve(t,e)},t.prototype.toString=function(){return"Resolvable(token: "+a.stringify(this.token)+", requires: ["+this.deps.map(a.stringify)+"])"},t.prototype.clone=function(){return new t(this)},t.fromData=function(e,r){return new t(e,function(){return r},null,null,r)},t}();e.Resolvable=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(14),a=r(21),s=function(){function t(){}return t.makeTargetState=function(t){var e=n.tail(t).state;return new o.TargetState(e,e,t.map(i.prop("paramValues")).reduce(n.mergeR,{}))},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new a.PathNode(t).applyRawParams(e)})},t.buildToPath=function(e,r){var n=t.buildPath(r);return r.options().inherit?t.inheritParams(e,n,Object.keys(r.params())):n},t.applyViewConfigs=function(e,r,i){r.filter(function(t){return n.inArray(i,t.state)}).forEach(function(i){var o=n.values(i.state.views||{}),a=t.subPath(r,function(t){return t===i}),s=o.map(function(t){return e.createViewConfig(a,t)});i.views=s.reduce(n.unnestR,[])})},t.inheritParams=function(t,e,r){function o(t,e){var r=n.find(t,i.propEq("state",e));return n.extend({},r&&r.paramValues)}function s(e){var i=n.extend({},e&&e.paramValues),s=n.pick(i,r);i=n.omit(i,r);var u=o(t,e.state)||{},c=n.extend(i,u,s);return new a.PathNode(e.state).applyRawParams(c)}return void 0===r&&(r=[]),e.map(s)},t.treeChanges=function(t,e,r){function n(t,r){var n=a.PathNode.clone(t);return n.paramValues=e[r].paramValues,n}for(var o=0,s=Math.min(t.length,e.length),u=function(t){return t.parameters({inherit:!1}).filter(i.not(i.prop("dynamic"))).map(i.prop("id"))},c=function(t,e){return t.equals(e,u(t.state))};o<s&&t[o].state!==r&&c(t[o],e[o]);)o++;var f,l,p,h,v;f=t,l=f.slice(0,o),p=f.slice(o);var d=l.map(n);return h=e.slice(o),v=d.concat(h),{from:f,to:v,retained:l,exiting:p,entering:h}},t.subPath=function(t,e){var r=n.find(t,e),i=t.indexOf(r);return i===-1?void 0:t.slice(0,i+1)},t.paramValues=function(t){return t.reduce(function(t,e){return n.extend(t,e.paramValues)},{})},t}();e.PathFactory=s},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(22),a=function(){function t(e){if(e instanceof t){var r=e;this.state=r.state,this.paramSchema=r.paramSchema.slice(),this.paramValues=n.extend({},r.paramValues),this.resolvables=r.resolvables.slice(),this.views=r.views&&r.views.slice()}else{var i=e;this.state=i,this.paramSchema=i.parameters({inherit:!1}),this.paramValues={},this.resolvables=i.resolvables.map(function(t){return t.clone()})}}return t.prototype.applyRawParams=function(t){var e=function(e){return[e.id,e.value(t[e.id])]};return this.paramValues=this.paramSchema.reduce(function(t,r){return n.applyPairs(t,e(r))},{}),this},t.prototype.parameter=function(t){return n.find(this.paramSchema,i.propEq("id",t))},t.prototype.equals=function(t,e){var r=this;void 0===e&&(e=this.paramSchema.map(function(t){return t.id}));var i=function(e){return r.parameter(e).type.equals(r.paramValues[e],t.paramValues[e])};return this.state===t.state&&e.map(i).reduce(n.allTrueR,!0)},t.clone=function(e){return new t(e)},t.matching=function(t,e,r){void 0===r&&(r=!0);for(var n=[],i=0;i<t.length&&i<e.length;i++){var a=t[i],s=e[i];if(a.state!==s.state)break;var u=o.Param.changed(a.paramSchema,a.paramValues,s.paramValues).filter(function(t){return!(r&&t.dynamic)});if(u.length)break;n.push(a)}return n},t}();e.PathNode=a},function(t,e,r){"use strict";function n(t){return t=v(t)&&{value:t}||t,s.extend(t,{$$fn:c.isInjectable(t.value)?t.value:function(){return t.value}})}function i(t,e,r,n,i){if(t.type&&e&&"string"!==e.name)throw new Error("Param '"+n+"' has two type configurations.");return t.type&&e&&"string"===e.name&&i.type(t.type)?i.type(t.type):e?e:t.type?t.type instanceof p.ParamType?t.type:i.type(t.type):r===d.CONFIG?i.type("any"):i.type("string")}function o(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!c.isDefined(r)||null==r)return l.matcherConfig.defaultSquashPolicy();if(r===!0||c.isString(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function a(t,e,r,n){var i,o,a=[{from:"",to:r||e?void 0:""},{from:null,to:r||e?void 0:""}];return i=c.isArray(t.replace)?t.replace:[],c.isString(n)&&i.push({from:n,to:void 0}),o=s.map(i,u.prop("from")),s.filter(a,function(t){return o.indexOf(t.from)===-1}).concat(i)}var s=r(3),u=r(5),c=r(4),f=r(6),l=r(23),p=r(24),h=Object.prototype.hasOwnProperty,v=function(t){return 0===["value","type","squash","array","dynamic"].filter(h.bind(t||{})).length};!function(t){t[t.PATH=0]="PATH",t[t.SEARCH=1]="SEARCH",t[t.CONFIG=2]="CONFIG"}(e.DefType||(e.DefType={}));var d=e.DefType,m=function(){function t(t,e,r,u,f){function l(){var e={array:u===d.SEARCH&&"auto"},n=t.match(/\[\]$/)?{array:!0}:{};return s.extend(e,n,r).array}r=n(r),e=i(r,e,u,t,f);var p=l();e=p?e.$asArray(p,u===d.SEARCH):e;var h=void 0!==r.value,v=c.isDefined(r.dynamic)?!!r.dynamic:!!e.dynamic,m=o(r,h),g=a(r,p,h,m);s.extend(this,{id:t,type:e,location:u,squash:m,replace:g,isOptional:h,dynamic:v,config:r,array:p})}return t.prototype.isDefaultValue=function(t){return this.isOptional&&this.type.equals(this.value(),t)},t.prototype.value=function(t){var e=this,r=function(){if(!f.services.$injector)throw new Error("Injectable functions cannot be called at configuration time");var t=f.services.$injector.invoke(e.config.$$fn);if(null!==t&&void 0!==t&&!e.type.is(t))throw new Error("Default value ("+t+") for parameter '"+e.id+"' is not an instance of ParamType ("+e.type.name+")");return t},n=function(t){var r=s.map(s.filter(e.replace,u.propEq("from",t)),u.prop("to"));return r.length?r[0]:t};return t=n(t),c.isDefined(t)?this.type.$normalize(t):r()},t.prototype.isSearch=function(){return this.location===d.SEARCH},t.prototype.validates=function(t){if((!c.isDefined(t)||null===t)&&this.isOptional)return!0;var e=this.type.$normalize(t);if(!this.type.is(e))return!1;var r=this.type.encode(e);return!(c.isString(r)&&!this.type.pattern.exec(r))},t.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},t.fromConfig=function(e,r,n,i){return new t(e,r,n,d.CONFIG,i)},t.fromPath=function(e,r,n,i){return new t(e,r,n,d.PATH,i)},t.fromSearch=function(e,r,n,i){return new t(e,r,n,d.SEARCH,i)},t.values=function(t,e){return void 0===e&&(e={}),t.map(function(t){return[t.id,t.value(e[t.id])]}).reduce(s.applyPairs,{})},t.changed=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r={}),t.filter(function(t){return!t.type.equals(e[t.id],r[t.id])})},t.equals=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),0===t.changed(e,r,n).length},t.validates=function(t,e){return void 0===e&&(e={}),t.map(function(t){return t.validates(e[t.id])}).reduce(s.allTrueR,!0)},t}();e.Param=m},function(t,e,r){"use strict";var n=r(4),i=function(){function t(){this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1}return t.prototype.caseInsensitive=function(t){return this._isCaseInsensitive=n.isDefined(t)?t:this._isCaseInsensitive},t.prototype.strictMode=function(t){return this._isStrictMode=n.isDefined(t)?t:this._isStrictMode},t.prototype.defaultSquashPolicy=function(t){if(n.isDefined(t)&&t!==!0&&t!==!1&&!n.isString(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=n.isDefined(t)?t:this._defaultSquashPolicy},t}();e.MatcherConfig=i,e.matcherConfig=new i},function(t,e,r){"use strict";function n(t,e){function r(t){return o.isArray(t)?t:o.isDefined(t)?[t]:[]}function n(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t,e){return function(a){if(o.isArray(a)&&0===a.length)return a;var s=r(a),u=i.map(s,t);return e===!0?0===i.filter(u,function(t){return!t}).length:n(u)}}function s(t){return function(e,n){var i=r(e),o=r(n);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(!t(i[a],o[a]))return!1;return!0}}var u=this;["encode","decode","equals","$normalize"].forEach(function(e){var r=t[e].bind(t),n="equals"===e?s:a;u[e]=n(r)}),i.extend(this,{dynamic:t.dynamic,name:t.name,pattern:t.pattern,is:a(t.is.bind(t),!0),$arrayMode:e})}var i=r(3),o=r(4),a=function(){function t(t){this.pattern=/.*/,i.extend(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new n(this,t)},t}();e.ParamType=a},function(t,e,r){"use strict";var n=r(26),i=r(29),o=r(29),a=r(30),s=r(37),u=r(38),c=r(43),f=r(44),l=function(){function t(){this.viewService=new s.ViewService,this.transitionService=new a.TransitionService(this),this.globals=new f.Globals(this.transitionService),this.urlMatcherFactory=new n.UrlMatcherFactory,this.urlRouterProvider=new i.UrlRouterProvider(this.urlMatcherFactory,this.globals.params),this.urlRouter=new o.UrlRouter(this.urlRouterProvider),this.stateRegistry=new u.StateRegistry(this.urlMatcherFactory,this.urlRouterProvider),this.stateService=new c.StateService(this),this.viewService.rootContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self}return t}();e.UIRouter=l},function(t,e,r){"use strict";function n(){return{strict:s.matcherConfig.strictMode(),caseInsensitive:s.matcherConfig.caseInsensitive()}}var i=r(3),o=r(4),a=r(27),s=r(23),u=r(22),c=r(28),f=function(){function t(){this.paramTypes=new c.ParamTypes,i.extend(this,{UrlMatcher:a.UrlMatcher,Param:u.Param})}return t.prototype.caseInsensitive=function(t){return s.matcherConfig.caseInsensitive(t)},t.prototype.strictMode=function(t){return s.matcherConfig.strictMode(t)},t.prototype.defaultSquashPolicy=function(t){return s.matcherConfig.defaultSquashPolicy(t)},t.prototype.compile=function(t,e){return new a.UrlMatcher(t,this.paramTypes,i.extend(n(),e))},t.prototype.isMatcher=function(t){if(!o.isObject(t))return!1;var e=!0;return i.forEach(a.UrlMatcher.prototype,function(r,n){o.isFunction(r)&&(e=e&&o.isDefined(t[n])&&o.isFunction(t[n]))}),e},t.prototype.type=function(t,e,r){var n=this.paramTypes.type(t,e,r);return o.isDefined(e)?this:n},t.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},t}();e.UrlMatcherFactory=f},function(t,e,r){"use strict";function n(t,e){var r=["",""],n=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return n;switch(e.squash){case!1:r=["(",")"+(e.isOptional?"?":"")];break;case!0:n=n.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+e.squash+"|",")?"]}return n+r[0]+e.type.pattern.source+r[1]}var i=r(3),o=r(5),a=r(4),s=r(22),u=r(4),c=r(22),f=r(3),l=r(3),p=function(t,e,r){return t[e]=t[e]||r()},h=function(){function t(e,r,a){var u=this;this.config=a,this._cache={path:[],pattern:null},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=e,this.config=i.defaults(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:i.identity});for(var c,f,l,p=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,v=0,d=[],m=function(r){if(!t.nameValidator.test(r))throw new Error("Invalid parameter name '"+r+"' in pattern '"+e+"'");if(i.find(u._params,o.propEq("id",r)))throw new Error("Duplicate parameter name '"+r+"' in pattern '"+e+"'")},g=function(t,n){var o=t[2]||t[3],a=n?t[4]:t[4]||("*"===t[1]?".*":null);return{id:o,regexp:a,cfg:u.config.params[o],segment:e.substring(v,t.index),type:a?r.type(a||"string")||i.inherit(r.type("string"),{pattern:new RegExp(a,u.config.caseInsensitive?"i":void 0)}):null}};(c=p.exec(e))&&(f=g(c,!1),!(f.segment.indexOf("?")>=0));)m(f.id),this._params.push(s.Param.fromPath(f.id,f.type,this.config.paramMap(f.cfg,!1),r)),this._segments.push(f.segment),d.push([f.segment,i.tail(this._params)]),v=p.lastIndex;l=e.substring(v);var y=l.indexOf("?");if(y>=0){var w=l.substring(y);if(l=l.substring(0,y),w.length>0)for(v=0;c=h.exec(w);)f=g(c,!0),m(f.id),this._params.push(s.Param.fromSearch(f.id,f.type,this.config.paramMap(f.cfg,!0),r)),v=p.lastIndex}this._segments.push(l),i.extend(this,{_compiled:d.map(function(t){return n.apply(null,t)}).concat(n(l)),prefix:this._segments[0]}),Object.freeze(this)}return t.prototype.append=function(t){return this._children.push(t),i.forEach(t._cache,function(e,r){return t._cache[r]=a.isArray(e)?[]:null}),t._cache.path=this._cache.path.concat(this),t},t.prototype.isRoot=function(){return 0===this._cache.path.length},t.prototype.toString=function(){return this.pattern},t.prototype.exec=function(t,e,r,n){function a(t){var e=function(t){return t.split("").reverse().join("")},r=function(t){return t.replace(/\\-/g,"-")},n=e(t).split(/-(?!\\)/),o=i.map(n,e);return i.map(o,r).reverse()}var s=this;void 0===e&&(e={}),void 0===n&&(n={});var c=p(this._cache,"pattern",function(){return new RegExp(["^",i.unnest(s._cache.path.concat(s).map(o.prop("_compiled"))).join(""),s.config.strict===!1?"/?":"","$"].join(""),s.config.caseInsensitive?"i":void 0)}).exec(t);if(!c)return null;var f=this.parameters(),l=f.filter(function(t){return!t.isSearch()}),h=f.filter(function(t){return t.isSearch()}),v=this._cache.path.concat(this).map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),d={};if(v!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;m<v;m++){for(var g=l[m],y=c[m+1],w=0;w<g.replace.length;w++)g.replace[w].from===y&&(y=g.replace[w].to);y&&g.array===!0&&(y=a(y)),u.isDefined(y)&&(y=g.type.decode(y)),d[g.id]=g.value(y)}return h.forEach(function(t){for(var r=e[t.id],n=0;n<t.replace.length;n++)t.replace[n].from===r&&(r=t.replace[n].to);u.isDefined(r)&&(r=t.type.decode(r)),d[t.id]=t.value(r)}),r&&(d["#"]=r),d},t.prototype.parameters=function(t){return void 0===t&&(t={}),t.inherit===!1?this._params:i.unnest(this._cache.path.concat(this).map(o.prop("_params")))},t.prototype.parameter=function(t,e){void 0===e&&(e={});var r=i.tail(this._cache.path);return i.find(this._params,o.propEq("id",t))||e.inherit!==!1&&r&&r.parameter(t)||null},t.prototype.validates=function(t){var e=this,r=function(t,e){return!t||t.validates(e)};return i.pairs(t||{}).map(function(t){var n=t[0],i=t[1];return r(e.parameter(n),i)}).reduce(i.allTrueR,!0)},t.prototype.format=function(e){function r(t){var r=t.value(e[t.id]),n=t.isDefaultValue(r),i=!!n&&t.squash,o=t.type.encode(r);return{param:t,value:r,isDefaultValue:n,squash:i,encoded:o}}if(void 0===e&&(e={}),!this.validates(e))return null;var n=this._cache.path.slice().concat(this),o=n.map(t.pathSegmentsAndParams).reduce(f.unnestR,[]),s=n.map(t.queryParams).reduce(f.unnestR,[]),u=o.reduce(function(e,n){if(a.isString(n))return e+n;var o=r(n),s=o.squash,u=o.encoded,c=o.param;return s===!0?e.match(/\/$/)?e.slice(0,-1):e:a.isString(s)?e+s:s!==!1?e:null==u?e:a.isArray(u)?e+i.map(u,t.encodeDashes).join("-"):c.type.raw?e+u:e+encodeURIComponent(u)},""),c=s.map(function(t){var e=r(t),n=e.squash,o=e.encoded,s=e.isDefaultValue;if(!(null==o||s&&n!==!1)&&(a.isArray(o)||(o=[o]),0!==o.length))return t.type.raw||(o=i.map(o,encodeURIComponent)),o.map(function(e){return t.id+"="+e})}).filter(i.identity).reduce(f.unnestR,[]).join("&");return u+(c?"?"+c:"")+(e["#"]?"#"+e["#"]:"")},t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,r=t._params.filter(function(t){return t.location===c.DefType.PATH});return l.arrayTuples(e,r.concat(void 0)).reduce(f.unnestR,[]).filter(function(t){return""!==t&&u.isDefined(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===c.DefType.SEARCH})},t.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,t}();e.UrlMatcher=h},function(t,e,r){"use strict";function n(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function i(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}var o=r(3),a=r(4),s=r(5),u=r(6),c=r(24),f=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes={hash:{encode:n,decode:i,is:s.is(String),pattern:/.*/,equals:function(t,e){return t==e}},string:{encode:n,decode:i,is:s.is(String),pattern:/[^\/]*/},"int":{encode:n,decode:function(t){return parseInt(t,10)},is:function(t){return a.isDefined(t)&&this.decode(t.toString())===t},pattern:/-?\d+/},bool:{encode:function(t){return t&&1||0},decode:function(t){return 0!==parseInt(t,10)},is:s.is(Boolean),pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(r,n){return r&&t[n]()===e[n]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:o.toJson,decode:o.fromJson,is:s.is(Object),equals:o.equals,pattern:/[^\/]*/},any:{encode:o.identity,decode:o.identity,equals:o.equals,pattern:/.*/}};var t=function(t,e){return new c.ParamType(o.extend({name:e},t))};this.types=o.inherit(o.map(this.defaultTypes,t),{})}return t.prototype.type=function(t,e,r){if(!a.isDefined(e))return this.types[t];if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new c.ParamType(o.extend({name:t},e)),r&&(this.typeQueue.push({name:t,def:r}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");o.extend(this.types[t.name],u.services.$injector.invoke(t.def))}},t}();e.ParamTypes=f},function(t,e,r){"use strict";function n(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function i(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,r){return e["$"===r?0:Number(r)]})}function o(t,e,r,n){if(!n)return!1;var i=t.invoke(r,r,{$match:n,$stateParams:e});return!c.isDefined(i)||i}function a(t,e,r){var n=f.services.locationConfig.baseHref();return"/"===n?t:e?n.slice(0,-1)+t:r?n.slice(1)+t:t}function s(t,e,r){function n(t){var e=t(f.services.$injector,l);return!!e&&(c.isString(e)&&l.setUrl(e,!0),!0)}if(!r||!r.defaultPrevented){for(var i=t.length,o=0;o<i;o++)if(n(t[o]))return;e&&n(e)}}var u=r(3),c=r(4),f=r(6),l=f.services.location,p=function(){function t(t,e){this.rules=[],this.interceptDeferred=!1,this.$urlMatcherFactory=t,this.$stateParams=e}return t.prototype.rule=function(t){if(!c.isFunction(t))throw new Error("'rule' must be a function");return this.rules.push(t),this},t.prototype.removeRule=function(t){return this.rules.length!==u.removeFrom(this.rules,t).length},t.prototype.otherwise=function(t){if(!c.isFunction(t)&&!c.isString(t))throw new Error("'rule' must be a string or function");return this.otherwiseFn=c.isString(t)?function(){return t}:t,this},t.prototype.when=function(t,e,r){void 0===r&&(r=function(t){});var a,s=this,p=s.$urlMatcherFactory,h=s.$stateParams,v=c.isString(e);if(c.isString(t)&&(t=p.compile(t)),!v&&!c.isFunction(e)&&!c.isArray(e))throw new Error("invalid 'handler' in when()");var d={matcher:function(t,e){return v&&(a=p.compile(e),e=["$match",a.format.bind(a)]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path(),l.search(),l.hash()))},{prefix:c.isString(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return v&&(a=e,e=["$match",function(t){return i(a,t)}]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path()))},{prefix:n(t)})}},m={matcher:p.isMatcher(t),regex:t instanceof RegExp};for(var g in m)if(m[g]){var y=d[g](t,e);return r(y),this.rule(y)}throw new Error("invalid 'what' in when()")},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}();e.UrlRouterProvider=p;var h=function(){function t(e){this.urlRouterProvider=e,u.bindFunctions(t.prototype,this,this)}return t.prototype.sync=function(){s(this.urlRouterProvider.rules,this.urlRouterProvider.otherwiseFn)},t.prototype.listen=function(){var t=this;return this.listener=this.listener||l.onChange(function(e){return s(t.urlRouterProvider.rules,t.urlRouterProvider.otherwiseFn,e)})},t.prototype.update=function(t){return t?void(this.location=l.path()):void(l.path()!==this.location&&l.setUrl(this.location,!0))},t.prototype.push=function(t,e,r){var n=r&&!!r.replace;l.setUrl(t.format(e||{}),n)},t.prototype.href=function(t,e,r){if(!t.validates(e))return null;var n=t.format(e);r=r||{absolute:!1};var i=f.services.locationConfig,o=i.html5Mode();if(o||null===n||(n="#"+i.hashPrefix()+n),n=a(n,o,r.absolute),!r.absolute||!n)return n;var s=!o&&n?"/":"",u=i.port();return u=80===u||443===u?"":":"+u,[i.protocol(),"://",i.host(),u,s,n].join("")},t}();e.UrlRouter=h},function(t,e,r){"use strict";var n=r(11),i=r(15),o=r(31),a=r(32),s=r(33),u=r(34),c=r(35),f=r(36);e.defaultTransOpts={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"};var l=function(){function t(t){this._router=t,this.$view=t.viewService,i.HookRegistry.mixin(new i.HookRegistry,this),this._deregisterHookFns={},this.registerTransitionHooks()}return t.prototype.registerTransitionHooks=function(){var t=this._deregisterHookFns;t.redirectTo=u.registerRedirectToHook(this),t.onExit=c.registerOnExitHook(this),t.onRetain=c.registerOnRetainHook(this),t.onEnter=c.registerOnEnterHook(this),t.eagerResolve=o.registerEagerResolvePath(this),t.lazyResolve=o.registerLazyResolveState(this),t.loadViews=a.registerLoadEnteringViews(this),t.activateViews=a.registerActivateViews(this),t.updateUrl=s.registerUpdateUrl(this),t.lazyLoad=f.registerLazyLoadHook(this)},t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.create=function(t,e){return new n.Transition(t,e,this._router)},t}();e.TransitionService=l},function(t,e,r){"use strict";var n=r(3),i=r(17),o=r(5),a=function(t){return new i.ResolveContext(t.treeChanges().to).resolvePath("EAGER",t).then(n.noop)};e.registerEagerResolvePath=function(t){return t.onStart({},a,{priority:1e3})};var s=function(t,e){return new i.ResolveContext(t.treeChanges().to).subContext(e).resolvePath("LAZY",t).then(n.noop)};e.registerLazyResolveState=function(t){return t.onEnter({entering:o.val(!0)},s,{priority:1e3})}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=function(t){var e=t.views("entering");if(e.length)return i.services.$q.all(e.map(function(t){return t.load()})).then(n.noop)};e.registerLoadEnteringViews=function(t){return t.onStart({},o)};var a=function(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}};e.registerActivateViews=function(t){return t.onSuccess({},a)}},function(t,e){"use strict";var r=function(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)};e.registerUpdateUrl=function(t){return t.onSuccess({},r,{priority:9999})}},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(14),a=function(t){function e(e){var r=t.router.stateService;return e instanceof o.TargetState?e:n.isString(e)?r.target(e,t.params(),t.options()):e.state||e.params?r.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}var r=t.to().redirectTo;if(r)return n.isFunction(r)?i.services.$q.when(r(t)).then(e):e(r)};e.registerRedirectToHook=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},a)}},function(t,e){"use strict";function r(t){return function(e,r){var n=r[t];return n(e,r)}}var n=r("onExit");e.registerOnExitHook=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},n)};var i=r("onRetain");e.registerOnRetainHook=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},i)};var o=r("onEnter");e.registerOnEnterHook=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},o)}},function(t,e,r){"use strict";var n=r(6),i=function(t){function e(){if("url"===t.options().source){var e=n.services.location,r=e.path(),i=e.search(),a=e.hash(),s=function(t){return[t,t.url&&t.url.exec(r,i,a)]},u=o.get().map(function(t){return t.$$state()}).map(s).filter(function(t){var e=(t[0],t[1]);return!!e});if(u.length){var c=u[0],f=c[0],l=c[1];return t.router.stateService.target(f,l,t.options())}t.router.urlRouter.sync()}var p=t.targetState();return t.router.stateService.target(p.identifier(),p.params(),p.options())}function r(e){o.deregister(t.$to()),e&&Array.isArray(e.states)&&e.states.forEach(function(t){return o.register(t)})}var i=t.to(),o=t.router.stateRegistry,a=i.lazyLoad,s=a._promise;if(!s){s=a._promise=a(t).then(r);var u=function(){return delete a._promise};s.then(u,u)}return s.then(e)};e.registerLazyLoadHook=function(t){return t.onBefore({to:function(t){return!!t.lazyLoad}},i)}},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(4),a=r(12),s=function(){function t(){var t=this;this.uiViews=[],this.viewConfigs=[],this._viewConfigFactories={},this.sync=function(){function e(t){return t.fqn.split(".").length}function r(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var o=t.uiViews.map(function(t){return[t.fqn,t]}).reduce(n.applyPairs,{}),a=function(t){return function(e){if(t.$type!==e.viewDecl.$type)return!1;var r=e.viewDecl,i=r.$uiViewName.split("."),a=t.fqn.split(".");if(!n.equals(i,a.slice(0-i.length)))return!1;var s=1-i.length||void 0,u=a.slice(0,s).join("."),c=o[u].creationContext;return r.$uiViewContextAnchor===(c&&c.name)}},s=i.curry(function(t,e,r,n){return e*(t(r)-t(n))}),u=function(e){var n=t.viewConfigs.filter(a(e));return n.length>1&&n.sort(s(r,-1)),[e,n[0]]},c=function(e){var r=e[0],n=e[1];t.uiViews.indexOf(r)!==-1&&r.configUpdated(n)};t.uiViews.sort(s(e,1)).map(u).forEach(c)}}return t.prototype.rootContext=function(t){return this._rootContext=t||this._rootContext},t.prototype.viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var r=this._viewConfigFactories[e.$type];if(!r)throw new Error("ViewService: No view config factory registered for type "+e.$type);var n=r(t,e);return o.isArray(n)?n:[n]},t.prototype.deactivateViewConfig=function(t){a.trace.traceViewServiceEvent("<- Removing",t),n.removeFrom(this.viewConfigs,t)},t.prototype.activateViewConfig=function(t){a.trace.traceViewServiceEvent("-> Registering",t),this.viewConfigs.push(t)},t.prototype.registerUIView=function(t){a.trace.traceViewServiceUIViewEvent("-> Registering",t);var e=this.uiViews,r=function(e){return e.fqn===t.fqn};return e.filter(r).length&&a.trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){var r=e.indexOf(t);return r===-1?void a.trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t):(a.trace.traceViewServiceUIViewEvent("<- Deregistering",t),void n.removeFrom(e)(t))}},t.prototype.available=function(){return this.uiViews.map(i.prop("fqn"))},t.prototype.active=function(){return this.uiViews.filter(i.prop("$config")).map(i.prop("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var r=e.split("@"),n=r[0]||"$default",i=o.isString(r[1])?r[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(n);a&&(i=a[1],n=a[2]),"!"===n.charAt(0)&&(n=n.substr(1),i="");var s=/^(\^(?:\.\^)*)$/;if(s.exec(i)){var u=i.split(".").reduce(function(t,e){return t.parent},t);i=u.name}return{uiViewName:n,uiViewContextAnchor:i}},t}();e.ViewService=s},function(t,e,r){"use strict";var n=r(39),i=r(40),o=r(41),a=r(3),s=function(){function t(t,e){this.urlRouterProvider=e,this.states={},this.listeners=[],this.matcher=new n.StateMatcher(this.states),this.builder=new i.StateBuilder(this.matcher,t),this.stateQueue=new o.StateQueueManager(this.states,this.builder,e,this.listeners);
1817 return this._injector||(this._injector=new d(this))},t.prototype.findNode=function(t){return n.find(this._path,function(e){return n.inArray(e.resolvables,t)})},t.prototype.getDependencies=function(t){var e=this,r=this.findNode(t),i=c.PathFactory.subPath(this._path,function(t){return t===r})||this._path,o=i.reduce(function(t,e){return t.concat(e.resolvables)},[]).filter(function(e){return e!==t}),a=function(t){var r=o.filter(function(e){return e.token===t});if(r.length)return n.tail(r);var i=e.injector().getNative(t);if(!i)throw new Error("Could not find Dependency Injection token: "+f.stringify(t));return new u.Resolvable(t,function(){return i},[],i)};return t.deps.map(a)},t}();e.ResolveContext=v;var d=function(){function t(t){this.context=t,this["native"]=this.get(e.NATIVE_INJECTOR_TOKEN)||a.services.$injector}return t.prototype.get=function(t){var e=this.context.getResolvable(t);if(e){if(!e.resolved)throw new Error("Resolvable async .get() not complete:"+f.stringify(e.token));return e.data}return this["native"]&&this["native"].get(t)},t.prototype.getAsync=function(t){var e=this.context.getResolvable(t);return e?e.get(this.context):a.services.$q.when(this["native"].get(t))},t.prototype.getNative=function(t){return this["native"].get(t)},t}()},function(t,e){"use strict";e.resolvePolicies={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=r(12),a=r(9),s=r(4);e.defaultResolvePolicy={when:"LAZY",async:"WAIT"};var u=function(){function t(e,r,o,a,u){if(this.resolved=!1,this.promise=void 0,e instanceof t)n.extend(this,e);else if(s.isFunction(r)){if(null==e||void 0==e)throw new Error("new Resolvable(): token argument is required");if(!s.isFunction(r))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=a,this.resolveFn=r,this.deps=o||[],this.data=u,this.resolved=void 0!==u,this.promise=this.resolved?i.services.$q.when(this.data):void 0}else if(s.isObject(e)&&e.token&&s.isFunction(e.resolveFn)){var c=e;return new t(c.token,c.resolveFn,c.deps,c.policy,c.data)}}return t.prototype.getPolicy=function(t){var r=this.policy||{},n=t&&t.resolvePolicy||{};return{when:r.when||n.when||e.defaultResolvePolicy.when,async:r.async||n.async||e.defaultResolvePolicy.async}},t.prototype.resolve=function(t,e){var r=this,a=i.services.$q,s=function(){return a.all(t.getDependencies(r).map(function(r){return r.get(t,e)}))},u=function(t){return r.resolveFn.apply(null,t)},c=function(t){var e=t.cache(1);return e.take(1).toPromise().then(function(){return e})},f=t.findNode(this),l=f&&f.state,p="RXWAIT"===this.getPolicy(l).async?c:n.identity,h=function(t){return r.data=t,r.resolved=!0,o.trace.traceResolvableResolved(r,e),r.data};return this.promise=a.when().then(s).then(u).then(p).then(h)},t.prototype.get=function(t,e){return this.promise||this.resolve(t,e)},t.prototype.toString=function(){return"Resolvable(token: "+a.stringify(this.token)+", requires: ["+this.deps.map(a.stringify)+"])"},t.prototype.clone=function(){return new t(this)},t.fromData=function(e,r){return new t(e,function(){return r},null,null,r)},t}();e.Resolvable=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(14),a=r(21),s=function(){function t(){}return t.makeTargetState=function(t){var e=n.tail(t).state;return new o.TargetState(e,e,t.map(i.prop("paramValues")).reduce(n.mergeR,{}))},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new a.PathNode(t).applyRawParams(e)})},t.buildToPath=function(e,r){var n=t.buildPath(r);return r.options().inherit?t.inheritParams(e,n,Object.keys(r.params())):n},t.applyViewConfigs=function(e,r,i){r.filter(function(t){return n.inArray(i,t.state)}).forEach(function(i){var o=n.values(i.state.views||{}),a=t.subPath(r,function(t){return t===i}),s=o.map(function(t){return e.createViewConfig(a,t)});i.views=s.reduce(n.unnestR,[])})},t.inheritParams=function(t,e,r){function o(t,e){var r=n.find(t,i.propEq("state",e));return n.extend({},r&&r.paramValues)}function s(e){var i=n.extend({},e&&e.paramValues),s=n.pick(i,r);i=n.omit(i,r);var u=o(t,e.state)||{},c=n.extend(i,u,s);return new a.PathNode(e.state).applyRawParams(c)}return void 0===r&&(r=[]),e.map(s)},t.treeChanges=function(t,e,r){function n(t,r){var n=a.PathNode.clone(t);return n.paramValues=e[r].paramValues,n}for(var o=0,s=Math.min(t.length,e.length),u=function(t){return t.parameters({inherit:!1}).filter(i.not(i.prop("dynamic"))).map(i.prop("id"))},c=function(t,e){return t.equals(e,u(t.state))};o<s&&t[o].state!==r&&c(t[o],e[o]);)o++;var f,l,p,h,v;f=t,l=f.slice(0,o),p=f.slice(o);var d=l.map(n);return h=e.slice(o),v=d.concat(h),{from:f,to:v,retained:l,exiting:p,entering:h}},t.subPath=function(t,e){var r=n.find(t,e),i=t.indexOf(r);return i===-1?void 0:t.slice(0,i+1)},t.paramValues=function(t){return t.reduce(function(t,e){return n.extend(t,e.paramValues)},{})},t}();e.PathFactory=s},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(22),a=function(){function t(e){if(e instanceof t){var r=e;this.state=r.state,this.paramSchema=r.paramSchema.slice(),this.paramValues=n.extend({},r.paramValues),this.resolvables=r.resolvables.slice(),this.views=r.views&&r.views.slice()}else{var i=e;this.state=i,this.paramSchema=i.parameters({inherit:!1}),this.paramValues={},this.resolvables=i.resolvables.map(function(t){return t.clone()})}}return t.prototype.applyRawParams=function(t){var e=function(e){return[e.id,e.value(t[e.id])]};return this.paramValues=this.paramSchema.reduce(function(t,r){return n.applyPairs(t,e(r))},{}),this},t.prototype.parameter=function(t){return n.find(this.paramSchema,i.propEq("id",t))},t.prototype.equals=function(t,e){var r=this;void 0===e&&(e=this.paramSchema.map(function(t){return t.id}));var i=function(e){return r.parameter(e).type.equals(r.paramValues[e],t.paramValues[e])};return this.state===t.state&&e.map(i).reduce(n.allTrueR,!0)},t.clone=function(e){return new t(e)},t.matching=function(t,e,r){void 0===r&&(r=!0);for(var n=[],i=0;i<t.length&&i<e.length;i++){var a=t[i],s=e[i];if(a.state!==s.state)break;var u=o.Param.changed(a.paramSchema,a.paramValues,s.paramValues).filter(function(t){return!(r&&t.dynamic)});if(u.length)break;n.push(a)}return n},t}();e.PathNode=a},function(t,e,r){"use strict";function n(t){return t=v(t)&&{value:t}||t,s.extend(t,{$$fn:c.isInjectable(t.value)?t.value:function(){return t.value}})}function i(t,e,r,n,i){if(t.type&&e&&"string"!==e.name)throw new Error("Param '"+n+"' has two type configurations.");return t.type&&e&&"string"===e.name&&i.type(t.type)?i.type(t.type):e?e:t.type?t.type instanceof p.ParamType?t.type:i.type(t.type):r===d.CONFIG?i.type("any"):i.type("string")}function o(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!c.isDefined(r)||null==r)return l.matcherConfig.defaultSquashPolicy();if(r===!0||c.isString(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function a(t,e,r,n){var i,o,a=[{from:"",to:r||e?void 0:""},{from:null,to:r||e?void 0:""}];return i=c.isArray(t.replace)?t.replace:[],c.isString(n)&&i.push({from:n,to:void 0}),o=s.map(i,u.prop("from")),s.filter(a,function(t){return o.indexOf(t.from)===-1}).concat(i)}var s=r(3),u=r(5),c=r(4),f=r(6),l=r(23),p=r(24),h=Object.prototype.hasOwnProperty,v=function(t){return 0===["value","type","squash","array","dynamic"].filter(h.bind(t||{})).length};!function(t){t[t.PATH=0]="PATH",t[t.SEARCH=1]="SEARCH",t[t.CONFIG=2]="CONFIG"}(e.DefType||(e.DefType={}));var d=e.DefType,m=function(){function t(t,e,r,u,f){function l(){var e={array:u===d.SEARCH&&"auto"},n=t.match(/\[\]$/)?{array:!0}:{};return s.extend(e,n,r).array}r=n(r),e=i(r,e,u,t,f);var p=l();e=p?e.$asArray(p,u===d.SEARCH):e;var h=void 0!==r.value,v=c.isDefined(r.dynamic)?!!r.dynamic:!!e.dynamic,m=o(r,h),g=a(r,p,h,m);s.extend(this,{id:t,type:e,location:u,squash:m,replace:g,isOptional:h,dynamic:v,config:r,array:p})}return t.prototype.isDefaultValue=function(t){return this.isOptional&&this.type.equals(this.value(),t)},t.prototype.value=function(t){var e=this,r=function(){if(!f.services.$injector)throw new Error("Injectable functions cannot be called at configuration time");var t=f.services.$injector.invoke(e.config.$$fn);if(null!==t&&void 0!==t&&!e.type.is(t))throw new Error("Default value ("+t+") for parameter '"+e.id+"' is not an instance of ParamType ("+e.type.name+")");return t},n=function(t){var r=s.map(s.filter(e.replace,u.propEq("from",t)),u.prop("to"));return r.length?r[0]:t};return t=n(t),c.isDefined(t)?this.type.$normalize(t):r()},t.prototype.isSearch=function(){return this.location===d.SEARCH},t.prototype.validates=function(t){if((!c.isDefined(t)||null===t)&&this.isOptional)return!0;var e=this.type.$normalize(t);if(!this.type.is(e))return!1;var r=this.type.encode(e);return!(c.isString(r)&&!this.type.pattern.exec(r))},t.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},t.fromConfig=function(e,r,n,i){return new t(e,r,n,d.CONFIG,i)},t.fromPath=function(e,r,n,i){return new t(e,r,n,d.PATH,i)},t.fromSearch=function(e,r,n,i){return new t(e,r,n,d.SEARCH,i)},t.values=function(t,e){return void 0===e&&(e={}),t.map(function(t){return[t.id,t.value(e[t.id])]}).reduce(s.applyPairs,{})},t.changed=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r={}),t.filter(function(t){return!t.type.equals(e[t.id],r[t.id])})},t.equals=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),0===t.changed(e,r,n).length},t.validates=function(t,e){return void 0===e&&(e={}),t.map(function(t){return t.validates(e[t.id])}).reduce(s.allTrueR,!0)},t}();e.Param=m},function(t,e,r){"use strict";var n=r(4),i=function(){function t(){this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1}return t.prototype.caseInsensitive=function(t){return this._isCaseInsensitive=n.isDefined(t)?t:this._isCaseInsensitive},t.prototype.strictMode=function(t){return this._isStrictMode=n.isDefined(t)?t:this._isStrictMode},t.prototype.defaultSquashPolicy=function(t){if(n.isDefined(t)&&t!==!0&&t!==!1&&!n.isString(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=n.isDefined(t)?t:this._defaultSquashPolicy},t}();e.MatcherConfig=i,e.matcherConfig=new i},function(t,e,r){"use strict";function n(t,e){function r(t){return o.isArray(t)?t:o.isDefined(t)?[t]:[]}function n(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t,e){return function(a){if(o.isArray(a)&&0===a.length)return a;var s=r(a),u=i.map(s,t);return e===!0?0===i.filter(u,function(t){return!t}).length:n(u)}}function s(t){return function(e,n){var i=r(e),o=r(n);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(!t(i[a],o[a]))return!1;return!0}}var u=this;["encode","decode","equals","$normalize"].forEach(function(e){var r=t[e].bind(t),n="equals"===e?s:a;u[e]=n(r)}),i.extend(this,{dynamic:t.dynamic,name:t.name,pattern:t.pattern,is:a(t.is.bind(t),!0),$arrayMode:e})}var i=r(3),o=r(4),a=function(){function t(t){this.pattern=/.*/,i.extend(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new n(this,t)},t}();e.ParamType=a},function(t,e,r){"use strict";var n=r(26),i=r(29),o=r(29),a=r(30),s=r(37),u=r(38),c=r(43),f=r(44),l=function(){function t(){this.viewService=new s.ViewService,this.transitionService=new a.TransitionService(this),this.globals=new f.Globals(this.transitionService),this.urlMatcherFactory=new n.UrlMatcherFactory,this.urlRouterProvider=new i.UrlRouterProvider(this.urlMatcherFactory,this.globals.params),this.urlRouter=new o.UrlRouter(this.urlRouterProvider),this.stateRegistry=new u.StateRegistry(this.urlMatcherFactory,this.urlRouterProvider),this.stateService=new c.StateService(this),this.viewService.rootContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self}return t}();e.UIRouter=l},function(t,e,r){"use strict";function n(){return{strict:s.matcherConfig.strictMode(),caseInsensitive:s.matcherConfig.caseInsensitive()}}var i=r(3),o=r(4),a=r(27),s=r(23),u=r(22),c=r(28),f=function(){function t(){this.paramTypes=new c.ParamTypes,i.extend(this,{UrlMatcher:a.UrlMatcher,Param:u.Param})}return t.prototype.caseInsensitive=function(t){return s.matcherConfig.caseInsensitive(t)},t.prototype.strictMode=function(t){return s.matcherConfig.strictMode(t)},t.prototype.defaultSquashPolicy=function(t){return s.matcherConfig.defaultSquashPolicy(t)},t.prototype.compile=function(t,e){return new a.UrlMatcher(t,this.paramTypes,i.extend(n(),e))},t.prototype.isMatcher=function(t){if(!o.isObject(t))return!1;var e=!0;return i.forEach(a.UrlMatcher.prototype,function(r,n){o.isFunction(r)&&(e=e&&o.isDefined(t[n])&&o.isFunction(t[n]))}),e},t.prototype.type=function(t,e,r){var n=this.paramTypes.type(t,e,r);return o.isDefined(e)?this:n},t.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},t}();e.UrlMatcherFactory=f},function(t,e,r){"use strict";function n(t,e){var r=["",""],n=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return n;switch(e.squash){case!1:r=["(",")"+(e.isOptional?"?":"")];break;case!0:n=n.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+e.squash+"|",")?"]}return n+r[0]+e.type.pattern.source+r[1]}var i=r(3),o=r(5),a=r(4),s=r(22),u=r(4),c=r(22),f=r(3),l=r(3),p=function(t,e,r){return t[e]=t[e]||r()},h=function(){function t(e,r,a){var u=this;this.config=a,this._cache={path:[],pattern:null},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=e,this.config=i.defaults(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:i.identity});for(var c,f,l,p=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,v=0,d=[],m=function(r){if(!t.nameValidator.test(r))throw new Error("Invalid parameter name '"+r+"' in pattern '"+e+"'");if(i.find(u._params,o.propEq("id",r)))throw new Error("Duplicate parameter name '"+r+"' in pattern '"+e+"'")},g=function(t,n){var o=t[2]||t[3],a=n?t[4]:t[4]||("*"===t[1]?".*":null);return{id:o,regexp:a,cfg:u.config.params[o],segment:e.substring(v,t.index),type:a?r.type(a||"string")||i.inherit(r.type("string"),{pattern:new RegExp(a,u.config.caseInsensitive?"i":void 0)}):null}};(c=p.exec(e))&&(f=g(c,!1),!(f.segment.indexOf("?")>=0));)m(f.id),this._params.push(s.Param.fromPath(f.id,f.type,this.config.paramMap(f.cfg,!1),r)),this._segments.push(f.segment),d.push([f.segment,i.tail(this._params)]),v=p.lastIndex;l=e.substring(v);var y=l.indexOf("?");if(y>=0){var w=l.substring(y);if(l=l.substring(0,y),w.length>0)for(v=0;c=h.exec(w);)f=g(c,!0),m(f.id),this._params.push(s.Param.fromSearch(f.id,f.type,this.config.paramMap(f.cfg,!0),r)),v=p.lastIndex}this._segments.push(l),i.extend(this,{_compiled:d.map(function(t){return n.apply(null,t)}).concat(n(l)),prefix:this._segments[0]}),Object.freeze(this)}return t.prototype.append=function(t){return this._children.push(t),i.forEach(t._cache,function(e,r){return t._cache[r]=a.isArray(e)?[]:null}),t._cache.path=this._cache.path.concat(this),t},t.prototype.isRoot=function(){return 0===this._cache.path.length},t.prototype.toString=function(){return this.pattern},t.prototype.exec=function(t,e,r,n){function a(t){var e=function(t){return t.split("").reverse().join("")},r=function(t){return t.replace(/\\-/g,"-")},n=e(t).split(/-(?!\\)/),o=i.map(n,e);return i.map(o,r).reverse()}var s=this;void 0===e&&(e={}),void 0===n&&(n={});var c=p(this._cache,"pattern",function(){return new RegExp(["^",i.unnest(s._cache.path.concat(s).map(o.prop("_compiled"))).join(""),s.config.strict===!1?"/?":"","$"].join(""),s.config.caseInsensitive?"i":void 0)}).exec(t);if(!c)return null;var f=this.parameters(),l=f.filter(function(t){return!t.isSearch()}),h=f.filter(function(t){return t.isSearch()}),v=this._cache.path.concat(this).map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),d={};if(v!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;m<v;m++){for(var g=l[m],y=c[m+1],w=0;w<g.replace.length;w++)g.replace[w].from===y&&(y=g.replace[w].to);y&&g.array===!0&&(y=a(y)),u.isDefined(y)&&(y=g.type.decode(y)),d[g.id]=g.value(y)}return h.forEach(function(t){for(var r=e[t.id],n=0;n<t.replace.length;n++)t.replace[n].from===r&&(r=t.replace[n].to);u.isDefined(r)&&(r=t.type.decode(r)),d[t.id]=t.value(r)}),r&&(d["#"]=r),d},t.prototype.parameters=function(t){return void 0===t&&(t={}),t.inherit===!1?this._params:i.unnest(this._cache.path.concat(this).map(o.prop("_params")))},t.prototype.parameter=function(t,e){void 0===e&&(e={});var r=i.tail(this._cache.path);return i.find(this._params,o.propEq("id",t))||e.inherit!==!1&&r&&r.parameter(t)||null},t.prototype.validates=function(t){var e=this,r=function(t,e){return!t||t.validates(e)};return i.pairs(t||{}).map(function(t){var n=t[0],i=t[1];return r(e.parameter(n),i)}).reduce(i.allTrueR,!0)},t.prototype.format=function(e){function r(t){var r=t.value(e[t.id]),n=t.isDefaultValue(r),i=!!n&&t.squash,o=t.type.encode(r);return{param:t,value:r,isDefaultValue:n,squash:i,encoded:o}}if(void 0===e&&(e={}),!this.validates(e))return null;var n=this._cache.path.slice().concat(this),o=n.map(t.pathSegmentsAndParams).reduce(f.unnestR,[]),s=n.map(t.queryParams).reduce(f.unnestR,[]),u=o.reduce(function(e,n){if(a.isString(n))return e+n;var o=r(n),s=o.squash,u=o.encoded,c=o.param;return s===!0?e.match(/\/$/)?e.slice(0,-1):e:a.isString(s)?e+s:s!==!1?e:null==u?e:a.isArray(u)?e+i.map(u,t.encodeDashes).join("-"):c.type.raw?e+u:e+encodeURIComponent(u)},""),c=s.map(function(t){var e=r(t),n=e.squash,o=e.encoded,s=e.isDefaultValue;if(!(null==o||s&&n!==!1)&&(a.isArray(o)||(o=[o]),0!==o.length))return t.type.raw||(o=i.map(o,encodeURIComponent)),o.map(function(e){return t.id+"="+e})}).filter(i.identity).reduce(f.unnestR,[]).join("&");return u+(c?"?"+c:"")+(e["#"]?"#"+e["#"]:"")},t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,r=t._params.filter(function(t){return t.location===c.DefType.PATH});return l.arrayTuples(e,r.concat(void 0)).reduce(f.unnestR,[]).filter(function(t){return""!==t&&u.isDefined(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===c.DefType.SEARCH})},t.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,t}();e.UrlMatcher=h},function(t,e,r){"use strict";function n(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function i(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}var o=r(3),a=r(4),s=r(5),u=r(6),c=r(24),f=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes={hash:{encode:n,decode:i,is:s.is(String),pattern:/.*/,equals:function(t,e){return t==e}},string:{encode:n,decode:i,is:s.is(String),pattern:/[^\/]*/},"int":{encode:n,decode:function(t){return parseInt(t,10)},is:function(t){return a.isDefined(t)&&this.decode(t.toString())===t},pattern:/-?\d+/},bool:{encode:function(t){return t&&1||0},decode:function(t){return 0!==parseInt(t,10)},is:s.is(Boolean),pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(r,n){return r&&t[n]()===e[n]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:o.toJson,decode:o.fromJson,is:s.is(Object),equals:o.equals,pattern:/[^\/]*/},any:{encode:o.identity,decode:o.identity,equals:o.equals,pattern:/.*/}};var t=function(t,e){return new c.ParamType(o.extend({name:e},t))};this.types=o.inherit(o.map(this.defaultTypes,t),{})}return t.prototype.type=function(t,e,r){if(!a.isDefined(e))return this.types[t];if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new c.ParamType(o.extend({name:t},e)),r&&(this.typeQueue.push({name:t,def:r}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");o.extend(this.types[t.name],u.services.$injector.invoke(t.def))}},t}();e.ParamTypes=f},function(t,e,r){"use strict";function n(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function i(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,r){return e["$"===r?0:Number(r)]})}function o(t,e,r,n){if(!n)return!1;var i=t.invoke(r,r,{$match:n,$stateParams:e});return!c.isDefined(i)||i}function a(t,e,r){var n=f.services.locationConfig.baseHref();return"/"===n?t:e?n.slice(0,-1)+t:r?n.slice(1)+t:t}function s(t,e,r){function n(t){var e=t(f.services.$injector,l);return!!e&&(c.isString(e)&&l.setUrl(e,!0),!0)}if(!r||!r.defaultPrevented){for(var i=t.length,o=0;o<i;o++)if(n(t[o]))return;e&&n(e)}}var u=r(3),c=r(4),f=r(6),l=f.services.location,p=function(){function t(t,e){this.rules=[],this.interceptDeferred=!1,this.$urlMatcherFactory=t,this.$stateParams=e}return t.prototype.rule=function(t){if(!c.isFunction(t))throw new Error("'rule' must be a function");return this.rules.push(t),this},t.prototype.removeRule=function(t){return this.rules.length!==u.removeFrom(this.rules,t).length},t.prototype.otherwise=function(t){if(!c.isFunction(t)&&!c.isString(t))throw new Error("'rule' must be a string or function");return this.otherwiseFn=c.isString(t)?function(){return t}:t,this},t.prototype.when=function(t,e,r){void 0===r&&(r=function(t){});var a,s=this,p=s.$urlMatcherFactory,h=s.$stateParams,v=c.isString(e);if(c.isString(t)&&(t=p.compile(t)),!v&&!c.isFunction(e)&&!c.isArray(e))throw new Error("invalid 'handler' in when()");var d={matcher:function(t,e){return v&&(a=p.compile(e),e=["$match",a.format.bind(a)]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path(),l.search(),l.hash()))},{prefix:c.isString(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return v&&(a=e,e=["$match",function(t){return i(a,t)}]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path()))},{prefix:n(t)})}},m={matcher:p.isMatcher(t),regex:t instanceof RegExp};for(var g in m)if(m[g]){var y=d[g](t,e);return r(y),this.rule(y)}throw new Error("invalid 'what' in when()")},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}();e.UrlRouterProvider=p;var h=function(){function t(e){this.urlRouterProvider=e,u.bindFunctions(t.prototype,this,this)}return t.prototype.sync=function(){s(this.urlRouterProvider.rules,this.urlRouterProvider.otherwiseFn)},t.prototype.listen=function(){var t=this;return this.listener=this.listener||l.onChange(function(e){return s(t.urlRouterProvider.rules,t.urlRouterProvider.otherwiseFn,e)})},t.prototype.update=function(t){return t?void(this.location=l.path()):void(l.path()!==this.location&&l.setUrl(this.location,!0))},t.prototype.push=function(t,e,r){var n=r&&!!r.replace;l.setUrl(t.format(e||{}),n)},t.prototype.href=function(t,e,r){if(!t.validates(e))return null;var n=t.format(e);r=r||{absolute:!1};var i=f.services.locationConfig,o=i.html5Mode();if(o||null===n||(n="#"+i.hashPrefix()+n),n=a(n,o,r.absolute),!r.absolute||!n)return n;var s=!o&&n?"/":"",u=i.port();return u=80===u||443===u?"":":"+u,[i.protocol(),"://",i.host(),u,s,n].join("")},t}();e.UrlRouter=h},function(t,e,r){"use strict";var n=r(11),i=r(15),o=r(31),a=r(32),s=r(33),u=r(34),c=r(35),f=r(36);e.defaultTransOpts={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"};var l=function(){function t(t){this._router=t,this.$view=t.viewService,i.HookRegistry.mixin(new i.HookRegistry,this),this._deregisterHookFns={},this.registerTransitionHooks()}return t.prototype.registerTransitionHooks=function(){var t=this._deregisterHookFns;t.redirectTo=u.registerRedirectToHook(this),t.onExit=c.registerOnExitHook(this),t.onRetain=c.registerOnRetainHook(this),t.onEnter=c.registerOnEnterHook(this),t.eagerResolve=o.registerEagerResolvePath(this),t.lazyResolve=o.registerLazyResolveState(this),t.loadViews=a.registerLoadEnteringViews(this),t.activateViews=a.registerActivateViews(this),t.updateUrl=s.registerUpdateUrl(this),t.lazyLoad=f.registerLazyLoadHook(this)},t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.create=function(t,e){return new n.Transition(t,e,this._router)},t}();e.TransitionService=l},function(t,e,r){"use strict";var n=r(3),i=r(17),o=r(5),a=function(t){return new i.ResolveContext(t.treeChanges().to).resolvePath("EAGER",t).then(n.noop)};e.registerEagerResolvePath=function(t){return t.onStart({},a,{priority:1e3})};var s=function(t,e){return new i.ResolveContext(t.treeChanges().to).subContext(e).resolvePath("LAZY",t).then(n.noop)};e.registerLazyResolveState=function(t){return t.onEnter({entering:o.val(!0)},s,{priority:1e3})}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=function(t){var e=t.views("entering");if(e.length)return i.services.$q.all(e.map(function(t){return t.load()})).then(n.noop)};e.registerLoadEnteringViews=function(t){return t.onStart({},o)};var a=function(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}};e.registerActivateViews=function(t){return t.onSuccess({},a)}},function(t,e){"use strict";var r=function(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)};e.registerUpdateUrl=function(t){return t.onSuccess({},r,{priority:9999})}},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(14),a=function(t){function e(e){var r=t.router.stateService;return e instanceof o.TargetState?e:n.isString(e)?r.target(e,t.params(),t.options()):e.state||e.params?r.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}var r=t.to().redirectTo;if(r)return n.isFunction(r)?i.services.$q.when(r(t)).then(e):e(r)};e.registerRedirectToHook=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},a)}},function(t,e){"use strict";function r(t){return function(e,r){var n=r[t];return n(e,r)}}var n=r("onExit");e.registerOnExitHook=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},n)};var i=r("onRetain");e.registerOnRetainHook=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},i)};var o=r("onEnter");e.registerOnEnterHook=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},o)}},function(t,e,r){"use strict";var n=r(6),i=function(t){function e(){if("url"===t.options().source){var e=n.services.location,r=e.path(),i=e.search(),a=e.hash(),s=function(t){return[t,t.url&&t.url.exec(r,i,a)]},u=o.get().map(function(t){return t.$$state()}).map(s).filter(function(t){var e=(t[0],t[1]);return!!e});if(u.length){var c=u[0],f=c[0],l=c[1];return t.router.stateService.target(f,l,t.options())}t.router.urlRouter.sync()}var p=t.targetState();return t.router.stateService.target(p.identifier(),p.params(),p.options())}function r(e){o.deregister(t.$to()),e&&Array.isArray(e.states)&&e.states.forEach(function(t){return o.register(t)})}var i=t.to(),o=t.router.stateRegistry,a=i.lazyLoad,s=a._promise;if(!s){s=a._promise=a(t).then(r);var u=function(){return delete a._promise};s.then(u,u)}return s.then(e)};e.registerLazyLoadHook=function(t){return t.onBefore({to:function(t){return!!t.lazyLoad}},i)}},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(4),a=r(12),s=function(){function t(){var t=this;this.uiViews=[],this.viewConfigs=[],this._viewConfigFactories={},this.sync=function(){function e(t){return t.fqn.split(".").length}function r(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var o=t.uiViews.map(function(t){return[t.fqn,t]}).reduce(n.applyPairs,{}),a=function(t){return function(e){if(t.$type!==e.viewDecl.$type)return!1;var r=e.viewDecl,i=r.$uiViewName.split("."),a=t.fqn.split(".");if(!n.equals(i,a.slice(0-i.length)))return!1;var s=1-i.length||void 0,u=a.slice(0,s).join("."),c=o[u].creationContext;return r.$uiViewContextAnchor===(c&&c.name)}},s=i.curry(function(t,e,r,n){return e*(t(r)-t(n))}),u=function(e){var n=t.viewConfigs.filter(a(e));return n.length>1&&n.sort(s(r,-1)),[e,n[0]]},c=function(e){var r=e[0],n=e[1];t.uiViews.indexOf(r)!==-1&&r.configUpdated(n)};t.uiViews.sort(s(e,1)).map(u).forEach(c)}}return t.prototype.rootContext=function(t){return this._rootContext=t||this._rootContext},t.prototype.viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var r=this._viewConfigFactories[e.$type];if(!r)throw new Error("ViewService: No view config factory registered for type "+e.$type);var n=r(t,e);return o.isArray(n)?n:[n]},t.prototype.deactivateViewConfig=function(t){a.trace.traceViewServiceEvent("<- Removing",t),n.removeFrom(this.viewConfigs,t)},t.prototype.activateViewConfig=function(t){a.trace.traceViewServiceEvent("-> Registering",t),this.viewConfigs.push(t)},t.prototype.registerUIView=function(t){a.trace.traceViewServiceUIViewEvent("-> Registering",t);var e=this.uiViews,r=function(e){return e.fqn===t.fqn};return e.filter(r).length&&a.trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){var r=e.indexOf(t);return r===-1?void a.trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t):(a.trace.traceViewServiceUIViewEvent("<- Deregistering",t),void n.removeFrom(e)(t))}},t.prototype.available=function(){return this.uiViews.map(i.prop("fqn"))},t.prototype.active=function(){return this.uiViews.filter(i.prop("$config")).map(i.prop("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var r=e.split("@"),n=r[0]||"$default",i=o.isString(r[1])?r[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(n);a&&(i=a[1],n=a[2]),"!"===n.charAt(0)&&(n=n.substr(1),i="");var s=/^(\^(?:\.\^)*)$/;if(s.exec(i)){var u=i.split(".").reduce(function(t,e){return t.parent},t);i=u.name}return{uiViewName:n,uiViewContextAnchor:i}},t}();e.ViewService=s},function(t,e,r){"use strict";var n=r(39),i=r(40),o=r(41),a=r(3),s=function(){function t(t,e){this.urlRouterProvider=e,this.states={},this.listeners=[],this.matcher=new n.StateMatcher(this.states),this.builder=new i.StateBuilder(this.matcher,t),this.stateQueue=new o.StateQueueManager(this.states,this.builder,e,this.listeners);
1818 var r={name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},"abstract":!0},a=this._root=this.stateQueue.register(r);a.navigable=null}return t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){a.removeFrom(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,r=this.get().map(function(t){return t.$$state()}),n=function(t){var e=r.filter(function(e){return t.indexOf(e.parent)!==-1});return 0===e.length?e:e.concat(n(e))},i=n([t]),o=[t].concat(i).reverse();return o.forEach(function(t){e.urlRouterProvider.removeRule(t._urlRule),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var r=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",r.map(function(t){return t.self}))}),r},t.prototype.get=function(t,e){var r=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return r.states[t].self});var n=this.matcher.find(t,e);return n&&n.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();e.StateRegistry=s},function(t,e,r){"use strict";var n=r(4),i=r(7),o=r(3),a=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return t=t||"",0===t.indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e){if(t||""===t){var r=n.isString(t),a=r?t:t.name;this.isRelative(a)&&(a=this.resolvePath(a,e));var s=this._states[a];if(s&&(r||!(r||s!==t&&s.self!==t)))return s;if(r){var u=o.values(this._states).filter(function(t){return new i.Glob(t.name).matches(a)});return u.length>1&&console.log("stateMatcher.find: Found multiple matches for "+a+" using glob: ",u.map(function(t){return t.name})),u[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var r=this.find(e),n=t.split("."),i=0,o=n.length,a=r;i<o;i++)if(""!==n[i]||0!==i){if("^"!==n[i])break;if(!a.parent)throw new Error("Path '"+t+"' not valid for state '"+r.name+"'");a=a.parent}else a=r;var s=n.slice(i).join(".");return a.name+(a.name&&s?".":"")+s},t}();e.StateMatcher=a},function(t,e,r){"use strict";function n(t){return t.lazyLoad&&(t.name=t.self.name+".**"),t.name}function i(t){return t.self.$$state=function(){return t},t.self}function o(t){return t.parent&&t.parent.data&&(t.data=t.self.data=c.inherit(t.parent.data,t.data)),t.data}function a(t){return t.parent?t.parent.path.concat(t):[t]}function s(t){var e=t.parent?c.extend({},t.parent.includes):{};return e[t.name]=!0,e}function u(t){var e=function(t,e){return Object.keys(t||{}).map(function(r){return{token:r,val:t[r],deps:void 0,policy:e[r]}})},r=function(t){return t.$inject||d.services.$injector.annotate(t,d.services.$injector.strictDi)},n=function(t){return!(!t.token||!t.resolveFn)},i=function(t){return!(!t.provide&&!t.token||!(t.useValue||t.useFactory||t.useExisting||t.useClass))},o=function(t){return!!(t&&t.val&&(f.isString(t.val)||f.isArray(t.val)||f.isFunction(t.val)))},a=function(t){return t.provide||t.token},s=p.pattern([[p.prop("resolveFn"),function(t){return new v.Resolvable(a(t),t.resolveFn,t.deps,t.policy)}],[p.prop("useFactory"),function(t){return new v.Resolvable(a(t),t.useFactory,t.deps||t.dependencies,t.policy)}],[p.prop("useClass"),function(t){return new v.Resolvable(a(t),function(){return new t.useClass},[],t.policy)}],[p.prop("useValue"),function(t){return new v.Resolvable(a(t),function(){return t.useValue},[],t.policy,t.useValue)}],[p.prop("useExisting"),function(t){return new v.Resolvable(a(t),c.identity,[t.useExisting],t.policy)}]]),u=p.pattern([[p.pipe(p.prop("val"),f.isString),function(t){return new v.Resolvable(t.token,c.identity,[t.val],t.policy)}],[p.pipe(p.prop("val"),f.isArray),function(t){return new v.Resolvable(t.token,c.tail(t.val),t.val.slice(0,-1),t.policy)}],[p.pipe(p.prop("val"),f.isFunction),function(t){return new v.Resolvable(t.token,t.val,r(t.val),t.policy)}]]),h=p.pattern([[p.is(v.Resolvable),function(t){return t}],[n,s],[i,s],[o,u],[p.val(!0),function(t){throw new Error("Invalid resolve value: "+l.stringify(t))}]]),m=t.resolve,g=f.isArray(m)?m:e(m,t.resolvePolicy||{});return g.map(h)}var c=r(3),f=r(4),l=r(9),p=r(5),h=r(22),v=r(19),d=r(6),m=function(t){if(!f.isString(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},g=function(t,e){return function(r){var n=r;n&&n.url&&n.lazyLoad&&(n.url+="{remainder:any}");var i=m(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return n.reloadOnSearch===!1&&e&&(t=c.extend(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+r+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},y=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},w=function(t){return function(e){var r=function(e,r){return h.Param.fromConfig(r,null,e,t)},n=e.url&&e.url.parameters({inherit:!1})||[],i=c.values(c.mapObj(c.omit(e.params||{},n.map(p.prop("id"))),r));return n.concat(i).map(function(t){return[t.id,t]}).reduce(c.applyPairs,{})}};e.resolvablesBuilder=u;var b=function(){function t(t,e){function r(e){return l(e)?null:t.find(c.parentName(e))||f()}this.matcher=t;var c=this,f=function(){return t.find("")},l=function(t){return""===t.name};this.builders={name:[n],self:[i],parent:[r],data:[o],url:[g(e,f)],navigable:[y(l)],params:[w(e.paramTypes)],views:[],path:[a],includes:[s],resolvables:[u]}}return t.prototype.builder=function(t,e){var r=this.builders,n=r[t]||[];return f.isString(t)&&!f.isDefined(e)?n.length>1?n:n[0]:f.isString(t)&&f.isFunction(e)?(r[t]=n,r[t].push(e),function(){return r[t].splice(r[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,r=e.matcher,n=e.builders,i=this.parentName(t);if(i&&!r.find(i))return null;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o].reduce(function(t,e){return function(r){return e(r,t)}},c.noop);t[o]=a(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",r=e.split(".");if(r.length>1){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");var n=r.pop();return"**"===n&&r.pop(),r.join(".")}return t.parent?f.isString(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(e.indexOf(".")!==-1||!t.parent)return e;var r=f.isString(t.parent)?t.parent:t.parent.name;return r?r+"."+e:e},t}();e.StateBuilder=b},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(42),a=function(){function t(t,e,r,n){this.states=t,this.builder=e,this.$urlRouterProvider=r,this.listeners=n,this.queue=[]}return t.prototype.register=function(t){var e=this,r=e.states,a=e.queue,s=e.$state,u=n.inherit(new o.State,n.extend({},t,{self:t,resolve:t.resolve||[],toString:function(){return t.name}}));if(!i.isString(u.name))throw new Error("State must have a valid name");if(r.hasOwnProperty(u.name)||n.pluck(a,"name").indexOf(u.name)!==-1)throw new Error("State '"+u.name+"' is already defined");return a.push(u),this.$state&&this.flush(s),u},t.prototype.flush=function(t){for(var e=this,r=e.queue,n=e.states,i=e.builder,o=[],a=[],s={};r.length>0;){var u=r.shift(),c=i.build(u),f=a.indexOf(u);if(c){if(n.hasOwnProperty(u.name))throw new Error("State '"+name+"' is already defined");n[u.name]=u,this.attachRoute(t,u),f>=0&&a.splice(f,1),o.push(u)}else{var l=s[u.name];if(s[u.name]=r.length,f>=0&&l===r.length)return r.push(u),n;f<0&&a.push(u),r.push(u)}}return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),n},t.prototype.autoFlush=function(t){this.$state=t,this.flush(t)},t.prototype.attachRoute=function(t,e){var r=this.$urlRouterProvider;!e["abstract"]&&e.url&&r.when(e.url,["$match","$stateParams",function(r,i){t.$current.navigable===e&&n.equalForKeys(r,i)||t.transitionTo(e,r,{inherit:!0,source:"url"})}],function(t){return e._urlRule=t})},t}();e.StateQueueManager=a},function(t,e,r){"use strict";var n=r(3),i=r(5),o=function(){function t(t){n.extend(this,t)}return t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){t=n.defaults(t,{inherit:!0});var e=t.inherit&&this.parent&&this.parent.parameters()||[];return e.concat(n.values(this.params))},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||n.find(n.values(this.params),i.propEq("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t}();e.State=o},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(8),a=r(6),s=r(20),u=r(21),c=r(30),f=r(10),l=r(14),p=r(22),h=r(7),v=r(3),d=r(3),m=r(17),g=function(){function t(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof f.Rejection?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var r=["current","$current","params","transition"],n=Object.keys(t.prototype).filter(function(t){return r.indexOf(t)===-1});d.bindFunctions(t.prototype,this,this,n)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype._handleInvalidTargetState=function(t,e){function r(){var t=h.dequeue();if(void 0===t)return f.Rejection.invalid(e.error()).toPromise();var n=a.services.$q.when(t(e,i,v));return n.then(d).then(function(t){return t||r()})}var n=this,i=s.PathFactory.makeTargetState(t),u=this.router.globals,c=function(){return u.transitionHistory.peekTail()},p=c(),h=new o.Queue(this.invalidCallbacks.slice()),v=new m.ResolveContext(t).injector(),d=function(t){if(t instanceof l.TargetState){var e=t;return e=n.target(e.identifier(),e.params(),e.options()),e.valid()?c()!==p?f.Rejection.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):f.Rejection.invalid(e.error()).toPromise()}};return r()},t.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){n.removeFrom(this.invalidCallbacks)(t)}.bind(this)},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!i.isDefined(t)||t,inherit:!1,notify:!1})},t.prototype.go=function(t,e,r){var i={relative:this.$current,inherit:!0},o=n.defaults(r,i,c.defaultTransOpts);return this.transitionTo(t,e,o)},t.prototype.target=function(t,e,r){if(void 0===r&&(r={}),i.isObject(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=r.reload===!0?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(i.isString(r.reload)?r.reload:r.reload.name)+"'");var o=n.matcher.find(t,r.relative);return new l.TargetState(t,o,e,r)},t.prototype.transitionTo=function(t,e,r){var i=this;void 0===e&&(e={}),void 0===r&&(r={});var o=this.router,s=o.globals,p=s.transitionHistory;r=n.defaults(r,c.defaultTransOpts),r=n.extend(r,{current:p.peekTail.bind(p)});var h=this.target(t,e,r),v=s.successfulTransitions.peekTail(),d=function(){return[new u.PathNode(i.router.stateRegistry.root())]},m=v?v.treeChanges().to:d();if(!h.exists())return this._handleInvalidTargetState(m,h);if(!h.valid())return n.silentRejection(h.error());var g=function(t){return function(e){if(e instanceof f.Rejection){if(e.type===f.RejectType.IGNORED)return o.urlRouter.update(),a.services.$q.when(s.current);var r=e.detail;if(e.type===f.RejectType.SUPERSEDED&&e.redirected&&r instanceof l.TargetState){var n=t.redirect(r);return n.run()["catch"](g(n))}e.type===f.RejectType.ABORTED&&o.urlRouter.update()}var u=i.defaultErrorHandler();return u(e),a.services.$q.reject(e)}},y=this.router.transitionService.create(m,h),w=y.run()["catch"](g(y));return n.silenceUncaughtInPromise(w),n.extend(w,{transition:y})},t.prototype.is=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=this.router.stateRegistry.matcher.find(t,r.relative);if(i.isDefined(o))return this.$current===o&&(!i.isDefined(e)||null===e||p.Param.equals(o.parameters(),this.params,e))},t.prototype.includes=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=i.isString(t)&&h.Glob.fromString(t);if(o){if(!o.matches(this.$current.name))return!1;t=this.$current.name}var a=this.router.stateRegistry.matcher.find(t,r.relative),s=this.$current.includes;if(i.isDefined(a))return!!i.isDefined(s[a.name])&&(!e||v.equalForKeys(p.Param.values(a.parameters(),e),this.params,Object.keys(e)))},t.prototype.href=function(t,e,r){var o={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};r=n.defaults(r,o),e=e||{};var a=this.router.stateRegistry.matcher.find(t,r.relative);if(!i.isDefined(a))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,a));var s=a&&r.lossy?a.navigable:a;return s&&void 0!==s.url&&null!==s.url?this.router.urlRouter.href(s.url,p.Param.values(a.parameters(),e),{absolute:r.absolute}):null},t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},t}();e.StateService=g},function(t,e,r){"use strict";var n=r(45),i=r(8),o=r(3),a=function(){function t(t){var e=this;this.params=new n.StateParams,this.transitionHistory=new i.Queue([],1),this.successfulTransitions=new i.Queue([],1);var r=function(t){e.transition=t,e.transitionHistory.enqueue(t);var r=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,o.copy(t.params(),e.params)};t.onSuccess({},r,{priority:1e4});var n=function(){e.transition===t&&(e.transition=null)};t.promise.then(n,n)};t.onBefore({},r)}return t}();e.Globals=a},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t){void 0===t&&(t={}),n.extend(this,t)}return t.prototype.$inherit=function(t,e,r){var i,o=n.ancestors(e,r),a={},s=[];for(var u in o)if(o[u]&&o[u].params&&(i=Object.keys(o[u].params),i.length))for(var c in i)s.indexOf(i[c])>=0||(s.push(i[c]),a[i[c]]=this[i[c]]);return n.extend({},a,t)},t}();e.StateParams=i},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(22)),n(r(28)),n(r(45)),n(r(24))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(21)),n(r(20))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(18)),n(r(19)),n(r(17))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(40)),n(r(42)),n(r(39)),n(r(41)),n(r(38)),n(r(43)),n(r(14))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(16)),n(r(15)),n(r(10)),n(r(11)),n(r(13)),n(r(30))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(27)),n(r(23)),n(r(26)),n(r(29))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(37))},function(t,e,r){"use strict";function n(t){var e=l.services.$injector,r=e.get("$controller"),n=e.instantiate;try{var i;return e.instantiate=function(t){e.instantiate=n,i=e.annotate(t)},r(t,{$scope:{}}),i}finally{e.instantiate=n}}function i(t){function e(e,n,i,o,a,s){return o.$on("$locationChangeSuccess",function(t){return r.forEach(function(e){return e(t)})}),l.services.locationConfig.html5Mode=function(){var e=t.html5Mode();return e=v.isObject(e)?e.enabled:e,e&&i.history},l.services.location.setUrl=function(t,r){void 0===r&&(r=!1),e.url(t),r&&e.replace()},l.services.template.get=function(t){return a.get(t,{cache:s,headers:{Accept:"text/html"}}).then(h.prop("data"))},p.bindFunctions(e,l.services.location,e,["replace","url","path","search","hash"]),p.bindFunctions(e,l.services.locationConfig,e,["port","protocol","host"]),p.bindFunctions(n,l.services.locationConfig,n,["baseHref"]),R}R=new f.UIRouter,R.stateProvider=new w.StateProvider(R.stateRegistry,R.stateService),R.stateRegistry.decorator("views",g.ng1ViewsBuilder),R.stateRegistry.decorator("onExit",b.getStateHookBuilder("onExit")),R.stateRegistry.decorator("onRetain",b.getStateHookBuilder("onRetain")),R.stateRegistry.decorator("onEnter",b.getStateHookBuilder("onEnter")),R.viewService.viewConfigFactory("ng1",g.ng1ViewConfigFactory),p.bindFunctions(t,l.services.locationConfig,t,["hashPrefix"]);var r=[];l.services.location.onChange=function(t){return r.push(t),function(){return p.removeFrom(r)(t)}},this.$get=e,e.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"]}function o(t,e){l.services.$injector=t,l.services.$q=e}function a(){return R.urlRouterProvider.$get=function(){return R.urlRouter.update(!0),this.interceptDeferred||R.urlRouter.listen(),R.urlRouter},R.urlRouterProvider}function s(){return R.stateProvider.$get=function(){return R.stateRegistry.stateQueue.autoFlush(R.stateService),R.stateService},R.stateProvider}function u(){return R.transitionService.$get=function(){return R.transitionService},R.transitionService}function c(t){t.$watch(function(){m.trace.approximateDigests++})}var f=r(25),l=r(6),p=r(3),h=r(5),v=r(4),d=r(54),m=r(12),g=r(55),y=r(56),w=r(58),b=r(59),$=r(57);$.module("ui.router.angular1",[]);$.module("ui.router.util",["ng","ui.router.init"]),$.module("ui.router.router",["ui.router.util"]),$.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),$.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),$.module("ui.router.compat",["ui.router"]),e.annotateController=n;var R=null;i.$inject=["$locationProvider"],$.module("ui.router.init",[]).provider("$uiRouter",i),o.$inject=["$injector","$q"],$.module("ui.router.init").run(o),$.module("ui.router.init").run(["$uiRouter",function(t){}]),$.module("ui.router.util").provider("$urlMatcherFactory",["$uiRouterProvider",function(){return R.urlMatcherFactory}]),$.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),$.module("ui.router.router").provider("$urlRouter",["$uiRouterProvider",a]),$.module("ui.router.router").run(["$urlRouter",function(t){}]),$.module("ui.router.state").provider("$state",["$uiRouterProvider",s]),$.module("ui.router.state").run(["$state",function(t){}]),$.module("ui.router.state").factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),$.module("ui.router.state").provider("$transitions",["$uiRouterProvider",u]),$.module("ui.router.util").factory("$templateFactory",["$uiRouter",function(){return new y.TemplateFactory}]),$.module("ui.router").factory("$view",function(){return R.viewService}),$.module("ui.router").factory("$resolve",d.resolveFactory),$.module("ui.router").service("$trace",function(){return m.trace}),c.$inject=["$rootScope"],e.watchDigests=c,$.module("ui.router").run(c),e.getLocals=function(t){var e=t.getTokens().filter(v.isString),r=e.map(function(e){return[e,t.getResolvable(e).data]});return r.reduce(p.applyPairs,{})}},function(t,e,r){"use strict";var n=r(42),i=r(21),o=r(17),a=r(3),s=r(40),u={resolve:function(t,e,r){void 0===e&&(e={});var u=new i.PathNode(new n.State({params:{},resolvables:[]})),c=new i.PathNode(new n.State({params:{},resolvables:[]})),f=new o.ResolveContext([u,c]);f.addResolvables(s.resolvablesBuilder({resolve:t}),c.state);var l=function(t){var r=function(t){return s.resolvablesBuilder({resolve:a.mapObj(t,function(t){return function(){return t}})})};f.addResolvables(r(t),u.state),f.addResolvables(r(e),c.state);var n=function(t,e){return t[e.token]=e.value,t};return f.resolvePath().then(function(t){return t.reduce(n,{})})};return r?r.then(l):l({})}};e.resolveFactory=function(){return u}},function(t,e,r){"use strict";function n(t){var e=["templateProvider","templateUrl","template","notify","async"],r=["controller","controllerProvider","controllerAs","resolveAs"],n=["component","bindings"],c=e.concat(r),f=n.concat(c),l={},p=t.views||{$default:o.pick(t,f)};return o.forEach(p,function(e,r){if(r=r||"$default",u.isString(e)&&(e={component:e}),Object.keys(e).length){if(e.component){if(c.map(function(t){return u.isDefined(e[t])}).reduce(o.anyTrueR,!1))throw new Error("Cannot combine: "+n.join("|")+" with: "+c.join("|")+" in stateview: 'name@"+t.name+"'");e.templateProvider=["$injector",function(t){var r=function(t){return e.bindings&&e.bindings[t]||t},n=v.version.minor>=3?"::":"",o=function(t){var e=a.kebobString(t.name),i=r(t.name);return"@"===t.type?e+"='{{"+n+"$resolve."+i+"}}'":e+"='"+n+"$resolve."+i+"'"},s=i(t,e.component).map(o).join(" "),u=a.kebobString(e.component);return"<"+u+" "+s+"></"+u+">"}]}e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=t,e.$name=r;var f=s.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=f.uiViewName,e.$uiViewContextAnchor=f.uiViewContextAnchor,l[r]=e}}),l}function i(t,e){var r=t.get(e+"Directive");if(!r||!r.length)throw new Error("Unable to find component named '"+e+"'");return r.map(m).reduce(o.unnestR,[])}var o=r(3),a=r(9),s=r(37),u=r(4),c=r(6),f=r(12),l=r(56),p=r(17),h=r(19),v=r(57);e.ng1ViewConfigFactory=function(t,e){return[new y(t,e)]},e.ng1ViewsBuilder=n;var d=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@])[?]?(.*)/.exec(t[e])]}).filter(function(t){return u.isDefined(t)&&u.isDefined(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},m=function(t){return d(u.isObject(t.bindToController)?t.bindToController:t.scope)},g=0,y=function(){function t(t,e){this.path=t,this.viewDecl=e,this.$id=g++,this.loaded=!1}return t.prototype.load=function(){var t=this,e=c.services.$q;if(!this.hasTemplate())throw new Error("No template configuration specified for '"+this.viewDecl.$uiViewName+"@"+this.viewDecl.$uiViewContextAnchor+"'");var r=new p.ResolveContext(this.path),n=this.path.reduce(function(t,e){return o.extend(t,e.paramValues)},{}),i={template:e.when(this.getTemplate(n,new l.TemplateFactory,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return f.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,t.template=e.template,t})},t.prototype.hasTemplate=function(){return!!(this.viewDecl.template||this.viewDecl.templateUrl||this.viewDecl.templateProvider)},t.prototype.getTemplate=function(t,e,r){return e.fromConfig(this.viewDecl,t,r)},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!u.isInjectable(e))return this.viewDecl.controller;var r=c.services.$injector.annotate(e),n=u.isArray(e)?o.tail(e):e,i=new h.Resolvable("",n,r);return i.get(t)},t}();e.Ng1ViewConfig=y},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(3),a=r(19),s=function(){function t(){}return t.prototype.fromConfig=function(t,e,r){return n.isDefined(t.template)?this.fromString(t.template,e):n.isDefined(t.templateUrl)?this.fromUrl(t.templateUrl,e):n.isDefined(t.templateProvider)?this.fromProvider(t.templateProvider,e,r):null},t.prototype.fromString=function(t,e){return n.isFunction(t)?t(e):t},t.prototype.fromUrl=function(t,e){return n.isFunction(t)&&(t=t(e)),null==t?null:i.services.template.get(t)},t.prototype.fromProvider=function(t,e,r){var s=i.services.$injector.annotate(t),u=n.isArray(t)?o.tail(t):t,c=new a.Resolvable("",u,s);return c.get(r)},t}();e.TemplateFactory=s},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(4),i=r(3),o=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,i.bindFunctions(t.prototype,this,this)}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return n.isObject(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}();e.StateProvider=o},function(t,e,r){"use strict";var n=r(6),i=r(53),o=r(17),a=r(3);e.getStateHookBuilder=function(t){return function(e,r){function s(t,e){var r=new o.ResolveContext(t.treeChanges().to);return n.services.$injector.invoke(u,this,a.extend({$state$:e},i.getLocals(r)))}var u=e[t];return u?s:void 0}}},function(t,e,r){"use strict";function n(t,e){var r,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t=e+"("+n[1]+")"),r=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!r||4!==r.length)throw new Error("Invalid state ref '"+t+"'");return{state:r[1],paramExpr:r[3]||null}}function i(t){var e=t.parent().inheritedData("$uiView"),r=l.parse("$cfg.path")(e);return r?c.tail(r).state.name:void 0}function o(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function a(t,e,r,n,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=r(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var c=n.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(u)}}}}function s(t,e){return{relative:i(t)||e.$current,inherit:!0,source:"sref"}}var u=r(57),c=r(3),f=r(4),l=r(5),p=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,f,l){var p,h=n(f.uiSref,t.current.name),v={state:h.state,href:null,params:null,options:null},d=o(i),m=l[1]||l[0],g=null;v.options=c.extend(s(i,t),f.uiSrefOpts?r.$eval(f.uiSrefOpts):{});var y=function(e){e&&(v.params=u.copy(e)),v.href=t.href(h.state,v.params,v.options),g&&g(),m&&(g=m.$$addStateInfo(h.state,v.params)),null!==v.href&&f.$set(d.attr,v.href)};h.paramExpr&&(r.$watch(h.paramExpr,function(t){t!==v.params&&y(t)},!0),v.params=u.copy(r.$eval(h.paramExpr))),y(),d.clickable&&(p=a(i,t,e,d,function(){return v}),i.on("click",p),r.$on("$destroy",function(){i.off("click",p)}))}}}],h=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,n,i,s){function u(e){v.state=e[0],v.params=e[1],v.options=e[2],v.href=t.href(v.state,v.params,v.options),d&&d(),l&&(d=l.$$addStateInfo(v.state,v.params)),v.href&&i.$set(f.attr,v.href)}var c,f=o(n),l=s[1]||s[0],p=[i.uiState,i.uiStateParams||null,i.uiStateOpts||null],h="["+p.map(function(t){return t||"null"}).join(", ")+"]",v={state:null,params:null,options:null,href:null},d=null;r.$watch(h,u,!0),u(r.$eval(h)),f.clickable&&(c=a(n,t,e,f,function(){return v}),n.on("click",c),r.$on("$destroy",function(){n.off("click",c)}))}}}],v=["$state","$stateParams","$interpolate","$transitions","$uiRouter",function(t,e,r,o,a){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,s,u,l){function p(t){t.promise.then(d)}function h(e,r,n){var o=t.get(e,i(s)),a=v(e,r),u={state:o||{name:e},params:r,hash:a};return R.push(u),S[a]=n,function(){var t=R.indexOf(u);t!==-1&&R.splice(t,1)}}function v(t,r){if(!f.isString(t))throw new Error("state should be a string");return f.isObject(r)?t+c.toJson(r):(r=e.$eval(r),f.isObject(r)?t+c.toJson(r):t)}function d(){for(var t=0;t<R.length;t++)y(R[t].state,R[t].params)?m(s,S[R[t].hash]):g(s,S[R[t].hash]),w(R[t].state,R[t].params)?m(s,b):g(s,b)}function m(t,e){l(function(){t.addClass(e)})}function g(t,e){t.removeClass(e)}function y(e,r){return t.includes(e.name,r)}function w(e,r){return t.is(e.name,r)}var b,$,R=[],S={};b=r(u.uiSrefActiveEq||"",!1)(e);try{$=e.$eval(u.uiSrefActive)}catch(E){}$=$||r(u.uiSrefActive||"",!1)(e),f.isObject($)&&c.forEach($,function(r,i){if(f.isString(r)){var o=n(r,t.current.name);h(o.state,e.$eval(o.paramExpr),i)}}),this.$$addStateInfo=function(t,e){if(!(f.isObject($)&&R.length>0)){var r=h(t,e,$);return d(),r}},e.$on("$stateChangeSuccess",d),e.$on("$destroy",o.onStart({},p)),a.globals.transition&&p(a.globals.transition),d()}]}}];u.module("ui.router.state").directive("uiSref",p).directive("uiSrefActive",v).directive("uiSrefActiveEq",v).directive("uiState",h)},function(t,e,r){"use strict";function n(t){var e=function(e,r,n){return t.is(e,r,n)};return e.$stateful=!0,e}function i(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}var o=r(57);n.$inject=["$state"],e.$IsStateFilter=n,i.$inject=["$state"],e.$IncludedByStateFilter=i,o.module("ui.router.state").filter("isState",n).filter("includedByState",i)},function(t,e,r){"use strict";function n(t,e,r,n,u){var v=c.parse("viewDecl.controllerAs"),d=c.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(n){var u=n.html();return function(n,c){var m=c.data("$uiView");if(m){var g=m.$cfg||{viewDecl:{}};c.html(g.template||u),s.trace.traceUIViewFill(m.$uiView,c.html());var y=t(c.contents()),w=g.controller,b=v(g),$=d(g),R=g.path&&new f.ResolveContext(g.path),S=R&&p.getLocals(R);if(n[$]=S,w){var E=e(w,o.extend({},S,{$scope:n,$element:c}));b&&(n[b]=E,n[b][$]=S),c.data("$ngControllerController",E),c.children().data("$ngControllerController",E),i(r,E,n,g)}if(a.isString(g.viewDecl.component))var x=g.viewDecl.component,k=l.kebobString(x),P=function(){var t=[].slice.call(c[0].children).filter(function(t){return t&&t.tagName&&t.tagName.toLowerCase()===k});return t&&h.element(t).data("$"+x+"Controller")},_=n.$watch(P,function(t){t&&(i(r,t,n,g),_())});y(n)}}}}}function i(t,e,r,n){!a.isFunction(e.$onInit)||n.viewDecl.component&&d||e.$onInit();var i=o.tail(n.path).state.self,s={bind:e};if(a.isFunction(e.uiOnParamsChanged)){var u=new f.ResolveContext(n.path),c=u.getResolvable("$transition$").data,l=function(t){if(t!==c&&t.exiting().indexOf(i)===-1){var r=t.params("to"),n=t.params("from"),a=t.treeChanges().to.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),s=t.treeChanges().from.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),u=a.filter(function(t){var e=s.indexOf(t);return e===-1||!s[e].type.equals(r[t.id],n[t.id])});if(u.length){var f=u.map(function(t){return t.id});e.uiOnParamsChanged(o.filter(r,function(t,e){return f.indexOf(e)!==-1}),t)}}};r.$on("$destroy",t.onSuccess({},l,s))}if(a.isFunction(e.uiCanExit)){var p={exiting:i.name};r.$on("$destroy",t.onBefore(p,e.uiCanExit,s))}}var o=r(3),a=r(4),s=r(12),u=r(55),c=r(5),f=r(17),l=r(9),p=r(53),h=r(57),v=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){h.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){h.version.minor>2?e.leave(t).then(r):e.leave(t,r)}}}function f(t,e){return t===e}var l={$cfg:{viewDecl:{$context:t.rootContext()}},$uiView:{}},p={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,h,v){return function(e,h,d){function m(t){(!t||t instanceof u.Ng1ViewConfig)&&(f(k,t)||(s.trace.traceUIViewConfigUpdated(C,t&&t.viewDecl&&t.viewDecl.$context),k=t,y(t)))}function g(){if(w&&(s.trace.traceUIViewEvent("Removing (previous) el",w.data("$uiView")),w.remove(),w=null),$&&(s.trace.traceUIViewEvent("Destroying scope",C),$.$destroy(),$=null),b){var t=b.data("$uiViewAnim");s.trace.traceUIViewEvent("Animate out",t),x.leave(b,function(){t.$$animLeave.resolve(),w=null}),w=b,b=null}}function y(t){var n=e.$new(),o=i.defer(),s=i.defer(),u={$cfg:t,$uiView:C},c={$animEnter:o.promise,$animLeave:s.promise,$$animLeave:s},f=v(n,function(t){t.data("$uiViewAnim",c),t.data("$uiView",u),
1818 var r={name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},"abstract":!0},a=this._root=this.stateQueue.register(r);a.navigable=null}return t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){a.removeFrom(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,r=this.get().map(function(t){return t.$$state()}),n=function(t){var e=r.filter(function(e){return t.indexOf(e.parent)!==-1});return 0===e.length?e:e.concat(n(e))},i=n([t]),o=[t].concat(i).reverse();return o.forEach(function(t){e.urlRouterProvider.removeRule(t._urlRule),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var r=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",r.map(function(t){return t.self}))}),r},t.prototype.get=function(t,e){var r=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return r.states[t].self});var n=this.matcher.find(t,e);return n&&n.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();e.StateRegistry=s},function(t,e,r){"use strict";var n=r(4),i=r(7),o=r(3),a=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return t=t||"",0===t.indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e){if(t||""===t){var r=n.isString(t),a=r?t:t.name;this.isRelative(a)&&(a=this.resolvePath(a,e));var s=this._states[a];if(s&&(r||!(r||s!==t&&s.self!==t)))return s;if(r){var u=o.values(this._states).filter(function(t){return new i.Glob(t.name).matches(a)});return u.length>1&&console.log("stateMatcher.find: Found multiple matches for "+a+" using glob: ",u.map(function(t){return t.name})),u[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var r=this.find(e),n=t.split("."),i=0,o=n.length,a=r;i<o;i++)if(""!==n[i]||0!==i){if("^"!==n[i])break;if(!a.parent)throw new Error("Path '"+t+"' not valid for state '"+r.name+"'");a=a.parent}else a=r;var s=n.slice(i).join(".");return a.name+(a.name&&s?".":"")+s},t}();e.StateMatcher=a},function(t,e,r){"use strict";function n(t){return t.lazyLoad&&(t.name=t.self.name+".**"),t.name}function i(t){return t.self.$$state=function(){return t},t.self}function o(t){return t.parent&&t.parent.data&&(t.data=t.self.data=c.inherit(t.parent.data,t.data)),t.data}function a(t){return t.parent?t.parent.path.concat(t):[t]}function s(t){var e=t.parent?c.extend({},t.parent.includes):{};return e[t.name]=!0,e}function u(t){var e=function(t,e){return Object.keys(t||{}).map(function(r){return{token:r,val:t[r],deps:void 0,policy:e[r]}})},r=function(t){return t.$inject||d.services.$injector.annotate(t,d.services.$injector.strictDi)},n=function(t){return!(!t.token||!t.resolveFn)},i=function(t){return!(!t.provide&&!t.token||!(t.useValue||t.useFactory||t.useExisting||t.useClass))},o=function(t){return!!(t&&t.val&&(f.isString(t.val)||f.isArray(t.val)||f.isFunction(t.val)))},a=function(t){return t.provide||t.token},s=p.pattern([[p.prop("resolveFn"),function(t){return new v.Resolvable(a(t),t.resolveFn,t.deps,t.policy)}],[p.prop("useFactory"),function(t){return new v.Resolvable(a(t),t.useFactory,t.deps||t.dependencies,t.policy)}],[p.prop("useClass"),function(t){return new v.Resolvable(a(t),function(){return new t.useClass},[],t.policy)}],[p.prop("useValue"),function(t){return new v.Resolvable(a(t),function(){return t.useValue},[],t.policy,t.useValue)}],[p.prop("useExisting"),function(t){return new v.Resolvable(a(t),c.identity,[t.useExisting],t.policy)}]]),u=p.pattern([[p.pipe(p.prop("val"),f.isString),function(t){return new v.Resolvable(t.token,c.identity,[t.val],t.policy)}],[p.pipe(p.prop("val"),f.isArray),function(t){return new v.Resolvable(t.token,c.tail(t.val),t.val.slice(0,-1),t.policy)}],[p.pipe(p.prop("val"),f.isFunction),function(t){return new v.Resolvable(t.token,t.val,r(t.val),t.policy)}]]),h=p.pattern([[p.is(v.Resolvable),function(t){return t}],[n,s],[i,s],[o,u],[p.val(!0),function(t){throw new Error("Invalid resolve value: "+l.stringify(t))}]]),m=t.resolve,g=f.isArray(m)?m:e(m,t.resolvePolicy||{});return g.map(h)}var c=r(3),f=r(4),l=r(9),p=r(5),h=r(22),v=r(19),d=r(6),m=function(t){if(!f.isString(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},g=function(t,e){return function(r){var n=r;n&&n.url&&n.lazyLoad&&(n.url+="{remainder:any}");var i=m(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return n.reloadOnSearch===!1&&e&&(t=c.extend(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+r+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},y=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},w=function(t){return function(e){var r=function(e,r){return h.Param.fromConfig(r,null,e,t)},n=e.url&&e.url.parameters({inherit:!1})||[],i=c.values(c.mapObj(c.omit(e.params||{},n.map(p.prop("id"))),r));return n.concat(i).map(function(t){return[t.id,t]}).reduce(c.applyPairs,{})}};e.resolvablesBuilder=u;var b=function(){function t(t,e){function r(e){return l(e)?null:t.find(c.parentName(e))||f()}this.matcher=t;var c=this,f=function(){return t.find("")},l=function(t){return""===t.name};this.builders={name:[n],self:[i],parent:[r],data:[o],url:[g(e,f)],navigable:[y(l)],params:[w(e.paramTypes)],views:[],path:[a],includes:[s],resolvables:[u]}}return t.prototype.builder=function(t,e){var r=this.builders,n=r[t]||[];return f.isString(t)&&!f.isDefined(e)?n.length>1?n:n[0]:f.isString(t)&&f.isFunction(e)?(r[t]=n,r[t].push(e),function(){return r[t].splice(r[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,r=e.matcher,n=e.builders,i=this.parentName(t);if(i&&!r.find(i))return null;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o].reduce(function(t,e){return function(r){return e(r,t)}},c.noop);t[o]=a(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",r=e.split(".");if(r.length>1){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");var n=r.pop();return"**"===n&&r.pop(),r.join(".")}return t.parent?f.isString(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(e.indexOf(".")!==-1||!t.parent)return e;var r=f.isString(t.parent)?t.parent:t.parent.name;return r?r+"."+e:e},t}();e.StateBuilder=b},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(42),a=function(){function t(t,e,r,n){this.states=t,this.builder=e,this.$urlRouterProvider=r,this.listeners=n,this.queue=[]}return t.prototype.register=function(t){var e=this,r=e.states,a=e.queue,s=e.$state,u=n.inherit(new o.State,n.extend({},t,{self:t,resolve:t.resolve||[],toString:function(){return t.name}}));if(!i.isString(u.name))throw new Error("State must have a valid name");if(r.hasOwnProperty(u.name)||n.pluck(a,"name").indexOf(u.name)!==-1)throw new Error("State '"+u.name+"' is already defined");return a.push(u),this.$state&&this.flush(s),u},t.prototype.flush=function(t){for(var e=this,r=e.queue,n=e.states,i=e.builder,o=[],a=[],s={};r.length>0;){var u=r.shift(),c=i.build(u),f=a.indexOf(u);if(c){if(n.hasOwnProperty(u.name))throw new Error("State '"+name+"' is already defined");n[u.name]=u,this.attachRoute(t,u),f>=0&&a.splice(f,1),o.push(u)}else{var l=s[u.name];if(s[u.name]=r.length,f>=0&&l===r.length)return r.push(u),n;f<0&&a.push(u),r.push(u)}}return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),n},t.prototype.autoFlush=function(t){this.$state=t,this.flush(t)},t.prototype.attachRoute=function(t,e){var r=this.$urlRouterProvider;!e["abstract"]&&e.url&&r.when(e.url,["$match","$stateParams",function(r,i){t.$current.navigable===e&&n.equalForKeys(r,i)||t.transitionTo(e,r,{inherit:!0,source:"url"})}],function(t){return e._urlRule=t})},t}();e.StateQueueManager=a},function(t,e,r){"use strict";var n=r(3),i=r(5),o=function(){function t(t){n.extend(this,t)}return t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){t=n.defaults(t,{inherit:!0});var e=t.inherit&&this.parent&&this.parent.parameters()||[];return e.concat(n.values(this.params))},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||n.find(n.values(this.params),i.propEq("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t}();e.State=o},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(8),a=r(6),s=r(20),u=r(21),c=r(30),f=r(10),l=r(14),p=r(22),h=r(7),v=r(3),d=r(3),m=r(17),g=function(){function t(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof f.Rejection?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var r=["current","$current","params","transition"],n=Object.keys(t.prototype).filter(function(t){return r.indexOf(t)===-1});d.bindFunctions(t.prototype,this,this,n)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype._handleInvalidTargetState=function(t,e){function r(){var t=h.dequeue();if(void 0===t)return f.Rejection.invalid(e.error()).toPromise();var n=a.services.$q.when(t(e,i,v));return n.then(d).then(function(t){return t||r()})}var n=this,i=s.PathFactory.makeTargetState(t),u=this.router.globals,c=function(){return u.transitionHistory.peekTail()},p=c(),h=new o.Queue(this.invalidCallbacks.slice()),v=new m.ResolveContext(t).injector(),d=function(t){if(t instanceof l.TargetState){var e=t;return e=n.target(e.identifier(),e.params(),e.options()),e.valid()?c()!==p?f.Rejection.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):f.Rejection.invalid(e.error()).toPromise()}};return r()},t.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){n.removeFrom(this.invalidCallbacks)(t)}.bind(this)},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!i.isDefined(t)||t,inherit:!1,notify:!1})},t.prototype.go=function(t,e,r){var i={relative:this.$current,inherit:!0},o=n.defaults(r,i,c.defaultTransOpts);return this.transitionTo(t,e,o)},t.prototype.target=function(t,e,r){if(void 0===r&&(r={}),i.isObject(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=r.reload===!0?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(i.isString(r.reload)?r.reload:r.reload.name)+"'");var o=n.matcher.find(t,r.relative);return new l.TargetState(t,o,e,r)},t.prototype.transitionTo=function(t,e,r){var i=this;void 0===e&&(e={}),void 0===r&&(r={});var o=this.router,s=o.globals,p=s.transitionHistory;r=n.defaults(r,c.defaultTransOpts),r=n.extend(r,{current:p.peekTail.bind(p)});var h=this.target(t,e,r),v=s.successfulTransitions.peekTail(),d=function(){return[new u.PathNode(i.router.stateRegistry.root())]},m=v?v.treeChanges().to:d();if(!h.exists())return this._handleInvalidTargetState(m,h);if(!h.valid())return n.silentRejection(h.error());var g=function(t){return function(e){if(e instanceof f.Rejection){if(e.type===f.RejectType.IGNORED)return o.urlRouter.update(),a.services.$q.when(s.current);var r=e.detail;if(e.type===f.RejectType.SUPERSEDED&&e.redirected&&r instanceof l.TargetState){var n=t.redirect(r);return n.run()["catch"](g(n))}e.type===f.RejectType.ABORTED&&o.urlRouter.update()}var u=i.defaultErrorHandler();return u(e),a.services.$q.reject(e)}},y=this.router.transitionService.create(m,h),w=y.run()["catch"](g(y));return n.silenceUncaughtInPromise(w),n.extend(w,{transition:y})},t.prototype.is=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=this.router.stateRegistry.matcher.find(t,r.relative);if(i.isDefined(o))return this.$current===o&&(!i.isDefined(e)||null===e||p.Param.equals(o.parameters(),this.params,e))},t.prototype.includes=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=i.isString(t)&&h.Glob.fromString(t);if(o){if(!o.matches(this.$current.name))return!1;t=this.$current.name}var a=this.router.stateRegistry.matcher.find(t,r.relative),s=this.$current.includes;if(i.isDefined(a))return!!i.isDefined(s[a.name])&&(!e||v.equalForKeys(p.Param.values(a.parameters(),e),this.params,Object.keys(e)))},t.prototype.href=function(t,e,r){var o={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};r=n.defaults(r,o),e=e||{};var a=this.router.stateRegistry.matcher.find(t,r.relative);if(!i.isDefined(a))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,a));var s=a&&r.lossy?a.navigable:a;return s&&void 0!==s.url&&null!==s.url?this.router.urlRouter.href(s.url,p.Param.values(a.parameters(),e),{absolute:r.absolute}):null},t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},t}();e.StateService=g},function(t,e,r){"use strict";var n=r(45),i=r(8),o=r(3),a=function(){function t(t){var e=this;this.params=new n.StateParams,this.transitionHistory=new i.Queue([],1),this.successfulTransitions=new i.Queue([],1);var r=function(t){e.transition=t,e.transitionHistory.enqueue(t);var r=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,o.copy(t.params(),e.params)};t.onSuccess({},r,{priority:1e4});var n=function(){e.transition===t&&(e.transition=null)};t.promise.then(n,n)};t.onBefore({},r)}return t}();e.Globals=a},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t){void 0===t&&(t={}),n.extend(this,t)}return t.prototype.$inherit=function(t,e,r){var i,o=n.ancestors(e,r),a={},s=[];for(var u in o)if(o[u]&&o[u].params&&(i=Object.keys(o[u].params),i.length))for(var c in i)s.indexOf(i[c])>=0||(s.push(i[c]),a[i[c]]=this[i[c]]);return n.extend({},a,t)},t}();e.StateParams=i},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(22)),n(r(28)),n(r(45)),n(r(24))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(21)),n(r(20))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(18)),n(r(19)),n(r(17))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(40)),n(r(42)),n(r(39)),n(r(41)),n(r(38)),n(r(43)),n(r(14))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(16)),n(r(15)),n(r(10)),n(r(11)),n(r(13)),n(r(30))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(27)),n(r(23)),n(r(26)),n(r(29))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(37))},function(t,e,r){"use strict";function n(t){var e=l.services.$injector,r=e.get("$controller"),n=e.instantiate;try{var i;return e.instantiate=function(t){e.instantiate=n,i=e.annotate(t)},r(t,{$scope:{}}),i}finally{e.instantiate=n}}function i(t){function e(e,n,i,o,a,s){return o.$on("$locationChangeSuccess",function(t){return r.forEach(function(e){return e(t)})}),l.services.locationConfig.html5Mode=function(){var e=t.html5Mode();return e=v.isObject(e)?e.enabled:e,e&&i.history},l.services.location.setUrl=function(t,r){void 0===r&&(r=!1),e.url(t),r&&e.replace()},l.services.template.get=function(t){return a.get(t,{cache:s,headers:{Accept:"text/html"}}).then(h.prop("data"))},p.bindFunctions(e,l.services.location,e,["replace","url","path","search","hash"]),p.bindFunctions(e,l.services.locationConfig,e,["port","protocol","host"]),p.bindFunctions(n,l.services.locationConfig,n,["baseHref"]),R}R=new f.UIRouter,R.stateProvider=new w.StateProvider(R.stateRegistry,R.stateService),R.stateRegistry.decorator("views",g.ng1ViewsBuilder),R.stateRegistry.decorator("onExit",b.getStateHookBuilder("onExit")),R.stateRegistry.decorator("onRetain",b.getStateHookBuilder("onRetain")),R.stateRegistry.decorator("onEnter",b.getStateHookBuilder("onEnter")),R.viewService.viewConfigFactory("ng1",g.ng1ViewConfigFactory),p.bindFunctions(t,l.services.locationConfig,t,["hashPrefix"]);var r=[];l.services.location.onChange=function(t){return r.push(t),function(){return p.removeFrom(r)(t)}},this.$get=e,e.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"]}function o(t,e){l.services.$injector=t,l.services.$q=e}function a(){return R.urlRouterProvider.$get=function(){return R.urlRouter.update(!0),this.interceptDeferred||R.urlRouter.listen(),R.urlRouter},R.urlRouterProvider}function s(){return R.stateProvider.$get=function(){return R.stateRegistry.stateQueue.autoFlush(R.stateService),R.stateService},R.stateProvider}function u(){return R.transitionService.$get=function(){return R.transitionService},R.transitionService}function c(t){t.$watch(function(){m.trace.approximateDigests++})}var f=r(25),l=r(6),p=r(3),h=r(5),v=r(4),d=r(54),m=r(12),g=r(55),y=r(56),w=r(58),b=r(59),$=r(57);$.module("ui.router.angular1",[]);$.module("ui.router.util",["ng","ui.router.init"]),$.module("ui.router.router",["ui.router.util"]),$.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),$.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),$.module("ui.router.compat",["ui.router"]),e.annotateController=n;var R=null;i.$inject=["$locationProvider"],$.module("ui.router.init",[]).provider("$uiRouter",i),o.$inject=["$injector","$q"],$.module("ui.router.init").run(o),$.module("ui.router.init").run(["$uiRouter",function(t){}]),$.module("ui.router.util").provider("$urlMatcherFactory",["$uiRouterProvider",function(){return R.urlMatcherFactory}]),$.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),$.module("ui.router.router").provider("$urlRouter",["$uiRouterProvider",a]),$.module("ui.router.router").run(["$urlRouter",function(t){}]),$.module("ui.router.state").provider("$state",["$uiRouterProvider",s]),$.module("ui.router.state").run(["$state",function(t){}]),$.module("ui.router.state").factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),$.module("ui.router.state").provider("$transitions",["$uiRouterProvider",u]),$.module("ui.router.util").factory("$templateFactory",["$uiRouter",function(){return new y.TemplateFactory}]),$.module("ui.router").factory("$view",function(){return R.viewService}),$.module("ui.router").factory("$resolve",d.resolveFactory),$.module("ui.router").service("$trace",function(){return m.trace}),c.$inject=["$rootScope"],e.watchDigests=c,$.module("ui.router").run(c),e.getLocals=function(t){var e=t.getTokens().filter(v.isString),r=e.map(function(e){return[e,t.getResolvable(e).data]});return r.reduce(p.applyPairs,{})}},function(t,e,r){"use strict";var n=r(42),i=r(21),o=r(17),a=r(3),s=r(40),u={resolve:function(t,e,r){void 0===e&&(e={});var u=new i.PathNode(new n.State({params:{},resolvables:[]})),c=new i.PathNode(new n.State({params:{},resolvables:[]})),f=new o.ResolveContext([u,c]);f.addResolvables(s.resolvablesBuilder({resolve:t}),c.state);var l=function(t){var r=function(t){return s.resolvablesBuilder({resolve:a.mapObj(t,function(t){return function(){return t}})})};f.addResolvables(r(t),u.state),f.addResolvables(r(e),c.state);var n=function(t,e){return t[e.token]=e.value,t};return f.resolvePath().then(function(t){return t.reduce(n,{})})};return r?r.then(l):l({})}};e.resolveFactory=function(){return u}},function(t,e,r){"use strict";function n(t){var e=["templateProvider","templateUrl","template","notify","async"],r=["controller","controllerProvider","controllerAs","resolveAs"],n=["component","bindings"],c=e.concat(r),f=n.concat(c),l={},p=t.views||{$default:o.pick(t,f)};return o.forEach(p,function(e,r){if(r=r||"$default",u.isString(e)&&(e={component:e}),Object.keys(e).length){if(e.component){if(c.map(function(t){return u.isDefined(e[t])}).reduce(o.anyTrueR,!1))throw new Error("Cannot combine: "+n.join("|")+" with: "+c.join("|")+" in stateview: 'name@"+t.name+"'");e.templateProvider=["$injector",function(t){var r=function(t){return e.bindings&&e.bindings[t]||t},n=v.version.minor>=3?"::":"",o=function(t){var e=a.kebobString(t.name),i=r(t.name);return"@"===t.type?e+"='{{"+n+"$resolve."+i+"}}'":e+"='"+n+"$resolve."+i+"'"},s=i(t,e.component).map(o).join(" "),u=a.kebobString(e.component);return"<"+u+" "+s+"></"+u+">"}]}e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=t,e.$name=r;var f=s.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=f.uiViewName,e.$uiViewContextAnchor=f.uiViewContextAnchor,l[r]=e}}),l}function i(t,e){var r=t.get(e+"Directive");if(!r||!r.length)throw new Error("Unable to find component named '"+e+"'");return r.map(m).reduce(o.unnestR,[])}var o=r(3),a=r(9),s=r(37),u=r(4),c=r(6),f=r(12),l=r(56),p=r(17),h=r(19),v=r(57);e.ng1ViewConfigFactory=function(t,e){return[new y(t,e)]},e.ng1ViewsBuilder=n;var d=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@])[?]?(.*)/.exec(t[e])]}).filter(function(t){return u.isDefined(t)&&u.isDefined(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},m=function(t){return d(u.isObject(t.bindToController)?t.bindToController:t.scope)},g=0,y=function(){function t(t,e){this.path=t,this.viewDecl=e,this.$id=g++,this.loaded=!1}return t.prototype.load=function(){var t=this,e=c.services.$q;if(!this.hasTemplate())throw new Error("No template configuration specified for '"+this.viewDecl.$uiViewName+"@"+this.viewDecl.$uiViewContextAnchor+"'");var r=new p.ResolveContext(this.path),n=this.path.reduce(function(t,e){return o.extend(t,e.paramValues)},{}),i={template:e.when(this.getTemplate(n,new l.TemplateFactory,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return f.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,t.template=e.template,t})},t.prototype.hasTemplate=function(){return!!(this.viewDecl.template||this.viewDecl.templateUrl||this.viewDecl.templateProvider)},t.prototype.getTemplate=function(t,e,r){return e.fromConfig(this.viewDecl,t,r)},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!u.isInjectable(e))return this.viewDecl.controller;var r=c.services.$injector.annotate(e),n=u.isArray(e)?o.tail(e):e,i=new h.Resolvable("",n,r);return i.get(t)},t}();e.Ng1ViewConfig=y},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(3),a=r(19),s=function(){function t(){}return t.prototype.fromConfig=function(t,e,r){return n.isDefined(t.template)?this.fromString(t.template,e):n.isDefined(t.templateUrl)?this.fromUrl(t.templateUrl,e):n.isDefined(t.templateProvider)?this.fromProvider(t.templateProvider,e,r):null},t.prototype.fromString=function(t,e){return n.isFunction(t)?t(e):t},t.prototype.fromUrl=function(t,e){return n.isFunction(t)&&(t=t(e)),null==t?null:i.services.template.get(t)},t.prototype.fromProvider=function(t,e,r){var s=i.services.$injector.annotate(t),u=n.isArray(t)?o.tail(t):t,c=new a.Resolvable("",u,s);return c.get(r)},t}();e.TemplateFactory=s},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(4),i=r(3),o=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,i.bindFunctions(t.prototype,this,this)}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return n.isObject(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}();e.StateProvider=o},function(t,e,r){"use strict";var n=r(6),i=r(53),o=r(17),a=r(3);e.getStateHookBuilder=function(t){return function(e,r){function s(t,e){var r=new o.ResolveContext(t.treeChanges().to);return n.services.$injector.invoke(u,this,a.extend({$state$:e},i.getLocals(r)))}var u=e[t];return u?s:void 0}}},function(t,e,r){"use strict";function n(t,e){var r,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t=e+"("+n[1]+")"),r=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!r||4!==r.length)throw new Error("Invalid state ref '"+t+"'");return{state:r[1],paramExpr:r[3]||null}}function i(t){var e=t.parent().inheritedData("$uiView"),r=l.parse("$cfg.path")(e);return r?c.tail(r).state.name:void 0}function o(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function a(t,e,r,n,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=r(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var c=n.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(u)}}}}function s(t,e){return{relative:i(t)||e.$current,inherit:!0,source:"sref"}}var u=r(57),c=r(3),f=r(4),l=r(5),p=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,f,l){var p,h=n(f.uiSref,t.current.name),v={state:h.state,href:null,params:null,options:null},d=o(i),m=l[1]||l[0],g=null;v.options=c.extend(s(i,t),f.uiSrefOpts?r.$eval(f.uiSrefOpts):{});var y=function(e){e&&(v.params=u.copy(e)),v.href=t.href(h.state,v.params,v.options),g&&g(),m&&(g=m.$$addStateInfo(h.state,v.params)),null!==v.href&&f.$set(d.attr,v.href)};h.paramExpr&&(r.$watch(h.paramExpr,function(t){t!==v.params&&y(t)},!0),v.params=u.copy(r.$eval(h.paramExpr))),y(),d.clickable&&(p=a(i,t,e,d,function(){return v}),i.on("click",p),r.$on("$destroy",function(){i.off("click",p)}))}}}],h=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,n,i,s){function u(e){v.state=e[0],v.params=e[1],v.options=e[2],v.href=t.href(v.state,v.params,v.options),d&&d(),l&&(d=l.$$addStateInfo(v.state,v.params)),v.href&&i.$set(f.attr,v.href)}var c,f=o(n),l=s[1]||s[0],p=[i.uiState,i.uiStateParams||null,i.uiStateOpts||null],h="["+p.map(function(t){return t||"null"}).join(", ")+"]",v={state:null,params:null,options:null,href:null},d=null;r.$watch(h,u,!0),u(r.$eval(h)),f.clickable&&(c=a(n,t,e,f,function(){return v}),n.on("click",c),r.$on("$destroy",function(){n.off("click",c)}))}}}],v=["$state","$stateParams","$interpolate","$transitions","$uiRouter",function(t,e,r,o,a){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,s,u,l){function p(t){t.promise.then(d)}function h(e,r,n){var o=t.get(e,i(s)),a=v(e,r),u={state:o||{name:e},params:r,hash:a};return R.push(u),S[a]=n,function(){var t=R.indexOf(u);t!==-1&&R.splice(t,1)}}function v(t,r){if(!f.isString(t))throw new Error("state should be a string");return f.isObject(r)?t+c.toJson(r):(r=e.$eval(r),f.isObject(r)?t+c.toJson(r):t)}function d(){for(var t=0;t<R.length;t++)y(R[t].state,R[t].params)?m(s,S[R[t].hash]):g(s,S[R[t].hash]),w(R[t].state,R[t].params)?m(s,b):g(s,b)}function m(t,e){l(function(){t.addClass(e)})}function g(t,e){t.removeClass(e)}function y(e,r){return t.includes(e.name,r)}function w(e,r){return t.is(e.name,r)}var b,$,R=[],S={};b=r(u.uiSrefActiveEq||"",!1)(e);try{$=e.$eval(u.uiSrefActive)}catch(E){}$=$||r(u.uiSrefActive||"",!1)(e),f.isObject($)&&c.forEach($,function(r,i){if(f.isString(r)){var o=n(r,t.current.name);h(o.state,e.$eval(o.paramExpr),i)}}),this.$$addStateInfo=function(t,e){if(!(f.isObject($)&&R.length>0)){var r=h(t,e,$);return d(),r}},e.$on("$stateChangeSuccess",d),e.$on("$destroy",o.onStart({},p)),a.globals.transition&&p(a.globals.transition),d()}]}}];u.module("ui.router.state").directive("uiSref",p).directive("uiSrefActive",v).directive("uiSrefActiveEq",v).directive("uiState",h)},function(t,e,r){"use strict";function n(t){var e=function(e,r,n){return t.is(e,r,n)};return e.$stateful=!0,e}function i(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}var o=r(57);n.$inject=["$state"],e.$IsStateFilter=n,i.$inject=["$state"],e.$IncludedByStateFilter=i,o.module("ui.router.state").filter("isState",n).filter("includedByState",i)},function(t,e,r){"use strict";function n(t,e,r,n,u){var v=c.parse("viewDecl.controllerAs"),d=c.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(n){var u=n.html();return function(n,c){var m=c.data("$uiView");if(m){var g=m.$cfg||{viewDecl:{}};c.html(g.template||u),s.trace.traceUIViewFill(m.$uiView,c.html());var y=t(c.contents()),w=g.controller,b=v(g),$=d(g),R=g.path&&new f.ResolveContext(g.path),S=R&&p.getLocals(R);if(n[$]=S,w){var E=e(w,o.extend({},S,{$scope:n,$element:c}));b&&(n[b]=E,n[b][$]=S),c.data("$ngControllerController",E),c.children().data("$ngControllerController",E),i(r,E,n,g)}if(a.isString(g.viewDecl.component))var x=g.viewDecl.component,k=l.kebobString(x),P=function(){var t=[].slice.call(c[0].children).filter(function(t){return t&&t.tagName&&t.tagName.toLowerCase()===k});return t&&h.element(t).data("$"+x+"Controller")},_=n.$watch(P,function(t){t&&(i(r,t,n,g),_())});y(n)}}}}}function i(t,e,r,n){!a.isFunction(e.$onInit)||n.viewDecl.component&&d||e.$onInit();var i=o.tail(n.path).state.self,s={bind:e};if(a.isFunction(e.uiOnParamsChanged)){var u=new f.ResolveContext(n.path),c=u.getResolvable("$transition$").data,l=function(t){if(t!==c&&t.exiting().indexOf(i)===-1){var r=t.params("to"),n=t.params("from"),a=t.treeChanges().to.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),s=t.treeChanges().from.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),u=a.filter(function(t){var e=s.indexOf(t);return e===-1||!s[e].type.equals(r[t.id],n[t.id])});if(u.length){var f=u.map(function(t){return t.id});e.uiOnParamsChanged(o.filter(r,function(t,e){return f.indexOf(e)!==-1}),t)}}};r.$on("$destroy",t.onSuccess({},l,s))}if(a.isFunction(e.uiCanExit)){var p={exiting:i.name};r.$on("$destroy",t.onBefore(p,e.uiCanExit,s))}}var o=r(3),a=r(4),s=r(12),u=r(55),c=r(5),f=r(17),l=r(9),p=r(53),h=r(57),v=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){h.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){h.version.minor>2?e.leave(t).then(r):e.leave(t,r)}}}function f(t,e){return t===e}var l={$cfg:{viewDecl:{$context:t.rootContext()}},$uiView:{}},p={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,h,v){return function(e,h,d){function m(t){(!t||t instanceof u.Ng1ViewConfig)&&(f(k,t)||(s.trace.traceUIViewConfigUpdated(C,t&&t.viewDecl&&t.viewDecl.$context),k=t,y(t)))}function g(){if(w&&(s.trace.traceUIViewEvent("Removing (previous) el",w.data("$uiView")),w.remove(),w=null),$&&(s.trace.traceUIViewEvent("Destroying scope",C),$.$destroy(),$=null),b){var t=b.data("$uiViewAnim");s.trace.traceUIViewEvent("Animate out",t),x.leave(b,function(){t.$$animLeave.resolve(),w=null}),w=b,b=null}}function y(t){var n=e.$new(),o=i.defer(),s=i.defer(),u={$cfg:t,$uiView:C},c={$animEnter:o.promise,$animLeave:s.promise,$$animLeave:s},f=v(n,function(t){t.data("$uiViewAnim",c),t.data("$uiView",u),
1819 x.enter(t,h,function(){o.resolve(),$&&$.$emit("$viewContentAnimationEnded"),(a.isDefined(E)&&!E||e.$eval(E))&&r(t)}),g()});b=f,$=n,$.$emit("$viewContentLoaded",t||k),$.$eval(S)}var w,b,$,R,S=d.onload||"",E=d.autoscroll,x=o(d,e),k=void 0,P=h.inheritedData("$uiView")||l,_=n(d.uiView||d.name||"")(e)||"$default",C={$type:"ng1",id:p.count++,name:_,fqn:P.$uiView.fqn?P.$uiView.fqn+"."+_:_,config:null,configUpdated:m,get creationContext(){return c.parse("$cfg.viewDecl.$context")(P)}};s.trace.traceUIViewEvent("Linking",C),h.data("$uiView",{$uiView:C}),y(),R=t.registerUIView(C),e.$on("$destroy",function(){s.trace.traceUIViewEvent("Destroying/Unregistering",C),R()})}}};return p}];n.$inject=["$compile","$controller","$transitions","$view","$timeout"];var d="function"==typeof h.module("ui.router").component;h.module("ui.router.state").directive("uiView",v),h.module("ui.router.state").directive("uiView",n)},function(t,e,r){"use strict";function n(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,r){return t?e:function(t){return r(function(){t[0].scrollIntoView()},0,!1)}}]}var i=r(57);i.module("ui.router.state").provider("$uiViewScroll",n)}])});
1819 x.enter(t,h,function(){o.resolve(),$&&$.$emit("$viewContentAnimationEnded"),(a.isDefined(E)&&!E||e.$eval(E))&&r(t)}),g()});b=f,$=n,$.$emit("$viewContentLoaded",t||k),$.$eval(S)}var w,b,$,R,S=d.onload||"",E=d.autoscroll,x=o(d,e),k=void 0,P=h.inheritedData("$uiView")||l,_=n(d.uiView||d.name||"")(e)||"$default",C={$type:"ng1",id:p.count++,name:_,fqn:P.$uiView.fqn?P.$uiView.fqn+"."+_:_,config:null,configUpdated:m,get creationContext(){return c.parse("$cfg.viewDecl.$context")(P)}};s.trace.traceUIViewEvent("Linking",C),h.data("$uiView",{$uiView:C}),y(),R=t.registerUIView(C),e.$on("$destroy",function(){s.trace.traceUIViewEvent("Destroying/Unregistering",C),R()})}}};return p}];n.$inject=["$compile","$controller","$transitions","$view","$timeout"];var d="function"==typeof h.module("ui.router").component;h.module("ui.router.state").directive("uiView",v),h.module("ui.router.state").directive("uiView",n)},function(t,e,r){"use strict";function n(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,r){return t?e:function(t){return r(function(){t[0].scrollIntoView()},0,!1)}}]}var i=r(57);i.module("ui.router.state").provider("$uiViewScroll",n)}])});
1820 //# sourceMappingURL=angular-ui-router.min.js.map
1820 //# sourceMappingURL=angular-ui-router.min.js.map
1821 ;angular.module('angular-toArrayFilter', [])
1821 ;angular.module('angular-toArrayFilter', [])
1822
1822
1823 .filter('toArray', function () {
1823 .filter('toArray', function () {
1824 return function (obj, addKey) {
1824 return function (obj, addKey) {
1825 if (!angular.isObject(obj)) return obj;
1825 if (!angular.isObject(obj)) return obj;
1826 if ( addKey === false ) {
1826 if ( addKey === false ) {
1827 return Object.keys(obj).map(function(key) {
1827 return Object.keys(obj).map(function(key) {
1828 return obj[key];
1828 return obj[key];
1829 });
1829 });
1830 } else {
1830 } else {
1831 return Object.keys(obj).map(function (key) {
1831 return Object.keys(obj).map(function (key) {
1832 var value = obj[key];
1832 var value = obj[key];
1833 return angular.isObject(value) ?
1833 return angular.isObject(value) ?
1834 Object.defineProperty(value, '$key', { enumerable: false, value: key}) :
1834 Object.defineProperty(value, '$key', { enumerable: false, value: key}) :
1835 { $key: key, $value: value };
1835 { $key: key, $value: value };
1836 });
1836 });
1837 }
1837 }
1838 };
1838 };
1839 });
1839 });
1840 ;//Copyright (C) 2012 Kory Nunn
1840 ;//Copyright (C) 2012 Kory Nunn
1841
1841
1842 //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:
1842 //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:
1843
1843
1844 //The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1844 //The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1845
1845
1846 //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.
1846 //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.
1847
1847
1848 /*
1848 /*
1849
1849
1850 This code is not formatted for readability, but rather run-speed and to assist compilers.
1850 This code is not formatted for readability, but rather run-speed and to assist compilers.
1851
1851
1852 However, the code's intention should be transparent.
1852 However, the code's intention should be transparent.
1853
1853
1854 *** IE SUPPORT ***
1854 *** IE SUPPORT ***
1855
1855
1856 If you require this library to work in IE7, add the following after declaring crel.
1856 If you require this library to work in IE7, add the following after declaring crel.
1857
1857
1858 var testDiv = document.createElement('div'),
1858 var testDiv = document.createElement('div'),
1859 testLabel = document.createElement('label');
1859 testLabel = document.createElement('label');
1860
1860
1861 testDiv.setAttribute('class', 'a');
1861 testDiv.setAttribute('class', 'a');
1862 testDiv['className'] !== 'a' ? crel.attrMap['class'] = 'className':undefined;
1862 testDiv['className'] !== 'a' ? crel.attrMap['class'] = 'className':undefined;
1863 testDiv.setAttribute('name','a');
1863 testDiv.setAttribute('name','a');
1864 testDiv['name'] !== 'a' ? crel.attrMap['name'] = function(element, value){
1864 testDiv['name'] !== 'a' ? crel.attrMap['name'] = function(element, value){
1865 element.id = value;
1865 element.id = value;
1866 }:undefined;
1866 }:undefined;
1867
1867
1868
1868
1869 testLabel.setAttribute('for', 'a');
1869 testLabel.setAttribute('for', 'a');
1870 testLabel['htmlFor'] !== 'a' ? crel.attrMap['for'] = 'htmlFor':undefined;
1870 testLabel['htmlFor'] !== 'a' ? crel.attrMap['for'] = 'htmlFor':undefined;
1871
1871
1872
1872
1873
1873
1874 */
1874 */
1875
1875
1876 (function (root, factory) {
1876 (function (root, factory) {
1877 if (typeof exports === 'object') {
1877 if (typeof exports === 'object') {
1878 if (!root.window) {
1878 if (!root.window) {
1879 var jsdom = require('jsdom').jsdom;
1879 var jsdom = require('jsdom').jsdom;
1880 root.window = jsdom().parentWindow;
1880 root.window = jsdom().parentWindow;
1881 }
1881 }
1882 module.exports = factory(root.window);
1882 module.exports = factory(root.window);
1883 } else if (typeof define === 'function' && define.amd) {
1883 } else if (typeof define === 'function' && define.amd) {
1884 define(factory.bind(null, window));
1884 define(factory.bind(null, window));
1885 } else {
1885 } else {
1886 root.crel = factory(root.window);
1886 root.crel = factory(root.window);
1887 }
1887 }
1888 }(this, function (window) {
1888 }(this, function (window) {
1889 // based on http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
1889 // based on http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
1890 var isNode = typeof Node === 'object'
1890 var isNode = typeof Node === 'object'
1891 ? function (object) { return object instanceof Node }
1891 ? function (object) { return object instanceof Node }
1892 : function (object) {
1892 : function (object) {
1893 return object
1893 return object
1894 && typeof object === 'object'
1894 && typeof object === 'object'
1895 && typeof object.nodeType === 'number'
1895 && typeof object.nodeType === 'number'
1896 && typeof object.nodeName === 'string';
1896 && typeof object.nodeName === 'string';
1897 };
1897 };
1898
1898
1899 function crel(){
1899 function crel(){
1900 var document = window.document,
1900 var document = window.document,
1901 args = arguments, //Note: assigned to a variable to assist compilers. Saves about 40 bytes in closure compiler. Has negligable effect on performance.
1901 args = arguments, //Note: assigned to a variable to assist compilers. Saves about 40 bytes in closure compiler. Has negligable effect on performance.
1902 element = document.createElement(args[0]),
1902 element = document.createElement(args[0]),
1903 child,
1903 child,
1904 settings = args[1],
1904 settings = args[1],
1905 childIndex = 2,
1905 childIndex = 2,
1906 argumentsLength = args.length,
1906 argumentsLength = args.length,
1907 attributeMap = crel.attrMap;
1907 attributeMap = crel.attrMap;
1908
1908
1909 // shortcut
1909 // shortcut
1910 if(argumentsLength === 1){
1910 if(argumentsLength === 1){
1911 return element;
1911 return element;
1912 }
1912 }
1913
1913
1914 if(typeof settings !== 'object' || isNode(settings)) {
1914 if(typeof settings !== 'object' || isNode(settings)) {
1915 --childIndex;
1915 --childIndex;
1916 settings = null;
1916 settings = null;
1917 }
1917 }
1918
1918
1919 // shortcut if there is only one child that is a string
1919 // shortcut if there is only one child that is a string
1920 if((argumentsLength - childIndex) === 1 && typeof args[childIndex] === 'string' && element.textContent !== undefined){
1920 if((argumentsLength - childIndex) === 1 && typeof args[childIndex] === 'string' && element.textContent !== undefined){
1921 element.textContent = args[childIndex];
1921 element.textContent = args[childIndex];
1922 }else{
1922 }else{
1923 for(; childIndex < argumentsLength; ++childIndex){
1923 for(; childIndex < argumentsLength; ++childIndex){
1924 child = args[childIndex];
1924 child = args[childIndex];
1925
1925
1926 if(child == null){
1926 if(child == null){
1927 continue;
1927 continue;
1928 }
1928 }
1929
1929
1930 if(!isNode(child)){
1930 if(!isNode(child)){
1931 child = document.createTextNode(child);
1931 child = document.createTextNode(child);
1932 }
1932 }
1933
1933
1934 element.appendChild(child);
1934 element.appendChild(child);
1935 }
1935 }
1936 }
1936 }
1937
1937
1938 for(var key in settings){
1938 for(var key in settings){
1939 if(!attributeMap[key]){
1939 if(!attributeMap[key]){
1940 element.setAttribute(key, settings[key]);
1940 element.setAttribute(key, settings[key]);
1941 }else{
1941 }else{
1942 var attr = crel.attrMap[key];
1942 var attr = crel.attrMap[key];
1943 if(typeof attr === 'function'){
1943 if(typeof attr === 'function'){
1944 attr(element, settings[key]);
1944 attr(element, settings[key]);
1945 }else{
1945 }else{
1946 element.setAttribute(attr, settings[key]);
1946 element.setAttribute(attr, settings[key]);
1947 }
1947 }
1948 }
1948 }
1949 }
1949 }
1950
1950
1951 return element;
1951 return element;
1952 }
1952 }
1953
1953
1954 // Used for mapping one kind of attribute to the supported version of that in bad browsers.
1954 // Used for mapping one kind of attribute to the supported version of that in bad browsers.
1955 // String referenced so that compilers maintain the property name.
1955 // String referenced so that compilers maintain the property name.
1956 crel['attrMap'] = {};
1956 crel['attrMap'] = {};
1957
1957
1958 // String referenced so that compilers maintain the property name.
1958 // String referenced so that compilers maintain the property name.
1959 crel["isNode"] = isNode;
1959 crel["isNode"] = isNode;
1960
1960
1961 return crel;
1961 return crel;
1962 }));
1962 }));
1963
1963
1964 ;/*globals define, module, require, document*/
1964 ;/*globals define, module, require, document*/
1965 (function (root, factory) {
1965 (function (root, factory) {
1966 "use strict";
1966 "use strict";
1967 if (typeof define === 'function' && define.amd) {
1967 if (typeof define === 'function' && define.amd) {
1968 define([], factory);
1968 define([], factory);
1969 } else if (typeof module !== 'undefined' && module.exports) {
1969 } else if (typeof module !== 'undefined' && module.exports) {
1970 module.exports = factory();
1970 module.exports = factory();
1971 } else {
1971 } else {
1972 root.JsonHuman = factory();
1972 root.JsonHuman = factory();
1973 }
1973 }
1974 }(this, function () {
1974 }(this, function () {
1975 "use strict";
1975 "use strict";
1976
1976
1977 var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
1977 var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
1978
1978
1979 function makePrefixer(prefix) {
1979 function makePrefixer(prefix) {
1980 return function (name) {
1980 return function (name) {
1981 return prefix + "-" + name;
1981 return prefix + "-" + name;
1982 };
1982 };
1983 }
1983 }
1984
1984
1985 function isArray(obj) {
1985 function isArray(obj) {
1986 return toString.call(obj) === '[object Array]';
1986 return toString.call(obj) === '[object Array]';
1987 }
1987 }
1988
1988
1989 function sn(tagName, className, data) {
1989 function sn(tagName, className, data) {
1990 var result = document.createElement(tagName);
1990 var result = document.createElement(tagName);
1991
1991
1992 result.className = className;
1992 result.className = className;
1993 result.appendChild(document.createTextNode("" + data));
1993 result.appendChild(document.createTextNode("" + data));
1994
1994
1995 return result;
1995 return result;
1996 }
1996 }
1997
1997
1998 function scn(tagName, className, child) {
1998 function scn(tagName, className, child) {
1999 var result = document.createElement(tagName),
1999 var result = document.createElement(tagName),
2000 i, len;
2000 i, len;
2001
2001
2002 result.className = className;
2002 result.className = className;
2003
2003
2004 if (isArray(child)) {
2004 if (isArray(child)) {
2005 for (i = 0, len = child.length; i < len; i += 1) {
2005 for (i = 0, len = child.length; i < len; i += 1) {
2006 result.appendChild(child[i]);
2006 result.appendChild(child[i]);
2007 }
2007 }
2008 } else {
2008 } else {
2009 result.appendChild(child);
2009 result.appendChild(child);
2010 }
2010 }
2011
2011
2012 return result;
2012 return result;
2013 }
2013 }
2014
2014
2015 function linkNode(child, href, target){
2015 function linkNode(child, href, target){
2016 var a = scn("a", HYPERLINK_CLASS_NAME, child);
2016 var a = scn("a", HYPERLINK_CLASS_NAME, child);
2017 a.setAttribute('href', href);
2017 a.setAttribute('href', href);
2018 a.setAttribute('target', target);
2018 a.setAttribute('target', target);
2019 return a;
2019 return a;
2020 }
2020 }
2021
2021
2022 var toString = Object.prototype.toString,
2022 var toString = Object.prototype.toString,
2023 prefixer = makePrefixer("jh"),
2023 prefixer = makePrefixer("jh"),
2024 p = prefixer,
2024 p = prefixer,
2025 ARRAY = 2,
2025 ARRAY = 2,
2026 BOOL = 4,
2026 BOOL = 4,
2027 INT = 8,
2027 INT = 8,
2028 FLOAT = 16,
2028 FLOAT = 16,
2029 STRING = 32,
2029 STRING = 32,
2030 OBJECT = 64,
2030 OBJECT = 64,
2031 SPECIAL_OBJECT = 128,
2031 SPECIAL_OBJECT = 128,
2032 FUNCTION = 256,
2032 FUNCTION = 256,
2033 UNK = 1,
2033 UNK = 1,
2034
2034
2035 STRING_CLASS_NAME = p("type-string"),
2035 STRING_CLASS_NAME = p("type-string"),
2036 STRING_EMPTY_CLASS_NAME = p("type-string") + " " + p("empty"),
2036 STRING_EMPTY_CLASS_NAME = p("type-string") + " " + p("empty"),
2037
2037
2038 BOOL_TRUE_CLASS_NAME = p("type-bool-true"),
2038 BOOL_TRUE_CLASS_NAME = p("type-bool-true"),
2039 BOOL_FALSE_CLASS_NAME = p("type-bool-false"),
2039 BOOL_FALSE_CLASS_NAME = p("type-bool-false"),
2040 BOOL_IMAGE = p("type-bool-image"),
2040 BOOL_IMAGE = p("type-bool-image"),
2041 INT_CLASS_NAME = p("type-int") + " " + p("type-number"),
2041 INT_CLASS_NAME = p("type-int") + " " + p("type-number"),
2042 FLOAT_CLASS_NAME = p("type-float") + " " + p("type-number"),
2042 FLOAT_CLASS_NAME = p("type-float") + " " + p("type-number"),
2043
2043
2044 OBJECT_CLASS_NAME = p("type-object"),
2044 OBJECT_CLASS_NAME = p("type-object"),
2045 OBJ_KEY_CLASS_NAME = p("key") + " " + p("object-key"),
2045 OBJ_KEY_CLASS_NAME = p("key") + " " + p("object-key"),
2046 OBJ_VAL_CLASS_NAME = p("value") + " " + p("object-value"),
2046 OBJ_VAL_CLASS_NAME = p("value") + " " + p("object-value"),
2047 OBJ_EMPTY_CLASS_NAME = p("type-object") + " " + p("empty"),
2047 OBJ_EMPTY_CLASS_NAME = p("type-object") + " " + p("empty"),
2048
2048
2049 FUNCTION_CLASS_NAME = p("type-function"),
2049 FUNCTION_CLASS_NAME = p("type-function"),
2050
2050
2051 ARRAY_KEY_CLASS_NAME = p("key") + " " + p("array-key"),
2051 ARRAY_KEY_CLASS_NAME = p("key") + " " + p("array-key"),
2052 ARRAY_VAL_CLASS_NAME = p("value") + " " + p("array-value"),
2052 ARRAY_VAL_CLASS_NAME = p("value") + " " + p("array-value"),
2053 ARRAY_CLASS_NAME = p("type-array"),
2053 ARRAY_CLASS_NAME = p("type-array"),
2054 ARRAY_EMPTY_CLASS_NAME = p("type-array") + " " + p("empty"),
2054 ARRAY_EMPTY_CLASS_NAME = p("type-array") + " " + p("empty"),
2055
2055
2056 HYPERLINK_CLASS_NAME = p('a'),
2056 HYPERLINK_CLASS_NAME = p('a'),
2057
2057
2058 UNKNOWN_CLASS_NAME = p("type-unk");
2058 UNKNOWN_CLASS_NAME = p("type-unk");
2059
2059
2060 function getType(obj) {
2060 function getType(obj) {
2061 var type = typeof obj;
2061 var type = typeof obj;
2062
2062
2063 switch (type) {
2063 switch (type) {
2064 case "boolean":
2064 case "boolean":
2065 return BOOL;
2065 return BOOL;
2066 case "string":
2066 case "string":
2067 return STRING;
2067 return STRING;
2068 case "number":
2068 case "number":
2069 return (obj % 1 === 0) ? INT : FLOAT;
2069 return (obj % 1 === 0) ? INT : FLOAT;
2070 case "function":
2070 case "function":
2071 return FUNCTION;
2071 return FUNCTION;
2072 default:
2072 default:
2073 if (isArray(obj)) {
2073 if (isArray(obj)) {
2074 return ARRAY;
2074 return ARRAY;
2075 } else if (obj === Object(obj)) {
2075 } else if (obj === Object(obj)) {
2076 if (obj.constructor === Object) {
2076 if (obj.constructor === Object) {
2077 return OBJECT;
2077 return OBJECT;
2078 }
2078 }
2079 return OBJECT | SPECIAL_OBJECT
2079 return OBJECT | SPECIAL_OBJECT
2080 } else {
2080 } else {
2081 return UNK;
2081 return UNK;
2082 }
2082 }
2083 }
2083 }
2084 }
2084 }
2085
2085
2086 function _format(data, options, parentKey) {
2086 function _format(data, options, parentKey) {
2087
2087
2088 var result, container, key, keyNode, valNode, len, childs, tr, value,
2088 var result, container, key, keyNode, valNode, len, childs, tr, value,
2089 isEmpty = true,
2089 isEmpty = true,
2090 isSpecial = false,
2090 isSpecial = false,
2091 accum = [],
2091 accum = [],
2092 type = getType(data);
2092 type = getType(data);
2093
2093
2094 // Initialized & used only in case of objects & arrays
2094 // Initialized & used only in case of objects & arrays
2095 var hyperlinksEnabled, aTarget, hyperlinkKeys ;
2095 var hyperlinksEnabled, aTarget, hyperlinkKeys ;
2096
2096
2097 if (type === BOOL) {
2097 if (type === BOOL) {
2098 var boolOpt = options.bool;
2098 var boolOpt = options.bool;
2099 container = document.createElement('div');
2099 container = document.createElement('div');
2100
2100
2101 if (boolOpt.showImage) {
2101 if (boolOpt.showImage) {
2102 var img = document.createElement('img');
2102 var img = document.createElement('img');
2103 img.setAttribute('class', BOOL_IMAGE);
2103 img.setAttribute('class', BOOL_IMAGE);
2104
2104
2105 img.setAttribute('src',
2105 img.setAttribute('src',
2106 '' + (data ? boolOpt.img.true : boolOpt.img.false));
2106 '' + (data ? boolOpt.img.true : boolOpt.img.false));
2107
2107
2108 container.appendChild(img);
2108 container.appendChild(img);
2109 }
2109 }
2110
2110
2111 if (boolOpt.showText) {
2111 if (boolOpt.showText) {
2112 container.appendChild(data ?
2112 container.appendChild(data ?
2113 sn("span", BOOL_TRUE_CLASS_NAME, boolOpt.text.true) :
2113 sn("span", BOOL_TRUE_CLASS_NAME, boolOpt.text.true) :
2114 sn("span", BOOL_FALSE_CLASS_NAME, boolOpt.text.false));
2114 sn("span", BOOL_FALSE_CLASS_NAME, boolOpt.text.false));
2115 }
2115 }
2116
2116
2117 result = container;
2117 result = container;
2118
2118
2119 } else if (type === STRING) {
2119 } else if (type === STRING) {
2120 if (data === "") {
2120 if (data === "") {
2121 result = sn("span", STRING_EMPTY_CLASS_NAME, "(Empty Text)");
2121 result = sn("span", STRING_EMPTY_CLASS_NAME, "(Empty Text)");
2122 } else {
2122 } else {
2123 result = sn("span", STRING_CLASS_NAME, data);
2123 result = sn("span", STRING_CLASS_NAME, data);
2124 }
2124 }
2125 } else if (type === INT) {
2125 } else if (type === INT) {
2126 result = sn("span", INT_CLASS_NAME, data);
2126 result = sn("span", INT_CLASS_NAME, data);
2127 } else if (type === FLOAT) {
2127 } else if (type === FLOAT) {
2128 result = sn("span", FLOAT_CLASS_NAME, data);
2128 result = sn("span", FLOAT_CLASS_NAME, data);
2129 } else if (type & OBJECT) {
2129 } else if (type & OBJECT) {
2130 if (type & SPECIAL_OBJECT) {
2130 if (type & SPECIAL_OBJECT) {
2131 isSpecial = true;
2131 isSpecial = true;
2132 }
2132 }
2133 childs = [];
2133 childs = [];
2134
2134
2135 aTarget = options.hyperlinks.target;
2135 aTarget = options.hyperlinks.target;
2136 hyperlinkKeys = options.hyperlinks.keys;
2136 hyperlinkKeys = options.hyperlinks.keys;
2137
2137
2138 // Is Hyperlink Key
2138 // Is Hyperlink Key
2139 hyperlinksEnabled =
2139 hyperlinksEnabled =
2140 options.hyperlinks.enable &&
2140 options.hyperlinks.enable &&
2141 hyperlinkKeys &&
2141 hyperlinkKeys &&
2142 hyperlinkKeys.length > 0;
2142 hyperlinkKeys.length > 0;
2143
2143
2144 for (key in data) {
2144 for (key in data) {
2145 isEmpty = false;
2145 isEmpty = false;
2146
2146
2147 value = data[key];
2147 value = data[key];
2148
2148
2149 valNode = _format(value, options, key);
2149 valNode = _format(value, options, key);
2150 keyNode = sn("th", OBJ_KEY_CLASS_NAME, key);
2150 keyNode = sn("th", OBJ_KEY_CLASS_NAME, key);
2151
2151
2152 if( hyperlinksEnabled &&
2152 if( hyperlinksEnabled &&
2153 typeof(value) === 'string' &&
2153 typeof(value) === 'string' &&
2154 indexOf.call(hyperlinkKeys, key) >= 0){
2154 indexOf.call(hyperlinkKeys, key) >= 0){
2155
2155
2156 valNode = scn("td", OBJ_VAL_CLASS_NAME, linkNode(valNode, value, aTarget));
2156 valNode = scn("td", OBJ_VAL_CLASS_NAME, linkNode(valNode, value, aTarget));
2157 } else {
2157 } else {
2158 valNode = scn("td", OBJ_VAL_CLASS_NAME, valNode);
2158 valNode = scn("td", OBJ_VAL_CLASS_NAME, valNode);
2159 }
2159 }
2160
2160
2161 tr = document.createElement("tr");
2161 tr = document.createElement("tr");
2162 tr.appendChild(keyNode);
2162 tr.appendChild(keyNode);
2163 tr.appendChild(valNode);
2163 tr.appendChild(valNode);
2164
2164
2165 childs.push(tr);
2165 childs.push(tr);
2166 }
2166 }
2167
2167
2168 if (isSpecial) {
2168 if (isSpecial) {
2169 result = sn('span', STRING_CLASS_NAME, data.toString())
2169 result = sn('span', STRING_CLASS_NAME, data.toString())
2170 } else if (isEmpty) {
2170 } else if (isEmpty) {
2171 result = sn("span", OBJ_EMPTY_CLASS_NAME, "(Empty Object)");
2171 result = sn("span", OBJ_EMPTY_CLASS_NAME, "(Empty Object)");
2172 } else {
2172 } else {
2173 result = scn("table", OBJECT_CLASS_NAME, scn("tbody", '', childs));
2173 result = scn("table", OBJECT_CLASS_NAME, scn("tbody", '', childs));
2174 }
2174 }
2175 } else if (type === FUNCTION) {
2175 } else if (type === FUNCTION) {
2176 result = sn("span", FUNCTION_CLASS_NAME, data);
2176 result = sn("span", FUNCTION_CLASS_NAME, data);
2177 } else if (type === ARRAY) {
2177 } else if (type === ARRAY) {
2178 if (data.length > 0) {
2178 if (data.length > 0) {
2179 childs = [];
2179 childs = [];
2180 var showArrayIndices = options.showArrayIndex;
2180 var showArrayIndices = options.showArrayIndex;
2181
2181
2182 aTarget = options.hyperlinks.target;
2182 aTarget = options.hyperlinks.target;
2183 hyperlinkKeys = options.hyperlinks.keys;
2183 hyperlinkKeys = options.hyperlinks.keys;
2184
2184
2185 // Hyperlink of arrays?
2185 // Hyperlink of arrays?
2186 hyperlinksEnabled = parentKey && options.hyperlinks.enable &&
2186 hyperlinksEnabled = parentKey && options.hyperlinks.enable &&
2187 hyperlinkKeys &&
2187 hyperlinkKeys &&
2188 hyperlinkKeys.length > 0 &&
2188 hyperlinkKeys.length > 0 &&
2189 indexOf.call(hyperlinkKeys, parentKey) >= 0;
2189 indexOf.call(hyperlinkKeys, parentKey) >= 0;
2190
2190
2191 for (key = 0, len = data.length; key < len; key += 1) {
2191 for (key = 0, len = data.length; key < len; key += 1) {
2192
2192
2193 keyNode = sn("th", ARRAY_KEY_CLASS_NAME, key);
2193 keyNode = sn("th", ARRAY_KEY_CLASS_NAME, key);
2194 value = data[key];
2194 value = data[key];
2195
2195
2196 if (hyperlinksEnabled && typeof(value) === "string") {
2196 if (hyperlinksEnabled && typeof(value) === "string") {
2197 valNode = _format(value, options, key);
2197 valNode = _format(value, options, key);
2198 valNode = scn("td", ARRAY_VAL_CLASS_NAME,
2198 valNode = scn("td", ARRAY_VAL_CLASS_NAME,
2199 linkNode(valNode, value, aTarget));
2199 linkNode(valNode, value, aTarget));
2200 } else {
2200 } else {
2201 valNode = scn("td", ARRAY_VAL_CLASS_NAME,
2201 valNode = scn("td", ARRAY_VAL_CLASS_NAME,
2202 _format(value, options, key));
2202 _format(value, options, key));
2203 }
2203 }
2204
2204
2205 tr = document.createElement("tr");
2205 tr = document.createElement("tr");
2206
2206
2207 if (showArrayIndices) {
2207 if (showArrayIndices) {
2208 tr.appendChild(keyNode);
2208 tr.appendChild(keyNode);
2209 }
2209 }
2210 tr.appendChild(valNode);
2210 tr.appendChild(valNode);
2211
2211
2212 childs.push(tr);
2212 childs.push(tr);
2213 }
2213 }
2214
2214
2215 result = scn("table", ARRAY_CLASS_NAME, scn("tbody", '', childs));
2215 result = scn("table", ARRAY_CLASS_NAME, scn("tbody", '', childs));
2216 } else {
2216 } else {
2217 result = sn("span", ARRAY_EMPTY_CLASS_NAME, "(Empty List)");
2217 result = sn("span", ARRAY_EMPTY_CLASS_NAME, "(Empty List)");
2218 }
2218 }
2219 } else {
2219 } else {
2220 result = sn("span", UNKNOWN_CLASS_NAME, data);
2220 result = sn("span", UNKNOWN_CLASS_NAME, data);
2221 }
2221 }
2222
2222
2223 return result;
2223 return result;
2224 }
2224 }
2225
2225
2226 function format(data, options) {
2226 function format(data, options) {
2227 options = validateOptions(options || {});
2227 options = validateOptions(options || {});
2228
2228
2229 var result;
2229 var result;
2230
2230
2231 result = _format(data, options);
2231 result = _format(data, options);
2232 result.className = result.className + " " + prefixer("root");
2232 result.className = result.className + " " + prefixer("root");
2233
2233
2234 return result;
2234 return result;
2235 }
2235 }
2236
2236
2237 function validateOptions(options){
2237 function validateOptions(options){
2238 options = validateArrayIndexOption(options);
2238 options = validateArrayIndexOption(options);
2239 options = validateHyperlinkOptions(options);
2239 options = validateHyperlinkOptions(options);
2240 options = validateBoolOptions(options);
2240 options = validateBoolOptions(options);
2241
2241
2242 // Add any more option validators here
2242 // Add any more option validators here
2243
2243
2244 return options;
2244 return options;
2245 }
2245 }
2246
2246
2247
2247
2248 function validateArrayIndexOption(options) {
2248 function validateArrayIndexOption(options) {
2249 if(options.showArrayIndex === undefined){
2249 if(options.showArrayIndex === undefined){
2250 options.showArrayIndex = true;
2250 options.showArrayIndex = true;
2251 } else {
2251 } else {
2252 // Force to boolean just in case
2252 // Force to boolean just in case
2253 options.showArrayIndex = options.showArrayIndex ? true: false;
2253 options.showArrayIndex = options.showArrayIndex ? true: false;
2254 }
2254 }
2255
2255
2256 return options;
2256 return options;
2257 }
2257 }
2258
2258
2259 function validateHyperlinkOptions(options){
2259 function validateHyperlinkOptions(options){
2260 var hyperlinks = {
2260 var hyperlinks = {
2261 enable : false,
2261 enable : false,
2262 keys : null,
2262 keys : null,
2263 target : ''
2263 target : ''
2264 };
2264 };
2265
2265
2266 if(options.hyperlinks && options.hyperlinks.enable) {
2266 if(options.hyperlinks && options.hyperlinks.enable) {
2267 hyperlinks.enable = true;
2267 hyperlinks.enable = true;
2268
2268
2269 hyperlinks.keys = isArray(options.hyperlinks.keys) ? options.hyperlinks.keys : [];
2269 hyperlinks.keys = isArray(options.hyperlinks.keys) ? options.hyperlinks.keys : [];
2270
2270
2271 if(options.hyperlinks.target) {
2271 if(options.hyperlinks.target) {
2272 hyperlinks.target = '' + options.hyperlinks.target;
2272 hyperlinks.target = '' + options.hyperlinks.target;
2273 } else {
2273 } else {
2274 hyperlinks.target = '_blank';
2274 hyperlinks.target = '_blank';
2275 }
2275 }
2276 }
2276 }
2277
2277
2278 options.hyperlinks = hyperlinks;
2278 options.hyperlinks = hyperlinks;
2279
2279
2280 return options;
2280 return options;
2281 }
2281 }
2282
2282
2283 function validateBoolOptions(options){
2283 function validateBoolOptions(options){
2284 if(!options.bool){
2284 if(!options.bool){
2285 options.bool = {
2285 options.bool = {
2286 text: {
2286 text: {
2287 true : "true",
2287 true : "true",
2288 false : "false"
2288 false : "false"
2289 },
2289 },
2290 img : {
2290 img : {
2291 true: "",
2291 true: "",
2292 false: ""
2292 false: ""
2293 },
2293 },
2294 showImage : false,
2294 showImage : false,
2295 showText : true
2295 showText : true
2296 };
2296 };
2297 } else {
2297 } else {
2298 var boolOptions = options.bool;
2298 var boolOptions = options.bool;
2299
2299
2300 // Show text if no option
2300 // Show text if no option
2301 if(!boolOptions.showText && !boolOptions.showImage){
2301 if(!boolOptions.showText && !boolOptions.showImage){
2302 boolOptions.showImage = false;
2302 boolOptions.showImage = false;
2303 boolOptions.showText = true;
2303 boolOptions.showText = true;
2304 }
2304 }
2305
2305
2306 if(boolOptions.showText){
2306 if(boolOptions.showText){
2307 if(!boolOptions.text){
2307 if(!boolOptions.text){
2308 boolOptions.text = {
2308 boolOptions.text = {
2309 true : "true",
2309 true : "true",
2310 false : "false"
2310 false : "false"
2311 };
2311 };
2312 } else {
2312 } else {
2313 var t = boolOptions.text.true, f = boolOptions.text.false;
2313 var t = boolOptions.text.true, f = boolOptions.text.false;
2314
2314
2315 if(getType(t) != STRING || t === ''){
2315 if(getType(t) != STRING || t === ''){
2316 boolOptions.text.true = 'true';
2316 boolOptions.text.true = 'true';
2317 }
2317 }
2318
2318
2319 if(getType(f) != STRING || f === ''){
2319 if(getType(f) != STRING || f === ''){
2320 boolOptions.text.false = 'false';
2320 boolOptions.text.false = 'false';
2321 }
2321 }
2322 }
2322 }
2323 }
2323 }
2324
2324
2325 if(boolOptions.showImage){
2325 if(boolOptions.showImage){
2326 if(!boolOptions.img.true && !boolOptions.img.false){
2326 if(!boolOptions.img.true && !boolOptions.img.false){
2327 boolOptions.showImage = false;
2327 boolOptions.showImage = false;
2328 }
2328 }
2329 }
2329 }
2330 }
2330 }
2331
2331
2332 return options;
2332 return options;
2333 }
2333 }
2334
2334
2335 return {
2335 return {
2336 format: format
2336 format: format
2337 };
2337 };
2338 }));
2338 }));
2339
2339
2340 ;//! moment.js
2340 ;//! moment.js
2341 //! version : 2.8.4
2341 //! version : 2.8.4
2342 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
2342 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
2343 //! license : MIT
2343 //! license : MIT
2344 //! momentjs.com
2344 //! momentjs.com
2345 (function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return zb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){tb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qc[a]||(e(b),qc[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=tb.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ib.length>0)for(c in Ib)d=Ib[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function q(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function r(a,b){var c;return b=K(b,a),a.isBefore(b)?c=q(a,b):(c=q(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function s(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=tb.duration(c,d),t(this,e,a),this}}function t(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&nb(a,"Date",mb(a,"Date")+f*c),g&&lb(a,mb(a,"Month")+g*c),d&&tb.updateOffset(a,f||g)}function u(a){return"[object Array]"===Object.prototype.toString.call(a)}function v(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function w(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jc[a]||kc[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}tb[b]=function(e,f){var g,h,i=tb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=tb().utc().set(d,a);return i.call(tb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return hb(tb([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Bb]<0||a._a[Bb]>11?Bb:a._a[Cb]<1||a._a[Cb]>B(a._a[Ab],a._a[Bb])?Cb:a._a[Db]<0||a._a[Db]>24||24===a._a[Db]&&(0!==a._a[Eb]||0!==a._a[Fb]||0!==a._a[Gb])?Db:a._a[Eb]<0||a._a[Eb]>59?Eb:a._a[Fb]<0||a._a[Fb]>59?Fb:a._a[Gb]<0||a._a[Gb]>999?Gb:-1,a._pf._overflowDayOfYear&&(Ab>b||b>Cb)&&(b=Cb),a._pf.overflow=b)}function G(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f<a.length;){for(e=H(a[f]).split("-"),b=e.length,c=H(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Hb[a]&&Jb)try{b=tb.locale(),require("./locale/"+a),tb.locale(b)}catch(c){}return Hb[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(tb.isMoment(a)||v(a)?+a:+tb(a))-+c,c._d.setTime(+c._d+d),tb.updateOffset(c,!1),c):tb(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Nb);for(b=0,c=d.length;c>b;b++)d[b]=pc[d[b]]?pc[d[b]]:L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lc[b]||(lc[b]=M(b)),lc[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Ob.lastIndex=0;d>=0&&Ob.test(a);)a=a.replace(Ob,c),Ob.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Zb;case"DDDD":return _b;case"YYYY":case"GGGG":case"gggg":return d?ac:Rb;case"Y":case"G":case"g":return cc;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bc:Sb;case"S":if(d)return Zb;case"SS":if(d)return $b;case"SSS":if(d)return _b;case"DDD":return Qb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ub;case"a":case"A":return b._locale._meridiemParse;case"x":return Xb;case"X":return Yb;case"Z":case"ZZ":return Vb;case"T":return Wb;case"SSSS":return Tb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$b:Pb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Vb)||[],c=b[b.length-1]||[],d=(c+"").match(hc)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Bb]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Bb]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Bb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Cb]=A(b));break;case"Do":null!=b&&(e[Cb]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Ab]=tb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ab]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Db]=A(b);break;case"m":case"mm":e[Eb]=A(b);break;case"s":case"ss":e[Fb]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Gb]=A(1e3*("0."+b));break;case"x":c._d=new Date(A(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=tb.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ab],hb(tb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ab],hb(tb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ib(d,e,f,h,g),a._a[Ab]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Cb]&&null==a._a[Bb]&&S(a),a._dayOfYear&&(f=b(a._a[Ab],e[Ab]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=db(f,0,a._dayOfYear),a._a[Bb]=d.getUTCMonth(),a._a[Cb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Db]&&0===a._a[Eb]&&0===a._a[Fb]&&0===a._a[Gb]&&(a._nextDay=!0,a._a[Db]=0),a._d=(a._useUTC?db:cb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Db]=24)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){if(b._f===tb.ISO_8601)return void $(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=O(b._f,b._locale).match(Nb)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(P(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),pc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),R(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Db]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Db]<12&&(b._a[Db]+=12),b._isPm===!1&&12===b._a[Db]&&(b._a[Db]=0),T(b),F(b)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],W(b),G(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=dc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fc.length;c>b;b++)if(fc[b][1].exec(d)){a._f=fc[b][0]+(e[6]||" ");break}for(b=0,c=gc.length;c>b;b++)if(gc[b][1].exec(d)){a._f+=gc[b][0];break}d.match(Vb)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,tb.createFromInputFallback(a))}function ab(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function bb(b){var c,d=b._i;d===a?b._d=new Date:v(d)?b._d=new Date(+d):null!==(c=Kb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?_(b):u(d)?(b._a=ab(d.slice(0),function(a){return parseInt(a,10)}),T(b)):"object"==typeof d?U(b):"number"==typeof d?b._d=new Date(d):tb.createFromInputFallback(b)}function cb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function db(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function eb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function gb(a,b,c){var d=tb.duration(a).abs(),e=yb(d.as("s")),f=yb(d.as("m")),g=yb(d.as("h")),h=yb(d.as("d")),i=yb(d.as("M")),j=yb(d.as("y")),k=e<mc.s&&["s",e]||1===f&&["m"]||f<mc.m&&["mm",f]||1===g&&["h"]||g<mc.h&&["hh",g]||1===h&&["d"]||h<mc.d&&["dd",h]||1===i&&["M"]||i<mc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,fb.apply({},k)}function hb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=tb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ib(a,b,c,d,e){var f,g,h=db(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function jb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||tb.localeData(b._l),null===d||e===a&&""===d?tb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),tb.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):bb(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function kb(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return tb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function lb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),B(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function mb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function nb(a,b,c){return"Month"===b?lb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function ob(a,b){return function(c){return null!=c?(nb(this,a,c),tb.updateOffset(this,b),this):mb(this,a)}}function pb(a){return 400*a/146097}function qb(a){return 146097*a/400}function rb(a){tb.duration.fn[a]=function(){return this._data[a]}}function sb(a){"undefined"==typeof ender&&(ub=xb.moment,xb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",tb):tb)}for(var tb,ub,vb,wb="2.8.4",xb="undefined"!=typeof global?global:this,yb=Math.round,zb=Object.prototype.hasOwnProperty,Ab=0,Bb=1,Cb=2,Db=3,Eb=4,Fb=5,Gb=6,Hb={},Ib=[],Jb="undefined"!=typeof module&&module&&module.exports,Kb=/^\/?Date\((\-?\d+)/i,Lb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Mb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Nb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ob=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pb=/\d\d?/,Qb=/\d{1,3}/,Rb=/\d{1,4}/,Sb=/[+\-]?\d{1,6}/,Tb=/\d+/,Ub=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Vb=/Z|[\+\-]\d\d:?\d\d/gi,Wb=/T/i,Xb=/[\+\-]?\d+/,Yb=/[\+\-]?\d+(\.\d{1,3})?/,Zb=/\d/,$b=/\d\d/,_b=/\d{3}/,ac=/\d{4}/,bc=/[+-]?\d{6}/,cc=/[+-]?\d+/,dc=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ec="YYYY-MM-DDTHH:mm:ssZ",fc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],hc=/([\+\-]|\d\d)/gi,ic=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),jc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},kc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},lc={},mc={s:45,m:45,h:22,d:26,M:11},nc="DDD w W M D d".split(" "),oc="M D H h m s w W".split(" "),pc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return p(this.year()%100,2)},YYYY:function(){return p(this.year(),4)},YYYYY:function(){return p(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qc={},rc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nc.length;)vb=nc.pop(),pc[vb+"o"]=i(pc[vb],vb);for(;oc.length;)vb=oc.pop(),pc[vb+vb]=h(pc[vb],2);pc.DDDD=h(pc.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=tb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=tb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return hb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),tb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),jb(g)},tb.suppressDeprecationWarnings=!1,tb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),tb.min=function(){var a=[].slice.call(arguments,0);return kb("isBefore",a)},tb.max=function(){var a=[].slice.call(arguments,0);return kb("isAfter",a)},tb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),jb(g).utc()},tb.unix=function(a){return tb(1e3*a)},tb.duration=function(a,b){var d,e,f,g,h=a,i=null;return tb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Lb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Cb])*d,h:A(i[Db])*d,m:A(i[Eb])*d,s:A(i[Fb])*d,ms:A(i[Gb])*d}):(i=Mb.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(tb(h.from),tb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),tb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},tb.version=wb,tb.defaultFormat=ec,tb.ISO_8601=function(){},tb.momentProperties=Ib,tb.updateOffset=function(){},tb.relativeTimeThreshold=function(b,c){return mc[b]===a?!1:c===a?mc[b]:(mc[b]=c,!0)},tb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return tb.locale(a,b)}),tb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?tb.defineLocale(a,b):tb.localeData(a),c&&(tb.duration._locale=tb._locale=c)),tb._locale._abbr},tb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Hb[a]||(Hb[a]=new j),Hb[a].set(b),tb.locale(a),Hb[a]):(delete Hb[a],null)},tb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return tb.localeData(a)}),tb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return tb._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},tb.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},tb.isDuration=function(a){return a instanceof l};for(vb=rc.length-1;vb>=0;--vb)z(rc[vb]);tb.normalizeUnits=function(a){return x(a)},tb.invalid=function(a){var b=tb.utc(0/0);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},tb.parseZone=function(){return tb.apply(null,arguments).parseZone()},tb.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(tb.fn=k.prototype,{clone:function(){return tb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=tb(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():N(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):N(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return G(this)},isDSTShifted:function(){return this._a?this.isValid()&&w(this._a,(this._isUTC?tb.utc(this._a):tb(this._a)).toArray())>0:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||tb.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-tb(this).startOf("month")-(g-tb(g).startOf("month")),f-=6e4*(this.zone()-tb(this).startOf("month").zone()-(g.zone()-tb(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return tb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(tb(),a)},calendar:function(a){var b=a||tb(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,tb(b)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=eb(a,this.localeData()),this.add(a-b,"d")):b},month:ob("Month",!0),startOf:function(a){switch(a=x(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=x(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this>+a):(c=tb.isMoment(a)?+a:+tb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+a>+this):(c=tb.isMoment(a)?+a:+tb(a),+this.clone().endOf(b)<c)},isSame:function(a,b){var c;return b=x(b||"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this===+a):(c=+tb(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,tb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,tb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?tb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=yb((tb(this).startOf("day")-tb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=hb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=hb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=hb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=tb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),tb.fn.millisecond=tb.fn.milliseconds=ob("Milliseconds",!1),tb.fn.second=tb.fn.seconds=ob("Seconds",!1),tb.fn.minute=tb.fn.minutes=ob("Minutes",!1),tb.fn.hour=tb.fn.hours=ob("Hours",!0),tb.fn.date=ob("Date",!0),tb.fn.dates=f("dates accessor is deprecated. Use date instead.",ob("Date",!0)),tb.fn.year=ob("FullYear",!0),tb.fn.years=f("years accessor is deprecated. Use year instead.",ob("FullYear",!0)),tb.fn.days=tb.fn.day,tb.fn.months=tb.fn.month,tb.fn.weeks=tb.fn.week,tb.fn.isoWeeks=tb.fn.isoWeek,tb.fn.quarters=tb.fn.quarter,tb.fn.toJSON=tb.fn.toISOString,m(tb.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pb(e)),e-=o(qb(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=gb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=tb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=tb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;
2345 (function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return zb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){tb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qc[a]||(e(b),qc[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=tb.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ib.length>0)for(c in Ib)d=Ib[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function q(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function r(a,b){var c;return b=K(b,a),a.isBefore(b)?c=q(a,b):(c=q(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function s(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=tb.duration(c,d),t(this,e,a),this}}function t(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&nb(a,"Date",mb(a,"Date")+f*c),g&&lb(a,mb(a,"Month")+g*c),d&&tb.updateOffset(a,f||g)}function u(a){return"[object Array]"===Object.prototype.toString.call(a)}function v(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function w(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jc[a]||kc[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}tb[b]=function(e,f){var g,h,i=tb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=tb().utc().set(d,a);return i.call(tb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return hb(tb([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Bb]<0||a._a[Bb]>11?Bb:a._a[Cb]<1||a._a[Cb]>B(a._a[Ab],a._a[Bb])?Cb:a._a[Db]<0||a._a[Db]>24||24===a._a[Db]&&(0!==a._a[Eb]||0!==a._a[Fb]||0!==a._a[Gb])?Db:a._a[Eb]<0||a._a[Eb]>59?Eb:a._a[Fb]<0||a._a[Fb]>59?Fb:a._a[Gb]<0||a._a[Gb]>999?Gb:-1,a._pf._overflowDayOfYear&&(Ab>b||b>Cb)&&(b=Cb),a._pf.overflow=b)}function G(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f<a.length;){for(e=H(a[f]).split("-"),b=e.length,c=H(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Hb[a]&&Jb)try{b=tb.locale(),require("./locale/"+a),tb.locale(b)}catch(c){}return Hb[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(tb.isMoment(a)||v(a)?+a:+tb(a))-+c,c._d.setTime(+c._d+d),tb.updateOffset(c,!1),c):tb(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Nb);for(b=0,c=d.length;c>b;b++)d[b]=pc[d[b]]?pc[d[b]]:L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lc[b]||(lc[b]=M(b)),lc[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Ob.lastIndex=0;d>=0&&Ob.test(a);)a=a.replace(Ob,c),Ob.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Zb;case"DDDD":return _b;case"YYYY":case"GGGG":case"gggg":return d?ac:Rb;case"Y":case"G":case"g":return cc;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bc:Sb;case"S":if(d)return Zb;case"SS":if(d)return $b;case"SSS":if(d)return _b;case"DDD":return Qb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ub;case"a":case"A":return b._locale._meridiemParse;case"x":return Xb;case"X":return Yb;case"Z":case"ZZ":return Vb;case"T":return Wb;case"SSSS":return Tb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$b:Pb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Vb)||[],c=b[b.length-1]||[],d=(c+"").match(hc)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Bb]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Bb]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Bb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Cb]=A(b));break;case"Do":null!=b&&(e[Cb]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Ab]=tb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ab]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Db]=A(b);break;case"m":case"mm":e[Eb]=A(b);break;case"s":case"ss":e[Fb]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Gb]=A(1e3*("0."+b));break;case"x":c._d=new Date(A(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=tb.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ab],hb(tb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ab],hb(tb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ib(d,e,f,h,g),a._a[Ab]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Cb]&&null==a._a[Bb]&&S(a),a._dayOfYear&&(f=b(a._a[Ab],e[Ab]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=db(f,0,a._dayOfYear),a._a[Bb]=d.getUTCMonth(),a._a[Cb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Db]&&0===a._a[Eb]&&0===a._a[Fb]&&0===a._a[Gb]&&(a._nextDay=!0,a._a[Db]=0),a._d=(a._useUTC?db:cb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Db]=24)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){if(b._f===tb.ISO_8601)return void $(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=O(b._f,b._locale).match(Nb)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(P(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),pc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),R(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Db]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Db]<12&&(b._a[Db]+=12),b._isPm===!1&&12===b._a[Db]&&(b._a[Db]=0),T(b),F(b)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],W(b),G(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=dc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fc.length;c>b;b++)if(fc[b][1].exec(d)){a._f=fc[b][0]+(e[6]||" ");break}for(b=0,c=gc.length;c>b;b++)if(gc[b][1].exec(d)){a._f+=gc[b][0];break}d.match(Vb)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,tb.createFromInputFallback(a))}function ab(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function bb(b){var c,d=b._i;d===a?b._d=new Date:v(d)?b._d=new Date(+d):null!==(c=Kb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?_(b):u(d)?(b._a=ab(d.slice(0),function(a){return parseInt(a,10)}),T(b)):"object"==typeof d?U(b):"number"==typeof d?b._d=new Date(d):tb.createFromInputFallback(b)}function cb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function db(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function eb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function gb(a,b,c){var d=tb.duration(a).abs(),e=yb(d.as("s")),f=yb(d.as("m")),g=yb(d.as("h")),h=yb(d.as("d")),i=yb(d.as("M")),j=yb(d.as("y")),k=e<mc.s&&["s",e]||1===f&&["m"]||f<mc.m&&["mm",f]||1===g&&["h"]||g<mc.h&&["hh",g]||1===h&&["d"]||h<mc.d&&["dd",h]||1===i&&["M"]||i<mc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,fb.apply({},k)}function hb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=tb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ib(a,b,c,d,e){var f,g,h=db(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function jb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||tb.localeData(b._l),null===d||e===a&&""===d?tb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),tb.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):bb(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function kb(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return tb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function lb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),B(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function mb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function nb(a,b,c){return"Month"===b?lb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function ob(a,b){return function(c){return null!=c?(nb(this,a,c),tb.updateOffset(this,b),this):mb(this,a)}}function pb(a){return 400*a/146097}function qb(a){return 146097*a/400}function rb(a){tb.duration.fn[a]=function(){return this._data[a]}}function sb(a){"undefined"==typeof ender&&(ub=xb.moment,xb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",tb):tb)}for(var tb,ub,vb,wb="2.8.4",xb="undefined"!=typeof global?global:this,yb=Math.round,zb=Object.prototype.hasOwnProperty,Ab=0,Bb=1,Cb=2,Db=3,Eb=4,Fb=5,Gb=6,Hb={},Ib=[],Jb="undefined"!=typeof module&&module&&module.exports,Kb=/^\/?Date\((\-?\d+)/i,Lb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Mb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Nb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ob=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pb=/\d\d?/,Qb=/\d{1,3}/,Rb=/\d{1,4}/,Sb=/[+\-]?\d{1,6}/,Tb=/\d+/,Ub=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Vb=/Z|[\+\-]\d\d:?\d\d/gi,Wb=/T/i,Xb=/[\+\-]?\d+/,Yb=/[\+\-]?\d+(\.\d{1,3})?/,Zb=/\d/,$b=/\d\d/,_b=/\d{3}/,ac=/\d{4}/,bc=/[+-]?\d{6}/,cc=/[+-]?\d+/,dc=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ec="YYYY-MM-DDTHH:mm:ssZ",fc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],hc=/([\+\-]|\d\d)/gi,ic=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),jc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},kc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},lc={},mc={s:45,m:45,h:22,d:26,M:11},nc="DDD w W M D d".split(" "),oc="M D H h m s w W".split(" "),pc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return p(this.year()%100,2)},YYYY:function(){return p(this.year(),4)},YYYYY:function(){return p(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qc={},rc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nc.length;)vb=nc.pop(),pc[vb+"o"]=i(pc[vb],vb);for(;oc.length;)vb=oc.pop(),pc[vb+vb]=h(pc[vb],2);pc.DDDD=h(pc.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=tb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=tb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return hb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),tb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),jb(g)},tb.suppressDeprecationWarnings=!1,tb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),tb.min=function(){var a=[].slice.call(arguments,0);return kb("isBefore",a)},tb.max=function(){var a=[].slice.call(arguments,0);return kb("isAfter",a)},tb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),jb(g).utc()},tb.unix=function(a){return tb(1e3*a)},tb.duration=function(a,b){var d,e,f,g,h=a,i=null;return tb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Lb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Cb])*d,h:A(i[Db])*d,m:A(i[Eb])*d,s:A(i[Fb])*d,ms:A(i[Gb])*d}):(i=Mb.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(tb(h.from),tb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),tb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},tb.version=wb,tb.defaultFormat=ec,tb.ISO_8601=function(){},tb.momentProperties=Ib,tb.updateOffset=function(){},tb.relativeTimeThreshold=function(b,c){return mc[b]===a?!1:c===a?mc[b]:(mc[b]=c,!0)},tb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return tb.locale(a,b)}),tb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?tb.defineLocale(a,b):tb.localeData(a),c&&(tb.duration._locale=tb._locale=c)),tb._locale._abbr},tb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Hb[a]||(Hb[a]=new j),Hb[a].set(b),tb.locale(a),Hb[a]):(delete Hb[a],null)},tb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return tb.localeData(a)}),tb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return tb._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},tb.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},tb.isDuration=function(a){return a instanceof l};for(vb=rc.length-1;vb>=0;--vb)z(rc[vb]);tb.normalizeUnits=function(a){return x(a)},tb.invalid=function(a){var b=tb.utc(0/0);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},tb.parseZone=function(){return tb.apply(null,arguments).parseZone()},tb.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(tb.fn=k.prototype,{clone:function(){return tb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=tb(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():N(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):N(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return G(this)},isDSTShifted:function(){return this._a?this.isValid()&&w(this._a,(this._isUTC?tb.utc(this._a):tb(this._a)).toArray())>0:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||tb.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-tb(this).startOf("month")-(g-tb(g).startOf("month")),f-=6e4*(this.zone()-tb(this).startOf("month").zone()-(g.zone()-tb(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return tb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(tb(),a)},calendar:function(a){var b=a||tb(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,tb(b)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=eb(a,this.localeData()),this.add(a-b,"d")):b},month:ob("Month",!0),startOf:function(a){switch(a=x(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=x(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this>+a):(c=tb.isMoment(a)?+a:+tb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+a>+this):(c=tb.isMoment(a)?+a:+tb(a),+this.clone().endOf(b)<c)},isSame:function(a,b){var c;return b=x(b||"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this===+a):(c=+tb(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,tb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,tb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?tb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=yb((tb(this).startOf("day")-tb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=hb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=hb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=hb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=tb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),tb.fn.millisecond=tb.fn.milliseconds=ob("Milliseconds",!1),tb.fn.second=tb.fn.seconds=ob("Seconds",!1),tb.fn.minute=tb.fn.minutes=ob("Minutes",!1),tb.fn.hour=tb.fn.hours=ob("Hours",!0),tb.fn.date=ob("Date",!0),tb.fn.dates=f("dates accessor is deprecated. Use date instead.",ob("Date",!0)),tb.fn.year=ob("FullYear",!0),tb.fn.years=f("years accessor is deprecated. Use year instead.",ob("FullYear",!0)),tb.fn.days=tb.fn.day,tb.fn.months=tb.fn.month,tb.fn.weeks=tb.fn.week,tb.fn.isoWeeks=tb.fn.isoWeek,tb.fn.quarters=tb.fn.quarter,tb.fn.toJSON=tb.fn.toISOString,m(tb.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pb(e)),e-=o(qb(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=gb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=tb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=tb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;
2346 case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:tb.fn.lang,locale:tb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),tb.duration.fn.toString=tb.duration.fn.toISOString;for(vb in ic)c(ic,vb)&&rb(vb.toLowerCase());tb.duration.fn.asMilliseconds=function(){return this.as("ms")},tb.duration.fn.asSeconds=function(){return this.as("s")},tb.duration.fn.asMinutes=function(){return this.as("m")},tb.duration.fn.asHours=function(){return this.as("h")},tb.duration.fn.asDays=function(){return this.as("d")},tb.duration.fn.asWeeks=function(){return this.as("weeks")},tb.duration.fn.asMonths=function(){return this.as("M")},tb.duration.fn.asYears=function(){return this.as("y")},tb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Jb?module.exports=tb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xb.moment=ub),tb}),sb(!0)):sb()}).call(this);
2346 case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:tb.fn.lang,locale:tb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),tb.duration.fn.toString=tb.duration.fn.toISOString;for(vb in ic)c(ic,vb)&&rb(vb.toLowerCase());tb.duration.fn.asMilliseconds=function(){return this.as("ms")},tb.duration.fn.asSeconds=function(){return this.as("s")},tb.duration.fn.asMinutes=function(){return this.as("m")},tb.duration.fn.asHours=function(){return this.as("h")},tb.duration.fn.asDays=function(){return this.as("d")},tb.duration.fn.asWeeks=function(){return this.as("weeks")},tb.duration.fn.asMonths=function(){return this.as("M")},tb.duration.fn.asYears=function(){return this.as("y")},tb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Jb?module.exports=tb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xb.moment=ub),tb}),sb(!0)):sb()}).call(this);
2347 ;!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n){var t=n.__transition__;t&&++t.active}function Z(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=V;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=X),a?t?u:r:t?y:i}function V(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function X(n,t){var e=V(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function $(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function B(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function W(){return ta.event.changedTouches[0].identifier}function J(){return ta.event.target}function G(){return oa}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?Da:Math.acos(n)}function tt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Ja,r=pt(r)*Ga,i=pt(i)*Ka,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,255&n>>8,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=vt((.2126729*n+.7151522*t+.072175*e)/Ga),i=vt((.0193339*n+.119192*t+.9503041*e)/Ka);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Nt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ct(t,e,n,r)}}function Ct(n,t,e,r){function u(){var n,t=c.status;if(!t&&qt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(zt(r))}function zt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Lt(){var n=Tt(),t=Rt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(Lt,t)),uc=0):(uc=1,ac(Lt))}function Tt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Rt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Dt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Pt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Ut(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:At;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||jt;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function jt(n){return n+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=Ft;var r=new Ft;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ot(n);return c.floor=c,c.round=Ot(r),c.ceil=Ot(u),c.offset=Ot(i),c.range=a,n}function Ot(n){return function(t,e){try{hc=Ft;var r=new Ft;return r._=t,n(r,e)._}finally{hc=Date}}}function Yt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==Ft,o=new(i?Ft:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=Ft;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=Ft;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ce;var M=ta.map(),x=Zt(v),b=Vt(v),_=Zt(d),w=Vt(d),S=Zt(m),k=Vt(m),E=Zt(y),A=Vt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+fc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:oe,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:ne,e:ne,H:ee,I:ee,j:te,L:ie,m:Qt,M:re,p:s,S:ue,U:$t,w:Xt,W:Bt,x:c,X:l,y:Jt,Y:Wt,Z:Gt,"%":ae};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Zt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Vt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Kt(+r[0]),e+r[0].length):-1}function Gt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kt(n){return n+(n>68?1900:2e3)}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ie(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function oe(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function ae(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ce(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function le(){}function se(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function fe(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function he(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)he(n[e],t,1);t.polygonEnd()}function pe(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function ve(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function de(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function me(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ye(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Me(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function be(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function _e(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function we(n,t){n*=Fa;var e=Math.cos(t*=Fa);Se(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Se(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function ke(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),Se(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,Se(t,e,r)}}function Ee(){Dc.point=we}function Ae(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),Se(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),Se(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=Ee,Dc.point=we}}function Ne(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ce(){return!0}function ze(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_e(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Le(e,n,null,!0),l=new Le(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Le(r,n,null,!1),l=new Le(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),qe(i),qe(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qe(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Le(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Te(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Re))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=He(m,p);g.length?(b||(i.polygonStart(),b=!0),ze(g,Pe,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=De(),x=t(M),b=!1;return y}}function Re(n){return n.length>1}function De(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pe(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Ue(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=je(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function je(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Fe(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function He(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=me(ve(f),ve(n));xe(E);var A=me(u,E);xe(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function Oe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(_e(e,g)||_e(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&_e(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=ve(n),u=ve(t),o=[1,0,0],a=me(r,u),c=de(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=me(o,a),p=Me(o,f),v=Me(a,h);ye(p,v);var d=g,m=de(p,d),y=de(d,d),M=m*m-y*(de(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=Me(d,(-m-x)/y);if(ye(b,p),b=be(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=Me(d,(-m+x)/y);return ye(z,p),[b,be(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=pr(n,6*Fa);return Te(t,e,c,o?[0,-n]:[-Da,n-Da])}function Ye(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=De(),N=Ye(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ze(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ze(n){var t=0,e=Da/3,r=or(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ve(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Xe(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function $e(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function Be(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=We(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=We(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function We(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Je(n,t){Ec+=n,Ac+=t,++Nc}function Ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,Je(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,Je(t=r,e=u)}}function Ke(){Xc.point=Je}function Qe(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,Je(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,Je(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function nr(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function tr(n){function t(n){return(a?r:e)(n)}function e(t){return ur(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=ve([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;
2347 ;!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n){var t=n.__transition__;t&&++t.active}function Z(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=V;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=X),a?t?u:r:t?y:i}function V(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function X(n,t){var e=V(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function $(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function B(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function W(){return ta.event.changedTouches[0].identifier}function J(){return ta.event.target}function G(){return oa}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?Da:Math.acos(n)}function tt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Ja,r=pt(r)*Ga,i=pt(i)*Ka,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,255&n>>8,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=vt((.2126729*n+.7151522*t+.072175*e)/Ga),i=vt((.0193339*n+.119192*t+.9503041*e)/Ka);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Nt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ct(t,e,n,r)}}function Ct(n,t,e,r){function u(){var n,t=c.status;if(!t&&qt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(zt(r))}function zt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Lt(){var n=Tt(),t=Rt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(Lt,t)),uc=0):(uc=1,ac(Lt))}function Tt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Rt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Dt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Pt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Ut(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:At;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||jt;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function jt(n){return n+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=Ft;var r=new Ft;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ot(n);return c.floor=c,c.round=Ot(r),c.ceil=Ot(u),c.offset=Ot(i),c.range=a,n}function Ot(n){return function(t,e){try{hc=Ft;var r=new Ft;return r._=t,n(r,e)._}finally{hc=Date}}}function Yt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==Ft,o=new(i?Ft:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=Ft;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=Ft;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ce;var M=ta.map(),x=Zt(v),b=Vt(v),_=Zt(d),w=Vt(d),S=Zt(m),k=Vt(m),E=Zt(y),A=Vt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+fc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:oe,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:ne,e:ne,H:ee,I:ee,j:te,L:ie,m:Qt,M:re,p:s,S:ue,U:$t,w:Xt,W:Bt,x:c,X:l,y:Jt,Y:Wt,Z:Gt,"%":ae};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Zt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Vt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Kt(+r[0]),e+r[0].length):-1}function Gt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kt(n){return n+(n>68?1900:2e3)}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ie(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function oe(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function ae(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ce(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function le(){}function se(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function fe(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function he(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)he(n[e],t,1);t.polygonEnd()}function pe(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function ve(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function de(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function me(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ye(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Me(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function be(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function _e(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function we(n,t){n*=Fa;var e=Math.cos(t*=Fa);Se(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Se(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function ke(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),Se(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,Se(t,e,r)}}function Ee(){Dc.point=we}function Ae(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),Se(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),Se(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=Ee,Dc.point=we}}function Ne(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ce(){return!0}function ze(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_e(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Le(e,n,null,!0),l=new Le(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Le(r,n,null,!1),l=new Le(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),qe(i),qe(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qe(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Le(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Te(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Re))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=He(m,p);g.length?(b||(i.polygonStart(),b=!0),ze(g,Pe,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=De(),x=t(M),b=!1;return y}}function Re(n){return n.length>1}function De(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pe(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Ue(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=je(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function je(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Fe(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function He(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=me(ve(f),ve(n));xe(E);var A=me(u,E);xe(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function Oe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(_e(e,g)||_e(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&_e(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=ve(n),u=ve(t),o=[1,0,0],a=me(r,u),c=de(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=me(o,a),p=Me(o,f),v=Me(a,h);ye(p,v);var d=g,m=de(p,d),y=de(d,d),M=m*m-y*(de(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=Me(d,(-m-x)/y);if(ye(b,p),b=be(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=Me(d,(-m+x)/y);return ye(z,p),[b,be(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=pr(n,6*Fa);return Te(t,e,c,o?[0,-n]:[-Da,n-Da])}function Ye(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=De(),N=Ye(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ze(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ze(n){var t=0,e=Da/3,r=or(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ve(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Xe(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function $e(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function Be(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=We(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=We(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function We(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Je(n,t){Ec+=n,Ac+=t,++Nc}function Ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,Je(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,Je(t=r,e=u)}}function Ke(){Xc.point=Je}function Qe(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,Je(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,Je(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function nr(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function tr(n){function t(n){return(a?r:e)(n)}function e(t){return ur(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=ve([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;
2348 (L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=tr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return ar(t(n))}}function rr(n){this.stream=n}function ur(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ir(n){return or(function(){return n})()}function or(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ne(o=sr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=tr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=At,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=ar(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):Oe((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function ar(n){return ur(n,function(t,e){n.point(t*Fa,e*Fa)})}function cr(n,t){return[n,t]}function lr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function sr(n,t,e){return n?t||e?Ne(hr(n),gr(t,e)):hr(n):t||e?gr(t,e):lr}function fr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function hr(n){var t=fr(n);return t.invert=fr(-n),t}function gr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function pr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=vr(e,u),i=vr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=be([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function vr(n,t){var e=ve(t);e[0]-=n,xe(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function mr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function yr(n){return n.source}function Mr(n){return n.target}function xr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function br(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function _r(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function wr(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):kr}function Sr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?cr:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function kr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function Er(n){var t,e=ir(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ar(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Nr(n){return n[0]}function Cr(n){return n[1]}function zr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qr(n,t){return n[0]-t[0]||n[1]-t[1]}function Lr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Tr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Rr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Dr(){eu(this),this.edge=this.site=this.circle=null}function Pr(n){var t=ol.pop()||new Dr;return t.site=n,t}function Ur(n){$r(n),rl.remove(n),ol.push(n),eu(n)}function jr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ur(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Ur(c),c=i;a.unshift(c),$r(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Ur(l),l=o;a.push(l),$r(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Qr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Gr(c.site,l.site,null,u),Xr(c),Xr(l)}function Fr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Hr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Or(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pr(n);if(rl.insert(t,c),t||e){if(t===e)return $r(t),e=Pr(t.site),rl.insert(c,e),c.edge=e.edge=Gr(t.site,c.site),Xr(t),Xr(e),void 0;if(!e)return c.edge=Gr(t.site,c.site),void 0;$r(t),$r(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Qr(e.edge,l,p,x),c.edge=Gr(l,n,null,x),e.edge=Gr(n,p,null,x),Xr(t),Xr(e)}}function Hr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Or(n,t){var e=n.N;if(e)return Hr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Yr(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new nu(Kr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Zr(n,t){return t.angle-n.angle}function Vr(){eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Vr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function $r(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),eu(t),n.circle=null)}function Br(n){for(var t,e=tl,r=Ye(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Wr(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Wr(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Gr(n,t,e,r){var u=new Jr(n,t);return tl.push(u),e&&Qr(u,n,t,e),r&&Qr(u,t,n,r),el[n.i].edges.push(new nu(u,n,t)),el[t.i].edges.push(new nu(u,t,n)),u}function Kr(n,t,e){var r=new Jr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Qr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function nu(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function tu(){this._=null}function eu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function uu(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function iu(n){for(;n.L;)n=n.L;return n}function ou(n,t){var e,r,u,i=n.sort(au).pop();for(tl=[],el=new Array(n.length),rl=new tu,il=new tu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Yr(i),Fr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;jr(u.arc)}t&&(Br(t),Ir(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function au(n,t){return t.y-n.y||t.x-n.x}function cu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lu(n){return n.x}function su(n){return n.y}function fu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&hu(n,c[0],e,r,o,a),c[1]&&hu(n,c[1],o,r,u,a),c[2]&&hu(n,c[2],e,a,o,i),c[3]&&hu(n,c[3],o,a,u,i)}}function gu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function pu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function vu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=yu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function du(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mu(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:du(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function yu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function Mu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(yu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function xu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function bu(n){return function(t){return 1-n(1-t)}}function _u(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wu(n){return n*n}function Su(n){return n*n*n}function ku(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Eu(n){return function(t){return Math.pow(t,n)}}function Au(n){return 1-Math.cos(n*ja)}function Nu(n){return Math.pow(2,10*(n-1))}function Cu(n){return 1-Math.sqrt(1-n*n)}function zu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function qu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Pu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Uu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fu(t),u=ju(t,e),i=Fu(Hu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function ju(n,t){return n[0]*t[0]+n[1]*t[1]}function Fu(n){var t=Math.sqrt(ju(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ou(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:du(a[0],c[0])},{i:3,x:du(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:du(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:du(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:du(g[0],p[0])},{i:e-2,x:du(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Zu(n){for(var t=n.source,e=n.target,r=Xu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Vu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Xu(n,t){if(n===t)return n;for(var e=Vu(n),r=Vu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function $u(n){n.fixed|=2}function Bu(n){n.fixed&=-7}function Wu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Ju(n){n.fixed&=-5}function Gu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Gu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Ku(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ui,n}function Qu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ti(n){return n.children}function ei(n){return n.value}function ri(n,t){return t.value-n.value}function ui(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ii(n){return n.x}function oi(n){return n.y}function ai(n,t,e){n.y0=t,n.y=e}function ci(n){return ta.range(n.length)}function li(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function si(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function fi(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function gi(n,t){return pi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function pi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function vi(n){return[ta.min(n),ta.max(n)]}function di(n,t){return n.value-t.value}function mi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function yi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function xi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],Si(r,u,i),t(i),mi(r,i),r._pack_prev=i,mi(i,u),u=r._pack_next,o=3;l>o;o++){Si(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Mi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?yi(r,u=a):yi(r=c,u),o--):(mi(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)wi(u[i],t,e,r)}function Si(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function ki(n,t){return n.parent==t.parent?1:2}function Ei(n){var t=n.children;return t.length?t[0]:n.t}function Ai(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ni(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ci(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+ta.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Hi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Yi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Yi:Fi,c=r?Iu:Yu;return o=u(n,t,c,e),a=u(t,n,c,yu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Pu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return $i(n,t)},i.tickFormat=function(t,e){return Bi(n,t,e)},i.nice=function(t){return Vi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Zi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function $i(n,t){return ta.range.apply(ta,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Wi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Ji(u[8],r)),e=u.join("")}else e=",."+Wi(r[2])+"f";return ta.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in _l?Math.abs(e-Wi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Hi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(u(t))}var u=Qi(t),i=Qi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(u=Qi(t=o),i=Qi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function no(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ui(t.a[0])},e.copy=function(){return no(n,t)},e.domain(n)}function to(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return to(r,u)},i()}function eo(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return eo(n,t,e)},u()}function ro(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ro(n,t)},e}function uo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return uo(n)},t}function io(){return 0}function oo(n){return n.innerRadius}function ao(n){return n.outerRadius}function co(n){return n.startAngle}function lo(n){return n.endAngle}function so(n){return n&&n.padAngle}function fo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function ho(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function go(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Nr,r=Cr,u=Ce,i=po,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||po).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function po(n){return n.join("L")}function vo(n){return po(n)+"Z"}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function xo(n,t){return n.length<4?po(n):n[1]+wo(n.slice(1,-1),So(n,t))}function bo(n,t){return n.length<3?po(n):n[0]+wo((n.push(n[0]),n),So([n[n.length-2]].concat(n,[n[1]]),t))}function _o(n,t){return n.length<3?po(n):n[0]+wo(n,So(n,t))}function wo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return po(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function So(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function ko(n){if(n.length<3)return po(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",Co(Tl,o),",",Co(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),zo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function Eo(n){if(n.length<4)return po(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(Co(Tl,i)+","+Co(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),zo(e,i,o);return e.join("")}function Ao(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[Co(Tl,o),",",Co(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),zo(t,o,a);return t.join("")}function No(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return ko(n)}function Co(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function zo(n,t,e){n.push("C",Co(ql,t),",",Co(ql,e),",",Co(Ll,t),",",Co(Ll,e),",",Co(Tl,t),",",Co(Tl,e))}function qo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Lo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=qo(u,i);++t<e;)r[t]=(o+(o=qo(u=i,i=n[t+1])))/2;return r[t]=o,r}function To(n){for(var t,e,r,u,i=[],o=Lo(n),a=-1,c=n.length-1;++a<c;)t=qo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Ro(n){return n.length<3?po(n):n[0]+wo(n,To(n))}function Do(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Po(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Nr,r=Nr,u=0,i=Cr,o=Ce,a=po,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||po).key,l=a.reverse||a,s=a.closed?"M":"L",t):c
2348 (L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=tr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return ar(t(n))}}function rr(n){this.stream=n}function ur(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ir(n){return or(function(){return n})()}function or(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ne(o=sr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=tr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=At,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=ar(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):Oe((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function ar(n){return ur(n,function(t,e){n.point(t*Fa,e*Fa)})}function cr(n,t){return[n,t]}function lr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function sr(n,t,e){return n?t||e?Ne(hr(n),gr(t,e)):hr(n):t||e?gr(t,e):lr}function fr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function hr(n){var t=fr(n);return t.invert=fr(-n),t}function gr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function pr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=vr(e,u),i=vr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=be([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function vr(n,t){var e=ve(t);e[0]-=n,xe(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function mr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function yr(n){return n.source}function Mr(n){return n.target}function xr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function br(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function _r(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function wr(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):kr}function Sr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?cr:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function kr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function Er(n){var t,e=ir(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ar(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Nr(n){return n[0]}function Cr(n){return n[1]}function zr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qr(n,t){return n[0]-t[0]||n[1]-t[1]}function Lr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Tr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Rr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Dr(){eu(this),this.edge=this.site=this.circle=null}function Pr(n){var t=ol.pop()||new Dr;return t.site=n,t}function Ur(n){$r(n),rl.remove(n),ol.push(n),eu(n)}function jr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ur(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Ur(c),c=i;a.unshift(c),$r(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Ur(l),l=o;a.push(l),$r(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Qr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Gr(c.site,l.site,null,u),Xr(c),Xr(l)}function Fr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Hr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Or(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pr(n);if(rl.insert(t,c),t||e){if(t===e)return $r(t),e=Pr(t.site),rl.insert(c,e),c.edge=e.edge=Gr(t.site,c.site),Xr(t),Xr(e),void 0;if(!e)return c.edge=Gr(t.site,c.site),void 0;$r(t),$r(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Qr(e.edge,l,p,x),c.edge=Gr(l,n,null,x),e.edge=Gr(n,p,null,x),Xr(t),Xr(e)}}function Hr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Or(n,t){var e=n.N;if(e)return Hr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Yr(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new nu(Kr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Zr(n,t){return t.angle-n.angle}function Vr(){eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Vr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function $r(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),eu(t),n.circle=null)}function Br(n){for(var t,e=tl,r=Ye(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Wr(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Wr(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Gr(n,t,e,r){var u=new Jr(n,t);return tl.push(u),e&&Qr(u,n,t,e),r&&Qr(u,t,n,r),el[n.i].edges.push(new nu(u,n,t)),el[t.i].edges.push(new nu(u,t,n)),u}function Kr(n,t,e){var r=new Jr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Qr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function nu(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function tu(){this._=null}function eu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function uu(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function iu(n){for(;n.L;)n=n.L;return n}function ou(n,t){var e,r,u,i=n.sort(au).pop();for(tl=[],el=new Array(n.length),rl=new tu,il=new tu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Yr(i),Fr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;jr(u.arc)}t&&(Br(t),Ir(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function au(n,t){return t.y-n.y||t.x-n.x}function cu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lu(n){return n.x}function su(n){return n.y}function fu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&hu(n,c[0],e,r,o,a),c[1]&&hu(n,c[1],o,r,u,a),c[2]&&hu(n,c[2],e,a,o,i),c[3]&&hu(n,c[3],o,a,u,i)}}function gu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function pu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function vu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=yu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function du(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mu(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:du(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function yu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function Mu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(yu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function xu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function bu(n){return function(t){return 1-n(1-t)}}function _u(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wu(n){return n*n}function Su(n){return n*n*n}function ku(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Eu(n){return function(t){return Math.pow(t,n)}}function Au(n){return 1-Math.cos(n*ja)}function Nu(n){return Math.pow(2,10*(n-1))}function Cu(n){return 1-Math.sqrt(1-n*n)}function zu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function qu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Pu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Uu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fu(t),u=ju(t,e),i=Fu(Hu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function ju(n,t){return n[0]*t[0]+n[1]*t[1]}function Fu(n){var t=Math.sqrt(ju(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ou(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:du(a[0],c[0])},{i:3,x:du(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:du(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:du(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:du(g[0],p[0])},{i:e-2,x:du(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Zu(n){for(var t=n.source,e=n.target,r=Xu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Vu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Xu(n,t){if(n===t)return n;for(var e=Vu(n),r=Vu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function $u(n){n.fixed|=2}function Bu(n){n.fixed&=-7}function Wu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Ju(n){n.fixed&=-5}function Gu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Gu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Ku(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ui,n}function Qu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ti(n){return n.children}function ei(n){return n.value}function ri(n,t){return t.value-n.value}function ui(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ii(n){return n.x}function oi(n){return n.y}function ai(n,t,e){n.y0=t,n.y=e}function ci(n){return ta.range(n.length)}function li(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function si(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function fi(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function gi(n,t){return pi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function pi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function vi(n){return[ta.min(n),ta.max(n)]}function di(n,t){return n.value-t.value}function mi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function yi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function xi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],Si(r,u,i),t(i),mi(r,i),r._pack_prev=i,mi(i,u),u=r._pack_next,o=3;l>o;o++){Si(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Mi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?yi(r,u=a):yi(r=c,u),o--):(mi(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)wi(u[i],t,e,r)}function Si(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function ki(n,t){return n.parent==t.parent?1:2}function Ei(n){var t=n.children;return t.length?t[0]:n.t}function Ai(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ni(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ci(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+ta.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Hi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Yi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Yi:Fi,c=r?Iu:Yu;return o=u(n,t,c,e),a=u(t,n,c,yu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Pu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return $i(n,t)},i.tickFormat=function(t,e){return Bi(n,t,e)},i.nice=function(t){return Vi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Zi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function $i(n,t){return ta.range.apply(ta,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Wi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Ji(u[8],r)),e=u.join("")}else e=",."+Wi(r[2])+"f";return ta.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in _l?Math.abs(e-Wi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Hi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(u(t))}var u=Qi(t),i=Qi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(u=Qi(t=o),i=Qi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function no(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ui(t.a[0])},e.copy=function(){return no(n,t)},e.domain(n)}function to(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return to(r,u)},i()}function eo(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return eo(n,t,e)},u()}function ro(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ro(n,t)},e}function uo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return uo(n)},t}function io(){return 0}function oo(n){return n.innerRadius}function ao(n){return n.outerRadius}function co(n){return n.startAngle}function lo(n){return n.endAngle}function so(n){return n&&n.padAngle}function fo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function ho(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function go(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Nr,r=Cr,u=Ce,i=po,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||po).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function po(n){return n.join("L")}function vo(n){return po(n)+"Z"}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function xo(n,t){return n.length<4?po(n):n[1]+wo(n.slice(1,-1),So(n,t))}function bo(n,t){return n.length<3?po(n):n[0]+wo((n.push(n[0]),n),So([n[n.length-2]].concat(n,[n[1]]),t))}function _o(n,t){return n.length<3?po(n):n[0]+wo(n,So(n,t))}function wo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return po(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function So(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function ko(n){if(n.length<3)return po(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",Co(Tl,o),",",Co(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),zo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function Eo(n){if(n.length<4)return po(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(Co(Tl,i)+","+Co(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),zo(e,i,o);return e.join("")}function Ao(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[Co(Tl,o),",",Co(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),zo(t,o,a);return t.join("")}function No(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return ko(n)}function Co(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function zo(n,t,e){n.push("C",Co(ql,t),",",Co(ql,e),",",Co(Ll,t),",",Co(Ll,e),",",Co(Tl,t),",",Co(Tl,e))}function qo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Lo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=qo(u,i);++t<e;)r[t]=(o+(o=qo(u=i,i=n[t+1])))/2;return r[t]=o,r}function To(n){for(var t,e,r,u,i=[],o=Lo(n),a=-1,c=n.length-1;++a<c;)t=qo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Ro(n){return n.length<3?po(n):n[0]+wo(n,To(n))}function Do(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Po(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Nr,r=Nr,u=0,i=Cr,o=Ce,a=po,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||po).key,l=a.reverse||a,s=a.closed?"M":"L",t):c
2349 },t.tension=function(n){return arguments.length?(f=n,t):f},t}function Uo(n){return n.radius}function jo(n){return[n.x,n.y]}function Fo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Oo(){return"circle"}function Yo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n,t,e){return xa(n,Fl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,delay:u.delay,duration:u.duration,ease:u.ease},u=null,++i.count,ta.timer(function(u){function a(e){return i.active>r?s(!1):(i.active=r,o.event&&o.event.start.call(n,g,t),o.tween.forEach(function(e,r){(r=r.call(n,g,t))&&d.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return v.c=l(e||1)?Ce:l,1},0,c),void 0)}function l(t){if(i.active!==r)return s(!1);for(var e=t/f,u=h(e),o=d.length;o>0;)d[--o].call(n,u);return e>=1?s(!0):void 0}function s(u){return o.event&&o.event[u?"end":"interrupt"].call(n,g,t),--i.count?delete i[r]:delete n[e],1}var f,h,g=n.__data__,p=o.delay,v=oc,d=[];return v.t=p+c,u>=p?a(u-p):(v.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Bl,u);return i==Bl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Bl[i-1]<Bl[i]/u?i-1:i]:[Gl,Xi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Ui(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Hi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Zi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.0"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ka.transition=function(n){for(var t,e,r=Dl||++Hl,u=Xo(n),i=[],o=Pl||{time:Date.now(),ease:ku,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){var t=Xo(n);return this.each(function(){var n=this[t];n&&++n.active})},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(Z(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Z(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return B(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return B(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=$(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,G,"mousemove","mouseup"),i=t(W,ta.touch,J,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=B(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(Ya*h)*(e*ut(Oa*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(z,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(T,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),t=ta.select(t),N>0&&(t=t.transition().duration(N)),t.call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){C++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--C||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(q,null).on(L,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=R.of(r,arguments),s=0,f=ta.select(oa).on(q,n).on(L,e),h=t(ta.mouse(r)),g=$();I(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);I(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(z,s).on(T,f),E(),l(v)}var g,p=this,v=R.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=$();e(),a(v),S.on(z,null).on(T,e)}function h(){var n=R.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),I(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=250,C=0,z="mousedown.zoom",q="mousemove.zoom",L="mouseup.zoom",T="touchstart.zoom",R=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=R.of(this,arguments),t=k;Dl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(N=+t,n):N},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,R,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var $a=at.prototype=new ot;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},$a.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Ba=lt.prototype=new ot;Ba.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=ft.prototype=new ot;Qa.brighter=function(n){return new ft(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new ft(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var nc=mt.prototype=new ot;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return _t(this.r,this.g,this.b)},nc.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,yt(t))}),ta.functor=Et,ta.xhr=Nt(At),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Ct(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(Lt))},ta.timer.flush=function(){Tt(),Rt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Pt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Dt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Dt(n,t))).toFixed(Math.max(0,Math.min(20,Dt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;Ft.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ht(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ht(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ht(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Ut(n),timeFormat:Yt(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=mc.numberFormat,ta.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,yc),se(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new le;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):fe(n,t)};var Mc={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)fe(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){he(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ge(e[r],t)
2349 },t.tension=function(n){return arguments.length?(f=n,t):f},t}function Uo(n){return n.radius}function jo(n){return[n.x,n.y]}function Fo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Oo(){return"circle"}function Yo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n,t,e){return xa(n,Fl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,delay:u.delay,duration:u.duration,ease:u.ease},u=null,++i.count,ta.timer(function(u){function a(e){return i.active>r?s(!1):(i.active=r,o.event&&o.event.start.call(n,g,t),o.tween.forEach(function(e,r){(r=r.call(n,g,t))&&d.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return v.c=l(e||1)?Ce:l,1},0,c),void 0)}function l(t){if(i.active!==r)return s(!1);for(var e=t/f,u=h(e),o=d.length;o>0;)d[--o].call(n,u);return e>=1?s(!0):void 0}function s(u){return o.event&&o.event[u?"end":"interrupt"].call(n,g,t),--i.count?delete i[r]:delete n[e],1}var f,h,g=n.__data__,p=o.delay,v=oc,d=[];return v.t=p+c,u>=p?a(u-p):(v.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Bl,u);return i==Bl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Bl[i-1]<Bl[i]/u?i-1:i]:[Gl,Xi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Ui(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Hi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Zi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.0"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ka.transition=function(n){for(var t,e,r=Dl||++Hl,u=Xo(n),i=[],o=Pl||{time:Date.now(),ease:ku,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){var t=Xo(n);return this.each(function(){var n=this[t];n&&++n.active})},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(Z(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Z(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return B(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return B(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=$(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,G,"mousemove","mouseup"),i=t(W,ta.touch,J,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=B(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(Ya*h)*(e*ut(Oa*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(z,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(T,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),t=ta.select(t),N>0&&(t=t.transition().duration(N)),t.call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){C++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--C||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(q,null).on(L,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=R.of(r,arguments),s=0,f=ta.select(oa).on(q,n).on(L,e),h=t(ta.mouse(r)),g=$();I(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);I(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(z,s).on(T,f),E(),l(v)}var g,p=this,v=R.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=$();e(),a(v),S.on(z,null).on(T,e)}function h(){var n=R.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),I(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=250,C=0,z="mousedown.zoom",q="mousemove.zoom",L="mouseup.zoom",T="touchstart.zoom",R=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=R.of(this,arguments),t=k;Dl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(N=+t,n):N},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,R,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var $a=at.prototype=new ot;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},$a.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Ba=lt.prototype=new ot;Ba.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=ft.prototype=new ot;Qa.brighter=function(n){return new ft(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new ft(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var nc=mt.prototype=new ot;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return _t(this.r,this.g,this.b)},nc.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,yt(t))}),ta.functor=Et,ta.xhr=Nt(At),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Ct(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(Lt))},ta.timer.flush=function(){Tt(),Rt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Pt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Dt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Dt(n,t))).toFixed(Math.max(0,Math.min(20,Dt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;Ft.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ht(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ht(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ht(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Ut(n),timeFormat:Yt(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=mc.numberFormat,ta.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,yc),se(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new le;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):fe(n,t)};var Mc={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)fe(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){he(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ge(e[r],t)
2350 },GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)fe(e[r],t)}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new le,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=pe},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=ve([t*Fa,e*Fa]);if(m){var u=me(m,r),i=[u[1],-u[0],0],o=me(i,u);xe(o),o=be(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,tt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:we,lineStart:ke,lineEnd:Ee,polygonStart:function(){Dc.lineStart=Ae},polygonEnd:function(){Dc.lineStart=ke}},Pc=Te(Ce,Ue,Fe,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ze(Ve)}).raw=Ve,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Xe},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:$e,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:Je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){Xc.lineStart=Qe},polygonEnd:function(){Xc.point=Je,Xc.lineStart=Ge,Xc.lineEnd=Ke}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||er(n):At,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Be:new nr(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new rr(t);for(var r in n)e[r]=n[r];return e}}},rr.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ir,ta.geo.projectionMutator=or,(ta.geo.equirectangular=function(){return ir(cr)}).raw=cr.invert=cr,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=sr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},lr.invert=cr,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=sr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=pr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=pr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=dr(a,o,90),f=mr(r,e,y),h=dr(l,c,90),g=mr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=yr,u=Mr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return xr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:br,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=_r(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ir(Wc)}).raw=Wc;var Jc=_r(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(ta.geo.azimuthalEquidistant=function(){return ir(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ze(wr)}).raw=wr,(ta.geo.conicEquidistant=function(){return Ze(Sr)}).raw=Sr;var Gc=_r(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ir(Gc)}).raw=Gc,kr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return Er(kr)}).raw=kr;var Kc=_r(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ir(Kc)}).raw=Kc;var Qc=_r(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ir(Qc)}).raw=Qc,Ar.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=Er(Ar),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ar,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(qr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=zr(a),s=zr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Nr,r=Cr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Lr(o,s,u)?(Lr(i,s,u)||n.push(Tr(i,o,s,u)),n.push(o)):Lr(i,s,u)&&n.push(Tr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Yr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Zr),t.length},nu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=iu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,uu(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(uu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?iu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,uu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,uu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,uu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return ou(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Nr,u=Cr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return ou(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ou(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Zr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&cu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=fu()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=fu();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){hu(n,k,v,d,m,y)},k.find=function(n){return gu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Nr,c=Cr;return(o=arguments.length)?(a=lu,c=su,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=pu,ta.interpolateObject=vu,ta.interpolateNumber=du,ta.interpolateString=mu;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=yu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?pu:mu:t instanceof ot?pu:Array.isArray(t)?Mu:"object"===e&&isNaN(t)?vu:du)(n,t)}],ta.interpolateArray=Mu;var fl=function(){return At},hl=ta.map({linear:fl,poly:Eu,quad:function(){return wu},cubic:function(){return Su},sin:function(){return Au},exp:function(){return Nu},circle:function(){return Cu},elastic:zu,back:qu,bounce:function(){return Lu}}),gl=ta.map({"in":At,out:bu,"in-out":_u,"out-in":function(n){return _u(bu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||At,xu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Tu,ta.interpolateHsl=Ru,ta.interpolateLab=Du,ta.interpolateRound=Pu,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Uu(e?e.matrix:pl)})(n)},Uu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Ou,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Zu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Gu(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(At).on("dragstart.force",$u).on("drag.force",t).on("dragend.force",Bu)),arguments.length?(this.on("mouseover.force",Wu).on("mouseout.force",Ju).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ni(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qu(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Ku(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=At,e=ci,r=li,u=ai,i=ii,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||li,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(si),i=n.map(fi),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ci}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:li});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=vi,u=gi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return pi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+s(n.value)}),ni(a,xi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=f}),ni(a,xi),ni(a,function(n){n.r-=f})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(di),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Ku(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(ni(h,e),h.parent.m=-h.z,Qu(h,r),l)Qu(f,i);else{var g=f,p=f,v=f;Qu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Qu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ai(o),u=Ei(u),o&&u;)c=Ei(c),i=Ai(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ni(zi(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ai(i)&&(i.t=o,i.m+=f-s),u&&!Ei(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Ku(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Ti(c),f=Ri(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return ni(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Ku(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Di,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Di(t):Pi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Pi(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Di:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Ku(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;
2350 },GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)fe(e[r],t)}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new le,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=pe},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=ve([t*Fa,e*Fa]);if(m){var u=me(m,r),i=[u[1],-u[0],0],o=me(i,u);xe(o),o=be(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,tt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:we,lineStart:ke,lineEnd:Ee,polygonStart:function(){Dc.lineStart=Ae},polygonEnd:function(){Dc.lineStart=ke}},Pc=Te(Ce,Ue,Fe,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ze(Ve)}).raw=Ve,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Xe},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:$e,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:Je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){Xc.lineStart=Qe},polygonEnd:function(){Xc.point=Je,Xc.lineStart=Ge,Xc.lineEnd=Ke}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||er(n):At,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Be:new nr(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new rr(t);for(var r in n)e[r]=n[r];return e}}},rr.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ir,ta.geo.projectionMutator=or,(ta.geo.equirectangular=function(){return ir(cr)}).raw=cr.invert=cr,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=sr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},lr.invert=cr,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=sr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=pr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=pr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=dr(a,o,90),f=mr(r,e,y),h=dr(l,c,90),g=mr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=yr,u=Mr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return xr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:br,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=_r(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ir(Wc)}).raw=Wc;var Jc=_r(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(ta.geo.azimuthalEquidistant=function(){return ir(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ze(wr)}).raw=wr,(ta.geo.conicEquidistant=function(){return Ze(Sr)}).raw=Sr;var Gc=_r(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ir(Gc)}).raw=Gc,kr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return Er(kr)}).raw=kr;var Kc=_r(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ir(Kc)}).raw=Kc;var Qc=_r(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ir(Qc)}).raw=Qc,Ar.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=Er(Ar),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ar,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(qr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=zr(a),s=zr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Nr,r=Cr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Lr(o,s,u)?(Lr(i,s,u)||n.push(Tr(i,o,s,u)),n.push(o)):Lr(i,s,u)&&n.push(Tr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Yr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Zr),t.length},nu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=iu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,uu(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(uu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?iu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,uu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,uu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,uu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return ou(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Nr,u=Cr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return ou(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ou(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Zr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&cu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=fu()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=fu();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){hu(n,k,v,d,m,y)},k.find=function(n){return gu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Nr,c=Cr;return(o=arguments.length)?(a=lu,c=su,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=pu,ta.interpolateObject=vu,ta.interpolateNumber=du,ta.interpolateString=mu;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=yu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?pu:mu:t instanceof ot?pu:Array.isArray(t)?Mu:"object"===e&&isNaN(t)?vu:du)(n,t)}],ta.interpolateArray=Mu;var fl=function(){return At},hl=ta.map({linear:fl,poly:Eu,quad:function(){return wu},cubic:function(){return Su},sin:function(){return Au},exp:function(){return Nu},circle:function(){return Cu},elastic:zu,back:qu,bounce:function(){return Lu}}),gl=ta.map({"in":At,out:bu,"in-out":_u,"out-in":function(n){return _u(bu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||At,xu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Tu,ta.interpolateHsl=Ru,ta.interpolateLab=Du,ta.interpolateRound=Pu,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Uu(e?e.matrix:pl)})(n)},Uu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Ou,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Zu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Gu(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(At).on("dragstart.force",$u).on("drag.force",t).on("dragend.force",Bu)),arguments.length?(this.on("mouseover.force",Wu).on("mouseout.force",Ju).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ni(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qu(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Ku(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=At,e=ci,r=li,u=ai,i=ii,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||li,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(si),i=n.map(fi),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ci}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:li});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=vi,u=gi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return pi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+s(n.value)}),ni(a,xi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=f}),ni(a,xi),ni(a,function(n){n.r-=f})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(di),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Ku(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(ni(h,e),h.parent.m=-h.z,Qu(h,r),l)Qu(f,i);else{var g=f,p=f,v=f;Qu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Qu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ai(o),u=Ei(u),o&&u;)c=Ei(c),i=Ai(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ni(zi(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ai(i)&&(i.t=o,i.m+=f-s),u&&!Ei(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Ku(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Ti(c),f=Ri(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return ni(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Ku(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Di,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Di(t):Pi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Pi(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Di:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Ku(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;
2351 do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:At,ceil:At};ta.scale.linear=function(){return Ii([0,1],[0,1],yu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Gi(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Ki(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return no([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return to([],[])},ta.scale.quantize=function(){return eo(0,1,[0,1])},ta.scale.threshold=function(){return ro([.5],[0,1])},ta.scale.identity=function(){return uo([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&fo(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&fo(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Tr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=ho(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=ho([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^fo(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=ho([y,M],[S,k],n,-I,g),V=ho([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^fo(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=oo,r=ao,u=io,i=Cl,o=co,a=lo,c=so;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return go(At)};var zl=ta.map({linear:po,"linear-closed":vo,step:mo,"step-before":yo,"step-after":Mo,basis:ko,"basis-open":Eo,"basis-closed":Ao,bundle:No,cardinal:_o,"cardinal-open":xo,"cardinal-closed":bo,monotone:Ro});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=go(Do);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yo.reverse=Mo,Mo.reverse=yo,ta.svg.area=function(){return Po(At)},ta.svg.area.radial=function(){var n=Po(Do);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=yr,o=Mr,a=Uo,c=co,l=lo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=yr,e=Mr,r=jo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=jo,e=n.projection;return n.projection=function(n){return arguments.length?e(Fo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Yo)(e.call(this,n,r))}var t=Oo,e=Ho;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var Rl=ta.map({circle:Yo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*jl)),e=t*jl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl,Pl,Ul=Math.sqrt(3),jl=Math.tan(30*Fa),Fl=[],Hl=0;Fl.call=ka.call,Fl.empty=ka.empty,Fl.node=ka.node,Fl.size=ka.size,ta.transition=function(n){return arguments.length?Dl?n.transition():n:Na.transition()},ta.transition.prototype=Fl,Fl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Fl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Fl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Fl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Fl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ou:yu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Fl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Fl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=yu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Fl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Fl.text=function(n){return Zo(this,"text",n,Vo)},Fl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Fl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Fl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Fl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Pl,i=Dl;Dl=e,H(this,function(t,u,i){Pl=t[r][e],n.call(t,t.__data__,u,i)}),Pl=u,Dl=i}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Fl.transition=function(){for(var n,t,e,r,u=this.id,i=++Hl,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=ji(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Ol,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Ol,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ol="bottom",Yl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Il[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=ji(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=ji(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=ji(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=$(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Zl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Dl?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mu(s,t.x),r=Mu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Zl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Zl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Il={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fc.format=mc.timeFormat,Xl=Vl.utc,$l=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:$l,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=$l.toString,fc.second=Ht(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ht(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ht(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Bl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Wl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Jl=Vl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ce]]),Gl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:At,ceil:At};Wl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Wl,Jl)};var Kl=Wl.map(function(n){return[n[0].utc,n[1]]}),Ql=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ce]]);Kl.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Kl,Ql)},ta.text=Nt(function(n){return n.responseText}),ta.json=function(n,t){return Ct(n,"application/json",Qo,t)},ta.html=function(n,t){return Ct(n,"text/html",na,t)},ta.xml=Nt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}();
2351 do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:At,ceil:At};ta.scale.linear=function(){return Ii([0,1],[0,1],yu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Gi(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Ki(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return no([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return to([],[])},ta.scale.quantize=function(){return eo(0,1,[0,1])},ta.scale.threshold=function(){return ro([.5],[0,1])},ta.scale.identity=function(){return uo([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&fo(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&fo(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Tr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=ho(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=ho([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^fo(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=ho([y,M],[S,k],n,-I,g),V=ho([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^fo(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=oo,r=ao,u=io,i=Cl,o=co,a=lo,c=so;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return go(At)};var zl=ta.map({linear:po,"linear-closed":vo,step:mo,"step-before":yo,"step-after":Mo,basis:ko,"basis-open":Eo,"basis-closed":Ao,bundle:No,cardinal:_o,"cardinal-open":xo,"cardinal-closed":bo,monotone:Ro});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=go(Do);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yo.reverse=Mo,Mo.reverse=yo,ta.svg.area=function(){return Po(At)},ta.svg.area.radial=function(){var n=Po(Do);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=yr,o=Mr,a=Uo,c=co,l=lo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=yr,e=Mr,r=jo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=jo,e=n.projection;return n.projection=function(n){return arguments.length?e(Fo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Yo)(e.call(this,n,r))}var t=Oo,e=Ho;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var Rl=ta.map({circle:Yo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*jl)),e=t*jl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl,Pl,Ul=Math.sqrt(3),jl=Math.tan(30*Fa),Fl=[],Hl=0;Fl.call=ka.call,Fl.empty=ka.empty,Fl.node=ka.node,Fl.size=ka.size,ta.transition=function(n){return arguments.length?Dl?n.transition():n:Na.transition()},ta.transition.prototype=Fl,Fl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Fl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Fl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Fl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Fl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ou:yu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Fl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Fl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=yu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Fl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Fl.text=function(n){return Zo(this,"text",n,Vo)},Fl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Fl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Fl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Fl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Pl,i=Dl;Dl=e,H(this,function(t,u,i){Pl=t[r][e],n.call(t,t.__data__,u,i)}),Pl=u,Dl=i}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Fl.transition=function(){for(var n,t,e,r,u=this.id,i=++Hl,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=ji(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Ol,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Ol,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ol="bottom",Yl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Il[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=ji(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=ji(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=ji(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=$(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Zl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Dl?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mu(s,t.x),r=Mu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Zl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Zl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Il={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fc.format=mc.timeFormat,Xl=Vl.utc,$l=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:$l,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=$l.toString,fc.second=Ht(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ht(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ht(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Bl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Wl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Jl=Vl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ce]]),Gl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:At,ceil:At};Wl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Wl,Jl)};var Kl=Wl.map(function(n){return[n[0].utc,n[1]]}),Ql=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ce]]);Kl.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Kl,Ql)},ta.text=Nt(function(n){return n.responseText}),ta.json=function(n,t){return Ct(n,"application/json",Qo,t)},ta.html=function(n,t){return Ct(n,"text/html",na,t)},ta.xml=Nt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}();
2352 ;!function(a){"use strict";function b(a){this.owner=a}function c(a,b){if(Object.create)b.prototype=Object.create(a.prototype);else{var c=function(){};c.prototype=a.prototype,b.prototype=new c}return b.prototype.constructor=b,b}function d(a){var b=this.internal=new e(this);b.loadConfig(a),b.beforeInit(a),b.init(),b.afterInit(a),function c(a,b,d){Object.keys(a).forEach(function(e){b[e]=a[e].bind(d),Object.keys(a[e]).length>0&&c(a[e],b[e],d)})}(h,this,this)}function e(b){var c=this;c.d3=a.d3?a.d3:"undefined"!=typeof require?require("d3"):void 0,c.api=b,c.config=c.getDefaultConfig(),c.data={},c.cache={},c.axes={}}function f(a){b.call(this,a)}function g(a,b){function c(a,b){a.attr("transform",function(a){return"translate("+Math.ceil(b(a)+u)+", 0)"})}function d(a,b){a.attr("transform",function(a){return"translate(0,"+Math.ceil(b(a))+")"})}function e(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function f(a){var b,c,d=[];if(a.ticks)return a.ticks.apply(a,n);for(c=a.domain(),b=Math.ceil(c[0]);b<c[1];b++)d.push(b);return d.length>0&&d[0]>0&&d.unshift(d[0]-(d[1]-d[0])),d}function g(){var a,c=p.copy();return b.isCategory&&(a=p.domain(),c.domain([a[0],a[1]-1])),c}function h(a){var b=m?m(a):a;return"undefined"!=typeof b?b:""}function i(a){if(A)return A;var b={h:11.5,w:5.5};return a.select("text").text(h).each(function(a){var c=this.getBoundingClientRect(),d=h(a),e=c.height,f=d?c.width/d.length:void 0;e&&f&&(b.h=e,b.w=f)}).text(""),A=b,b}function j(c){return b.withoutTransition?c:a.transition(c)}function k(m){m.each(function(){function m(a,c){function d(a,b){f=void 0;for(var h=1;h<b.length;h++)if(" "===b.charAt(h)&&(f=h),e=b.substr(0,h+1),g=U.w*e.length,g>c)return d(a.concat(b.substr(0,f?f:h)),b.slice(f?f+1:h));return a.concat(b)}var e,f,g,i=h(a),j=[];return"[object Array]"===Object.prototype.toString.call(i)?i:((!c||0>=c)&&(c=X?95:b.isCategory?Math.ceil(F(G[1])-F(G[0]))-12:110),d(j,i+""))}function n(a,b){var c=U.h;return 0===b&&(c="left"===q||"right"===q?-((V[a.index]-1)*(U.h/2)-3):".71em"),c}function v(a){var b=p(a)+(o?0:u);return L[0]<b&&b<L[1]?r:0}function w(a){return a?a>0?"start":"end":"middle"}function x(a){return a?"rotate("+a+")":""}function y(a){return a?8*Math.sin(Math.PI*(a/180)):0}function z(a){return a?11.5-2.5*(a/15)*(a>0?1:-1):W}var A,B,C,D=k.g=a.select(this),E=this.__chart__||p,F=this.__chart__=g(),G=t?t:f(F),H=D.selectAll(".tick").data(G,F),I=H.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),J=H.exit().remove(),K=j(H).style("opacity",1),L=p.rangeExtent?p.rangeExtent():e(p.range()),M=D.selectAll(".domain").data([0]),N=(M.enter().append("path").attr("class","domain"),j(M));I.append("line"),I.append("text");var O=I.select("line"),P=K.select("line"),Q=I.select("text"),R=K.select("text");b.isCategory?(u=Math.ceil((F(1)-F(0))/2),B=o?0:u,C=o?u:0):u=B=0;var S,T,U=i(D.select(".tick")),V=[],W=Math.max(r,0)+s,X="left"===q||"right"===q;S=H.select("text"),T=S.selectAll("tspan").data(function(a,c){var d=b.tickMultiline?m(a,b.tickWidth):[].concat(h(a));return V[c]=d.length,d.map(function(a){return{index:c,splitted:a}})}),T.enter().append("tspan"),T.exit().remove(),T.text(function(a){return a.splitted});var Y=b.tickTextRotate;switch(q){case"bottom":A=c,O.attr("y2",r),Q.attr("y",W),P.attr("x1",B).attr("x2",B).attr("y2",v),R.attr("x",0).attr("y",z(Y)).style("text-anchor",w(Y)).attr("transform",x(Y)),T.attr("x",0).attr("dy",n).attr("dx",y(Y)),N.attr("d","M"+L[0]+","+l+"V0H"+L[1]+"V"+l);break;case"top":A=c,O.attr("y2",-r),Q.attr("y",-W),P.attr("x2",0).attr("y2",-r),R.attr("x",0).attr("y",-W),S.style("text-anchor","middle"),T.attr("x",0).attr("dy","0em"),N.attr("d","M"+L[0]+","+-l+"V0H"+L[1]+"V"+-l);break;case"left":A=d,O.attr("x2",-r),Q.attr("x",-W),P.attr("x2",-r).attr("y1",C).attr("y2",C),R.attr("x",-W).attr("y",u),S.style("text-anchor","end"),T.attr("x",-W).attr("dy",n),N.attr("d","M"+-l+","+L[0]+"H0V"+L[1]+"H"+-l);break;case"right":A=d,O.attr("x2",r),Q.attr("x",W),P.attr("x2",r).attr("y2",0),R.attr("x",W).attr("y",0),S.style("text-anchor","start"),T.attr("x",W).attr("dy",n),N.attr("d","M"+l+","+L[0]+"H0V"+L[1]+"H"+l)}if(F.rangeBand){var Z=F,$=Z.rangeBand()/2;E=F=function(a){return Z(a)+$}}else E.rangeBand?E=F:J.call(A,F);I.call(A,E),K.call(A,F)})}var l,m,n,o,p=a.scale.linear(),q="bottom",r=6,s=3,t=null,u=0,v=!0;return b=b||{},l=b.withOuterTick?6:0,k.scale=function(a){return arguments.length?(p=a,k):p},k.orient=function(a){return arguments.length?(q=a in{top:1,right:1,bottom:1,left:1}?a+"":"bottom",k):q},k.tickFormat=function(a){return arguments.length?(m=a,k):m},k.tickCentered=function(a){return arguments.length?(o=a,k):o},k.tickOffset=function(){return u},k.tickInterval=function(){var a,c;return b.isCategory?a=2*u:(c=k.g.select("path.domain").node().getTotalLength()-2*l,a=c/k.g.selectAll("line").size()),a===1/0?0:a},k.ticks=function(){return arguments.length?(n=arguments,k):n},k.tickCulling=function(a){return arguments.length?(v=a,k):v},k.tickValues=function(a){if("function"==typeof a)t=function(){return a(p.domain())};else{if(!arguments.length)return t;t=a}return k},k}var h,i,j,k={version:"0.4.11"};k.generate=function(a){return new d(a)},k.chart={fn:d.prototype,internal:{fn:e.prototype,axis:{fn:f.prototype}}},h=k.chart.fn,i=k.chart.internal.fn,j=k.chart.internal.axis.fn,i.beforeInit=function(){},i.afterInit=function(){},i.init=function(){var a=this,b=a.config;if(a.initParams(),b.data_url)a.convertUrlToData(b.data_url,b.data_mimeType,b.data_headers,b.data_keys,a.initWithData);else if(b.data_json)a.initWithData(a.convertJsonToData(b.data_json,b.data_keys));else if(b.data_rows)a.initWithData(a.convertRowsToData(b.data_rows));else{if(!b.data_columns)throw Error("url or json or rows or columns is required.");a.initWithData(a.convertColumnsToData(b.data_columns))}},i.initParams=function(){var a=this,b=a.d3,c=a.config;a.clipId="c3-"+ +new Date+"-clip",a.clipIdForXAxis=a.clipId+"-xaxis",a.clipIdForYAxis=a.clipId+"-yaxis",a.clipIdForGrid=a.clipId+"-grid",a.clipIdForSubchart=a.clipId+"-subchart",a.clipPath=a.getClipPath(a.clipId),a.clipPathForXAxis=a.getClipPath(a.clipIdForXAxis),a.clipPathForYAxis=a.getClipPath(a.clipIdForYAxis),a.clipPathForGrid=a.getClipPath(a.clipIdForGrid),a.clipPathForSubchart=a.getClipPath(a.clipIdForSubchart),a.dragStart=null,a.dragging=!1,a.flowing=!1,a.cancelClick=!1,a.mouseover=!1,a.transiting=!1,a.color=a.generateColor(),a.levelColor=a.generateLevelColor(),a.dataTimeFormat=c.data_xLocaltime?b.time.format:b.time.format.utc,a.axisTimeFormat=c.axis_x_localtime?b.time.format:b.time.format.utc,a.defaultAxisTimeFormat=a.axisTimeFormat.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%-m/%-d",function(a){return a.getDay()&&1!==a.getDate()}],["%-m/%-d",function(a){return 1!==a.getDate()}],["%-m/%-d",function(a){return a.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),a.hiddenTargetIds=[],a.hiddenLegendIds=[],a.focusedTargetIds=[],a.defocusedTargetIds=[],a.xOrient=c.axis_rotated?"left":"bottom",a.yOrient=c.axis_rotated?c.axis_y_inner?"top":"bottom":c.axis_y_inner?"right":"left",a.y2Orient=c.axis_rotated?c.axis_y2_inner?"bottom":"top":c.axis_y2_inner?"left":"right",a.subXOrient=c.axis_rotated?"left":"bottom",a.isLegendRight="right"===c.legend_position,a.isLegendInset="inset"===c.legend_position,a.isLegendTop="top-left"===c.legend_inset_anchor||"top-right"===c.legend_inset_anchor,a.isLegendLeft="top-left"===c.legend_inset_anchor||"bottom-left"===c.legend_inset_anchor,a.legendStep=0,a.legendItemWidth=0,a.legendItemHeight=0,a.currentMaxTickWidths={x:0,y:0,y2:0},a.rotated_padding_left=30,a.rotated_padding_right=c.axis_rotated&&!c.axis_x_show?0:30,a.rotated_padding_top=5,a.withoutFadeIn={},a.intervalForObserveInserted=void 0,a.axes.subx=b.selectAll([])},i.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},i.initWithData=function(a){var b,c,d=this,e=d.d3,g=d.config,h=!0;d.axis=new f(d),d.initPie&&d.initPie(),d.initBrush&&d.initBrush(),d.initZoom&&d.initZoom(),g.bindto?"function"==typeof g.bindto.node?d.selectChart=g.bindto:d.selectChart=e.select(g.bindto):d.selectChart=e.selectAll([]),d.selectChart.empty()&&(d.selectChart=e.select(document.createElement("div")).style("opacity",0),d.observeInserted(d.selectChart),h=!1),d.selectChart.html("").classed("c3",!0),d.data.xs={},d.data.targets=d.convertDataToTargets(a),g.data_filter&&(d.data.targets=d.data.targets.filter(g.data_filter)),g.data_hide&&d.addHiddenTargetIds(g.data_hide===!0?d.mapToIds(d.data.targets):g.data_hide),g.legend_hide&&d.addHiddenLegendIds(g.legend_hide===!0?d.mapToIds(d.data.targets):g.legend_hide),d.hasType("gauge")&&(g.legend_show=!1),d.updateSizes(),d.updateScales(),d.x.domain(e.extent(d.getXDomain(d.data.targets))),d.y.domain(d.getYDomain(d.data.targets,"y")),d.y2.domain(d.getYDomain(d.data.targets,"y2")),d.subX.domain(d.x.domain()),d.subY.domain(d.y.domain()),d.subY2.domain(d.y2.domain()),d.orgXDomain=d.x.domain(),d.brush&&d.brush.scale(d.subX),g.zoom_enabled&&d.zoom.scale(d.x),d.svg=d.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return g.onmouseover.call(d)}).on("mouseleave",function(){return g.onmouseout.call(d)}),d.config.svg_classname&&d.svg.attr("class",d.config.svg_classname),b=d.svg.append("defs"),d.clipChart=d.appendClip(b,d.clipId),d.clipXAxis=d.appendClip(b,d.clipIdForXAxis),d.clipYAxis=d.appendClip(b,d.clipIdForYAxis),d.clipGrid=d.appendClip(b,d.clipIdForGrid),d.clipSubchart=d.appendClip(b,d.clipIdForSubchart),d.updateSvgSize(),c=d.main=d.svg.append("g").attr("transform",d.getTranslate("main")),d.initSubchart&&d.initSubchart(),d.initTooltip&&d.initTooltip(),d.initLegend&&d.initLegend(),d.initTitle&&d.initTitle(),c.append("text").attr("class",l.text+" "+l.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d.initRegion(),d.initGrid(),c.append("g").attr("clip-path",d.clipPath).attr("class",l.chart),g.grid_lines_front&&d.initGridLines(),d.initEventRect(),d.initChartElements(),c.insert("rect",g.zoom_privileged?null:"g."+l.regions).attr("class",l.zoomRect).attr("width",d.width).attr("height",d.height).style("opacity",0).on("dblclick.zoom",null),g.axis_x_extent&&d.brush.extent(d.getDefaultExtent()),d.axis.init(),d.updateTargets(d.data.targets),h&&(d.updateDimension(),d.config.oninit.call(d),d.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),d.bindResize(),d.api.element=d.selectChart.node()},i.smoothLines=function(a,b){var c=this;"grid"===b&&a.each(function(){var a=c.d3.select(this),b=a.attr("x1"),d=a.attr("x2"),e=a.attr("y1"),f=a.attr("y2");a.attr({x1:Math.ceil(b),x2:Math.ceil(d),y1:Math.ceil(e),y2:Math.ceil(f)})})},i.updateSizes=function(){var a=this,b=a.config,c=a.legend?a.getLegendHeight():0,d=a.legend?a.getLegendWidth():0,e=a.isLegendRight||a.isLegendInset?0:c,f=a.hasArcType(),g=b.axis_rotated||f?0:a.getHorizontalAxisHeight("x"),h=b.subchart_show&&!f?b.subchart_size_height+g:0;a.currentWidth=a.getCurrentWidth(),a.currentHeight=a.getCurrentHeight(),a.margin=b.axis_rotated?{top:a.getHorizontalAxisHeight("y2")+a.getCurrentPaddingTop(),right:f?0:a.getCurrentPaddingRight(),bottom:a.getHorizontalAxisHeight("y")+e+a.getCurrentPaddingBottom(),left:h+(f?0:a.getCurrentPaddingLeft())}:{top:4+a.getCurrentPaddingTop(),right:f?0:a.getCurrentPaddingRight(),bottom:g+h+e+a.getCurrentPaddingBottom(),left:f?0:a.getCurrentPaddingLeft()},a.margin2=b.axis_rotated?{top:a.margin.top,right:NaN,bottom:20+e,left:a.rotated_padding_left}:{top:a.currentHeight-h-e,right:NaN,bottom:g+e,left:a.margin.left},a.margin3={top:0,right:NaN,bottom:0,left:0},a.updateSizeForLegend&&a.updateSizeForLegend(c,d),a.width=a.currentWidth-a.margin.left-a.margin.right,a.height=a.currentHeight-a.margin.top-a.margin.bottom,a.width<0&&(a.width=0),a.height<0&&(a.height=0),a.width2=b.axis_rotated?a.margin.left-a.rotated_padding_left-a.rotated_padding_right:a.width,a.height2=b.axis_rotated?a.height:a.currentHeight-a.margin2.top-a.margin2.bottom,a.width2<0&&(a.width2=0),a.height2<0&&(a.height2=0),a.arcWidth=a.width-(a.isLegendRight?d+10:0),a.arcHeight=a.height-(a.isLegendRight?0:10),a.hasType("gauge")&&!b.gauge_fullCircle&&(a.arcHeight+=a.height-a.getGaugeLabelHeight()),a.updateRadius&&a.updateRadius(),a.isLegendRight&&f&&(a.margin3.left=a.arcWidth/2+1.1*a.radiusExpanded)},i.updateTargets=function(a){var b=this;b.updateTargetsForText(a),b.updateTargetsForBar(a),b.updateTargetsForLine(a),b.hasArcType()&&b.updateTargetsForArc&&b.updateTargetsForArc(a),b.updateTargetsForSubchart&&b.updateTargetsForSubchart(a),b.showTargets()},i.showTargets=function(){var a=this;a.svg.selectAll("."+l.target).filter(function(b){return a.isTargetToShow(b.id)}).transition().duration(a.config.transition_duration).style("opacity",1)},i.redraw=function(a,b){var c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,v,x,y,z,A,B,C,D,E,F,G,H=this,I=H.main,J=H.d3,K=H.config,L=H.getShapeIndices(H.isAreaType),M=H.getShapeIndices(H.isBarType),N=H.getShapeIndices(H.isLineType),O=H.hasArcType(),P=H.filterTargetsToShow(H.data.targets),Q=H.xv.bind(H);if(a=a||{},c=w(a,"withY",!0),d=w(a,"withSubchart",!0),e=w(a,"withTransition",!0),h=w(a,"withTransform",!1),i=w(a,"withUpdateXDomain",!1),j=w(a,"withUpdateOrgXDomain",!1),k=w(a,"withTrimXDomain",!0),p=w(a,"withUpdateXAxis",i),m=w(a,"withLegend",!1),n=w(a,"withEventRect",!0),o=w(a,"withDimension",!0),f=w(a,"withTransitionForExit",e),g=w(a,"withTransitionForAxis",e),v=e?K.transition_duration:0,x=f?v:0,y=g?v:0,b=b||H.axis.generateTransitions(y),m&&K.legend_show?H.updateLegend(H.mapToIds(H.data.targets),a,b):o&&H.updateDimension(!0),H.isCategorized()&&0===P.length&&H.x.domain([0,H.axes.x.selectAll(".tick").size()]),P.length?(H.updateXDomain(P,i,j,k),K.axis_x_tick_values||(B=H.axis.updateXAxisTickValues(P))):(H.xAxis.tickValues([]),H.subXAxis.tickValues([])),K.zoom_rescale&&!a.flow&&(E=H.x.orgDomain()),H.y.domain(H.getYDomain(P,"y",E)),H.y2.domain(H.getYDomain(P,"y2",E)),!K.axis_y_tick_values&&K.axis_y_tick_count&&H.yAxis.tickValues(H.axis.generateTickValues(H.y.domain(),K.axis_y_tick_count)),!K.axis_y2_tick_values&&K.axis_y2_tick_count&&H.y2Axis.tickValues(H.axis.generateTickValues(H.y2.domain(),K.axis_y2_tick_count)),H.axis.redraw(b,O),H.axis.updateLabels(e),(i||p)&&P.length)if(K.axis_x_tick_culling&&B){for(C=1;C<B.length;C++)if(B.length/C<K.axis_x_tick_culling_max){D=C;break}H.svg.selectAll("."+l.axisX+" .tick text").each(function(a){var b=B.indexOf(a);b>=0&&J.select(this).style("display",b%D?"none":"block")})}else H.svg.selectAll("."+l.axisX+" .tick text").style("display","block");q=H.generateDrawArea?H.generateDrawArea(L,!1):void 0,r=H.generateDrawBar?H.generateDrawBar(M):void 0,s=H.generateDrawLine?H.generateDrawLine(N,!1):void 0,t=H.generateXYForText(L,M,N,!0),u=H.generateXYForText(L,M,N,!1),c&&(H.subY.domain(H.getYDomain(P,"y")),H.subY2.domain(H.getYDomain(P,"y2"))),H.updateXgridFocus(),I.select("text."+l.text+"."+l.empty).attr("x",H.width/2).attr("y",H.height/2).text(K.data_empty_label_text).transition().style("opacity",P.length?0:1),H.updateGrid(v),H.updateRegion(v),H.updateBar(x),H.updateLine(x),H.updateArea(x),H.updateCircle(),H.hasDataLabel()&&H.updateText(x),H.redrawTitle&&H.redrawTitle(),H.redrawArc&&H.redrawArc(v,x,h),H.redrawSubchart&&H.redrawSubchart(d,b,v,x,L,M,N),I.selectAll("."+l.selectedCircles).filter(H.isBarType.bind(H)).selectAll("circle").remove(),K.interaction_enabled&&!a.flow&&n&&(H.redrawEventRect(),H.updateZoom&&H.updateZoom()),H.updateCircleY(),F=(H.config.axis_rotated?H.circleY:H.circleX).bind(H),G=(H.config.axis_rotated?H.circleX:H.circleY).bind(H),a.flow&&(A=H.generateFlow({targets:P,flow:a.flow,duration:a.flow.duration,drawBar:r,drawLine:s,drawArea:q,cx:F,cy:G,xv:Q,xForText:t,yForText:u})),(v||A)&&H.isTabVisible()?J.transition().duration(v).each(function(){var b=[];[H.redrawBar(r,!0),H.redrawLine(s,!0),H.redrawArea(q,!0),H.redrawCircle(F,G,!0),H.redrawText(t,u,a.flow,!0),H.redrawRegion(!0),H.redrawGrid(!0)].forEach(function(a){a.forEach(function(a){b.push(a)})}),z=H.generateWait(),b.forEach(function(a){z.add(a)})}).call(z,function(){A&&A(),K.onrendered&&K.onrendered.call(H)}):(H.redrawBar(r),H.redrawLine(s),H.redrawArea(q),H.redrawCircle(F,G),H.redrawText(t,u,a.flow),H.redrawRegion(),H.redrawGrid(),K.onrendered&&K.onrendered.call(H)),H.mapToIds(H.data.targets).forEach(function(a){H.withoutFadeIn[a]=!0})},i.updateAndRedraw=function(a){var b,c=this,d=c.config;a=a||{},a.withTransition=w(a,"withTransition",!0),a.withTransform=w(a,"withTransform",!1),a.withLegend=w(a,"withLegend",!1),a.withUpdateXDomain=!0,a.withUpdateOrgXDomain=!0,a.withTransitionForExit=!1,a.withTransitionForTransform=w(a,"withTransitionForTransform",a.withTransition),c.updateSizes(),a.withLegend&&d.legend_show||(b=c.axis.generateTransitions(a.withTransitionForAxis?d.transition_duration:0),c.updateScales(),c.updateSvgSize(),c.transformAll(a.withTransitionForTransform,b)),c.redraw(a,b)},i.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},i.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},i.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},i.isCustomX=function(){var a=this,b=a.config;return!a.isTimeSeries()&&(b.data_x||v(b.data_xs))},i.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},i.getTranslate=function(a){var b,c,d=this,e=d.config;return"main"===a?(b=s(d.margin.left),c=s(d.margin.top)):"context"===a?(b=s(d.margin2.left),c=s(d.margin2.top)):"legend"===a?(b=d.margin3.left,c=d.margin3.top):"x"===a?(b=0,c=e.axis_rotated?0:d.height):"y"===a?(b=0,c=e.axis_rotated?d.height:0):"y2"===a?(b=e.axis_rotated?0:d.width,c=e.axis_rotated?1:0):"subx"===a?(b=0,c=e.axis_rotated?0:d.height2):"arc"===a&&(b=d.arcWidth/2,c=d.arcHeight/2),"translate("+b+","+c+")"},i.initialOpacity=function(a){return null!==a.value&&this.withoutFadeIn[a.id]?1:0},i.initialOpacityForCircle=function(a){return null!==a.value&&this.withoutFadeIn[a.id]?this.opacityForCircle(a):0},i.opacityForCircle=function(a){var b=this.config.point_show?1:0;return m(a.value)?this.isScatterType(a)?.5:b:0},i.opacityForText=function(){return this.hasDataLabel()?1:0},i.xx=function(a){return a?this.x(a.x):null},i.xv=function(a){var b=this,c=a.value;return b.isTimeSeries()?c=b.parseDate(a.value):b.isCategorized()&&"string"==typeof a.value&&(c=b.config.axis_x_categories.indexOf(a.value)),Math.ceil(b.x(c))},i.yv=function(a){var b=this,c=a.axis&&"y2"===a.axis?b.y2:b.y;return Math.ceil(c(a.value))},i.subxx=function(a){return a?this.subX(a.x):null},i.transformMain=function(a,b){var c,d,e,f=this;b&&b.axisX?c=b.axisX:(c=f.main.select("."+l.axisX),a&&(c=c.transition())),b&&b.axisY?d=b.axisY:(d=f.main.select("."+l.axisY),a&&(d=d.transition())),b&&b.axisY2?e=b.axisY2:(e=f.main.select("."+l.axisY2),a&&(e=e.transition())),(a?f.main.transition():f.main).attr("transform",f.getTranslate("main")),c.attr("transform",f.getTranslate("x")),d.attr("transform",f.getTranslate("y")),e.attr("transform",f.getTranslate("y2")),f.main.select("."+l.chartArcs).attr("transform",f.getTranslate("arc"))},i.transformAll=function(a,b){var c=this;c.transformMain(a,b),c.config.subchart_show&&c.transformContext(a,b),c.legend&&c.transformLegend(a)},i.updateSvgSize=function(){var a=this,b=a.svg.select(".c3-brush .background");a.svg.attr("width",a.currentWidth).attr("height",a.currentHeight),a.svg.selectAll(["#"+a.clipId,"#"+a.clipIdForGrid]).select("rect").attr("width",a.width).attr("height",a.height),a.svg.select("#"+a.clipIdForXAxis).select("rect").attr("x",a.getXAxisClipX.bind(a)).attr("y",a.getXAxisClipY.bind(a)).attr("width",a.getXAxisClipWidth.bind(a)).attr("height",a.getXAxisClipHeight.bind(a)),a.svg.select("#"+a.clipIdForYAxis).select("rect").attr("x",a.getYAxisClipX.bind(a)).attr("y",a.getYAxisClipY.bind(a)).attr("width",a.getYAxisClipWidth.bind(a)).attr("height",a.getYAxisClipHeight.bind(a)),a.svg.select("#"+a.clipIdForSubchart).select("rect").attr("width",a.width).attr("height",b.size()?b.attr("height"):0),a.svg.select("."+l.zoomRect).attr("width",a.width).attr("height",a.height),a.selectChart.style("max-height",a.currentHeight+"px")},i.updateDimension=function(a){var b=this;a||(b.config.axis_rotated?(b.axes.x.call(b.xAxis),b.axes.subx.call(b.subXAxis)):(b.axes.y.call(b.yAxis),b.axes.y2.call(b.y2Axis))),b.updateSizes(),b.updateScales(),b.updateSvgSize(),b.transformAll(!1)},i.observeInserted=function(b){var c,d=this;return"undefined"==typeof MutationObserver?void a.console.error("MutationObserver not defined."):(c=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&e.previousSibling&&(c.disconnect(),d.intervalForObserveInserted=a.setInterval(function(){b.node().parentNode&&(a.clearInterval(d.intervalForObserveInserted),d.updateDimension(),d.brush&&d.brush.update(),d.config.oninit.call(d),d.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),b.transition().style("opacity",1))},10))})}),void c.observe(b.node(),{attributes:!0,childList:!0,characterData:!0}))},i.bindResize=function(){var b=this,c=b.config;if(b.resizeFunction=b.generateResize(),b.resizeFunction.add(function(){c.onresize.call(b)}),c.resize_auto&&b.resizeFunction.add(function(){void 0!==b.resizeTimeout&&a.clearTimeout(b.resizeTimeout),b.resizeTimeout=a.setTimeout(function(){delete b.resizeTimeout,b.api.flush()},100)}),b.resizeFunction.add(function(){c.onresized.call(b)}),a.attachEvent)a.attachEvent("onresize",b.resizeFunction);else if(a.addEventListener)a.addEventListener("resize",b.resizeFunction,!1);else{var d=a.onresize;d?d.add&&d.remove||(d=b.generateResize(),d.add(a.onresize)):d=b.generateResize(),d.add(b.resizeFunction),a.onresize=d}},i.generateResize=function(){function a(){b.forEach(function(a){a()})}var b=[];return a.add=function(a){b.push(a)},a.remove=function(a){for(var c=0;c<b.length;c++)if(b[c]===a){b.splice(c,1);break}},a},i.endall=function(a,b){var c=0;a.each(function(){++c}).each("end",function(){--c||b.apply(this,arguments)})},i.generateWait=function(){var a=[],b=function(b,c){var d=setInterval(function(){var b=0;a.forEach(function(a){if(a.empty())return void(b+=1);try{a.transition()}catch(c){b+=1}}),b===a.length&&(clearInterval(d),c&&c())},10)};return b.add=function(b){a.push(b)},b},i.parseDate=function(b){var c,d=this;return b instanceof Date?c=b:"string"==typeof b?c=d.dataTimeFormat(d.config.data_xFormat).parse(b):"number"!=typeof b||isNaN(b)||(c=new Date(+b)),c&&!isNaN(+c)||a.console.error("Failed to parse x '"+b+"' to Date object"),c},i.isTabVisible=function(){var a;return"undefined"!=typeof document.hidden?a="hidden":"undefined"!=typeof document.mozHidden?a="mozHidden":"undefined"!=typeof document.msHidden?a="msHidden":"undefined"!=typeof document.webkitHidden&&(a="webkitHidden"),!document[a]},i.getDefaultConfig=function(){var a={bindto:"#chart",svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},zoom_x_min:void 0,zoom_x_max:void 0,interaction_brighten:!0,interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(a){return a},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_units:void 0,gauge_width:void 0,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,spline_interpolation_type:"cardinal",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(a,b,c,d){return this.getTooltipContent?this.getTooltipContent(a,b,c,d):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_onshow:function(){},tooltip_onhide:function(){},title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"};return Object.keys(this.additionalConfig).forEach(function(b){a[b]=this.additionalConfig[b]},this),a},i.additionalConfig={},i.loadConfig=function(a){function b(){var a=d.shift();return a&&c&&"object"==typeof c&&a in c?(c=c[a],b()):a?void 0:c}var c,d,e,f=this.config;Object.keys(f).forEach(function(g){c=a,d=g.split("_"),e=b(),q(e)&&(f[g]=e)})},i.getScale=function(a,b,c){return(c?this.d3.time.scale():this.d3.scale.linear()).range([a,b])},i.getX=function(a,b,c,d){var e,f=this,g=f.getScale(a,b,f.isTimeSeries()),h=c?g.domain(c):g;f.isCategorized()?(d=d||function(){return 0},g=function(a,b){var c=h(a)+d(a);return b?c:Math.ceil(c)}):g=function(a,b){var c=h(a);return b?c:Math.ceil(c)};for(e in h)g[e]=h[e];return g.orgDomain=function(){return h.domain()},f.isCategorized()&&(g.domain=function(a){return arguments.length?(h.domain(a),g):(a=this.orgDomain(),[a[0],a[1]+1])}),g},i.getY=function(a,b,c){var d=this.getScale(a,b,this.isTimeSeriesY());return c&&d.domain(c),d},i.getYScale=function(a){return"y2"===this.axis.getId(a)?this.y2:this.y},i.getSubYScale=function(a){return"y2"===this.axis.getId(a)?this.subY2:this.subY},i.updateScales=function(){var a=this,b=a.config,c=!a.x;a.xMin=b.axis_rotated?1:0,a.xMax=b.axis_rotated?a.height:a.width,a.yMin=b.axis_rotated?0:a.height,a.yMax=b.axis_rotated?a.width:1,a.subXMin=a.xMin,a.subXMax=a.xMax,a.subYMin=b.axis_rotated?0:a.height2,a.subYMax=b.axis_rotated?a.width2:1,a.x=a.getX(a.xMin,a.xMax,c?void 0:a.x.orgDomain(),function(){return a.xAxis.tickOffset()}),a.y=a.getY(a.yMin,a.yMax,c?b.axis_y_default:a.y.domain()),a.y2=a.getY(a.yMin,a.yMax,c?b.axis_y2_default:a.y2.domain()),a.subX=a.getX(a.xMin,a.xMax,a.orgXDomain,function(b){return b%1?0:a.subXAxis.tickOffset()}),a.subY=a.getY(a.subYMin,a.subYMax,c?b.axis_y_default:a.subY.domain()),a.subY2=a.getY(a.subYMin,a.subYMax,c?b.axis_y2_default:a.subY2.domain()),a.xAxisTickFormat=a.axis.getXAxisTickFormat(),a.xAxisTickValues=a.axis.getXAxisTickValues(),a.yAxisTickValues=a.axis.getYAxisTickValues(),a.y2AxisTickValues=a.axis.getY2AxisTickValues(),a.xAxis=a.axis.getXAxis(a.x,a.xOrient,a.xAxisTickFormat,a.xAxisTickValues,b.axis_x_tick_outer),a.subXAxis=a.axis.getXAxis(a.subX,a.subXOrient,a.xAxisTickFormat,a.xAxisTickValues,b.axis_x_tick_outer),a.yAxis=a.axis.getYAxis(a.y,a.yOrient,b.axis_y_tick_format,a.yAxisTickValues,b.axis_y_tick_outer),a.y2Axis=a.axis.getYAxis(a.y2,a.y2Orient,b.axis_y2_tick_format,a.y2AxisTickValues,b.axis_y2_tick_outer),c||(a.brush&&a.brush.scale(a.subX),b.zoom_enabled&&a.zoom.scale(a.x)),a.updateArc&&a.updateArc()},i.getYDomainMin=function(a){var b,c,d,e,f,g,h=this,i=h.config,j=h.mapToIds(a),k=h.getValuesAsIdKeyed(a);if(i.data_groups.length>0)for(g=h.hasNegativeValueInTargets(a),b=0;b<i.data_groups.length;b++)if(e=i.data_groups[b].filter(function(a){return j.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&k[d]&&k[d].forEach(function(a,b){k[d][b]=0>a?a:0}),c=1;c<e.length;c++)f=e[c],k[f]&&k[f].forEach(function(a,b){h.axis.getId(f)!==h.axis.getId(d)||!k[d]||g&&+a>0||(k[d][b]+=+a)});return h.d3.min(Object.keys(k).map(function(a){return h.d3.min(k[a])}))},i.getYDomainMax=function(a){var b,c,d,e,f,g,h=this,i=h.config,j=h.mapToIds(a),k=h.getValuesAsIdKeyed(a);if(i.data_groups.length>0)for(g=h.hasPositiveValueInTargets(a),b=0;b<i.data_groups.length;b++)if(e=i.data_groups[b].filter(function(a){return j.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&k[d]&&k[d].forEach(function(a,b){k[d][b]=a>0?a:0}),c=1;c<e.length;c++)f=e[c],k[f]&&k[f].forEach(function(a,b){h.axis.getId(f)!==h.axis.getId(d)||!k[d]||g&&0>+a||(k[d][b]+=+a)});return h.d3.max(Object.keys(k).map(function(a){return h.d3.max(k[a])}))},i.getYDomain=function(a,b,c){var d,e,f,g,h,i,j,k,l,n,o,p=this,q=p.config,r=a.filter(function(a){return p.axis.getId(a.id)===b}),s=c?p.filterByXDomain(r,c):r,u="y2"===b?q.axis_y2_min:q.axis_y_min,w="y2"===b?q.axis_y2_max:q.axis_y_max,x=p.getYDomainMin(s),y=p.getYDomainMax(s),z="y2"===b?q.axis_y2_center:q.axis_y_center,A=p.hasType("bar",s)&&q.bar_zerobased||p.hasType("area",s)&&q.area_zerobased,B="y2"===b?q.axis_y2_inverted:q.axis_y_inverted,C=p.hasDataLabel()&&q.axis_rotated,D=p.hasDataLabel()&&!q.axis_rotated;return x=m(u)?u:m(w)?w>x?x:w-10:x,y=m(w)?w:m(u)?y>u?y:u+10:y,0===s.length?"y2"===b?p.y2.domain():p.y.domain():(isNaN(x)&&(x=0),isNaN(y)&&(y=x),x===y&&(0>x?y=0:x=0),n=x>=0&&y>=0,o=0>=x&&0>=y,(m(u)&&n||m(w)&&o)&&(A=!1),A&&(n&&(x=0),o&&(y=0)),e=Math.abs(y-x),f=g=h=.1*e,"undefined"!=typeof z&&(i=Math.max(Math.abs(x),Math.abs(y)),y=z+i,x=z-i),C?(j=p.getDataLabelLength(x,y,"width"),k=t(p.y.range()),l=[j[0]/k,j[1]/k],
2352 ;!function(a){"use strict";function b(a){this.owner=a}function c(a,b){if(Object.create)b.prototype=Object.create(a.prototype);else{var c=function(){};c.prototype=a.prototype,b.prototype=new c}return b.prototype.constructor=b,b}function d(a){var b=this.internal=new e(this);b.loadConfig(a),b.beforeInit(a),b.init(),b.afterInit(a),function c(a,b,d){Object.keys(a).forEach(function(e){b[e]=a[e].bind(d),Object.keys(a[e]).length>0&&c(a[e],b[e],d)})}(h,this,this)}function e(b){var c=this;c.d3=a.d3?a.d3:"undefined"!=typeof require?require("d3"):void 0,c.api=b,c.config=c.getDefaultConfig(),c.data={},c.cache={},c.axes={}}function f(a){b.call(this,a)}function g(a,b){function c(a,b){a.attr("transform",function(a){return"translate("+Math.ceil(b(a)+u)+", 0)"})}function d(a,b){a.attr("transform",function(a){return"translate(0,"+Math.ceil(b(a))+")"})}function e(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function f(a){var b,c,d=[];if(a.ticks)return a.ticks.apply(a,n);for(c=a.domain(),b=Math.ceil(c[0]);b<c[1];b++)d.push(b);return d.length>0&&d[0]>0&&d.unshift(d[0]-(d[1]-d[0])),d}function g(){var a,c=p.copy();return b.isCategory&&(a=p.domain(),c.domain([a[0],a[1]-1])),c}function h(a){var b=m?m(a):a;return"undefined"!=typeof b?b:""}function i(a){if(A)return A;var b={h:11.5,w:5.5};return a.select("text").text(h).each(function(a){var c=this.getBoundingClientRect(),d=h(a),e=c.height,f=d?c.width/d.length:void 0;e&&f&&(b.h=e,b.w=f)}).text(""),A=b,b}function j(c){return b.withoutTransition?c:a.transition(c)}function k(m){m.each(function(){function m(a,c){function d(a,b){f=void 0;for(var h=1;h<b.length;h++)if(" "===b.charAt(h)&&(f=h),e=b.substr(0,h+1),g=U.w*e.length,g>c)return d(a.concat(b.substr(0,f?f:h)),b.slice(f?f+1:h));return a.concat(b)}var e,f,g,i=h(a),j=[];return"[object Array]"===Object.prototype.toString.call(i)?i:((!c||0>=c)&&(c=X?95:b.isCategory?Math.ceil(F(G[1])-F(G[0]))-12:110),d(j,i+""))}function n(a,b){var c=U.h;return 0===b&&(c="left"===q||"right"===q?-((V[a.index]-1)*(U.h/2)-3):".71em"),c}function v(a){var b=p(a)+(o?0:u);return L[0]<b&&b<L[1]?r:0}function w(a){return a?a>0?"start":"end":"middle"}function x(a){return a?"rotate("+a+")":""}function y(a){return a?8*Math.sin(Math.PI*(a/180)):0}function z(a){return a?11.5-2.5*(a/15)*(a>0?1:-1):W}var A,B,C,D=k.g=a.select(this),E=this.__chart__||p,F=this.__chart__=g(),G=t?t:f(F),H=D.selectAll(".tick").data(G,F),I=H.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),J=H.exit().remove(),K=j(H).style("opacity",1),L=p.rangeExtent?p.rangeExtent():e(p.range()),M=D.selectAll(".domain").data([0]),N=(M.enter().append("path").attr("class","domain"),j(M));I.append("line"),I.append("text");var O=I.select("line"),P=K.select("line"),Q=I.select("text"),R=K.select("text");b.isCategory?(u=Math.ceil((F(1)-F(0))/2),B=o?0:u,C=o?u:0):u=B=0;var S,T,U=i(D.select(".tick")),V=[],W=Math.max(r,0)+s,X="left"===q||"right"===q;S=H.select("text"),T=S.selectAll("tspan").data(function(a,c){var d=b.tickMultiline?m(a,b.tickWidth):[].concat(h(a));return V[c]=d.length,d.map(function(a){return{index:c,splitted:a}})}),T.enter().append("tspan"),T.exit().remove(),T.text(function(a){return a.splitted});var Y=b.tickTextRotate;switch(q){case"bottom":A=c,O.attr("y2",r),Q.attr("y",W),P.attr("x1",B).attr("x2",B).attr("y2",v),R.attr("x",0).attr("y",z(Y)).style("text-anchor",w(Y)).attr("transform",x(Y)),T.attr("x",0).attr("dy",n).attr("dx",y(Y)),N.attr("d","M"+L[0]+","+l+"V0H"+L[1]+"V"+l);break;case"top":A=c,O.attr("y2",-r),Q.attr("y",-W),P.attr("x2",0).attr("y2",-r),R.attr("x",0).attr("y",-W),S.style("text-anchor","middle"),T.attr("x",0).attr("dy","0em"),N.attr("d","M"+L[0]+","+-l+"V0H"+L[1]+"V"+-l);break;case"left":A=d,O.attr("x2",-r),Q.attr("x",-W),P.attr("x2",-r).attr("y1",C).attr("y2",C),R.attr("x",-W).attr("y",u),S.style("text-anchor","end"),T.attr("x",-W).attr("dy",n),N.attr("d","M"+-l+","+L[0]+"H0V"+L[1]+"H"+-l);break;case"right":A=d,O.attr("x2",r),Q.attr("x",W),P.attr("x2",r).attr("y2",0),R.attr("x",W).attr("y",0),S.style("text-anchor","start"),T.attr("x",W).attr("dy",n),N.attr("d","M"+l+","+L[0]+"H0V"+L[1]+"H"+l)}if(F.rangeBand){var Z=F,$=Z.rangeBand()/2;E=F=function(a){return Z(a)+$}}else E.rangeBand?E=F:J.call(A,F);I.call(A,E),K.call(A,F)})}var l,m,n,o,p=a.scale.linear(),q="bottom",r=6,s=3,t=null,u=0,v=!0;return b=b||{},l=b.withOuterTick?6:0,k.scale=function(a){return arguments.length?(p=a,k):p},k.orient=function(a){return arguments.length?(q=a in{top:1,right:1,bottom:1,left:1}?a+"":"bottom",k):q},k.tickFormat=function(a){return arguments.length?(m=a,k):m},k.tickCentered=function(a){return arguments.length?(o=a,k):o},k.tickOffset=function(){return u},k.tickInterval=function(){var a,c;return b.isCategory?a=2*u:(c=k.g.select("path.domain").node().getTotalLength()-2*l,a=c/k.g.selectAll("line").size()),a===1/0?0:a},k.ticks=function(){return arguments.length?(n=arguments,k):n},k.tickCulling=function(a){return arguments.length?(v=a,k):v},k.tickValues=function(a){if("function"==typeof a)t=function(){return a(p.domain())};else{if(!arguments.length)return t;t=a}return k},k}var h,i,j,k={version:"0.4.11"};k.generate=function(a){return new d(a)},k.chart={fn:d.prototype,internal:{fn:e.prototype,axis:{fn:f.prototype}}},h=k.chart.fn,i=k.chart.internal.fn,j=k.chart.internal.axis.fn,i.beforeInit=function(){},i.afterInit=function(){},i.init=function(){var a=this,b=a.config;if(a.initParams(),b.data_url)a.convertUrlToData(b.data_url,b.data_mimeType,b.data_headers,b.data_keys,a.initWithData);else if(b.data_json)a.initWithData(a.convertJsonToData(b.data_json,b.data_keys));else if(b.data_rows)a.initWithData(a.convertRowsToData(b.data_rows));else{if(!b.data_columns)throw Error("url or json or rows or columns is required.");a.initWithData(a.convertColumnsToData(b.data_columns))}},i.initParams=function(){var a=this,b=a.d3,c=a.config;a.clipId="c3-"+ +new Date+"-clip",a.clipIdForXAxis=a.clipId+"-xaxis",a.clipIdForYAxis=a.clipId+"-yaxis",a.clipIdForGrid=a.clipId+"-grid",a.clipIdForSubchart=a.clipId+"-subchart",a.clipPath=a.getClipPath(a.clipId),a.clipPathForXAxis=a.getClipPath(a.clipIdForXAxis),a.clipPathForYAxis=a.getClipPath(a.clipIdForYAxis),a.clipPathForGrid=a.getClipPath(a.clipIdForGrid),a.clipPathForSubchart=a.getClipPath(a.clipIdForSubchart),a.dragStart=null,a.dragging=!1,a.flowing=!1,a.cancelClick=!1,a.mouseover=!1,a.transiting=!1,a.color=a.generateColor(),a.levelColor=a.generateLevelColor(),a.dataTimeFormat=c.data_xLocaltime?b.time.format:b.time.format.utc,a.axisTimeFormat=c.axis_x_localtime?b.time.format:b.time.format.utc,a.defaultAxisTimeFormat=a.axisTimeFormat.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%-m/%-d",function(a){return a.getDay()&&1!==a.getDate()}],["%-m/%-d",function(a){return 1!==a.getDate()}],["%-m/%-d",function(a){return a.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),a.hiddenTargetIds=[],a.hiddenLegendIds=[],a.focusedTargetIds=[],a.defocusedTargetIds=[],a.xOrient=c.axis_rotated?"left":"bottom",a.yOrient=c.axis_rotated?c.axis_y_inner?"top":"bottom":c.axis_y_inner?"right":"left",a.y2Orient=c.axis_rotated?c.axis_y2_inner?"bottom":"top":c.axis_y2_inner?"left":"right",a.subXOrient=c.axis_rotated?"left":"bottom",a.isLegendRight="right"===c.legend_position,a.isLegendInset="inset"===c.legend_position,a.isLegendTop="top-left"===c.legend_inset_anchor||"top-right"===c.legend_inset_anchor,a.isLegendLeft="top-left"===c.legend_inset_anchor||"bottom-left"===c.legend_inset_anchor,a.legendStep=0,a.legendItemWidth=0,a.legendItemHeight=0,a.currentMaxTickWidths={x:0,y:0,y2:0},a.rotated_padding_left=30,a.rotated_padding_right=c.axis_rotated&&!c.axis_x_show?0:30,a.rotated_padding_top=5,a.withoutFadeIn={},a.intervalForObserveInserted=void 0,a.axes.subx=b.selectAll([])},i.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},i.initWithData=function(a){var b,c,d=this,e=d.d3,g=d.config,h=!0;d.axis=new f(d),d.initPie&&d.initPie(),d.initBrush&&d.initBrush(),d.initZoom&&d.initZoom(),g.bindto?"function"==typeof g.bindto.node?d.selectChart=g.bindto:d.selectChart=e.select(g.bindto):d.selectChart=e.selectAll([]),d.selectChart.empty()&&(d.selectChart=e.select(document.createElement("div")).style("opacity",0),d.observeInserted(d.selectChart),h=!1),d.selectChart.html("").classed("c3",!0),d.data.xs={},d.data.targets=d.convertDataToTargets(a),g.data_filter&&(d.data.targets=d.data.targets.filter(g.data_filter)),g.data_hide&&d.addHiddenTargetIds(g.data_hide===!0?d.mapToIds(d.data.targets):g.data_hide),g.legend_hide&&d.addHiddenLegendIds(g.legend_hide===!0?d.mapToIds(d.data.targets):g.legend_hide),d.hasType("gauge")&&(g.legend_show=!1),d.updateSizes(),d.updateScales(),d.x.domain(e.extent(d.getXDomain(d.data.targets))),d.y.domain(d.getYDomain(d.data.targets,"y")),d.y2.domain(d.getYDomain(d.data.targets,"y2")),d.subX.domain(d.x.domain()),d.subY.domain(d.y.domain()),d.subY2.domain(d.y2.domain()),d.orgXDomain=d.x.domain(),d.brush&&d.brush.scale(d.subX),g.zoom_enabled&&d.zoom.scale(d.x),d.svg=d.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return g.onmouseover.call(d)}).on("mouseleave",function(){return g.onmouseout.call(d)}),d.config.svg_classname&&d.svg.attr("class",d.config.svg_classname),b=d.svg.append("defs"),d.clipChart=d.appendClip(b,d.clipId),d.clipXAxis=d.appendClip(b,d.clipIdForXAxis),d.clipYAxis=d.appendClip(b,d.clipIdForYAxis),d.clipGrid=d.appendClip(b,d.clipIdForGrid),d.clipSubchart=d.appendClip(b,d.clipIdForSubchart),d.updateSvgSize(),c=d.main=d.svg.append("g").attr("transform",d.getTranslate("main")),d.initSubchart&&d.initSubchart(),d.initTooltip&&d.initTooltip(),d.initLegend&&d.initLegend(),d.initTitle&&d.initTitle(),c.append("text").attr("class",l.text+" "+l.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d.initRegion(),d.initGrid(),c.append("g").attr("clip-path",d.clipPath).attr("class",l.chart),g.grid_lines_front&&d.initGridLines(),d.initEventRect(),d.initChartElements(),c.insert("rect",g.zoom_privileged?null:"g."+l.regions).attr("class",l.zoomRect).attr("width",d.width).attr("height",d.height).style("opacity",0).on("dblclick.zoom",null),g.axis_x_extent&&d.brush.extent(d.getDefaultExtent()),d.axis.init(),d.updateTargets(d.data.targets),h&&(d.updateDimension(),d.config.oninit.call(d),d.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),d.bindResize(),d.api.element=d.selectChart.node()},i.smoothLines=function(a,b){var c=this;"grid"===b&&a.each(function(){var a=c.d3.select(this),b=a.attr("x1"),d=a.attr("x2"),e=a.attr("y1"),f=a.attr("y2");a.attr({x1:Math.ceil(b),x2:Math.ceil(d),y1:Math.ceil(e),y2:Math.ceil(f)})})},i.updateSizes=function(){var a=this,b=a.config,c=a.legend?a.getLegendHeight():0,d=a.legend?a.getLegendWidth():0,e=a.isLegendRight||a.isLegendInset?0:c,f=a.hasArcType(),g=b.axis_rotated||f?0:a.getHorizontalAxisHeight("x"),h=b.subchart_show&&!f?b.subchart_size_height+g:0;a.currentWidth=a.getCurrentWidth(),a.currentHeight=a.getCurrentHeight(),a.margin=b.axis_rotated?{top:a.getHorizontalAxisHeight("y2")+a.getCurrentPaddingTop(),right:f?0:a.getCurrentPaddingRight(),bottom:a.getHorizontalAxisHeight("y")+e+a.getCurrentPaddingBottom(),left:h+(f?0:a.getCurrentPaddingLeft())}:{top:4+a.getCurrentPaddingTop(),right:f?0:a.getCurrentPaddingRight(),bottom:g+h+e+a.getCurrentPaddingBottom(),left:f?0:a.getCurrentPaddingLeft()},a.margin2=b.axis_rotated?{top:a.margin.top,right:NaN,bottom:20+e,left:a.rotated_padding_left}:{top:a.currentHeight-h-e,right:NaN,bottom:g+e,left:a.margin.left},a.margin3={top:0,right:NaN,bottom:0,left:0},a.updateSizeForLegend&&a.updateSizeForLegend(c,d),a.width=a.currentWidth-a.margin.left-a.margin.right,a.height=a.currentHeight-a.margin.top-a.margin.bottom,a.width<0&&(a.width=0),a.height<0&&(a.height=0),a.width2=b.axis_rotated?a.margin.left-a.rotated_padding_left-a.rotated_padding_right:a.width,a.height2=b.axis_rotated?a.height:a.currentHeight-a.margin2.top-a.margin2.bottom,a.width2<0&&(a.width2=0),a.height2<0&&(a.height2=0),a.arcWidth=a.width-(a.isLegendRight?d+10:0),a.arcHeight=a.height-(a.isLegendRight?0:10),a.hasType("gauge")&&!b.gauge_fullCircle&&(a.arcHeight+=a.height-a.getGaugeLabelHeight()),a.updateRadius&&a.updateRadius(),a.isLegendRight&&f&&(a.margin3.left=a.arcWidth/2+1.1*a.radiusExpanded)},i.updateTargets=function(a){var b=this;b.updateTargetsForText(a),b.updateTargetsForBar(a),b.updateTargetsForLine(a),b.hasArcType()&&b.updateTargetsForArc&&b.updateTargetsForArc(a),b.updateTargetsForSubchart&&b.updateTargetsForSubchart(a),b.showTargets()},i.showTargets=function(){var a=this;a.svg.selectAll("."+l.target).filter(function(b){return a.isTargetToShow(b.id)}).transition().duration(a.config.transition_duration).style("opacity",1)},i.redraw=function(a,b){var c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,v,x,y,z,A,B,C,D,E,F,G,H=this,I=H.main,J=H.d3,K=H.config,L=H.getShapeIndices(H.isAreaType),M=H.getShapeIndices(H.isBarType),N=H.getShapeIndices(H.isLineType),O=H.hasArcType(),P=H.filterTargetsToShow(H.data.targets),Q=H.xv.bind(H);if(a=a||{},c=w(a,"withY",!0),d=w(a,"withSubchart",!0),e=w(a,"withTransition",!0),h=w(a,"withTransform",!1),i=w(a,"withUpdateXDomain",!1),j=w(a,"withUpdateOrgXDomain",!1),k=w(a,"withTrimXDomain",!0),p=w(a,"withUpdateXAxis",i),m=w(a,"withLegend",!1),n=w(a,"withEventRect",!0),o=w(a,"withDimension",!0),f=w(a,"withTransitionForExit",e),g=w(a,"withTransitionForAxis",e),v=e?K.transition_duration:0,x=f?v:0,y=g?v:0,b=b||H.axis.generateTransitions(y),m&&K.legend_show?H.updateLegend(H.mapToIds(H.data.targets),a,b):o&&H.updateDimension(!0),H.isCategorized()&&0===P.length&&H.x.domain([0,H.axes.x.selectAll(".tick").size()]),P.length?(H.updateXDomain(P,i,j,k),K.axis_x_tick_values||(B=H.axis.updateXAxisTickValues(P))):(H.xAxis.tickValues([]),H.subXAxis.tickValues([])),K.zoom_rescale&&!a.flow&&(E=H.x.orgDomain()),H.y.domain(H.getYDomain(P,"y",E)),H.y2.domain(H.getYDomain(P,"y2",E)),!K.axis_y_tick_values&&K.axis_y_tick_count&&H.yAxis.tickValues(H.axis.generateTickValues(H.y.domain(),K.axis_y_tick_count)),!K.axis_y2_tick_values&&K.axis_y2_tick_count&&H.y2Axis.tickValues(H.axis.generateTickValues(H.y2.domain(),K.axis_y2_tick_count)),H.axis.redraw(b,O),H.axis.updateLabels(e),(i||p)&&P.length)if(K.axis_x_tick_culling&&B){for(C=1;C<B.length;C++)if(B.length/C<K.axis_x_tick_culling_max){D=C;break}H.svg.selectAll("."+l.axisX+" .tick text").each(function(a){var b=B.indexOf(a);b>=0&&J.select(this).style("display",b%D?"none":"block")})}else H.svg.selectAll("."+l.axisX+" .tick text").style("display","block");q=H.generateDrawArea?H.generateDrawArea(L,!1):void 0,r=H.generateDrawBar?H.generateDrawBar(M):void 0,s=H.generateDrawLine?H.generateDrawLine(N,!1):void 0,t=H.generateXYForText(L,M,N,!0),u=H.generateXYForText(L,M,N,!1),c&&(H.subY.domain(H.getYDomain(P,"y")),H.subY2.domain(H.getYDomain(P,"y2"))),H.updateXgridFocus(),I.select("text."+l.text+"."+l.empty).attr("x",H.width/2).attr("y",H.height/2).text(K.data_empty_label_text).transition().style("opacity",P.length?0:1),H.updateGrid(v),H.updateRegion(v),H.updateBar(x),H.updateLine(x),H.updateArea(x),H.updateCircle(),H.hasDataLabel()&&H.updateText(x),H.redrawTitle&&H.redrawTitle(),H.redrawArc&&H.redrawArc(v,x,h),H.redrawSubchart&&H.redrawSubchart(d,b,v,x,L,M,N),I.selectAll("."+l.selectedCircles).filter(H.isBarType.bind(H)).selectAll("circle").remove(),K.interaction_enabled&&!a.flow&&n&&(H.redrawEventRect(),H.updateZoom&&H.updateZoom()),H.updateCircleY(),F=(H.config.axis_rotated?H.circleY:H.circleX).bind(H),G=(H.config.axis_rotated?H.circleX:H.circleY).bind(H),a.flow&&(A=H.generateFlow({targets:P,flow:a.flow,duration:a.flow.duration,drawBar:r,drawLine:s,drawArea:q,cx:F,cy:G,xv:Q,xForText:t,yForText:u})),(v||A)&&H.isTabVisible()?J.transition().duration(v).each(function(){var b=[];[H.redrawBar(r,!0),H.redrawLine(s,!0),H.redrawArea(q,!0),H.redrawCircle(F,G,!0),H.redrawText(t,u,a.flow,!0),H.redrawRegion(!0),H.redrawGrid(!0)].forEach(function(a){a.forEach(function(a){b.push(a)})}),z=H.generateWait(),b.forEach(function(a){z.add(a)})}).call(z,function(){A&&A(),K.onrendered&&K.onrendered.call(H)}):(H.redrawBar(r),H.redrawLine(s),H.redrawArea(q),H.redrawCircle(F,G),H.redrawText(t,u,a.flow),H.redrawRegion(),H.redrawGrid(),K.onrendered&&K.onrendered.call(H)),H.mapToIds(H.data.targets).forEach(function(a){H.withoutFadeIn[a]=!0})},i.updateAndRedraw=function(a){var b,c=this,d=c.config;a=a||{},a.withTransition=w(a,"withTransition",!0),a.withTransform=w(a,"withTransform",!1),a.withLegend=w(a,"withLegend",!1),a.withUpdateXDomain=!0,a.withUpdateOrgXDomain=!0,a.withTransitionForExit=!1,a.withTransitionForTransform=w(a,"withTransitionForTransform",a.withTransition),c.updateSizes(),a.withLegend&&d.legend_show||(b=c.axis.generateTransitions(a.withTransitionForAxis?d.transition_duration:0),c.updateScales(),c.updateSvgSize(),c.transformAll(a.withTransitionForTransform,b)),c.redraw(a,b)},i.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},i.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},i.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},i.isCustomX=function(){var a=this,b=a.config;return!a.isTimeSeries()&&(b.data_x||v(b.data_xs))},i.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},i.getTranslate=function(a){var b,c,d=this,e=d.config;return"main"===a?(b=s(d.margin.left),c=s(d.margin.top)):"context"===a?(b=s(d.margin2.left),c=s(d.margin2.top)):"legend"===a?(b=d.margin3.left,c=d.margin3.top):"x"===a?(b=0,c=e.axis_rotated?0:d.height):"y"===a?(b=0,c=e.axis_rotated?d.height:0):"y2"===a?(b=e.axis_rotated?0:d.width,c=e.axis_rotated?1:0):"subx"===a?(b=0,c=e.axis_rotated?0:d.height2):"arc"===a&&(b=d.arcWidth/2,c=d.arcHeight/2),"translate("+b+","+c+")"},i.initialOpacity=function(a){return null!==a.value&&this.withoutFadeIn[a.id]?1:0},i.initialOpacityForCircle=function(a){return null!==a.value&&this.withoutFadeIn[a.id]?this.opacityForCircle(a):0},i.opacityForCircle=function(a){var b=this.config.point_show?1:0;return m(a.value)?this.isScatterType(a)?.5:b:0},i.opacityForText=function(){return this.hasDataLabel()?1:0},i.xx=function(a){return a?this.x(a.x):null},i.xv=function(a){var b=this,c=a.value;return b.isTimeSeries()?c=b.parseDate(a.value):b.isCategorized()&&"string"==typeof a.value&&(c=b.config.axis_x_categories.indexOf(a.value)),Math.ceil(b.x(c))},i.yv=function(a){var b=this,c=a.axis&&"y2"===a.axis?b.y2:b.y;return Math.ceil(c(a.value))},i.subxx=function(a){return a?this.subX(a.x):null},i.transformMain=function(a,b){var c,d,e,f=this;b&&b.axisX?c=b.axisX:(c=f.main.select("."+l.axisX),a&&(c=c.transition())),b&&b.axisY?d=b.axisY:(d=f.main.select("."+l.axisY),a&&(d=d.transition())),b&&b.axisY2?e=b.axisY2:(e=f.main.select("."+l.axisY2),a&&(e=e.transition())),(a?f.main.transition():f.main).attr("transform",f.getTranslate("main")),c.attr("transform",f.getTranslate("x")),d.attr("transform",f.getTranslate("y")),e.attr("transform",f.getTranslate("y2")),f.main.select("."+l.chartArcs).attr("transform",f.getTranslate("arc"))},i.transformAll=function(a,b){var c=this;c.transformMain(a,b),c.config.subchart_show&&c.transformContext(a,b),c.legend&&c.transformLegend(a)},i.updateSvgSize=function(){var a=this,b=a.svg.select(".c3-brush .background");a.svg.attr("width",a.currentWidth).attr("height",a.currentHeight),a.svg.selectAll(["#"+a.clipId,"#"+a.clipIdForGrid]).select("rect").attr("width",a.width).attr("height",a.height),a.svg.select("#"+a.clipIdForXAxis).select("rect").attr("x",a.getXAxisClipX.bind(a)).attr("y",a.getXAxisClipY.bind(a)).attr("width",a.getXAxisClipWidth.bind(a)).attr("height",a.getXAxisClipHeight.bind(a)),a.svg.select("#"+a.clipIdForYAxis).select("rect").attr("x",a.getYAxisClipX.bind(a)).attr("y",a.getYAxisClipY.bind(a)).attr("width",a.getYAxisClipWidth.bind(a)).attr("height",a.getYAxisClipHeight.bind(a)),a.svg.select("#"+a.clipIdForSubchart).select("rect").attr("width",a.width).attr("height",b.size()?b.attr("height"):0),a.svg.select("."+l.zoomRect).attr("width",a.width).attr("height",a.height),a.selectChart.style("max-height",a.currentHeight+"px")},i.updateDimension=function(a){var b=this;a||(b.config.axis_rotated?(b.axes.x.call(b.xAxis),b.axes.subx.call(b.subXAxis)):(b.axes.y.call(b.yAxis),b.axes.y2.call(b.y2Axis))),b.updateSizes(),b.updateScales(),b.updateSvgSize(),b.transformAll(!1)},i.observeInserted=function(b){var c,d=this;return"undefined"==typeof MutationObserver?void a.console.error("MutationObserver not defined."):(c=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&e.previousSibling&&(c.disconnect(),d.intervalForObserveInserted=a.setInterval(function(){b.node().parentNode&&(a.clearInterval(d.intervalForObserveInserted),d.updateDimension(),d.brush&&d.brush.update(),d.config.oninit.call(d),d.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),b.transition().style("opacity",1))},10))})}),void c.observe(b.node(),{attributes:!0,childList:!0,characterData:!0}))},i.bindResize=function(){var b=this,c=b.config;if(b.resizeFunction=b.generateResize(),b.resizeFunction.add(function(){c.onresize.call(b)}),c.resize_auto&&b.resizeFunction.add(function(){void 0!==b.resizeTimeout&&a.clearTimeout(b.resizeTimeout),b.resizeTimeout=a.setTimeout(function(){delete b.resizeTimeout,b.api.flush()},100)}),b.resizeFunction.add(function(){c.onresized.call(b)}),a.attachEvent)a.attachEvent("onresize",b.resizeFunction);else if(a.addEventListener)a.addEventListener("resize",b.resizeFunction,!1);else{var d=a.onresize;d?d.add&&d.remove||(d=b.generateResize(),d.add(a.onresize)):d=b.generateResize(),d.add(b.resizeFunction),a.onresize=d}},i.generateResize=function(){function a(){b.forEach(function(a){a()})}var b=[];return a.add=function(a){b.push(a)},a.remove=function(a){for(var c=0;c<b.length;c++)if(b[c]===a){b.splice(c,1);break}},a},i.endall=function(a,b){var c=0;a.each(function(){++c}).each("end",function(){--c||b.apply(this,arguments)})},i.generateWait=function(){var a=[],b=function(b,c){var d=setInterval(function(){var b=0;a.forEach(function(a){if(a.empty())return void(b+=1);try{a.transition()}catch(c){b+=1}}),b===a.length&&(clearInterval(d),c&&c())},10)};return b.add=function(b){a.push(b)},b},i.parseDate=function(b){var c,d=this;return b instanceof Date?c=b:"string"==typeof b?c=d.dataTimeFormat(d.config.data_xFormat).parse(b):"number"!=typeof b||isNaN(b)||(c=new Date(+b)),c&&!isNaN(+c)||a.console.error("Failed to parse x '"+b+"' to Date object"),c},i.isTabVisible=function(){var a;return"undefined"!=typeof document.hidden?a="hidden":"undefined"!=typeof document.mozHidden?a="mozHidden":"undefined"!=typeof document.msHidden?a="msHidden":"undefined"!=typeof document.webkitHidden&&(a="webkitHidden"),!document[a]},i.getDefaultConfig=function(){var a={bindto:"#chart",svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},zoom_x_min:void 0,zoom_x_max:void 0,interaction_brighten:!0,interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(a){return a},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_units:void 0,gauge_width:void 0,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,spline_interpolation_type:"cardinal",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(a,b,c,d){return this.getTooltipContent?this.getTooltipContent(a,b,c,d):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_onshow:function(){},tooltip_onhide:function(){},title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"};return Object.keys(this.additionalConfig).forEach(function(b){a[b]=this.additionalConfig[b]},this),a},i.additionalConfig={},i.loadConfig=function(a){function b(){var a=d.shift();return a&&c&&"object"==typeof c&&a in c?(c=c[a],b()):a?void 0:c}var c,d,e,f=this.config;Object.keys(f).forEach(function(g){c=a,d=g.split("_"),e=b(),q(e)&&(f[g]=e)})},i.getScale=function(a,b,c){return(c?this.d3.time.scale():this.d3.scale.linear()).range([a,b])},i.getX=function(a,b,c,d){var e,f=this,g=f.getScale(a,b,f.isTimeSeries()),h=c?g.domain(c):g;f.isCategorized()?(d=d||function(){return 0},g=function(a,b){var c=h(a)+d(a);return b?c:Math.ceil(c)}):g=function(a,b){var c=h(a);return b?c:Math.ceil(c)};for(e in h)g[e]=h[e];return g.orgDomain=function(){return h.domain()},f.isCategorized()&&(g.domain=function(a){return arguments.length?(h.domain(a),g):(a=this.orgDomain(),[a[0],a[1]+1])}),g},i.getY=function(a,b,c){var d=this.getScale(a,b,this.isTimeSeriesY());return c&&d.domain(c),d},i.getYScale=function(a){return"y2"===this.axis.getId(a)?this.y2:this.y},i.getSubYScale=function(a){return"y2"===this.axis.getId(a)?this.subY2:this.subY},i.updateScales=function(){var a=this,b=a.config,c=!a.x;a.xMin=b.axis_rotated?1:0,a.xMax=b.axis_rotated?a.height:a.width,a.yMin=b.axis_rotated?0:a.height,a.yMax=b.axis_rotated?a.width:1,a.subXMin=a.xMin,a.subXMax=a.xMax,a.subYMin=b.axis_rotated?0:a.height2,a.subYMax=b.axis_rotated?a.width2:1,a.x=a.getX(a.xMin,a.xMax,c?void 0:a.x.orgDomain(),function(){return a.xAxis.tickOffset()}),a.y=a.getY(a.yMin,a.yMax,c?b.axis_y_default:a.y.domain()),a.y2=a.getY(a.yMin,a.yMax,c?b.axis_y2_default:a.y2.domain()),a.subX=a.getX(a.xMin,a.xMax,a.orgXDomain,function(b){return b%1?0:a.subXAxis.tickOffset()}),a.subY=a.getY(a.subYMin,a.subYMax,c?b.axis_y_default:a.subY.domain()),a.subY2=a.getY(a.subYMin,a.subYMax,c?b.axis_y2_default:a.subY2.domain()),a.xAxisTickFormat=a.axis.getXAxisTickFormat(),a.xAxisTickValues=a.axis.getXAxisTickValues(),a.yAxisTickValues=a.axis.getYAxisTickValues(),a.y2AxisTickValues=a.axis.getY2AxisTickValues(),a.xAxis=a.axis.getXAxis(a.x,a.xOrient,a.xAxisTickFormat,a.xAxisTickValues,b.axis_x_tick_outer),a.subXAxis=a.axis.getXAxis(a.subX,a.subXOrient,a.xAxisTickFormat,a.xAxisTickValues,b.axis_x_tick_outer),a.yAxis=a.axis.getYAxis(a.y,a.yOrient,b.axis_y_tick_format,a.yAxisTickValues,b.axis_y_tick_outer),a.y2Axis=a.axis.getYAxis(a.y2,a.y2Orient,b.axis_y2_tick_format,a.y2AxisTickValues,b.axis_y2_tick_outer),c||(a.brush&&a.brush.scale(a.subX),b.zoom_enabled&&a.zoom.scale(a.x)),a.updateArc&&a.updateArc()},i.getYDomainMin=function(a){var b,c,d,e,f,g,h=this,i=h.config,j=h.mapToIds(a),k=h.getValuesAsIdKeyed(a);if(i.data_groups.length>0)for(g=h.hasNegativeValueInTargets(a),b=0;b<i.data_groups.length;b++)if(e=i.data_groups[b].filter(function(a){return j.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&k[d]&&k[d].forEach(function(a,b){k[d][b]=0>a?a:0}),c=1;c<e.length;c++)f=e[c],k[f]&&k[f].forEach(function(a,b){h.axis.getId(f)!==h.axis.getId(d)||!k[d]||g&&+a>0||(k[d][b]+=+a)});return h.d3.min(Object.keys(k).map(function(a){return h.d3.min(k[a])}))},i.getYDomainMax=function(a){var b,c,d,e,f,g,h=this,i=h.config,j=h.mapToIds(a),k=h.getValuesAsIdKeyed(a);if(i.data_groups.length>0)for(g=h.hasPositiveValueInTargets(a),b=0;b<i.data_groups.length;b++)if(e=i.data_groups[b].filter(function(a){return j.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&k[d]&&k[d].forEach(function(a,b){k[d][b]=a>0?a:0}),c=1;c<e.length;c++)f=e[c],k[f]&&k[f].forEach(function(a,b){h.axis.getId(f)!==h.axis.getId(d)||!k[d]||g&&0>+a||(k[d][b]+=+a)});return h.d3.max(Object.keys(k).map(function(a){return h.d3.max(k[a])}))},i.getYDomain=function(a,b,c){var d,e,f,g,h,i,j,k,l,n,o,p=this,q=p.config,r=a.filter(function(a){return p.axis.getId(a.id)===b}),s=c?p.filterByXDomain(r,c):r,u="y2"===b?q.axis_y2_min:q.axis_y_min,w="y2"===b?q.axis_y2_max:q.axis_y_max,x=p.getYDomainMin(s),y=p.getYDomainMax(s),z="y2"===b?q.axis_y2_center:q.axis_y_center,A=p.hasType("bar",s)&&q.bar_zerobased||p.hasType("area",s)&&q.area_zerobased,B="y2"===b?q.axis_y2_inverted:q.axis_y_inverted,C=p.hasDataLabel()&&q.axis_rotated,D=p.hasDataLabel()&&!q.axis_rotated;return x=m(u)?u:m(w)?w>x?x:w-10:x,y=m(w)?w:m(u)?y>u?y:u+10:y,0===s.length?"y2"===b?p.y2.domain():p.y.domain():(isNaN(x)&&(x=0),isNaN(y)&&(y=x),x===y&&(0>x?y=0:x=0),n=x>=0&&y>=0,o=0>=x&&0>=y,(m(u)&&n||m(w)&&o)&&(A=!1),A&&(n&&(x=0),o&&(y=0)),e=Math.abs(y-x),f=g=h=.1*e,"undefined"!=typeof z&&(i=Math.max(Math.abs(x),Math.abs(y)),y=z+i,x=z-i),C?(j=p.getDataLabelLength(x,y,"width"),k=t(p.y.range()),l=[j[0]/k,j[1]/k],
2353 g+=e*(l[1]/(1-l[0]-l[1])),h+=e*(l[0]/(1-l[0]-l[1]))):D&&(j=p.getDataLabelLength(x,y,"height"),g+=p.axis.convertPixelsToAxisPadding(j[1],e),h+=p.axis.convertPixelsToAxisPadding(j[0],e)),"y"===b&&v(q.axis_y_padding)&&(g=p.axis.getPadding(q.axis_y_padding,"top",g,e),h=p.axis.getPadding(q.axis_y_padding,"bottom",h,e)),"y2"===b&&v(q.axis_y2_padding)&&(g=p.axis.getPadding(q.axis_y2_padding,"top",g,e),h=p.axis.getPadding(q.axis_y2_padding,"bottom",h,e)),A&&(n&&(h=x),o&&(g=-y)),d=[x-h,y+g],B?d.reverse():d)},i.getXDomainMin=function(a){var b=this,c=b.config;return q(c.axis_x_min)?b.isTimeSeries()?this.parseDate(c.axis_x_min):c.axis_x_min:b.d3.min(a,function(a){return b.d3.min(a.values,function(a){return a.x})})},i.getXDomainMax=function(a){var b=this,c=b.config;return q(c.axis_x_max)?b.isTimeSeries()?this.parseDate(c.axis_x_max):c.axis_x_max:b.d3.max(a,function(a){return b.d3.max(a.values,function(a){return a.x})})},i.getXDomainPadding=function(a){var b,c,d,e,f=this,g=f.config,h=a[1]-a[0];return f.isCategorized()?c=0:f.hasType("bar")?(b=f.getMaxDataCount(),c=b>1?h/(b-1)/2:.5):c=.01*h,"object"==typeof g.axis_x_padding&&v(g.axis_x_padding)?(d=m(g.axis_x_padding.left)?g.axis_x_padding.left:c,e=m(g.axis_x_padding.right)?g.axis_x_padding.right:c):d=e="number"==typeof g.axis_x_padding?g.axis_x_padding:c,{left:d,right:e}},i.getXDomain=function(a){var b=this,c=[b.getXDomainMin(a),b.getXDomainMax(a)],d=c[0],e=c[1],f=b.getXDomainPadding(c),g=0,h=0;return d-e!==0||b.isCategorized()||(b.isTimeSeries()?(d=new Date(.5*d.getTime()),e=new Date(1.5*e.getTime())):(d=0===d?1:.5*d,e=0===e?-1:1.5*e)),(d||0===d)&&(g=b.isTimeSeries()?new Date(d.getTime()-f.left):d-f.left),(e||0===e)&&(h=b.isTimeSeries()?new Date(e.getTime()+f.right):e+f.right),[g,h]},i.updateXDomain=function(a,b,c,d,e){var f=this,g=f.config;return c&&(f.x.domain(e?e:f.d3.extent(f.getXDomain(a))),f.orgXDomain=f.x.domain(),g.zoom_enabled&&f.zoom.scale(f.x).updateScaleExtent(),f.subX.domain(f.x.domain()),f.brush&&f.brush.scale(f.subX)),b&&(f.x.domain(e?e:!f.brush||f.brush.empty()?f.orgXDomain:f.brush.extent()),g.zoom_enabled&&f.zoom.scale(f.x).updateScaleExtent()),d&&f.x.domain(f.trimXDomain(f.x.orgDomain())),f.x.domain()},i.trimXDomain=function(a){var b=this.getZoomDomain(),c=b[0],d=b[1];return a[0]<=c&&(a[1]=+a[1]+(c-a[0]),a[0]=c),d<=a[1]&&(a[0]=+a[0]-(a[1]-d),a[1]=d),a},i.isX=function(a){var b=this,c=b.config;return c.data_x&&a===c.data_x||v(c.data_xs)&&x(c.data_xs,a)},i.isNotX=function(a){return!this.isX(a)},i.getXKey=function(a){var b=this,c=b.config;return c.data_x?c.data_x:v(c.data_xs)?c.data_xs[a]:null},i.getXValuesOfXKey=function(a,b){var c,d=this,e=b&&v(b)?d.mapToIds(b):[];return e.forEach(function(b){d.getXKey(b)===a&&(c=d.data.xs[b])}),c},i.getIndexByX=function(a){var b=this,c=b.filterByX(b.data.targets,a);return c.length?c[0].index:null},i.getXValue=function(a,b){var c=this;return a in c.data.xs&&c.data.xs[a]&&m(c.data.xs[a][b])?c.data.xs[a][b]:b},i.getOtherTargetXs=function(){var a=this,b=Object.keys(a.data.xs);return b.length?a.data.xs[b[0]]:null},i.getOtherTargetX=function(a){var b=this.getOtherTargetXs();return b&&a<b.length?b[a]:null},i.addXs=function(a){var b=this;Object.keys(a).forEach(function(c){b.config.data_xs[c]=a[c]})},i.hasMultipleX=function(a){return this.d3.set(Object.keys(a).map(function(b){return a[b]})).size()>1},i.isMultipleX=function(){return v(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},i.addName=function(a){var b,c=this;return a&&(b=c.config.data_names[a.id],a.name=void 0!==b?b:a.id),a},i.getValueOnIndex=function(a,b){var c=a.filter(function(a){return a.index===b});return c.length?c[0]:null},i.updateTargetX=function(a,b){var c=this;a.forEach(function(a){a.values.forEach(function(d,e){d.x=c.generateTargetX(b[e],a.id,e)}),c.data.xs[a.id]=b})},i.updateTargetXs=function(a,b){var c=this;a.forEach(function(a){b[a.id]&&c.updateTargetX([a],b[a.id])})},i.generateTargetX=function(a,b,c){var d,e=this;return d=e.isTimeSeries()?a?e.parseDate(a):e.parseDate(e.getXValue(b,c)):e.isCustomX()&&!e.isCategorized()?m(a)?+a:e.getXValue(b,c):c},i.cloneTarget=function(a){return{id:a.id,id_org:a.id_org,values:a.values.map(function(a){return{x:a.x,value:a.value,id:a.id}})}},i.updateXs=function(){var a=this;a.data.targets.length&&(a.xs=[],a.data.targets[0].values.forEach(function(b){a.xs[b.index]=b.x}))},i.getPrevX=function(a){var b=this.xs[a-1];return"undefined"!=typeof b?b:null},i.getNextX=function(a){var b=this.xs[a+1];return"undefined"!=typeof b?b:null},i.getMaxDataCount=function(){var a=this;return a.d3.max(a.data.targets,function(a){return a.values.length})},i.getMaxDataCountTarget=function(a){var b,c=a.length,d=0;return c>1?a.forEach(function(a){a.values.length>d&&(b=a,d=a.values.length)}):b=c?a[0]:null,b},i.getEdgeX=function(a){var b=this;return a.length?[b.d3.min(a,function(a){return a.values[0].x}),b.d3.max(a,function(a){return a.values[a.values.length-1].x})]:[0,0]},i.mapToIds=function(a){return a.map(function(a){return a.id})},i.mapToTargetIds=function(a){var b=this;return a?[].concat(a):b.mapToIds(b.data.targets)},i.hasTarget=function(a,b){var c,d=this.mapToIds(a);for(c=0;c<d.length;c++)if(d[c]===b)return!0;return!1},i.isTargetToShow=function(a){return this.hiddenTargetIds.indexOf(a)<0},i.isLegendToShow=function(a){return this.hiddenLegendIds.indexOf(a)<0},i.filterTargetsToShow=function(a){var b=this;return a.filter(function(a){return b.isTargetToShow(a.id)})},i.mapTargetsToUniqueXs=function(a){var b=this,c=b.d3.set(b.d3.merge(a.map(function(a){return a.values.map(function(a){return+a.x})}))).values();return c=b.isTimeSeries()?c.map(function(a){return new Date(+a)}):c.map(function(a){return+a}),c.sort(function(a,b){return b>a?-1:a>b?1:a>=b?0:NaN})},i.addHiddenTargetIds=function(a){this.hiddenTargetIds=this.hiddenTargetIds.concat(a)},i.removeHiddenTargetIds=function(a){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(b){return a.indexOf(b)<0})},i.addHiddenLegendIds=function(a){this.hiddenLegendIds=this.hiddenLegendIds.concat(a)},i.removeHiddenLegendIds=function(a){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(b){return a.indexOf(b)<0})},i.getValuesAsIdKeyed=function(a){var b={};return a.forEach(function(a){b[a.id]=[],a.values.forEach(function(c){b[a.id].push(c.value)})}),b},i.checkValueInTargets=function(a,b){var c,d,e,f=Object.keys(a);for(c=0;c<f.length;c++)for(e=a[f[c]].values,d=0;d<e.length;d++)if(b(e[d].value))return!0;return!1},i.hasNegativeValueInTargets=function(a){return this.checkValueInTargets(a,function(a){return 0>a})},i.hasPositiveValueInTargets=function(a){return this.checkValueInTargets(a,function(a){return a>0})},i.isOrderDesc=function(){var a=this.config;return"string"==typeof a.data_order&&"desc"===a.data_order.toLowerCase()},i.isOrderAsc=function(){var a=this.config;return"string"==typeof a.data_order&&"asc"===a.data_order.toLowerCase()},i.orderTargets=function(a){var b=this,c=b.config,d=b.isOrderAsc(),e=b.isOrderDesc();return d||e?a.sort(function(a,b){var c=function(a,b){return a+Math.abs(b.value)},e=a.values.reduce(c,0),f=b.values.reduce(c,0);return d?f-e:e-f}):n(c.data_order)&&a.sort(c.data_order),a},i.filterByX=function(a,b){return this.d3.merge(a.map(function(a){return a.values})).filter(function(a){return a.x-b===0})},i.filterRemoveNull=function(a){return a.filter(function(a){return m(a.value)})},i.filterByXDomain=function(a,b){return a.map(function(a){return{id:a.id,id_org:a.id_org,values:a.values.filter(function(a){return b[0]<=a.x&&a.x<=b[1]})}})},i.hasDataLabel=function(){var a=this.config;return"boolean"==typeof a.data_labels&&a.data_labels?!0:!("object"!=typeof a.data_labels||!v(a.data_labels))},i.getDataLabelLength=function(a,b,c){var d=this,e=[0,0],f=1.3;return d.selectChart.select("svg").selectAll(".dummy").data([a,b]).enter().append("text").text(function(a){return d.dataLabelFormat(a.id)(a)}).each(function(a,b){e[b]=this.getBoundingClientRect()[c]*f}).remove(),e},i.isNoneArc=function(a){return this.hasTarget(this.data.targets,a.id)},i.isArc=function(a){return"data"in a&&this.hasTarget(this.data.targets,a.data.id)},i.findSameXOfValues=function(a,b){var c,d=a[b].x,e=[];for(c=b-1;c>=0&&d===a[c].x;c--)e.push(a[c]);for(c=b;c<a.length&&d===a[c].x;c++)e.push(a[c]);return e},i.findClosestFromTargets=function(a,b){var c,d=this;return c=a.map(function(a){return d.findClosest(a.values,b)}),d.findClosest(c,b)},i.findClosest=function(a,b){var c,d=this,e=d.config.point_sensitivity;return a.filter(function(a){return a&&d.isBarType(a.id)}).forEach(function(a){var b=d.main.select("."+l.bars+d.getTargetSelectorSuffix(a.id)+" ."+l.bar+"-"+a.index).node();!c&&d.isWithinBar(b)&&(c=a)}),a.filter(function(a){return a&&!d.isBarType(a.id)}).forEach(function(a){var f=d.dist(a,b);e>f&&(e=f,c=a)}),c},i.dist=function(a,b){var c=this,d=c.config,e=d.axis_rotated?1:0,f=d.axis_rotated?0:1,g=c.circleY(a,a.index),h=c.x(a.x);return Math.sqrt(Math.pow(h-b[e],2)+Math.pow(g-b[f],2))},i.convertValuesToStep=function(a){var b,c=[].concat(a);if(!this.isCategorized())return a;for(b=a.length+1;b>0;b--)c[b]=c[b-1];return c[0]={x:c[0].x-1,value:c[0].value,id:c[0].id},c[a.length+1]={x:c[a.length].x+1,value:c[a.length].value,id:c[a.length].id},c},i.updateDataAttributes=function(a,b){var c=this,d=c.config,e=d["data_"+a];return"undefined"==typeof b?e:(Object.keys(b).forEach(function(a){e[a]=b[a]}),c.redraw({withLegend:!0}),e)},i.convertUrlToData=function(a,b,c,d,e){var f=this,g=b?b:"csv",h=f.d3.xhr(a);c&&Object.keys(c).forEach(function(a){h.header(a,c[a])}),h.get(function(a,b){var c;if(!b)throw new Error(a.responseURL+" "+a.status+" ("+a.statusText+")");c="json"===g?f.convertJsonToData(JSON.parse(b.response),d):"tsv"===g?f.convertTsvToData(b.response):f.convertCsvToData(b.response),e.call(f,c)})},i.convertXsvToData=function(a,b){var c,d=b.parseRows(a);return 1===d.length?(c=[{}],d[0].forEach(function(a){c[0][a]=null})):c=b.parse(a),c},i.convertCsvToData=function(a){return this.convertXsvToData(a,this.d3.csv)},i.convertTsvToData=function(a){return this.convertXsvToData(a,this.d3.tsv)},i.convertJsonToData=function(a,b){var c,d,e=this,f=[];return b?(b.x?(c=b.value.concat(b.x),e.config.data_x=b.x):c=b.value,f.push(c),a.forEach(function(a){var b=[];c.forEach(function(c){var d=e.findValueInJson(a,c);p(d)&&(d=null),b.push(d)}),f.push(b)}),d=e.convertRowsToData(f)):(Object.keys(a).forEach(function(b){f.push([b].concat(a[b]))}),d=e.convertColumnsToData(f)),d},i.findValueInJson=function(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split("."),d=0;d<c.length;++d){var e=c[d];if(!(e in a))return;a=a[e]}return a},i.convertRowsToData=function(a){var b,c,d=a[0],e={},f=[];for(b=1;b<a.length;b++){for(e={},c=0;c<a[b].length;c++){if(p(a[b][c]))throw new Error("Source data is missing a component at ("+b+","+c+")!");e[d[c]]=a[b][c]}f.push(e)}return f},i.convertColumnsToData=function(a){var b,c,d,e=[];for(b=0;b<a.length;b++)for(d=a[b][0],c=1;c<a[b].length;c++){if(p(e[c-1])&&(e[c-1]={}),p(a[b][c]))throw new Error("Source data is missing a component at ("+b+","+c+")!");e[c-1][d]=a[b][c]}return e},i.convertDataToTargets=function(a,b){var c,d=this,e=d.config,f=d.d3.keys(a[0]).filter(d.isNotX,d),g=d.d3.keys(a[0]).filter(d.isX,d);return f.forEach(function(c){var f=d.getXKey(c);d.isCustomX()||d.isTimeSeries()?g.indexOf(f)>=0?d.data.xs[c]=(b&&d.data.xs[c]?d.data.xs[c]:[]).concat(a.map(function(a){return a[f]}).filter(m).map(function(a,b){return d.generateTargetX(a,c,b)})):e.data_x?d.data.xs[c]=d.getOtherTargetXs():v(e.data_xs)&&(d.data.xs[c]=d.getXValuesOfXKey(f,d.data.targets)):d.data.xs[c]=a.map(function(a,b){return b})}),f.forEach(function(a){if(!d.data.xs[a])throw new Error('x is not defined for id = "'+a+'".')}),c=f.map(function(b,c){var f=e.data_idConverter(b);return{id:f,id_org:b,values:a.map(function(a,g){var h,i=d.getXKey(b),j=a[i],k=null===a[b]||isNaN(a[b])?null:+a[b];return d.isCustomX()&&d.isCategorized()&&0===c&&!p(j)?(0===c&&0===g&&(e.axis_x_categories=[]),h=e.axis_x_categories.indexOf(j),-1===h&&(h=e.axis_x_categories.length,e.axis_x_categories.push(j))):h=d.generateTargetX(j,b,g),(p(a[b])||d.data.xs[b].length<=g)&&(h=void 0),{x:h,value:k,id:f}}).filter(function(a){return q(a.x)})}}),c.forEach(function(a){var b;e.data_xSort&&(a.values=a.values.sort(function(a,b){var c=a.x||0===a.x?a.x:1/0,d=b.x||0===b.x?b.x:1/0;return c-d})),b=0,a.values.forEach(function(a){a.index=b++}),d.data.xs[a.id].sort(function(a,b){return a-b})}),d.hasNegativeValue=d.hasNegativeValueInTargets(c),d.hasPositiveValue=d.hasPositiveValueInTargets(c),e.data_type&&d.setTargetType(d.mapToIds(c).filter(function(a){return!(a in e.data_types)}),e.data_type),c.forEach(function(a){d.addCache(a.id_org,a)}),c},i.load=function(a,b){var c=this;a&&(b.filter&&(a=a.filter(b.filter)),(b.type||b.types)&&a.forEach(function(a){var d=b.types&&b.types[a.id]?b.types[a.id]:b.type;c.setTargetType(a.id,d)}),c.data.targets.forEach(function(b){for(var c=0;c<a.length;c++)if(b.id===a[c].id){b.values=a[c].values,a.splice(c,1);break}}),c.data.targets=c.data.targets.concat(a)),c.updateTargets(c.data.targets),c.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),b.done&&b.done()},i.loadFromArgs=function(a){var b=this;a.data?b.load(b.convertDataToTargets(a.data),a):a.url?b.convertUrlToData(a.url,a.mimeType,a.headers,a.keys,function(c){b.load(b.convertDataToTargets(c),a)}):a.json?b.load(b.convertDataToTargets(b.convertJsonToData(a.json,a.keys)),a):a.rows?b.load(b.convertDataToTargets(b.convertRowsToData(a.rows)),a):a.columns?b.load(b.convertDataToTargets(b.convertColumnsToData(a.columns)),a):b.load(null,a)},i.unload=function(a,b){var c=this;return b||(b=function(){}),a=a.filter(function(a){return c.hasTarget(c.data.targets,a)}),a&&0!==a.length?(c.svg.selectAll(a.map(function(a){return c.selectorTarget(a)})).transition().style("opacity",0).remove().call(c.endall,b),void a.forEach(function(a){c.withoutFadeIn[a]=!1,c.legend&&c.legend.selectAll("."+l.legendItem+c.getTargetSelectorSuffix(a)).remove(),c.data.targets=c.data.targets.filter(function(b){return b.id!==a})})):void b()},i.categoryName=function(a){var b=this.config;return a<b.axis_x_categories.length?b.axis_x_categories[a]:a},i.initEventRect=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.eventRects).style("fill-opacity",0)},i.redrawEventRect=function(){var a,b,c=this,d=c.config,e=c.isMultipleX(),f=c.main.select("."+l.eventRects).style("cursor",d.zoom_enabled?d.axis_rotated?"ns-resize":"ew-resize":null).classed(l.eventRectsMultiple,e).classed(l.eventRectsSingle,!e);f.selectAll("."+l.eventRect).remove(),c.eventRect=f.selectAll("."+l.eventRect),e?(a=c.eventRect.data([0]),c.generateEventRectsForMultipleXs(a.enter()),c.updateEventRect(a)):(b=c.getMaxDataCountTarget(c.data.targets),f.datum(b?b.values:[]),c.eventRect=f.selectAll("."+l.eventRect),a=c.eventRect.data(function(a){return a}),c.generateEventRectsForSingleX(a.enter()),c.updateEventRect(a),a.exit().remove())},i.updateEventRect=function(a){var b,c,d,e,f,g,h=this,i=h.config;a=a||h.eventRect.data(function(a){return a}),h.isMultipleX()?(b=0,c=0,d=h.width,e=h.height):(!h.isCustomX()&&!h.isTimeSeries()||h.isCategorized()?(f=h.getEventRectWidth(),g=function(a){return h.x(a.x)-f/2}):(h.updateXs(),f=function(a){var b=h.getPrevX(a.index),c=h.getNextX(a.index);return null===b&&null===c?i.axis_rotated?h.height:h.width:(null===b&&(b=h.x.domain()[0]),null===c&&(c=h.x.domain()[1]),Math.max(0,(h.x(c)-h.x(b))/2))},g=function(a){var b=h.getPrevX(a.index),c=h.getNextX(a.index),d=h.data.xs[a.id][a.index];return null===b&&null===c?0:(null===b&&(b=h.x.domain()[0]),(h.x(d)+h.x(b))/2)}),b=i.axis_rotated?0:g,c=i.axis_rotated?g:0,d=i.axis_rotated?h.width:f,e=i.axis_rotated?f:h.height),a.attr("class",h.classEvent.bind(h)).attr("x",b).attr("y",c).attr("width",d).attr("height",e)},i.generateEventRectsForSingleX=function(a){var b=this,c=b.d3,d=b.config;a.append("rect").attr("class",b.classEvent.bind(b)).style("cursor",d.data_selection_enabled&&d.data_selection_grouped?"pointer":null).on("mouseover",function(a){var c=a.index;b.dragging||b.flowing||b.hasArcType()||(d.point_focus_expand_enabled&&b.expandCircles(c,null,!0),b.expandBars(c,null,!0),b.main.selectAll("."+l.shape+"-"+c).each(function(a){d.data_onmouseover.call(b.api,a)}))}).on("mouseout",function(a){var c=a.index;b.config&&(b.hasArcType()||(b.hideXGridFocus(),b.hideTooltip(),b.unexpandCircles(),b.unexpandBars(),b.main.selectAll("."+l.shape+"-"+c).each(function(a){d.data_onmouseout.call(b.api,a)})))}).on("mousemove",function(a){var e,f=a.index,g=b.svg.select("."+l.eventRect+"-"+f);b.dragging||b.flowing||b.hasArcType()||(b.isStepType(a)&&"step-after"===b.config.line_step_type&&c.mouse(this)[0]<b.x(b.getXValue(a.id,f))&&(f-=1),e=b.filterTargetsToShow(b.data.targets).map(function(a){return b.addName(b.getValueOnIndex(a.values,f))}),d.tooltip_grouped&&(b.showTooltip(e,this),b.showXGridFocus(e)),(!d.tooltip_grouped||d.data_selection_enabled&&!d.data_selection_grouped)&&b.main.selectAll("."+l.shape+"-"+f).each(function(){c.select(this).classed(l.EXPANDED,!0),d.data_selection_enabled&&g.style("cursor",d.data_selection_grouped?"pointer":null),d.tooltip_grouped||(b.hideXGridFocus(),b.hideTooltip(),d.data_selection_grouped||(b.unexpandCircles(f),b.unexpandBars(f)))}).filter(function(a){return b.isWithinShape(this,a)}).each(function(a){d.data_selection_enabled&&(d.data_selection_grouped||d.data_selection_isselectable(a))&&g.style("cursor","pointer"),d.tooltip_grouped||(b.showTooltip([a],this),b.showXGridFocus([a]),d.point_focus_expand_enabled&&b.expandCircles(f,a.id,!0),b.expandBars(f,a.id,!0))}))}).on("click",function(a){var e=a.index;if(!b.hasArcType()&&b.toggleShape){if(b.cancelClick)return void(b.cancelClick=!1);b.isStepType(a)&&"step-after"===d.line_step_type&&c.mouse(this)[0]<b.x(b.getXValue(a.id,e))&&(e-=1),b.main.selectAll("."+l.shape+"-"+e).each(function(a){(d.data_selection_grouped||b.isWithinShape(this,a))&&(b.toggleShape(this,a,e),b.config.data_onclick.call(b.api,a,this))})}}).call(d.data_selection_draggable&&b.drag?c.behavior.drag().origin(Object).on("drag",function(){b.drag(c.mouse(this))}).on("dragstart",function(){b.dragstart(c.mouse(this))}).on("dragend",function(){b.dragend()}):function(){})},i.generateEventRectsForMultipleXs=function(a){function b(){c.svg.select("."+l.eventRect).style("cursor",null),c.hideXGridFocus(),c.hideTooltip(),c.unexpandCircles(),c.unexpandBars()}var c=this,d=c.d3,e=c.config;a.append("rect").attr("x",0).attr("y",0).attr("width",c.width).attr("height",c.height).attr("class",l.eventRect).on("mouseout",function(){c.config&&(c.hasArcType()||b())}).on("mousemove",function(){var a,f,g,h,i=c.filterTargetsToShow(c.data.targets);if(!c.dragging&&!c.hasArcType(i)){if(a=d.mouse(this),f=c.findClosestFromTargets(i,a),!c.mouseover||f&&f.id===c.mouseover.id||(e.data_onmouseout.call(c.api,c.mouseover),c.mouseover=void 0),!f)return void b();g=c.isScatterType(f)||!e.tooltip_grouped?[f]:c.filterByX(i,f.x),h=g.map(function(a){return c.addName(a)}),c.showTooltip(h,this),e.point_focus_expand_enabled&&c.expandCircles(f.index,f.id,!0),c.expandBars(f.index,f.id,!0),c.showXGridFocus(h),(c.isBarType(f.id)||c.dist(f,a)<e.point_sensitivity)&&(c.svg.select("."+l.eventRect).style("cursor","pointer"),c.mouseover||(e.data_onmouseover.call(c.api,f),c.mouseover=f))}}).on("click",function(){var a,b,f=c.filterTargetsToShow(c.data.targets);c.hasArcType(f)||(a=d.mouse(this),b=c.findClosestFromTargets(f,a),b&&(c.isBarType(b.id)||c.dist(b,a)<e.point_sensitivity)&&c.main.selectAll("."+l.shapes+c.getTargetSelectorSuffix(b.id)).selectAll("."+l.shape+"-"+b.index).each(function(){(e.data_selection_grouped||c.isWithinShape(this,b))&&(c.toggleShape(this,b,b.index),c.config.data_onclick.call(c.api,b,this))}))}).call(e.data_selection_draggable&&c.drag?d.behavior.drag().origin(Object).on("drag",function(){c.drag(d.mouse(this))}).on("dragstart",function(){c.dragstart(d.mouse(this))}).on("dragend",function(){c.dragend()}):function(){})},i.dispatchEvent=function(b,c,d){var e=this,f="."+l.eventRect+(e.isMultipleX()?"":"-"+c),g=e.main.select(f).node(),h=g.getBoundingClientRect(),i=h.left+(d?d[0]:0),j=h.top+(d?d[1]:0),k=document.createEvent("MouseEvents");k.initMouseEvent(b,!0,!0,a,0,i,j,i,j,!1,!1,!1,!1,0,null),g.dispatchEvent(k)},i.getCurrentWidth=function(){var a=this,b=a.config;return b.size_width?b.size_width:a.getParentWidth()},i.getCurrentHeight=function(){var a=this,b=a.config,c=b.size_height?b.size_height:a.getParentHeight();return c>0?c:320/(a.hasType("gauge")&&!b.gauge_fullCircle?2:1)},i.getCurrentPaddingTop=function(){var a=this,b=a.config,c=m(b.padding_top)?b.padding_top:0;return a.title&&a.title.node()&&(c+=a.getTitlePadding()),c},i.getCurrentPaddingBottom=function(){var a=this.config;return m(a.padding_bottom)?a.padding_bottom:0},i.getCurrentPaddingLeft=function(a){var b=this,c=b.config;return m(c.padding_left)?c.padding_left:c.axis_rotated?c.axis_x_show?Math.max(r(b.getAxisWidthByAxisId("x",a)),40):1:!c.axis_y_show||c.axis_y_inner?b.axis.getYAxisLabelPosition().isOuter?30:1:r(b.getAxisWidthByAxisId("y",a))},i.getCurrentPaddingRight=function(){var a=this,b=a.config,c=10,d=a.isLegendRight?a.getLegendWidth()+20:0;return m(b.padding_right)?b.padding_right+1:b.axis_rotated?c+d:!b.axis_y2_show||b.axis_y2_inner?2+d+(a.axis.getY2AxisLabelPosition().isOuter?20:0):r(a.getAxisWidthByAxisId("y2"))+d},i.getParentRectValue=function(a){for(var b,c=this.selectChart.node();c&&"BODY"!==c.tagName;){try{b=c.getBoundingClientRect()[a]}catch(d){"width"===a&&(b=c.offsetWidth)}if(b)break;c=c.parentNode}return b},i.getParentWidth=function(){return this.getParentRectValue("width")},i.getParentHeight=function(){var a=this.selectChart.style("height");return a.indexOf("px")>0?+a.replace("px",""):0},i.getSvgLeft=function(a){var b=this,c=b.config,d=c.axis_rotated||!c.axis_rotated&&!c.axis_y_inner,e=c.axis_rotated?l.axisX:l.axisY,f=b.main.select("."+e).node(),g=f&&d?f.getBoundingClientRect():{right:0},h=b.selectChart.node().getBoundingClientRect(),i=b.hasArcType(),j=g.right-h.left-(i?0:b.getCurrentPaddingLeft(a));return j>0?j:0},i.getAxisWidthByAxisId=function(a,b){var c=this,d=c.axis.getLabelPositionById(a);return c.axis.getMaxTickWidth(a,b)+(d.isInner?20:40)},i.getHorizontalAxisHeight=function(a){var b=this,c=b.config,d=30;return"x"!==a||c.axis_x_show?"x"===a&&c.axis_x_height?c.axis_x_height:"y"!==a||c.axis_y_show?"y2"!==a||c.axis_y2_show?("x"===a&&!c.axis_rotated&&c.axis_x_tick_rotate&&(d=30+b.axis.getMaxTickWidth(a)*Math.cos(Math.PI*(90-c.axis_x_tick_rotate)/180)),"y"===a&&c.axis_rotated&&c.axis_y_tick_rotate&&(d=30+b.axis.getMaxTickWidth(a)*Math.cos(Math.PI*(90-c.axis_y_tick_rotate)/180)),d+(b.axis.getLabelPositionById(a).isInner?0:10)+("y2"===a?-10:0)):b.rotated_padding_top:!c.legend_show||b.isLegendRight||b.isLegendInset?1:10:8},i.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},i.getShapeIndices=function(a){var b,c,d=this,e=d.config,f={},g=0;return d.filterTargetsToShow(d.data.targets.filter(a,d)).forEach(function(a){for(b=0;b<e.data_groups.length;b++)if(!(e.data_groups[b].indexOf(a.id)<0))for(c=0;c<e.data_groups[b].length;c++)if(e.data_groups[b][c]in f){f[a.id]=f[e.data_groups[b][c]];break}p(f[a.id])&&(f[a.id]=g++)}),f.__max__=g-1,f},i.getShapeX=function(a,b,c,d){var e=this,f=d?e.subX:e.x;return function(d){var e=d.id in c?c[d.id]:0;return d.x||0===d.x?f(d.x)-a*(b/2-e):0}},i.getShapeY=function(a){var b=this;return function(c){var d=a?b.getSubYScale(c.id):b.getYScale(c.id);return d(c.value)}},i.getShapeOffset=function(a,b,c){var d=this,e=d.orderTargets(d.filterTargetsToShow(d.data.targets.filter(a,d))),f=e.map(function(a){return a.id});return function(a,g){var h=c?d.getSubYScale(a.id):d.getYScale(a.id),i=h(0),j=i;return e.forEach(function(c){var e=d.isStepType(a)?d.convertValuesToStep(c.values):c.values;c.id!==a.id&&b[c.id]===b[a.id]&&f.indexOf(c.id)<f.indexOf(a.id)&&("undefined"!=typeof e[g]&&+e[g].x===+a.x||(g=-1,e.forEach(function(b,c){b.x===a.x&&(g=c)})),g in e&&e[g].value*a.value>=0&&(j+=h(e[g].value)-i))}),j}},i.isWithinShape=function(a,b){var c,d=this,e=d.d3.select(a);return d.isTargetToShow(b.id)?"circle"===a.nodeName?c=d.isStepType(b)?d.isWithinStep(a,d.getYScale(b.id)(b.value)):d.isWithinCircle(a,1.5*d.pointSelectR(b)):"path"===a.nodeName&&(c=e.classed(l.bar)?d.isWithinBar(a):!0):c=!1,c},i.getInterpolate=function(a){var b=this,c=b.isInterpolationType(b.config.spline_interpolation_type)?b.config.spline_interpolation_type:"cardinal";return b.isSplineType(a)?c:b.isStepType(a)?b.config.line_step_type:"linear"},i.initLine=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartLines)},i.updateTargetsForLine=function(a){var b,c,d=this,e=d.config,f=d.classChartLine.bind(d),g=d.classLines.bind(d),h=d.classAreas.bind(d),i=d.classCircles.bind(d),j=d.classFocus.bind(d);b=d.main.select("."+l.chartLines).selectAll("."+l.chartLine).data(a).attr("class",function(a){return f(a)+j(a)}),c=b.enter().append("g").attr("class",f).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",g),c.append("g").attr("class",h),c.append("g").attr("class",function(a){return d.generateClass(l.selectedCircles,a.id)}),c.append("g").attr("class",i).style("cursor",function(a){return e.data_selection_isselectable(a)?"pointer":null}),a.forEach(function(a){d.main.selectAll("."+l.selectedCircles+d.getTargetSelectorSuffix(a.id)).selectAll("."+l.selectedCircle).each(function(b){b.value=a.values[b.index].value})})},i.updateLine=function(a){var b=this;b.mainLine=b.main.selectAll("."+l.lines).selectAll("."+l.line).data(b.lineData.bind(b)),b.mainLine.enter().append("path").attr("class",b.classLine.bind(b)).style("stroke",b.color),b.mainLine.style("opacity",b.initialOpacity.bind(b)).style("shape-rendering",function(a){return b.isStepType(a)?"crispEdges":""}).attr("transform",null),b.mainLine.exit().transition().duration(a).style("opacity",0).remove()},i.redrawLine=function(a,b){return[(b?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",a).style("stroke",this.color).style("opacity",1)]},i.generateDrawLine=function(a,b){var c=this,d=c.config,e=c.d3.svg.line(),f=c.generateGetLinePoints(a,b),g=b?c.getSubYScale:c.getYScale,h=function(a){return(b?c.subxx:c.xx).call(c,a)},i=function(a,b){return d.data_groups.length>0?f(a,b)[0][1]:g.call(c,a.id)(a.value)};return e=d.axis_rotated?e.x(i).y(h):e.x(h).y(i),d.line_connectNull||(e=e.defined(function(a){return null!=a.value})),function(a){var f,h=d.line_connectNull?c.filterRemoveNull(a.values):a.values,i=b?c.x:c.subX,j=g.call(c,a.id),k=0,l=0;return c.isLineType(a)?d.data_regions[a.id]?f=c.lineWithRegions(h,i,j,d.data_regions[a.id]):(c.isStepType(a)&&(h=c.convertValuesToStep(h)),f=e.interpolate(c.getInterpolate(a))(h)):(h[0]&&(k=i(h[0].x),l=j(h[0].value)),f=d.axis_rotated?"M "+l+" "+k:"M "+k+" "+l),f?f:"M 0 0"}},i.generateGetLinePoints=function(a,b){var c=this,d=c.config,e=a.__max__+1,f=c.getShapeX(0,e,a,!!b),g=c.getShapeY(!!b),h=c.getShapeOffset(c.isLineType,a,!!b),i=b?c.getSubYScale:c.getYScale;return function(a,b){var e=i.call(c,a.id)(0),j=h(a,b)||e,k=f(a),l=g(a);return d.axis_rotated&&(0<a.value&&e>l||a.value<0&&l>e)&&(l=e),[[k,l-(e-j)],[k,l-(e-j)],[k,l-(e-j)],[k,l-(e-j)]]}},i.lineWithRegions=function(a,b,c,d){function e(a,b){var c;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}function f(a){return"M"+a[0][0]+" "+a[0][1]+" "+a[1][0]+" "+a[1][1]}var g,h,i,j,k,l,m,n,o,r,s,t,u=this,v=u.config,w=-1,x="M",y=u.isCategorized()?.5:0,z=[];if(q(d))for(g=0;g<d.length;g++)z[g]={},p(d[g].start)?z[g].start=a[0].x:z[g].start=u.isTimeSeries()?u.parseDate(d[g].start):d[g].start,p(d[g].end)?z[g].end=a[a.length-1].x:z[g].end=u.isTimeSeries()?u.parseDate(d[g].end):d[g].end;for(s=v.axis_rotated?function(a){return c(a.value)}:function(a){return b(a.x)},t=v.axis_rotated?function(a){return b(a.x)}:function(a){return c(a.value)},i=u.isTimeSeries()?function(a,d,e,g){var h,i=a.x.getTime(),j=d.x-a.x,l=new Date(i+j*e),m=new Date(i+j*(e+g));return h=v.axis_rotated?[[c(k(e)),b(l)],[c(k(e+g)),b(m)]]:[[b(l),c(k(e))],[b(m),c(k(e+g))]],f(h)}:function(a,d,e,g){var h;return h=v.axis_rotated?[[c(k(e),!0),b(j(e))],[c(k(e+g),!0),b(j(e+g))]]:[[b(j(e),!0),c(k(e))],[b(j(e+g),!0),c(k(e+g))]],f(h)},g=0;g<a.length;g++){if(p(z)||!e(a[g].x,z))x+=" "+s(a[g])+" "+t(a[g]);else for(j=u.getScale(a[g-1].x+y,a[g].x+y,u.isTimeSeries()),k=u.getScale(a[g-1].value,a[g].value),l=b(a[g].x)-b(a[g-1].x),m=c(a[g].value)-c(a[g-1].value),n=Math.sqrt(Math.pow(l,2)+Math.pow(m,2)),o=2/n,r=2*o,h=o;1>=h;h+=r)x+=i(a[g-1],a[g],h,o);w=a[g].x}return x},i.updateArea=function(a){var b=this,c=b.d3;b.mainArea=b.main.selectAll("."+l.areas).selectAll("."+l.area).data(b.lineData.bind(b)),b.mainArea.enter().append("path").attr("class",b.classArea.bind(b)).style("fill",b.color).style("opacity",function(){return b.orgAreaOpacity=+c.select(this).style("opacity"),0}),b.mainArea.style("opacity",b.orgAreaOpacity),b.mainArea.exit().transition().duration(a).style("opacity",0).remove()},i.redrawArea=function(a,b){return[(b?this.mainArea.transition(Math.random().toString()):this.mainArea).attr("d",a).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},i.generateDrawArea=function(a,b){var c=this,d=c.config,e=c.d3.svg.area(),f=c.generateGetAreaPoints(a,b),g=b?c.getSubYScale:c.getYScale,h=function(a){return(b?c.subxx:c.xx).call(c,a)},i=function(a,b){return d.data_groups.length>0?f(a,b)[0][1]:g.call(c,a.id)(c.getAreaBaseValue(a.id))},j=function(a,b){return d.data_groups.length>0?f(a,b)[1][1]:g.call(c,a.id)(a.value)};return e=d.axis_rotated?e.x0(i).x1(j).y(h):e.x(h).y0(d.area_above?0:i).y1(j),d.line_connectNull||(e=e.defined(function(a){return null!==a.value})),function(a){var b,f=d.line_connectNull?c.filterRemoveNull(a.values):a.values,g=0,h=0;return c.isAreaType(a)?(c.isStepType(a)&&(f=c.convertValuesToStep(f)),b=e.interpolate(c.getInterpolate(a))(f)):(f[0]&&(g=c.x(f[0].x),h=c.getYScale(a.id)(f[0].value)),b=d.axis_rotated?"M "+h+" "+g:"M "+g+" "+h),b?b:"M 0 0"}},i.getAreaBaseValue=function(){return 0},i.generateGetAreaPoints=function(a,b){var c=this,d=c.config,e=a.__max__+1,f=c.getShapeX(0,e,a,!!b),g=c.getShapeY(!!b),h=c.getShapeOffset(c.isAreaType,a,!!b),i=b?c.getSubYScale:c.getYScale;return function(a,b){var e=i.call(c,a.id)(0),j=h(a,b)||e,k=f(a),l=g(a);return d.axis_rotated&&(0<a.value&&e>l||a.value<0&&l>e)&&(l=e),[[k,j],[k,l-(e-j)],[k,l-(e-j)],[k,j]]}},i.updateCircle=function(){var a=this;a.mainCircle=a.main.selectAll("."+l.circles).selectAll("."+l.circle).data(a.lineOrScatterData.bind(a)),a.mainCircle.enter().append("circle").attr("class",a.classCircle.bind(a)).attr("r",a.pointR.bind(a)).style("fill",a.color),a.mainCircle.style("opacity",a.initialOpacityForCircle.bind(a)),a.mainCircle.exit().remove()},i.redrawCircle=function(a,b,c){var d=this.main.selectAll("."+l.selectedCircle);return[(c?this.mainCircle.transition(Math.random().toString()):this.mainCircle).style("opacity",this.opacityForCircle.bind(this)).style("fill",this.color).attr("cx",a).attr("cy",b),(c?d.transition(Math.random().toString()):d).attr("cx",a).attr("cy",b)]},i.circleX=function(a){return a.x||0===a.x?this.x(a.x):null},i.updateCircleY=function(){var a,b,c=this;c.config.data_groups.length>0?(a=c.getShapeIndices(c.isLineType),b=c.generateGetLinePoints(a),c.circleY=function(a,c){return b(a,c)[0][1]}):c.circleY=function(a){return c.getYScale(a.id)(a.value)}},i.getCircles=function(a,b){var c=this;return(b?c.main.selectAll("."+l.circles+c.getTargetSelectorSuffix(b)):c.main).selectAll("."+l.circle+(m(a)?"-"+a:""))},i.expandCircles=function(a,b,c){var d=this,e=d.pointExpandedR.bind(d);c&&d.unexpandCircles(),d.getCircles(a,b).classed(l.EXPANDED,!0).attr("r",e)},i.unexpandCircles=function(a){var b=this,c=b.pointR.bind(b);b.getCircles(a).filter(function(){return b.d3.select(this).classed(l.EXPANDED)}).classed(l.EXPANDED,!1).attr("r",c)},i.pointR=function(a){var b=this,c=b.config;return b.isStepType(a)?0:n(c.point_r)?c.point_r(a):c.point_r;
2353 g+=e*(l[1]/(1-l[0]-l[1])),h+=e*(l[0]/(1-l[0]-l[1]))):D&&(j=p.getDataLabelLength(x,y,"height"),g+=p.axis.convertPixelsToAxisPadding(j[1],e),h+=p.axis.convertPixelsToAxisPadding(j[0],e)),"y"===b&&v(q.axis_y_padding)&&(g=p.axis.getPadding(q.axis_y_padding,"top",g,e),h=p.axis.getPadding(q.axis_y_padding,"bottom",h,e)),"y2"===b&&v(q.axis_y2_padding)&&(g=p.axis.getPadding(q.axis_y2_padding,"top",g,e),h=p.axis.getPadding(q.axis_y2_padding,"bottom",h,e)),A&&(n&&(h=x),o&&(g=-y)),d=[x-h,y+g],B?d.reverse():d)},i.getXDomainMin=function(a){var b=this,c=b.config;return q(c.axis_x_min)?b.isTimeSeries()?this.parseDate(c.axis_x_min):c.axis_x_min:b.d3.min(a,function(a){return b.d3.min(a.values,function(a){return a.x})})},i.getXDomainMax=function(a){var b=this,c=b.config;return q(c.axis_x_max)?b.isTimeSeries()?this.parseDate(c.axis_x_max):c.axis_x_max:b.d3.max(a,function(a){return b.d3.max(a.values,function(a){return a.x})})},i.getXDomainPadding=function(a){var b,c,d,e,f=this,g=f.config,h=a[1]-a[0];return f.isCategorized()?c=0:f.hasType("bar")?(b=f.getMaxDataCount(),c=b>1?h/(b-1)/2:.5):c=.01*h,"object"==typeof g.axis_x_padding&&v(g.axis_x_padding)?(d=m(g.axis_x_padding.left)?g.axis_x_padding.left:c,e=m(g.axis_x_padding.right)?g.axis_x_padding.right:c):d=e="number"==typeof g.axis_x_padding?g.axis_x_padding:c,{left:d,right:e}},i.getXDomain=function(a){var b=this,c=[b.getXDomainMin(a),b.getXDomainMax(a)],d=c[0],e=c[1],f=b.getXDomainPadding(c),g=0,h=0;return d-e!==0||b.isCategorized()||(b.isTimeSeries()?(d=new Date(.5*d.getTime()),e=new Date(1.5*e.getTime())):(d=0===d?1:.5*d,e=0===e?-1:1.5*e)),(d||0===d)&&(g=b.isTimeSeries()?new Date(d.getTime()-f.left):d-f.left),(e||0===e)&&(h=b.isTimeSeries()?new Date(e.getTime()+f.right):e+f.right),[g,h]},i.updateXDomain=function(a,b,c,d,e){var f=this,g=f.config;return c&&(f.x.domain(e?e:f.d3.extent(f.getXDomain(a))),f.orgXDomain=f.x.domain(),g.zoom_enabled&&f.zoom.scale(f.x).updateScaleExtent(),f.subX.domain(f.x.domain()),f.brush&&f.brush.scale(f.subX)),b&&(f.x.domain(e?e:!f.brush||f.brush.empty()?f.orgXDomain:f.brush.extent()),g.zoom_enabled&&f.zoom.scale(f.x).updateScaleExtent()),d&&f.x.domain(f.trimXDomain(f.x.orgDomain())),f.x.domain()},i.trimXDomain=function(a){var b=this.getZoomDomain(),c=b[0],d=b[1];return a[0]<=c&&(a[1]=+a[1]+(c-a[0]),a[0]=c),d<=a[1]&&(a[0]=+a[0]-(a[1]-d),a[1]=d),a},i.isX=function(a){var b=this,c=b.config;return c.data_x&&a===c.data_x||v(c.data_xs)&&x(c.data_xs,a)},i.isNotX=function(a){return!this.isX(a)},i.getXKey=function(a){var b=this,c=b.config;return c.data_x?c.data_x:v(c.data_xs)?c.data_xs[a]:null},i.getXValuesOfXKey=function(a,b){var c,d=this,e=b&&v(b)?d.mapToIds(b):[];return e.forEach(function(b){d.getXKey(b)===a&&(c=d.data.xs[b])}),c},i.getIndexByX=function(a){var b=this,c=b.filterByX(b.data.targets,a);return c.length?c[0].index:null},i.getXValue=function(a,b){var c=this;return a in c.data.xs&&c.data.xs[a]&&m(c.data.xs[a][b])?c.data.xs[a][b]:b},i.getOtherTargetXs=function(){var a=this,b=Object.keys(a.data.xs);return b.length?a.data.xs[b[0]]:null},i.getOtherTargetX=function(a){var b=this.getOtherTargetXs();return b&&a<b.length?b[a]:null},i.addXs=function(a){var b=this;Object.keys(a).forEach(function(c){b.config.data_xs[c]=a[c]})},i.hasMultipleX=function(a){return this.d3.set(Object.keys(a).map(function(b){return a[b]})).size()>1},i.isMultipleX=function(){return v(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},i.addName=function(a){var b,c=this;return a&&(b=c.config.data_names[a.id],a.name=void 0!==b?b:a.id),a},i.getValueOnIndex=function(a,b){var c=a.filter(function(a){return a.index===b});return c.length?c[0]:null},i.updateTargetX=function(a,b){var c=this;a.forEach(function(a){a.values.forEach(function(d,e){d.x=c.generateTargetX(b[e],a.id,e)}),c.data.xs[a.id]=b})},i.updateTargetXs=function(a,b){var c=this;a.forEach(function(a){b[a.id]&&c.updateTargetX([a],b[a.id])})},i.generateTargetX=function(a,b,c){var d,e=this;return d=e.isTimeSeries()?a?e.parseDate(a):e.parseDate(e.getXValue(b,c)):e.isCustomX()&&!e.isCategorized()?m(a)?+a:e.getXValue(b,c):c},i.cloneTarget=function(a){return{id:a.id,id_org:a.id_org,values:a.values.map(function(a){return{x:a.x,value:a.value,id:a.id}})}},i.updateXs=function(){var a=this;a.data.targets.length&&(a.xs=[],a.data.targets[0].values.forEach(function(b){a.xs[b.index]=b.x}))},i.getPrevX=function(a){var b=this.xs[a-1];return"undefined"!=typeof b?b:null},i.getNextX=function(a){var b=this.xs[a+1];return"undefined"!=typeof b?b:null},i.getMaxDataCount=function(){var a=this;return a.d3.max(a.data.targets,function(a){return a.values.length})},i.getMaxDataCountTarget=function(a){var b,c=a.length,d=0;return c>1?a.forEach(function(a){a.values.length>d&&(b=a,d=a.values.length)}):b=c?a[0]:null,b},i.getEdgeX=function(a){var b=this;return a.length?[b.d3.min(a,function(a){return a.values[0].x}),b.d3.max(a,function(a){return a.values[a.values.length-1].x})]:[0,0]},i.mapToIds=function(a){return a.map(function(a){return a.id})},i.mapToTargetIds=function(a){var b=this;return a?[].concat(a):b.mapToIds(b.data.targets)},i.hasTarget=function(a,b){var c,d=this.mapToIds(a);for(c=0;c<d.length;c++)if(d[c]===b)return!0;return!1},i.isTargetToShow=function(a){return this.hiddenTargetIds.indexOf(a)<0},i.isLegendToShow=function(a){return this.hiddenLegendIds.indexOf(a)<0},i.filterTargetsToShow=function(a){var b=this;return a.filter(function(a){return b.isTargetToShow(a.id)})},i.mapTargetsToUniqueXs=function(a){var b=this,c=b.d3.set(b.d3.merge(a.map(function(a){return a.values.map(function(a){return+a.x})}))).values();return c=b.isTimeSeries()?c.map(function(a){return new Date(+a)}):c.map(function(a){return+a}),c.sort(function(a,b){return b>a?-1:a>b?1:a>=b?0:NaN})},i.addHiddenTargetIds=function(a){this.hiddenTargetIds=this.hiddenTargetIds.concat(a)},i.removeHiddenTargetIds=function(a){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(b){return a.indexOf(b)<0})},i.addHiddenLegendIds=function(a){this.hiddenLegendIds=this.hiddenLegendIds.concat(a)},i.removeHiddenLegendIds=function(a){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(b){return a.indexOf(b)<0})},i.getValuesAsIdKeyed=function(a){var b={};return a.forEach(function(a){b[a.id]=[],a.values.forEach(function(c){b[a.id].push(c.value)})}),b},i.checkValueInTargets=function(a,b){var c,d,e,f=Object.keys(a);for(c=0;c<f.length;c++)for(e=a[f[c]].values,d=0;d<e.length;d++)if(b(e[d].value))return!0;return!1},i.hasNegativeValueInTargets=function(a){return this.checkValueInTargets(a,function(a){return 0>a})},i.hasPositiveValueInTargets=function(a){return this.checkValueInTargets(a,function(a){return a>0})},i.isOrderDesc=function(){var a=this.config;return"string"==typeof a.data_order&&"desc"===a.data_order.toLowerCase()},i.isOrderAsc=function(){var a=this.config;return"string"==typeof a.data_order&&"asc"===a.data_order.toLowerCase()},i.orderTargets=function(a){var b=this,c=b.config,d=b.isOrderAsc(),e=b.isOrderDesc();return d||e?a.sort(function(a,b){var c=function(a,b){return a+Math.abs(b.value)},e=a.values.reduce(c,0),f=b.values.reduce(c,0);return d?f-e:e-f}):n(c.data_order)&&a.sort(c.data_order),a},i.filterByX=function(a,b){return this.d3.merge(a.map(function(a){return a.values})).filter(function(a){return a.x-b===0})},i.filterRemoveNull=function(a){return a.filter(function(a){return m(a.value)})},i.filterByXDomain=function(a,b){return a.map(function(a){return{id:a.id,id_org:a.id_org,values:a.values.filter(function(a){return b[0]<=a.x&&a.x<=b[1]})}})},i.hasDataLabel=function(){var a=this.config;return"boolean"==typeof a.data_labels&&a.data_labels?!0:!("object"!=typeof a.data_labels||!v(a.data_labels))},i.getDataLabelLength=function(a,b,c){var d=this,e=[0,0],f=1.3;return d.selectChart.select("svg").selectAll(".dummy").data([a,b]).enter().append("text").text(function(a){return d.dataLabelFormat(a.id)(a)}).each(function(a,b){e[b]=this.getBoundingClientRect()[c]*f}).remove(),e},i.isNoneArc=function(a){return this.hasTarget(this.data.targets,a.id)},i.isArc=function(a){return"data"in a&&this.hasTarget(this.data.targets,a.data.id)},i.findSameXOfValues=function(a,b){var c,d=a[b].x,e=[];for(c=b-1;c>=0&&d===a[c].x;c--)e.push(a[c]);for(c=b;c<a.length&&d===a[c].x;c++)e.push(a[c]);return e},i.findClosestFromTargets=function(a,b){var c,d=this;return c=a.map(function(a){return d.findClosest(a.values,b)}),d.findClosest(c,b)},i.findClosest=function(a,b){var c,d=this,e=d.config.point_sensitivity;return a.filter(function(a){return a&&d.isBarType(a.id)}).forEach(function(a){var b=d.main.select("."+l.bars+d.getTargetSelectorSuffix(a.id)+" ."+l.bar+"-"+a.index).node();!c&&d.isWithinBar(b)&&(c=a)}),a.filter(function(a){return a&&!d.isBarType(a.id)}).forEach(function(a){var f=d.dist(a,b);e>f&&(e=f,c=a)}),c},i.dist=function(a,b){var c=this,d=c.config,e=d.axis_rotated?1:0,f=d.axis_rotated?0:1,g=c.circleY(a,a.index),h=c.x(a.x);return Math.sqrt(Math.pow(h-b[e],2)+Math.pow(g-b[f],2))},i.convertValuesToStep=function(a){var b,c=[].concat(a);if(!this.isCategorized())return a;for(b=a.length+1;b>0;b--)c[b]=c[b-1];return c[0]={x:c[0].x-1,value:c[0].value,id:c[0].id},c[a.length+1]={x:c[a.length].x+1,value:c[a.length].value,id:c[a.length].id},c},i.updateDataAttributes=function(a,b){var c=this,d=c.config,e=d["data_"+a];return"undefined"==typeof b?e:(Object.keys(b).forEach(function(a){e[a]=b[a]}),c.redraw({withLegend:!0}),e)},i.convertUrlToData=function(a,b,c,d,e){var f=this,g=b?b:"csv",h=f.d3.xhr(a);c&&Object.keys(c).forEach(function(a){h.header(a,c[a])}),h.get(function(a,b){var c;if(!b)throw new Error(a.responseURL+" "+a.status+" ("+a.statusText+")");c="json"===g?f.convertJsonToData(JSON.parse(b.response),d):"tsv"===g?f.convertTsvToData(b.response):f.convertCsvToData(b.response),e.call(f,c)})},i.convertXsvToData=function(a,b){var c,d=b.parseRows(a);return 1===d.length?(c=[{}],d[0].forEach(function(a){c[0][a]=null})):c=b.parse(a),c},i.convertCsvToData=function(a){return this.convertXsvToData(a,this.d3.csv)},i.convertTsvToData=function(a){return this.convertXsvToData(a,this.d3.tsv)},i.convertJsonToData=function(a,b){var c,d,e=this,f=[];return b?(b.x?(c=b.value.concat(b.x),e.config.data_x=b.x):c=b.value,f.push(c),a.forEach(function(a){var b=[];c.forEach(function(c){var d=e.findValueInJson(a,c);p(d)&&(d=null),b.push(d)}),f.push(b)}),d=e.convertRowsToData(f)):(Object.keys(a).forEach(function(b){f.push([b].concat(a[b]))}),d=e.convertColumnsToData(f)),d},i.findValueInJson=function(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split("."),d=0;d<c.length;++d){var e=c[d];if(!(e in a))return;a=a[e]}return a},i.convertRowsToData=function(a){var b,c,d=a[0],e={},f=[];for(b=1;b<a.length;b++){for(e={},c=0;c<a[b].length;c++){if(p(a[b][c]))throw new Error("Source data is missing a component at ("+b+","+c+")!");e[d[c]]=a[b][c]}f.push(e)}return f},i.convertColumnsToData=function(a){var b,c,d,e=[];for(b=0;b<a.length;b++)for(d=a[b][0],c=1;c<a[b].length;c++){if(p(e[c-1])&&(e[c-1]={}),p(a[b][c]))throw new Error("Source data is missing a component at ("+b+","+c+")!");e[c-1][d]=a[b][c]}return e},i.convertDataToTargets=function(a,b){var c,d=this,e=d.config,f=d.d3.keys(a[0]).filter(d.isNotX,d),g=d.d3.keys(a[0]).filter(d.isX,d);return f.forEach(function(c){var f=d.getXKey(c);d.isCustomX()||d.isTimeSeries()?g.indexOf(f)>=0?d.data.xs[c]=(b&&d.data.xs[c]?d.data.xs[c]:[]).concat(a.map(function(a){return a[f]}).filter(m).map(function(a,b){return d.generateTargetX(a,c,b)})):e.data_x?d.data.xs[c]=d.getOtherTargetXs():v(e.data_xs)&&(d.data.xs[c]=d.getXValuesOfXKey(f,d.data.targets)):d.data.xs[c]=a.map(function(a,b){return b})}),f.forEach(function(a){if(!d.data.xs[a])throw new Error('x is not defined for id = "'+a+'".')}),c=f.map(function(b,c){var f=e.data_idConverter(b);return{id:f,id_org:b,values:a.map(function(a,g){var h,i=d.getXKey(b),j=a[i],k=null===a[b]||isNaN(a[b])?null:+a[b];return d.isCustomX()&&d.isCategorized()&&0===c&&!p(j)?(0===c&&0===g&&(e.axis_x_categories=[]),h=e.axis_x_categories.indexOf(j),-1===h&&(h=e.axis_x_categories.length,e.axis_x_categories.push(j))):h=d.generateTargetX(j,b,g),(p(a[b])||d.data.xs[b].length<=g)&&(h=void 0),{x:h,value:k,id:f}}).filter(function(a){return q(a.x)})}}),c.forEach(function(a){var b;e.data_xSort&&(a.values=a.values.sort(function(a,b){var c=a.x||0===a.x?a.x:1/0,d=b.x||0===b.x?b.x:1/0;return c-d})),b=0,a.values.forEach(function(a){a.index=b++}),d.data.xs[a.id].sort(function(a,b){return a-b})}),d.hasNegativeValue=d.hasNegativeValueInTargets(c),d.hasPositiveValue=d.hasPositiveValueInTargets(c),e.data_type&&d.setTargetType(d.mapToIds(c).filter(function(a){return!(a in e.data_types)}),e.data_type),c.forEach(function(a){d.addCache(a.id_org,a)}),c},i.load=function(a,b){var c=this;a&&(b.filter&&(a=a.filter(b.filter)),(b.type||b.types)&&a.forEach(function(a){var d=b.types&&b.types[a.id]?b.types[a.id]:b.type;c.setTargetType(a.id,d)}),c.data.targets.forEach(function(b){for(var c=0;c<a.length;c++)if(b.id===a[c].id){b.values=a[c].values,a.splice(c,1);break}}),c.data.targets=c.data.targets.concat(a)),c.updateTargets(c.data.targets),c.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),b.done&&b.done()},i.loadFromArgs=function(a){var b=this;a.data?b.load(b.convertDataToTargets(a.data),a):a.url?b.convertUrlToData(a.url,a.mimeType,a.headers,a.keys,function(c){b.load(b.convertDataToTargets(c),a)}):a.json?b.load(b.convertDataToTargets(b.convertJsonToData(a.json,a.keys)),a):a.rows?b.load(b.convertDataToTargets(b.convertRowsToData(a.rows)),a):a.columns?b.load(b.convertDataToTargets(b.convertColumnsToData(a.columns)),a):b.load(null,a)},i.unload=function(a,b){var c=this;return b||(b=function(){}),a=a.filter(function(a){return c.hasTarget(c.data.targets,a)}),a&&0!==a.length?(c.svg.selectAll(a.map(function(a){return c.selectorTarget(a)})).transition().style("opacity",0).remove().call(c.endall,b),void a.forEach(function(a){c.withoutFadeIn[a]=!1,c.legend&&c.legend.selectAll("."+l.legendItem+c.getTargetSelectorSuffix(a)).remove(),c.data.targets=c.data.targets.filter(function(b){return b.id!==a})})):void b()},i.categoryName=function(a){var b=this.config;return a<b.axis_x_categories.length?b.axis_x_categories[a]:a},i.initEventRect=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.eventRects).style("fill-opacity",0)},i.redrawEventRect=function(){var a,b,c=this,d=c.config,e=c.isMultipleX(),f=c.main.select("."+l.eventRects).style("cursor",d.zoom_enabled?d.axis_rotated?"ns-resize":"ew-resize":null).classed(l.eventRectsMultiple,e).classed(l.eventRectsSingle,!e);f.selectAll("."+l.eventRect).remove(),c.eventRect=f.selectAll("."+l.eventRect),e?(a=c.eventRect.data([0]),c.generateEventRectsForMultipleXs(a.enter()),c.updateEventRect(a)):(b=c.getMaxDataCountTarget(c.data.targets),f.datum(b?b.values:[]),c.eventRect=f.selectAll("."+l.eventRect),a=c.eventRect.data(function(a){return a}),c.generateEventRectsForSingleX(a.enter()),c.updateEventRect(a),a.exit().remove())},i.updateEventRect=function(a){var b,c,d,e,f,g,h=this,i=h.config;a=a||h.eventRect.data(function(a){return a}),h.isMultipleX()?(b=0,c=0,d=h.width,e=h.height):(!h.isCustomX()&&!h.isTimeSeries()||h.isCategorized()?(f=h.getEventRectWidth(),g=function(a){return h.x(a.x)-f/2}):(h.updateXs(),f=function(a){var b=h.getPrevX(a.index),c=h.getNextX(a.index);return null===b&&null===c?i.axis_rotated?h.height:h.width:(null===b&&(b=h.x.domain()[0]),null===c&&(c=h.x.domain()[1]),Math.max(0,(h.x(c)-h.x(b))/2))},g=function(a){var b=h.getPrevX(a.index),c=h.getNextX(a.index),d=h.data.xs[a.id][a.index];return null===b&&null===c?0:(null===b&&(b=h.x.domain()[0]),(h.x(d)+h.x(b))/2)}),b=i.axis_rotated?0:g,c=i.axis_rotated?g:0,d=i.axis_rotated?h.width:f,e=i.axis_rotated?f:h.height),a.attr("class",h.classEvent.bind(h)).attr("x",b).attr("y",c).attr("width",d).attr("height",e)},i.generateEventRectsForSingleX=function(a){var b=this,c=b.d3,d=b.config;a.append("rect").attr("class",b.classEvent.bind(b)).style("cursor",d.data_selection_enabled&&d.data_selection_grouped?"pointer":null).on("mouseover",function(a){var c=a.index;b.dragging||b.flowing||b.hasArcType()||(d.point_focus_expand_enabled&&b.expandCircles(c,null,!0),b.expandBars(c,null,!0),b.main.selectAll("."+l.shape+"-"+c).each(function(a){d.data_onmouseover.call(b.api,a)}))}).on("mouseout",function(a){var c=a.index;b.config&&(b.hasArcType()||(b.hideXGridFocus(),b.hideTooltip(),b.unexpandCircles(),b.unexpandBars(),b.main.selectAll("."+l.shape+"-"+c).each(function(a){d.data_onmouseout.call(b.api,a)})))}).on("mousemove",function(a){var e,f=a.index,g=b.svg.select("."+l.eventRect+"-"+f);b.dragging||b.flowing||b.hasArcType()||(b.isStepType(a)&&"step-after"===b.config.line_step_type&&c.mouse(this)[0]<b.x(b.getXValue(a.id,f))&&(f-=1),e=b.filterTargetsToShow(b.data.targets).map(function(a){return b.addName(b.getValueOnIndex(a.values,f))}),d.tooltip_grouped&&(b.showTooltip(e,this),b.showXGridFocus(e)),(!d.tooltip_grouped||d.data_selection_enabled&&!d.data_selection_grouped)&&b.main.selectAll("."+l.shape+"-"+f).each(function(){c.select(this).classed(l.EXPANDED,!0),d.data_selection_enabled&&g.style("cursor",d.data_selection_grouped?"pointer":null),d.tooltip_grouped||(b.hideXGridFocus(),b.hideTooltip(),d.data_selection_grouped||(b.unexpandCircles(f),b.unexpandBars(f)))}).filter(function(a){return b.isWithinShape(this,a)}).each(function(a){d.data_selection_enabled&&(d.data_selection_grouped||d.data_selection_isselectable(a))&&g.style("cursor","pointer"),d.tooltip_grouped||(b.showTooltip([a],this),b.showXGridFocus([a]),d.point_focus_expand_enabled&&b.expandCircles(f,a.id,!0),b.expandBars(f,a.id,!0))}))}).on("click",function(a){var e=a.index;if(!b.hasArcType()&&b.toggleShape){if(b.cancelClick)return void(b.cancelClick=!1);b.isStepType(a)&&"step-after"===d.line_step_type&&c.mouse(this)[0]<b.x(b.getXValue(a.id,e))&&(e-=1),b.main.selectAll("."+l.shape+"-"+e).each(function(a){(d.data_selection_grouped||b.isWithinShape(this,a))&&(b.toggleShape(this,a,e),b.config.data_onclick.call(b.api,a,this))})}}).call(d.data_selection_draggable&&b.drag?c.behavior.drag().origin(Object).on("drag",function(){b.drag(c.mouse(this))}).on("dragstart",function(){b.dragstart(c.mouse(this))}).on("dragend",function(){b.dragend()}):function(){})},i.generateEventRectsForMultipleXs=function(a){function b(){c.svg.select("."+l.eventRect).style("cursor",null),c.hideXGridFocus(),c.hideTooltip(),c.unexpandCircles(),c.unexpandBars()}var c=this,d=c.d3,e=c.config;a.append("rect").attr("x",0).attr("y",0).attr("width",c.width).attr("height",c.height).attr("class",l.eventRect).on("mouseout",function(){c.config&&(c.hasArcType()||b())}).on("mousemove",function(){var a,f,g,h,i=c.filterTargetsToShow(c.data.targets);if(!c.dragging&&!c.hasArcType(i)){if(a=d.mouse(this),f=c.findClosestFromTargets(i,a),!c.mouseover||f&&f.id===c.mouseover.id||(e.data_onmouseout.call(c.api,c.mouseover),c.mouseover=void 0),!f)return void b();g=c.isScatterType(f)||!e.tooltip_grouped?[f]:c.filterByX(i,f.x),h=g.map(function(a){return c.addName(a)}),c.showTooltip(h,this),e.point_focus_expand_enabled&&c.expandCircles(f.index,f.id,!0),c.expandBars(f.index,f.id,!0),c.showXGridFocus(h),(c.isBarType(f.id)||c.dist(f,a)<e.point_sensitivity)&&(c.svg.select("."+l.eventRect).style("cursor","pointer"),c.mouseover||(e.data_onmouseover.call(c.api,f),c.mouseover=f))}}).on("click",function(){var a,b,f=c.filterTargetsToShow(c.data.targets);c.hasArcType(f)||(a=d.mouse(this),b=c.findClosestFromTargets(f,a),b&&(c.isBarType(b.id)||c.dist(b,a)<e.point_sensitivity)&&c.main.selectAll("."+l.shapes+c.getTargetSelectorSuffix(b.id)).selectAll("."+l.shape+"-"+b.index).each(function(){(e.data_selection_grouped||c.isWithinShape(this,b))&&(c.toggleShape(this,b,b.index),c.config.data_onclick.call(c.api,b,this))}))}).call(e.data_selection_draggable&&c.drag?d.behavior.drag().origin(Object).on("drag",function(){c.drag(d.mouse(this))}).on("dragstart",function(){c.dragstart(d.mouse(this))}).on("dragend",function(){c.dragend()}):function(){})},i.dispatchEvent=function(b,c,d){var e=this,f="."+l.eventRect+(e.isMultipleX()?"":"-"+c),g=e.main.select(f).node(),h=g.getBoundingClientRect(),i=h.left+(d?d[0]:0),j=h.top+(d?d[1]:0),k=document.createEvent("MouseEvents");k.initMouseEvent(b,!0,!0,a,0,i,j,i,j,!1,!1,!1,!1,0,null),g.dispatchEvent(k)},i.getCurrentWidth=function(){var a=this,b=a.config;return b.size_width?b.size_width:a.getParentWidth()},i.getCurrentHeight=function(){var a=this,b=a.config,c=b.size_height?b.size_height:a.getParentHeight();return c>0?c:320/(a.hasType("gauge")&&!b.gauge_fullCircle?2:1)},i.getCurrentPaddingTop=function(){var a=this,b=a.config,c=m(b.padding_top)?b.padding_top:0;return a.title&&a.title.node()&&(c+=a.getTitlePadding()),c},i.getCurrentPaddingBottom=function(){var a=this.config;return m(a.padding_bottom)?a.padding_bottom:0},i.getCurrentPaddingLeft=function(a){var b=this,c=b.config;return m(c.padding_left)?c.padding_left:c.axis_rotated?c.axis_x_show?Math.max(r(b.getAxisWidthByAxisId("x",a)),40):1:!c.axis_y_show||c.axis_y_inner?b.axis.getYAxisLabelPosition().isOuter?30:1:r(b.getAxisWidthByAxisId("y",a))},i.getCurrentPaddingRight=function(){var a=this,b=a.config,c=10,d=a.isLegendRight?a.getLegendWidth()+20:0;return m(b.padding_right)?b.padding_right+1:b.axis_rotated?c+d:!b.axis_y2_show||b.axis_y2_inner?2+d+(a.axis.getY2AxisLabelPosition().isOuter?20:0):r(a.getAxisWidthByAxisId("y2"))+d},i.getParentRectValue=function(a){for(var b,c=this.selectChart.node();c&&"BODY"!==c.tagName;){try{b=c.getBoundingClientRect()[a]}catch(d){"width"===a&&(b=c.offsetWidth)}if(b)break;c=c.parentNode}return b},i.getParentWidth=function(){return this.getParentRectValue("width")},i.getParentHeight=function(){var a=this.selectChart.style("height");return a.indexOf("px")>0?+a.replace("px",""):0},i.getSvgLeft=function(a){var b=this,c=b.config,d=c.axis_rotated||!c.axis_rotated&&!c.axis_y_inner,e=c.axis_rotated?l.axisX:l.axisY,f=b.main.select("."+e).node(),g=f&&d?f.getBoundingClientRect():{right:0},h=b.selectChart.node().getBoundingClientRect(),i=b.hasArcType(),j=g.right-h.left-(i?0:b.getCurrentPaddingLeft(a));return j>0?j:0},i.getAxisWidthByAxisId=function(a,b){var c=this,d=c.axis.getLabelPositionById(a);return c.axis.getMaxTickWidth(a,b)+(d.isInner?20:40)},i.getHorizontalAxisHeight=function(a){var b=this,c=b.config,d=30;return"x"!==a||c.axis_x_show?"x"===a&&c.axis_x_height?c.axis_x_height:"y"!==a||c.axis_y_show?"y2"!==a||c.axis_y2_show?("x"===a&&!c.axis_rotated&&c.axis_x_tick_rotate&&(d=30+b.axis.getMaxTickWidth(a)*Math.cos(Math.PI*(90-c.axis_x_tick_rotate)/180)),"y"===a&&c.axis_rotated&&c.axis_y_tick_rotate&&(d=30+b.axis.getMaxTickWidth(a)*Math.cos(Math.PI*(90-c.axis_y_tick_rotate)/180)),d+(b.axis.getLabelPositionById(a).isInner?0:10)+("y2"===a?-10:0)):b.rotated_padding_top:!c.legend_show||b.isLegendRight||b.isLegendInset?1:10:8},i.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},i.getShapeIndices=function(a){var b,c,d=this,e=d.config,f={},g=0;return d.filterTargetsToShow(d.data.targets.filter(a,d)).forEach(function(a){for(b=0;b<e.data_groups.length;b++)if(!(e.data_groups[b].indexOf(a.id)<0))for(c=0;c<e.data_groups[b].length;c++)if(e.data_groups[b][c]in f){f[a.id]=f[e.data_groups[b][c]];break}p(f[a.id])&&(f[a.id]=g++)}),f.__max__=g-1,f},i.getShapeX=function(a,b,c,d){var e=this,f=d?e.subX:e.x;return function(d){var e=d.id in c?c[d.id]:0;return d.x||0===d.x?f(d.x)-a*(b/2-e):0}},i.getShapeY=function(a){var b=this;return function(c){var d=a?b.getSubYScale(c.id):b.getYScale(c.id);return d(c.value)}},i.getShapeOffset=function(a,b,c){var d=this,e=d.orderTargets(d.filterTargetsToShow(d.data.targets.filter(a,d))),f=e.map(function(a){return a.id});return function(a,g){var h=c?d.getSubYScale(a.id):d.getYScale(a.id),i=h(0),j=i;return e.forEach(function(c){var e=d.isStepType(a)?d.convertValuesToStep(c.values):c.values;c.id!==a.id&&b[c.id]===b[a.id]&&f.indexOf(c.id)<f.indexOf(a.id)&&("undefined"!=typeof e[g]&&+e[g].x===+a.x||(g=-1,e.forEach(function(b,c){b.x===a.x&&(g=c)})),g in e&&e[g].value*a.value>=0&&(j+=h(e[g].value)-i))}),j}},i.isWithinShape=function(a,b){var c,d=this,e=d.d3.select(a);return d.isTargetToShow(b.id)?"circle"===a.nodeName?c=d.isStepType(b)?d.isWithinStep(a,d.getYScale(b.id)(b.value)):d.isWithinCircle(a,1.5*d.pointSelectR(b)):"path"===a.nodeName&&(c=e.classed(l.bar)?d.isWithinBar(a):!0):c=!1,c},i.getInterpolate=function(a){var b=this,c=b.isInterpolationType(b.config.spline_interpolation_type)?b.config.spline_interpolation_type:"cardinal";return b.isSplineType(a)?c:b.isStepType(a)?b.config.line_step_type:"linear"},i.initLine=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartLines)},i.updateTargetsForLine=function(a){var b,c,d=this,e=d.config,f=d.classChartLine.bind(d),g=d.classLines.bind(d),h=d.classAreas.bind(d),i=d.classCircles.bind(d),j=d.classFocus.bind(d);b=d.main.select("."+l.chartLines).selectAll("."+l.chartLine).data(a).attr("class",function(a){return f(a)+j(a)}),c=b.enter().append("g").attr("class",f).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",g),c.append("g").attr("class",h),c.append("g").attr("class",function(a){return d.generateClass(l.selectedCircles,a.id)}),c.append("g").attr("class",i).style("cursor",function(a){return e.data_selection_isselectable(a)?"pointer":null}),a.forEach(function(a){d.main.selectAll("."+l.selectedCircles+d.getTargetSelectorSuffix(a.id)).selectAll("."+l.selectedCircle).each(function(b){b.value=a.values[b.index].value})})},i.updateLine=function(a){var b=this;b.mainLine=b.main.selectAll("."+l.lines).selectAll("."+l.line).data(b.lineData.bind(b)),b.mainLine.enter().append("path").attr("class",b.classLine.bind(b)).style("stroke",b.color),b.mainLine.style("opacity",b.initialOpacity.bind(b)).style("shape-rendering",function(a){return b.isStepType(a)?"crispEdges":""}).attr("transform",null),b.mainLine.exit().transition().duration(a).style("opacity",0).remove()},i.redrawLine=function(a,b){return[(b?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",a).style("stroke",this.color).style("opacity",1)]},i.generateDrawLine=function(a,b){var c=this,d=c.config,e=c.d3.svg.line(),f=c.generateGetLinePoints(a,b),g=b?c.getSubYScale:c.getYScale,h=function(a){return(b?c.subxx:c.xx).call(c,a)},i=function(a,b){return d.data_groups.length>0?f(a,b)[0][1]:g.call(c,a.id)(a.value)};return e=d.axis_rotated?e.x(i).y(h):e.x(h).y(i),d.line_connectNull||(e=e.defined(function(a){return null!=a.value})),function(a){var f,h=d.line_connectNull?c.filterRemoveNull(a.values):a.values,i=b?c.x:c.subX,j=g.call(c,a.id),k=0,l=0;return c.isLineType(a)?d.data_regions[a.id]?f=c.lineWithRegions(h,i,j,d.data_regions[a.id]):(c.isStepType(a)&&(h=c.convertValuesToStep(h)),f=e.interpolate(c.getInterpolate(a))(h)):(h[0]&&(k=i(h[0].x),l=j(h[0].value)),f=d.axis_rotated?"M "+l+" "+k:"M "+k+" "+l),f?f:"M 0 0"}},i.generateGetLinePoints=function(a,b){var c=this,d=c.config,e=a.__max__+1,f=c.getShapeX(0,e,a,!!b),g=c.getShapeY(!!b),h=c.getShapeOffset(c.isLineType,a,!!b),i=b?c.getSubYScale:c.getYScale;return function(a,b){var e=i.call(c,a.id)(0),j=h(a,b)||e,k=f(a),l=g(a);return d.axis_rotated&&(0<a.value&&e>l||a.value<0&&l>e)&&(l=e),[[k,l-(e-j)],[k,l-(e-j)],[k,l-(e-j)],[k,l-(e-j)]]}},i.lineWithRegions=function(a,b,c,d){function e(a,b){var c;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}function f(a){return"M"+a[0][0]+" "+a[0][1]+" "+a[1][0]+" "+a[1][1]}var g,h,i,j,k,l,m,n,o,r,s,t,u=this,v=u.config,w=-1,x="M",y=u.isCategorized()?.5:0,z=[];if(q(d))for(g=0;g<d.length;g++)z[g]={},p(d[g].start)?z[g].start=a[0].x:z[g].start=u.isTimeSeries()?u.parseDate(d[g].start):d[g].start,p(d[g].end)?z[g].end=a[a.length-1].x:z[g].end=u.isTimeSeries()?u.parseDate(d[g].end):d[g].end;for(s=v.axis_rotated?function(a){return c(a.value)}:function(a){return b(a.x)},t=v.axis_rotated?function(a){return b(a.x)}:function(a){return c(a.value)},i=u.isTimeSeries()?function(a,d,e,g){var h,i=a.x.getTime(),j=d.x-a.x,l=new Date(i+j*e),m=new Date(i+j*(e+g));return h=v.axis_rotated?[[c(k(e)),b(l)],[c(k(e+g)),b(m)]]:[[b(l),c(k(e))],[b(m),c(k(e+g))]],f(h)}:function(a,d,e,g){var h;return h=v.axis_rotated?[[c(k(e),!0),b(j(e))],[c(k(e+g),!0),b(j(e+g))]]:[[b(j(e),!0),c(k(e))],[b(j(e+g),!0),c(k(e+g))]],f(h)},g=0;g<a.length;g++){if(p(z)||!e(a[g].x,z))x+=" "+s(a[g])+" "+t(a[g]);else for(j=u.getScale(a[g-1].x+y,a[g].x+y,u.isTimeSeries()),k=u.getScale(a[g-1].value,a[g].value),l=b(a[g].x)-b(a[g-1].x),m=c(a[g].value)-c(a[g-1].value),n=Math.sqrt(Math.pow(l,2)+Math.pow(m,2)),o=2/n,r=2*o,h=o;1>=h;h+=r)x+=i(a[g-1],a[g],h,o);w=a[g].x}return x},i.updateArea=function(a){var b=this,c=b.d3;b.mainArea=b.main.selectAll("."+l.areas).selectAll("."+l.area).data(b.lineData.bind(b)),b.mainArea.enter().append("path").attr("class",b.classArea.bind(b)).style("fill",b.color).style("opacity",function(){return b.orgAreaOpacity=+c.select(this).style("opacity"),0}),b.mainArea.style("opacity",b.orgAreaOpacity),b.mainArea.exit().transition().duration(a).style("opacity",0).remove()},i.redrawArea=function(a,b){return[(b?this.mainArea.transition(Math.random().toString()):this.mainArea).attr("d",a).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},i.generateDrawArea=function(a,b){var c=this,d=c.config,e=c.d3.svg.area(),f=c.generateGetAreaPoints(a,b),g=b?c.getSubYScale:c.getYScale,h=function(a){return(b?c.subxx:c.xx).call(c,a)},i=function(a,b){return d.data_groups.length>0?f(a,b)[0][1]:g.call(c,a.id)(c.getAreaBaseValue(a.id))},j=function(a,b){return d.data_groups.length>0?f(a,b)[1][1]:g.call(c,a.id)(a.value)};return e=d.axis_rotated?e.x0(i).x1(j).y(h):e.x(h).y0(d.area_above?0:i).y1(j),d.line_connectNull||(e=e.defined(function(a){return null!==a.value})),function(a){var b,f=d.line_connectNull?c.filterRemoveNull(a.values):a.values,g=0,h=0;return c.isAreaType(a)?(c.isStepType(a)&&(f=c.convertValuesToStep(f)),b=e.interpolate(c.getInterpolate(a))(f)):(f[0]&&(g=c.x(f[0].x),h=c.getYScale(a.id)(f[0].value)),b=d.axis_rotated?"M "+h+" "+g:"M "+g+" "+h),b?b:"M 0 0"}},i.getAreaBaseValue=function(){return 0},i.generateGetAreaPoints=function(a,b){var c=this,d=c.config,e=a.__max__+1,f=c.getShapeX(0,e,a,!!b),g=c.getShapeY(!!b),h=c.getShapeOffset(c.isAreaType,a,!!b),i=b?c.getSubYScale:c.getYScale;return function(a,b){var e=i.call(c,a.id)(0),j=h(a,b)||e,k=f(a),l=g(a);return d.axis_rotated&&(0<a.value&&e>l||a.value<0&&l>e)&&(l=e),[[k,j],[k,l-(e-j)],[k,l-(e-j)],[k,j]]}},i.updateCircle=function(){var a=this;a.mainCircle=a.main.selectAll("."+l.circles).selectAll("."+l.circle).data(a.lineOrScatterData.bind(a)),a.mainCircle.enter().append("circle").attr("class",a.classCircle.bind(a)).attr("r",a.pointR.bind(a)).style("fill",a.color),a.mainCircle.style("opacity",a.initialOpacityForCircle.bind(a)),a.mainCircle.exit().remove()},i.redrawCircle=function(a,b,c){var d=this.main.selectAll("."+l.selectedCircle);return[(c?this.mainCircle.transition(Math.random().toString()):this.mainCircle).style("opacity",this.opacityForCircle.bind(this)).style("fill",this.color).attr("cx",a).attr("cy",b),(c?d.transition(Math.random().toString()):d).attr("cx",a).attr("cy",b)]},i.circleX=function(a){return a.x||0===a.x?this.x(a.x):null},i.updateCircleY=function(){var a,b,c=this;c.config.data_groups.length>0?(a=c.getShapeIndices(c.isLineType),b=c.generateGetLinePoints(a),c.circleY=function(a,c){return b(a,c)[0][1]}):c.circleY=function(a){return c.getYScale(a.id)(a.value)}},i.getCircles=function(a,b){var c=this;return(b?c.main.selectAll("."+l.circles+c.getTargetSelectorSuffix(b)):c.main).selectAll("."+l.circle+(m(a)?"-"+a:""))},i.expandCircles=function(a,b,c){var d=this,e=d.pointExpandedR.bind(d);c&&d.unexpandCircles(),d.getCircles(a,b).classed(l.EXPANDED,!0).attr("r",e)},i.unexpandCircles=function(a){var b=this,c=b.pointR.bind(b);b.getCircles(a).filter(function(){return b.d3.select(this).classed(l.EXPANDED)}).classed(l.EXPANDED,!1).attr("r",c)},i.pointR=function(a){var b=this,c=b.config;return b.isStepType(a)?0:n(c.point_r)?c.point_r(a):c.point_r;
2354 },i.pointExpandedR=function(a){var b=this,c=b.config;return c.point_focus_expand_enabled?c.point_focus_expand_r?c.point_focus_expand_r:1.75*b.pointR(a):b.pointR(a)},i.pointSelectR=function(a){var b=this,c=b.config;return n(c.point_select_r)?c.point_select_r(a):c.point_select_r?c.point_select_r:4*b.pointR(a)},i.isWithinCircle=function(a,b){var c=this.d3,d=c.mouse(a),e=c.select(a),f=+e.attr("cx"),g=+e.attr("cy");return Math.sqrt(Math.pow(f-d[0],2)+Math.pow(g-d[1],2))<b},i.isWithinStep=function(a,b){return Math.abs(b-this.d3.mouse(a)[1])<30},i.initBar=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartBars)},i.updateTargetsForBar=function(a){var b,c,d=this,e=d.config,f=d.classChartBar.bind(d),g=d.classBars.bind(d),h=d.classFocus.bind(d);b=d.main.select("."+l.chartBars).selectAll("."+l.chartBar).data(a).attr("class",function(a){return f(a)+h(a)}),c=b.enter().append("g").attr("class",f).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",g).style("cursor",function(a){return e.data_selection_isselectable(a)?"pointer":null})},i.updateBar=function(a){var b=this,c=b.barData.bind(b),d=b.classBar.bind(b),e=b.initialOpacity.bind(b),f=function(a){return b.color(a.id)};b.mainBar=b.main.selectAll("."+l.bars).selectAll("."+l.bar).data(c),b.mainBar.enter().append("path").attr("class",d).style("stroke",f).style("fill",f),b.mainBar.style("opacity",e),b.mainBar.exit().transition().duration(a).style("opacity",0).remove()},i.redrawBar=function(a,b){return[(b?this.mainBar.transition(Math.random().toString()):this.mainBar).attr("d",a).style("fill",this.color).style("opacity",1)]},i.getBarW=function(a,b){var c=this,d=c.config,e="number"==typeof d.bar_width?d.bar_width:b?a.tickInterval()*d.bar_width_ratio/b:0;return d.bar_width_max&&e>d.bar_width_max?d.bar_width_max:e},i.getBars=function(a,b){var c=this;return(b?c.main.selectAll("."+l.bars+c.getTargetSelectorSuffix(b)):c.main).selectAll("."+l.bar+(m(a)?"-"+a:""))},i.expandBars=function(a,b,c){var d=this;c&&d.unexpandBars(),d.getBars(a,b).classed(l.EXPANDED,!0)},i.unexpandBars=function(a){var b=this;b.getBars(a).classed(l.EXPANDED,!1)},i.generateDrawBar=function(a,b){var c=this,d=c.config,e=c.generateGetBarPoints(a,b);return function(a,b){var c=e(a,b),f=d.axis_rotated?1:0,g=d.axis_rotated?0:1,h="M "+c[0][f]+","+c[0][g]+" L"+c[1][f]+","+c[1][g]+" L"+c[2][f]+","+c[2][g]+" L"+c[3][f]+","+c[3][g]+" z";return h}},i.generateGetBarPoints=function(a,b){var c=this,d=b?c.subXAxis:c.xAxis,e=a.__max__+1,f=c.getBarW(d,e),g=c.getShapeX(f,e,a,!!b),h=c.getShapeY(!!b),i=c.getShapeOffset(c.isBarType,a,!!b),j=b?c.getSubYScale:c.getYScale;return function(a,b){var d=j.call(c,a.id)(0),e=i(a,b)||d,k=g(a),l=h(a);return c.config.axis_rotated&&(0<a.value&&d>l||a.value<0&&l>d)&&(l=d),[[k,e],[k,l-(d-e)],[k+f,l-(d-e)],[k+f,e]]}},i.isWithinBar=function(a){var b=this.d3.mouse(a),c=a.getBoundingClientRect(),d=a.pathSegList.getItem(0),e=a.pathSegList.getItem(1),f=Math.min(d.x,e.x),g=Math.min(d.y,e.y),h=c.width,i=c.height,j=2,k=f-j,l=f+h+j,m=g+i+j,n=g-j;return k<b[0]&&b[0]<l&&n<b[1]&&b[1]<m},i.initText=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartTexts),a.mainText=a.d3.selectAll([])},i.updateTargetsForText=function(a){var b,c,d=this,e=d.classChartText.bind(d),f=d.classTexts.bind(d),g=d.classFocus.bind(d);b=d.main.select("."+l.chartTexts).selectAll("."+l.chartText).data(a).attr("class",function(a){return e(a)+g(a)}),c=b.enter().append("g").attr("class",e).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",f)},i.updateText=function(a){var b=this,c=b.config,d=b.barOrLineData.bind(b),e=b.classText.bind(b);b.mainText=b.main.selectAll("."+l.texts).selectAll("."+l.text).data(d),b.mainText.enter().append("text").attr("class",e).attr("text-anchor",function(a){return c.axis_rotated?a.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(a){return b.color(a)}).style("fill-opacity",0),b.mainText.text(function(a,c,d){return b.dataLabelFormat(a.id)(a.value,a.id,c,d)}),b.mainText.exit().transition().duration(a).style("fill-opacity",0).remove()},i.redrawText=function(a,b,c,d){return[(d?this.mainText.transition():this.mainText).attr("x",a).attr("y",b).style("fill",this.color).style("fill-opacity",c?0:this.opacityForText.bind(this))]},i.getTextRect=function(a,b,c){var d,e=this.d3.select("body").append("div").classed("c3",!0),f=e.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),g=this.d3.select(c).style("font");return f.selectAll(".dummy").data([a]).enter().append("text").classed(b?b:"",!0).style("font",g).text(a).each(function(){d=this.getBoundingClientRect()}),e.remove(),d},i.generateXYForText=function(a,b,c,d){var e=this,f=e.generateGetAreaPoints(a,!1),g=e.generateGetBarPoints(b,!1),h=e.generateGetLinePoints(c,!1),i=d?e.getXForText:e.getYForText;return function(a,b){var c=e.isAreaType(a)?f:e.isBarType(a)?g:h;return i.call(e,c(a,b),a,this)}},i.getXForText=function(a,b,c){var d,e,f=this,g=c.getBoundingClientRect();return f.config.axis_rotated?(e=f.isBarType(b)?4:6,d=a[2][1]+e*(b.value<0?-1:1)):d=f.hasType("bar")?(a[2][0]+a[0][0])/2:a[0][0],null===b.value&&(d>f.width?d=f.width-g.width:0>d&&(d=4)),d},i.getYForText=function(a,b,c){var d,e=this,f=c.getBoundingClientRect();return e.config.axis_rotated?d=(a[0][0]+a[2][0]+.6*f.height)/2:(d=a[2][1],b.value<0||0===b.value&&!e.hasPositiveValue?(d+=f.height,e.isBarType(b)&&e.isSafari()?d-=3:!e.isBarType(b)&&e.isChrome()&&(d+=3)):d+=e.isBarType(b)?-3:-6),null!==b.value||e.config.axis_rotated||(d<f.height?d=f.height:d>this.height&&(d=this.height-4)),d},i.setTargetType=function(a,b){var c=this,d=c.config;c.mapToTargetIds(a).forEach(function(a){c.withoutFadeIn[a]=b===d.data_types[a],d.data_types[a]=b}),a||(d.data_type=b)},i.hasType=function(a,b){var c=this,d=c.config.data_types,e=!1;return b=b||c.data.targets,b&&b.length?b.forEach(function(b){var c=d[b.id];(c&&c.indexOf(a)>=0||!c&&"line"===a)&&(e=!0)}):Object.keys(d).length?Object.keys(d).forEach(function(b){d[b]===a&&(e=!0)}):e=c.config.data_type===a,e},i.hasArcType=function(a){return this.hasType("pie",a)||this.hasType("donut",a)||this.hasType("gauge",a)},i.isLineType=function(a){var b=this.config,c=o(a)?a:a.id;return!b.data_types[c]||["line","spline","area","area-spline","step","area-step"].indexOf(b.data_types[c])>=0},i.isStepType=function(a){var b=o(a)?a:a.id;return["step","area-step"].indexOf(this.config.data_types[b])>=0},i.isSplineType=function(a){var b=o(a)?a:a.id;return["spline","area-spline"].indexOf(this.config.data_types[b])>=0},i.isAreaType=function(a){var b=o(a)?a:a.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[b])>=0},i.isBarType=function(a){var b=o(a)?a:a.id;return"bar"===this.config.data_types[b]},i.isScatterType=function(a){var b=o(a)?a:a.id;return"scatter"===this.config.data_types[b]},i.isPieType=function(a){var b=o(a)?a:a.id;return"pie"===this.config.data_types[b]},i.isGaugeType=function(a){var b=o(a)?a:a.id;return"gauge"===this.config.data_types[b]},i.isDonutType=function(a){var b=o(a)?a:a.id;return"donut"===this.config.data_types[b]},i.isArcType=function(a){return this.isPieType(a)||this.isDonutType(a)||this.isGaugeType(a)},i.lineData=function(a){return this.isLineType(a)?[a]:[]},i.arcData=function(a){return this.isArcType(a.data)?[a]:[]},i.barData=function(a){return this.isBarType(a)?a.values:[]},i.lineOrScatterData=function(a){return this.isLineType(a)||this.isScatterType(a)?a.values:[]},i.barOrLineData=function(a){return this.isBarType(a)||this.isLineType(a)?a.values:[]},i.isInterpolationType=function(a){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(a)>=0},i.initGrid=function(){var a=this,b=a.config,c=a.d3;a.grid=a.main.append("g").attr("clip-path",a.clipPathForGrid).attr("class",l.grid),b.grid_x_show&&a.grid.append("g").attr("class",l.xgrids),b.grid_y_show&&a.grid.append("g").attr("class",l.ygrids),b.grid_focus_show&&a.grid.append("g").attr("class",l.xgridFocus).append("line").attr("class",l.xgridFocus),a.xgrid=c.selectAll([]),b.grid_lines_front||a.initGridLines()},i.initGridLines=function(){var a=this,b=a.d3;a.gridLines=a.main.append("g").attr("clip-path",a.clipPathForGrid).attr("class",l.grid+" "+l.gridLines),a.gridLines.append("g").attr("class",l.xgridLines),a.gridLines.append("g").attr("class",l.ygridLines),a.xgridLines=b.selectAll([])},i.updateXGrid=function(a){var b=this,c=b.config,d=b.d3,e=b.generateGridData(c.grid_x_type,b.x),f=b.isCategorized()?b.xAxis.tickOffset():0;b.xgridAttr=c.axis_rotated?{x1:0,x2:b.width,y1:function(a){return b.x(a)-f},y2:function(a){return b.x(a)-f}}:{x1:function(a){return b.x(a)+f},x2:function(a){return b.x(a)+f},y1:0,y2:b.height},b.xgrid=b.main.select("."+l.xgrids).selectAll("."+l.xgrid).data(e),b.xgrid.enter().append("line").attr("class",l.xgrid),a||b.xgrid.attr(b.xgridAttr).style("opacity",function(){return+d.select(this).attr(c.axis_rotated?"y1":"x1")===(c.axis_rotated?b.height:0)?0:1}),b.xgrid.exit().remove()},i.updateYGrid=function(){var a=this,b=a.config,c=a.yAxis.tickValues()||a.y.ticks(b.grid_y_ticks);a.ygrid=a.main.select("."+l.ygrids).selectAll("."+l.ygrid).data(c),a.ygrid.enter().append("line").attr("class",l.ygrid),a.ygrid.attr("x1",b.axis_rotated?a.y:0).attr("x2",b.axis_rotated?a.y:a.width).attr("y1",b.axis_rotated?0:a.y).attr("y2",b.axis_rotated?a.height:a.y),a.ygrid.exit().remove(),a.smoothLines(a.ygrid,"grid")},i.gridTextAnchor=function(a){return a.position?a.position:"end"},i.gridTextDx=function(a){return"start"===a.position?4:"middle"===a.position?0:-4},i.xGridTextX=function(a){return"start"===a.position?-this.height:"middle"===a.position?-this.height/2:0},i.yGridTextX=function(a){return"start"===a.position?0:"middle"===a.position?this.width/2:this.width},i.updateGrid=function(a){var b,c,d,e=this,f=e.main,g=e.config;e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),f.select("line."+l.xgridFocus).style("visibility","hidden"),g.grid_x_show&&e.updateXGrid(),e.xgridLines=f.select("."+l.xgridLines).selectAll("."+l.xgridLine).data(g.grid_x_lines),b=e.xgridLines.enter().append("g").attr("class",function(a){return l.xgridLine+(a["class"]?" "+a["class"]:"")}),b.append("line").style("opacity",0),b.append("text").attr("text-anchor",e.gridTextAnchor).attr("transform",g.axis_rotated?"":"rotate(-90)").attr("dx",e.gridTextDx).attr("dy",-5).style("opacity",0),e.xgridLines.exit().transition().duration(a).style("opacity",0).remove(),g.grid_y_show&&e.updateYGrid(),e.ygridLines=f.select("."+l.ygridLines).selectAll("."+l.ygridLine).data(g.grid_y_lines),c=e.ygridLines.enter().append("g").attr("class",function(a){return l.ygridLine+(a["class"]?" "+a["class"]:"")}),c.append("line").style("opacity",0),c.append("text").attr("text-anchor",e.gridTextAnchor).attr("transform",g.axis_rotated?"rotate(-90)":"").attr("dx",e.gridTextDx).attr("dy",-5).style("opacity",0),d=e.yv.bind(e),e.ygridLines.select("line").transition().duration(a).attr("x1",g.axis_rotated?d:0).attr("x2",g.axis_rotated?d:e.width).attr("y1",g.axis_rotated?0:d).attr("y2",g.axis_rotated?e.height:d).style("opacity",1),e.ygridLines.select("text").transition().duration(a).attr("x",g.axis_rotated?e.xGridTextX.bind(e):e.yGridTextX.bind(e)).attr("y",d).text(function(a){return a.text}).style("opacity",1),e.ygridLines.exit().transition().duration(a).style("opacity",0).remove()},i.redrawGrid=function(a){var b=this,c=b.config,d=b.xv.bind(b),e=b.xgridLines.select("line"),f=b.xgridLines.select("text");return[(a?e.transition():e).attr("x1",c.axis_rotated?0:d).attr("x2",c.axis_rotated?b.width:d).attr("y1",c.axis_rotated?d:0).attr("y2",c.axis_rotated?d:b.height).style("opacity",1),(a?f.transition():f).attr("x",c.axis_rotated?b.yGridTextX.bind(b):b.xGridTextX.bind(b)).attr("y",d).text(function(a){return a.text}).style("opacity",1)]},i.showXGridFocus=function(a){var b=this,c=b.config,d=a.filter(function(a){return a&&m(a.value)}),e=b.main.selectAll("line."+l.xgridFocus),f=b.xx.bind(b);c.tooltip_show&&(b.hasType("scatter")||b.hasArcType()||(e.style("visibility","visible").data([d[0]]).attr(c.axis_rotated?"y1":"x1",f).attr(c.axis_rotated?"y2":"x2",f),b.smoothLines(e,"grid")))},i.hideXGridFocus=function(){this.main.select("line."+l.xgridFocus).style("visibility","hidden")},i.updateXgridFocus=function(){var a=this,b=a.config;a.main.select("line."+l.xgridFocus).attr("x1",b.axis_rotated?0:-10).attr("x2",b.axis_rotated?a.width:-10).attr("y1",b.axis_rotated?-10:0).attr("y2",b.axis_rotated?-10:a.height)},i.generateGridData=function(a,b){var c,d,e,f,g=this,h=[],i=g.main.select("."+l.axisX).selectAll(".tick").size();if("year"===a)for(c=g.getXDomain(),d=c[0].getFullYear(),e=c[1].getFullYear(),f=d;e>=f;f++)h.push(new Date(f+"-01-01 00:00:00"));else h=b.ticks(10),h.length>i&&(h=h.filter(function(a){return(""+a).indexOf(".")<0}));return h},i.getGridFilterToRemove=function(a){return a?function(b){var c=!1;return[].concat(a).forEach(function(a){("value"in a&&b.value===a.value||"class"in a&&b["class"]===a["class"])&&(c=!0)}),c}:function(){return!0}},i.removeGridLines=function(a,b){var c=this,d=c.config,e=c.getGridFilterToRemove(a),f=function(a){return!e(a)},g=b?l.xgridLines:l.ygridLines,h=b?l.xgridLine:l.ygridLine;c.main.select("."+g).selectAll("."+h).filter(e).transition().duration(d.transition_duration).style("opacity",0).remove(),b?d.grid_x_lines=d.grid_x_lines.filter(f):d.grid_y_lines=d.grid_y_lines.filter(f)},i.initTooltip=function(){var a,b=this,c=b.config;if(b.tooltip=b.selectChart.style("position","relative").append("div").attr("class",l.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),c.tooltip_init_show){if(b.isTimeSeries()&&o(c.tooltip_init_x)){for(c.tooltip_init_x=b.parseDate(c.tooltip_init_x),a=0;a<b.data.targets[0].values.length&&b.data.targets[0].values[a].x-c.tooltip_init_x!==0;a++);c.tooltip_init_x=a}b.tooltip.html(c.tooltip_contents.call(b,b.data.targets.map(function(a){return b.addName(a.values[c.tooltip_init_x])}),b.axis.getXAxisTickFormat(),b.getYFormat(b.hasArcType()),b.color)),b.tooltip.style("top",c.tooltip_init_position.top).style("left",c.tooltip_init_position.left).style("display","block")}},i.getTooltipContent=function(a,b,c,d){var e,f,g,h,i,j,k=this,l=k.config,m=l.tooltip_format_title||b,n=l.tooltip_format_name||function(a){return a},o=l.tooltip_format_value||c,p=k.isOrderAsc();if(0===l.data_groups.length)a.sort(function(a,b){var c=a?a.value:null,d=b?b.value:null;return p?c-d:d-c});else{var q=k.orderTargets(k.data.targets).map(function(a){return a.id});a.sort(function(a,b){var c=a?a.value:null,d=b?b.value:null;return c>0&&d>0&&(c=a?q.indexOf(a.id):null,d=b?q.indexOf(b.id):null),p?c-d:d-c})}for(f=0;f<a.length;f++)if(a[f]&&(a[f].value||0===a[f].value)&&(e||(g=y(m?m(a[f].x):a[f].x),e="<table class='"+k.CLASS.tooltip+"'>"+(g||0===g?"<tr><th colspan='2'>"+g+"</th></tr>":"")),h=y(o(a[f].value,a[f].ratio,a[f].id,a[f].index,a)),void 0!==h)){if(null===a[f].name)continue;i=y(n(a[f].name,a[f].ratio,a[f].id,a[f].index)),j=k.levelColor?k.levelColor(a[f].value):d(a[f].id),e+="<tr class='"+k.CLASS.tooltipName+"-"+k.getTargetSelectorSuffix(a[f].id)+"'>",e+="<td class='name'><span style='background-color:"+j+"'></span>"+i+"</td>",e+="<td class='value'>"+h+"</td>",e+="</tr>"}return e+"</table>"},i.tooltipPosition=function(a,b,c,d){var e,f,g,h,i,j=this,k=j.config,l=j.d3,m=j.hasArcType(),n=l.mouse(d);return m?(f=(j.width-(j.isLegendRight?j.getLegendWidth():0))/2+n[0],h=j.height/2+n[1]+20):(e=j.getSvgLeft(!0),k.axis_rotated?(f=e+n[0]+100,g=f+b,i=j.currentWidth-j.getCurrentPaddingRight(),h=j.x(a[0].x)+20):(f=e+j.getCurrentPaddingLeft(!0)+j.x(a[0].x)+20,g=f+b,i=e+j.currentWidth-j.getCurrentPaddingRight(),h=n[1]+15),g>i&&(f-=g-i+20),h+c>j.currentHeight&&(h-=c+30)),0>h&&(h=0),{top:h,left:f}},i.showTooltip=function(a,b){var c,d,e,f=this,g=f.config,h=f.hasArcType(),j=a.filter(function(a){return a&&m(a.value)}),k=g.tooltip_position||i.tooltipPosition;0!==j.length&&g.tooltip_show&&(f.tooltip.html(g.tooltip_contents.call(f,a,f.axis.getXAxisTickFormat(),f.getYFormat(h),f.color)).style("display","block"),c=f.tooltip.property("offsetWidth"),d=f.tooltip.property("offsetHeight"),e=k.call(this,j,c,d,b),f.tooltip.style("top",e.top+"px").style("left",e.left+"px"))},i.hideTooltip=function(){this.tooltip.style("display","none")},i.initLegend=function(){var a=this;return a.legendItemTextBox={},a.legendHasRendered=!1,a.legend=a.svg.append("g").attr("transform",a.getTranslate("legend")),a.config.legend_show?void a.updateLegendWithDefaults():(a.legend.style("visibility","hidden"),void(a.hiddenLegendIds=a.mapToIds(a.data.targets)))},i.updateLegendWithDefaults=function(){var a=this;a.updateLegend(a.mapToIds(a.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},i.updateSizeForLegend=function(a,b){var c=this,d=c.config,e={top:c.isLegendTop?c.getCurrentPaddingTop()+d.legend_inset_y+5.5:c.currentHeight-a-c.getCurrentPaddingBottom()-d.legend_inset_y,left:c.isLegendLeft?c.getCurrentPaddingLeft()+d.legend_inset_x+.5:c.currentWidth-b-c.getCurrentPaddingRight()-d.legend_inset_x+.5};c.margin3={top:c.isLegendRight?0:c.isLegendInset?e.top:c.currentHeight-a,right:NaN,bottom:0,left:c.isLegendRight?c.currentWidth-b:c.isLegendInset?e.left:0}},i.transformLegend=function(a){var b=this;(a?b.legend.transition():b.legend).attr("transform",b.getTranslate("legend"))},i.updateLegendStep=function(a){this.legendStep=a},i.updateLegendItemWidth=function(a){this.legendItemWidth=a},i.updateLegendItemHeight=function(a){this.legendItemHeight=a},i.getLegendWidth=function(){var a=this;return a.config.legend_show?a.isLegendRight||a.isLegendInset?a.legendItemWidth*(a.legendStep+1):a.currentWidth:0},i.getLegendHeight=function(){var a=this,b=0;return a.config.legend_show&&(b=a.isLegendRight?a.currentHeight:Math.max(20,a.legendItemHeight)*(a.legendStep+1)),b},i.opacityForLegend=function(a){return a.classed(l.legendItemHidden)?null:1},i.opacityForUnfocusedLegend=function(a){return a.classed(l.legendItemHidden)?null:.3},i.toggleFocusLegend=function(a,b){var c=this;a=c.mapToTargetIds(a),c.legend.selectAll("."+l.legendItem).filter(function(b){return a.indexOf(b)>=0}).classed(l.legendItemFocused,b).transition().duration(100).style("opacity",function(){var a=b?c.opacityForLegend:c.opacityForUnfocusedLegend;return a.call(c,c.d3.select(this))})},i.revertLegend=function(){var a=this,b=a.d3;a.legend.selectAll("."+l.legendItem).classed(l.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return a.opacityForLegend(b.select(this))})},i.showLegend=function(a){var b=this,c=b.config;c.legend_show||(c.legend_show=!0,b.legend.style("visibility","visible"),b.legendHasRendered||b.updateLegendWithDefaults()),b.removeHiddenLegendIds(a),b.legend.selectAll(b.selectorLegends(a)).style("visibility","visible").transition().style("opacity",function(){return b.opacityForLegend(b.d3.select(this))})},i.hideLegend=function(a){var b=this,c=b.config;c.legend_show&&u(a)&&(c.legend_show=!1,b.legend.style("visibility","hidden")),b.addHiddenLegendIds(a),b.legend.selectAll(b.selectorLegends(a)).style("opacity",0).style("visibility","hidden")},i.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},i.updateLegend=function(a,b,c){function d(a,b){return y.legendItemTextBox[b]||(y.legendItemTextBox[b]=y.getTextRect(a.textContent,l.legendItem,a)),y.legendItemTextBox[b]}function e(b,c,e){function f(a,b){b||(g=(o-G-n)/2,E>g&&(g=(o-n)/2,G=0,M++)),L[a]=M,K[M]=y.isLegendInset?10:g,H[a]=G,G+=n}var g,h,i=0===e,j=e===a.length-1,k=d(b,c),l=k.width+F+(!j||y.isLegendRight||y.isLegendInset?B:0)+z.legend_padding,m=k.height+A,n=y.isLegendRight||y.isLegendInset?m:l,o=y.isLegendRight||y.isLegendInset?y.getLegendHeight():y.getLegendWidth();return i&&(G=0,M=0,C=0,D=0),z.legend_show&&!y.isLegendToShow(c)?void(I[c]=J[c]=L[c]=H[c]=0):(I[c]=l,J[c]=m,(!C||l>=C)&&(C=l),(!D||m>=D)&&(D=m),h=y.isLegendRight||y.isLegendInset?D:C,void(z.legend_equally?(Object.keys(I).forEach(function(a){I[a]=C}),Object.keys(J).forEach(function(a){J[a]=D}),g=(o-h*a.length)/2,E>g?(G=0,M=0,a.forEach(function(a){f(a)})):f(c,!0)):f(c)))}var f,g,h,i,j,k,m,n,o,p,r,s,t,u,v,x,y=this,z=y.config,A=4,B=10,C=0,D=0,E=10,F=z.legend_item_tile_width+5,G=0,H={},I={},J={},K=[0],L={},M=0;a=a.filter(function(a){return!q(z.data_names[a])||null!==z.data_names[a]}),b=b||{},r=w(b,"withTransition",!0),s=w(b,"withTransitionForTransform",!0),y.isLegendInset&&(M=z.legend_inset_step?z.legend_inset_step:a.length,y.updateLegendStep(M)),y.isLegendRight?(f=function(a){return C*L[a]},i=function(a){return K[L[a]]+H[a]}):y.isLegendInset?(f=function(a){return C*L[a]+10},i=function(a){return K[L[a]]+H[a]}):(f=function(a){return K[L[a]]+H[a]},i=function(a){return D*L[a]}),g=function(a,b){return f(a,b)+4+z.legend_item_tile_width},j=function(a,b){return i(a,b)+9},h=function(a,b){return f(a,b)},k=function(a,b){return i(a,b)-5},m=function(a,b){return f(a,b)-2},n=function(a,b){return f(a,b)-2+z.legend_item_tile_width},o=function(a,b){return i(a,b)+4},p=y.legend.selectAll("."+l.legendItem).data(a).enter().append("g").attr("class",function(a){return y.generateClass(l.legendItem,a)}).style("visibility",function(a){return y.isLegendToShow(a)?"visible":"hidden"}).style("cursor","pointer").on("click",function(a){z.legend_item_onclick?z.legend_item_onclick.call(y,a):y.d3.event.altKey?(y.api.hide(),y.api.show(a)):(y.api.toggle(a),y.isTargetToShow(a)?y.api.focus(a):y.api.revert())}).on("mouseover",function(a){z.legend_item_onmouseover?z.legend_item_onmouseover.call(y,a):(y.d3.select(this).classed(l.legendItemFocused,!0),!y.transiting&&y.isTargetToShow(a)&&y.api.focus(a))}).on("mouseout",function(a){z.legend_item_onmouseout?z.legend_item_onmouseout.call(y,a):(y.d3.select(this).classed(l.legendItemFocused,!1),y.api.revert())}),p.append("text").text(function(a){return q(z.data_names[a])?z.data_names[a]:a}).each(function(a,b){e(this,a,b)}).style("pointer-events","none").attr("x",y.isLegendRight||y.isLegendInset?g:-200).attr("y",y.isLegendRight||y.isLegendInset?-200:j),p.append("rect").attr("class",l.legendItemEvent).style("fill-opacity",0).attr("x",y.isLegendRight||y.isLegendInset?h:-200).attr("y",y.isLegendRight||y.isLegendInset?-200:k),p.append("line").attr("class",l.legendItemTile).style("stroke",y.color).style("pointer-events","none").attr("x1",y.isLegendRight||y.isLegendInset?m:-200).attr("y1",y.isLegendRight||y.isLegendInset?-200:o).attr("x2",y.isLegendRight||y.isLegendInset?n:-200).attr("y2",y.isLegendRight||y.isLegendInset?-200:o).attr("stroke-width",z.legend_item_tile_height),x=y.legend.select("."+l.legendBackground+" rect"),y.isLegendInset&&C>0&&0===x.size()&&(x=y.legend.insert("g","."+l.legendItem).attr("class",l.legendBackground).append("rect")),t=y.legend.selectAll("text").data(a).text(function(a){return q(z.data_names[a])?z.data_names[a]:a}).each(function(a,b){e(this,a,b)}),(r?t.transition():t).attr("x",g).attr("y",j),u=y.legend.selectAll("rect."+l.legendItemEvent).data(a),(r?u.transition():u).attr("width",function(a){return I[a]}).attr("height",function(a){return J[a]}).attr("x",h).attr("y",k),v=y.legend.selectAll("line."+l.legendItemTile).data(a),(r?v.transition():v).style("stroke",y.color).attr("x1",m).attr("y1",o).attr("x2",n).attr("y2",o),x&&(r?x.transition():x).attr("height",y.getLegendHeight()-12).attr("width",C*(M+1)+10),y.legend.selectAll("."+l.legendItem).classed(l.legendItemHidden,function(a){return!y.isTargetToShow(a)}),y.updateLegendItemWidth(C),y.updateLegendItemHeight(D),y.updateLegendStep(M),y.updateSizes(),y.updateScales(),y.updateSvgSize(),y.transformAll(s,c),y.legendHasRendered=!0},i.initTitle=function(){var a=this;a.title=a.svg.append("text").text(a.config.title_text).attr("class",a.CLASS.title)},i.redrawTitle=function(){var a=this;a.title.attr("x",a.xForTitle.bind(a)).attr("y",a.yForTitle.bind(a))},i.xForTitle=function(){var a,b=this,c=b.config,d=c.title_position||"left";return a=d.indexOf("right")>=0?b.currentWidth-b.getTextRect(b.title.node().textContent,b.CLASS.title,b.title.node()).width-c.title_padding.right:d.indexOf("center")>=0?(b.currentWidth-b.getTextRect(b.title.node().textContent,b.CLASS.title,b.title.node()).width)/2:c.title_padding.left},i.yForTitle=function(){var a=this;return a.config.title_padding.top+a.getTextRect(a.title.node().textContent,a.CLASS.title,a.title.node()).height},i.getTitlePadding=function(){var a=this;return a.yForTitle()+a.config.title_padding.bottom},c(b,f),f.prototype.init=function(){var a=this.owner,b=a.config,c=a.main;a.axes.x=c.append("g").attr("class",l.axis+" "+l.axisX).attr("clip-path",a.clipPathForXAxis).attr("transform",a.getTranslate("x")).style("visibility",b.axis_x_show?"visible":"hidden"),a.axes.x.append("text").attr("class",l.axisXLabel).attr("transform",b.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),a.axes.y=c.append("g").attr("class",l.axis+" "+l.axisY).attr("clip-path",b.axis_y_inner?"":a.clipPathForYAxis).attr("transform",a.getTranslate("y")).style("visibility",b.axis_y_show?"visible":"hidden"),a.axes.y.append("text").attr("class",l.axisYLabel).attr("transform",b.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),a.axes.y2=c.append("g").attr("class",l.axis+" "+l.axisY2).attr("transform",a.getTranslate("y2")).style("visibility",b.axis_y2_show?"visible":"hidden"),a.axes.y2.append("text").attr("class",l.axisY2Label).attr("transform",b.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},f.prototype.getXAxis=function(a,b,c,d,e,f,h){var i=this.owner,j=i.config,k={isCategory:i.isCategorized(),withOuterTick:e,tickMultiline:j.axis_x_tick_multiline,tickWidth:j.axis_x_tick_width,tickTextRotate:h?0:j.axis_x_tick_rotate,withoutTransition:f},l=g(i.d3,k).scale(a).orient(b);return i.isTimeSeries()&&d&&"function"!=typeof d&&(d=d.map(function(a){return i.parseDate(a)})),l.tickFormat(c).tickValues(d),i.isCategorized()&&(l.tickCentered(j.axis_x_tick_centered),u(j.axis_x_tick_culling)&&(j.axis_x_tick_culling=!1)),l},f.prototype.updateXAxisTickValues=function(a,b){var c,d=this.owner,e=d.config;return(e.axis_x_tick_fit||e.axis_x_tick_count)&&(c=this.generateTickValues(d.mapTargetsToUniqueXs(a),e.axis_x_tick_count,d.isTimeSeries())),b?b.tickValues(c):(d.xAxis.tickValues(c),d.subXAxis.tickValues(c)),c},f.prototype.getYAxis=function(a,b,c,d,e,f,h){var i=this.owner,j=i.config,k={withOuterTick:e,withoutTransition:f,tickTextRotate:h?0:j.axis_y_tick_rotate},l=g(i.d3,k).scale(a).orient(b).tickFormat(c);return i.isTimeSeriesY()?l.ticks(i.d3.time[j.axis_y_tick_time_value],j.axis_y_tick_time_interval):l.tickValues(d),l},f.prototype.getId=function(a){var b=this.owner.config;return a in b.data_axes?b.data_axes[a]:"y"},f.prototype.getXAxisTickFormat=function(){var a=this.owner,b=a.config,c=a.isTimeSeries()?a.defaultAxisTimeFormat:a.isCategorized()?a.categoryName:function(a){return 0>a?a.toFixed(0):a};return b.axis_x_tick_format&&(n(b.axis_x_tick_format)?c=b.axis_x_tick_format:a.isTimeSeries()&&(c=function(c){return c?a.axisTimeFormat(b.axis_x_tick_format)(c):""})),n(c)?function(b){return c.call(a,b)}:c},f.prototype.getTickValues=function(a,b){return a?a:b?b.tickValues():void 0},f.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},f.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},f.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},f.prototype.getLabelOptionByAxisId=function(a){var b,c=this.owner,d=c.config;return"y"===a?b=d.axis_y_label:"y2"===a?b=d.axis_y2_label:"x"===a&&(b=d.axis_x_label),b},f.prototype.getLabelText=function(a){var b=this.getLabelOptionByAxisId(a);return o(b)?b:b?b.text:null},f.prototype.setLabelText=function(a,b){var c=this.owner,d=c.config,e=this.getLabelOptionByAxisId(a);o(e)?"y"===a?d.axis_y_label=b:"y2"===a?d.axis_y2_label=b:"x"===a&&(d.axis_x_label=b):e&&(e.text=b)},f.prototype.getLabelPosition=function(a,b){var c=this.getLabelOptionByAxisId(a),d=c&&"object"==typeof c&&c.position?c.position:b;return{isInner:d.indexOf("inner")>=0,isOuter:d.indexOf("outer")>=0,isLeft:d.indexOf("left")>=0,isCenter:d.indexOf("center")>=0,isRight:d.indexOf("right")>=0,isTop:d.indexOf("top")>=0,isMiddle:d.indexOf("middle")>=0,isBottom:d.indexOf("bottom")>=0}},f.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},f.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getLabelPositionById=function(a){return"y2"===a?this.getY2AxisLabelPosition():"y"===a?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},f.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},f.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},f.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},f.prototype.xForAxisLabel=function(a,b){var c=this.owner;return a?b.isLeft?0:b.isCenter?c.width/2:c.width:b.isBottom?-c.height:b.isMiddle?-c.height/2:0},f.prototype.dxForAxisLabel=function(a,b){return a?b.isLeft?"0.5em":b.isRight?"-0.5em":"0":b.isTop?"-0.5em":b.isBottom?"0.5em":"0"},f.prototype.textAnchorForAxisLabel=function(a,b){return a?b.isLeft?"start":b.isCenter?"middle":"end":b.isBottom?"start":b.isMiddle?"middle":"end"},f.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dyForXAxisLabel=function(){var a=this.owner,b=a.config,c=this.getXAxisLabelPosition();return b.axis_rotated?c.isInner?"1.2em":-25-this.getMaxTickWidth("x"):c.isInner?"-0.5em":b.axis_x_height?b.axis_x_height-10:"3em"},f.prototype.dyForYAxisLabel=function(){var a=this.owner,b=this.getYAxisLabelPosition();return a.config.axis_rotated?b.isInner?"-0.5em":"3em":b.isInner?"1.2em":-10-(a.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},f.prototype.dyForY2AxisLabel=function(){var a=this.owner,b=this.getY2AxisLabelPosition();return a.config.axis_rotated?b.isInner?"1.2em":"-2.2em":b.isInner?"-0.5em":15+(a.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},f.prototype.textAnchorForXAxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(!a.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.textAnchorForYAxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(a.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.textAnchorForY2AxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(a.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.getMaxTickWidth=function(a,b){var c,d,e,f,g,h=this.owner,i=h.config,j=0;return b&&h.currentMaxTickWidths[a]?h.currentMaxTickWidths[a]:(h.svg&&(c=h.filterTargetsToShow(h.data.targets),"y"===a?(d=h.y.copy().domain(h.getYDomain(c,"y")),e=this.getYAxis(d,h.yOrient,i.axis_y_tick_format,h.yAxisTickValues,!1,!0,!0)):"y2"===a?(d=h.y2.copy().domain(h.getYDomain(c,"y2")),
2354 },i.pointExpandedR=function(a){var b=this,c=b.config;return c.point_focus_expand_enabled?c.point_focus_expand_r?c.point_focus_expand_r:1.75*b.pointR(a):b.pointR(a)},i.pointSelectR=function(a){var b=this,c=b.config;return n(c.point_select_r)?c.point_select_r(a):c.point_select_r?c.point_select_r:4*b.pointR(a)},i.isWithinCircle=function(a,b){var c=this.d3,d=c.mouse(a),e=c.select(a),f=+e.attr("cx"),g=+e.attr("cy");return Math.sqrt(Math.pow(f-d[0],2)+Math.pow(g-d[1],2))<b},i.isWithinStep=function(a,b){return Math.abs(b-this.d3.mouse(a)[1])<30},i.initBar=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartBars)},i.updateTargetsForBar=function(a){var b,c,d=this,e=d.config,f=d.classChartBar.bind(d),g=d.classBars.bind(d),h=d.classFocus.bind(d);b=d.main.select("."+l.chartBars).selectAll("."+l.chartBar).data(a).attr("class",function(a){return f(a)+h(a)}),c=b.enter().append("g").attr("class",f).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",g).style("cursor",function(a){return e.data_selection_isselectable(a)?"pointer":null})},i.updateBar=function(a){var b=this,c=b.barData.bind(b),d=b.classBar.bind(b),e=b.initialOpacity.bind(b),f=function(a){return b.color(a.id)};b.mainBar=b.main.selectAll("."+l.bars).selectAll("."+l.bar).data(c),b.mainBar.enter().append("path").attr("class",d).style("stroke",f).style("fill",f),b.mainBar.style("opacity",e),b.mainBar.exit().transition().duration(a).style("opacity",0).remove()},i.redrawBar=function(a,b){return[(b?this.mainBar.transition(Math.random().toString()):this.mainBar).attr("d",a).style("fill",this.color).style("opacity",1)]},i.getBarW=function(a,b){var c=this,d=c.config,e="number"==typeof d.bar_width?d.bar_width:b?a.tickInterval()*d.bar_width_ratio/b:0;return d.bar_width_max&&e>d.bar_width_max?d.bar_width_max:e},i.getBars=function(a,b){var c=this;return(b?c.main.selectAll("."+l.bars+c.getTargetSelectorSuffix(b)):c.main).selectAll("."+l.bar+(m(a)?"-"+a:""))},i.expandBars=function(a,b,c){var d=this;c&&d.unexpandBars(),d.getBars(a,b).classed(l.EXPANDED,!0)},i.unexpandBars=function(a){var b=this;b.getBars(a).classed(l.EXPANDED,!1)},i.generateDrawBar=function(a,b){var c=this,d=c.config,e=c.generateGetBarPoints(a,b);return function(a,b){var c=e(a,b),f=d.axis_rotated?1:0,g=d.axis_rotated?0:1,h="M "+c[0][f]+","+c[0][g]+" L"+c[1][f]+","+c[1][g]+" L"+c[2][f]+","+c[2][g]+" L"+c[3][f]+","+c[3][g]+" z";return h}},i.generateGetBarPoints=function(a,b){var c=this,d=b?c.subXAxis:c.xAxis,e=a.__max__+1,f=c.getBarW(d,e),g=c.getShapeX(f,e,a,!!b),h=c.getShapeY(!!b),i=c.getShapeOffset(c.isBarType,a,!!b),j=b?c.getSubYScale:c.getYScale;return function(a,b){var d=j.call(c,a.id)(0),e=i(a,b)||d,k=g(a),l=h(a);return c.config.axis_rotated&&(0<a.value&&d>l||a.value<0&&l>d)&&(l=d),[[k,e],[k,l-(d-e)],[k+f,l-(d-e)],[k+f,e]]}},i.isWithinBar=function(a){var b=this.d3.mouse(a),c=a.getBoundingClientRect(),d=a.pathSegList.getItem(0),e=a.pathSegList.getItem(1),f=Math.min(d.x,e.x),g=Math.min(d.y,e.y),h=c.width,i=c.height,j=2,k=f-j,l=f+h+j,m=g+i+j,n=g-j;return k<b[0]&&b[0]<l&&n<b[1]&&b[1]<m},i.initText=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartTexts),a.mainText=a.d3.selectAll([])},i.updateTargetsForText=function(a){var b,c,d=this,e=d.classChartText.bind(d),f=d.classTexts.bind(d),g=d.classFocus.bind(d);b=d.main.select("."+l.chartTexts).selectAll("."+l.chartText).data(a).attr("class",function(a){return e(a)+g(a)}),c=b.enter().append("g").attr("class",e).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",f)},i.updateText=function(a){var b=this,c=b.config,d=b.barOrLineData.bind(b),e=b.classText.bind(b);b.mainText=b.main.selectAll("."+l.texts).selectAll("."+l.text).data(d),b.mainText.enter().append("text").attr("class",e).attr("text-anchor",function(a){return c.axis_rotated?a.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(a){return b.color(a)}).style("fill-opacity",0),b.mainText.text(function(a,c,d){return b.dataLabelFormat(a.id)(a.value,a.id,c,d)}),b.mainText.exit().transition().duration(a).style("fill-opacity",0).remove()},i.redrawText=function(a,b,c,d){return[(d?this.mainText.transition():this.mainText).attr("x",a).attr("y",b).style("fill",this.color).style("fill-opacity",c?0:this.opacityForText.bind(this))]},i.getTextRect=function(a,b,c){var d,e=this.d3.select("body").append("div").classed("c3",!0),f=e.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),g=this.d3.select(c).style("font");return f.selectAll(".dummy").data([a]).enter().append("text").classed(b?b:"",!0).style("font",g).text(a).each(function(){d=this.getBoundingClientRect()}),e.remove(),d},i.generateXYForText=function(a,b,c,d){var e=this,f=e.generateGetAreaPoints(a,!1),g=e.generateGetBarPoints(b,!1),h=e.generateGetLinePoints(c,!1),i=d?e.getXForText:e.getYForText;return function(a,b){var c=e.isAreaType(a)?f:e.isBarType(a)?g:h;return i.call(e,c(a,b),a,this)}},i.getXForText=function(a,b,c){var d,e,f=this,g=c.getBoundingClientRect();return f.config.axis_rotated?(e=f.isBarType(b)?4:6,d=a[2][1]+e*(b.value<0?-1:1)):d=f.hasType("bar")?(a[2][0]+a[0][0])/2:a[0][0],null===b.value&&(d>f.width?d=f.width-g.width:0>d&&(d=4)),d},i.getYForText=function(a,b,c){var d,e=this,f=c.getBoundingClientRect();return e.config.axis_rotated?d=(a[0][0]+a[2][0]+.6*f.height)/2:(d=a[2][1],b.value<0||0===b.value&&!e.hasPositiveValue?(d+=f.height,e.isBarType(b)&&e.isSafari()?d-=3:!e.isBarType(b)&&e.isChrome()&&(d+=3)):d+=e.isBarType(b)?-3:-6),null!==b.value||e.config.axis_rotated||(d<f.height?d=f.height:d>this.height&&(d=this.height-4)),d},i.setTargetType=function(a,b){var c=this,d=c.config;c.mapToTargetIds(a).forEach(function(a){c.withoutFadeIn[a]=b===d.data_types[a],d.data_types[a]=b}),a||(d.data_type=b)},i.hasType=function(a,b){var c=this,d=c.config.data_types,e=!1;return b=b||c.data.targets,b&&b.length?b.forEach(function(b){var c=d[b.id];(c&&c.indexOf(a)>=0||!c&&"line"===a)&&(e=!0)}):Object.keys(d).length?Object.keys(d).forEach(function(b){d[b]===a&&(e=!0)}):e=c.config.data_type===a,e},i.hasArcType=function(a){return this.hasType("pie",a)||this.hasType("donut",a)||this.hasType("gauge",a)},i.isLineType=function(a){var b=this.config,c=o(a)?a:a.id;return!b.data_types[c]||["line","spline","area","area-spline","step","area-step"].indexOf(b.data_types[c])>=0},i.isStepType=function(a){var b=o(a)?a:a.id;return["step","area-step"].indexOf(this.config.data_types[b])>=0},i.isSplineType=function(a){var b=o(a)?a:a.id;return["spline","area-spline"].indexOf(this.config.data_types[b])>=0},i.isAreaType=function(a){var b=o(a)?a:a.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[b])>=0},i.isBarType=function(a){var b=o(a)?a:a.id;return"bar"===this.config.data_types[b]},i.isScatterType=function(a){var b=o(a)?a:a.id;return"scatter"===this.config.data_types[b]},i.isPieType=function(a){var b=o(a)?a:a.id;return"pie"===this.config.data_types[b]},i.isGaugeType=function(a){var b=o(a)?a:a.id;return"gauge"===this.config.data_types[b]},i.isDonutType=function(a){var b=o(a)?a:a.id;return"donut"===this.config.data_types[b]},i.isArcType=function(a){return this.isPieType(a)||this.isDonutType(a)||this.isGaugeType(a)},i.lineData=function(a){return this.isLineType(a)?[a]:[]},i.arcData=function(a){return this.isArcType(a.data)?[a]:[]},i.barData=function(a){return this.isBarType(a)?a.values:[]},i.lineOrScatterData=function(a){return this.isLineType(a)||this.isScatterType(a)?a.values:[]},i.barOrLineData=function(a){return this.isBarType(a)||this.isLineType(a)?a.values:[]},i.isInterpolationType=function(a){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(a)>=0},i.initGrid=function(){var a=this,b=a.config,c=a.d3;a.grid=a.main.append("g").attr("clip-path",a.clipPathForGrid).attr("class",l.grid),b.grid_x_show&&a.grid.append("g").attr("class",l.xgrids),b.grid_y_show&&a.grid.append("g").attr("class",l.ygrids),b.grid_focus_show&&a.grid.append("g").attr("class",l.xgridFocus).append("line").attr("class",l.xgridFocus),a.xgrid=c.selectAll([]),b.grid_lines_front||a.initGridLines()},i.initGridLines=function(){var a=this,b=a.d3;a.gridLines=a.main.append("g").attr("clip-path",a.clipPathForGrid).attr("class",l.grid+" "+l.gridLines),a.gridLines.append("g").attr("class",l.xgridLines),a.gridLines.append("g").attr("class",l.ygridLines),a.xgridLines=b.selectAll([])},i.updateXGrid=function(a){var b=this,c=b.config,d=b.d3,e=b.generateGridData(c.grid_x_type,b.x),f=b.isCategorized()?b.xAxis.tickOffset():0;b.xgridAttr=c.axis_rotated?{x1:0,x2:b.width,y1:function(a){return b.x(a)-f},y2:function(a){return b.x(a)-f}}:{x1:function(a){return b.x(a)+f},x2:function(a){return b.x(a)+f},y1:0,y2:b.height},b.xgrid=b.main.select("."+l.xgrids).selectAll("."+l.xgrid).data(e),b.xgrid.enter().append("line").attr("class",l.xgrid),a||b.xgrid.attr(b.xgridAttr).style("opacity",function(){return+d.select(this).attr(c.axis_rotated?"y1":"x1")===(c.axis_rotated?b.height:0)?0:1}),b.xgrid.exit().remove()},i.updateYGrid=function(){var a=this,b=a.config,c=a.yAxis.tickValues()||a.y.ticks(b.grid_y_ticks);a.ygrid=a.main.select("."+l.ygrids).selectAll("."+l.ygrid).data(c),a.ygrid.enter().append("line").attr("class",l.ygrid),a.ygrid.attr("x1",b.axis_rotated?a.y:0).attr("x2",b.axis_rotated?a.y:a.width).attr("y1",b.axis_rotated?0:a.y).attr("y2",b.axis_rotated?a.height:a.y),a.ygrid.exit().remove(),a.smoothLines(a.ygrid,"grid")},i.gridTextAnchor=function(a){return a.position?a.position:"end"},i.gridTextDx=function(a){return"start"===a.position?4:"middle"===a.position?0:-4},i.xGridTextX=function(a){return"start"===a.position?-this.height:"middle"===a.position?-this.height/2:0},i.yGridTextX=function(a){return"start"===a.position?0:"middle"===a.position?this.width/2:this.width},i.updateGrid=function(a){var b,c,d,e=this,f=e.main,g=e.config;e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),f.select("line."+l.xgridFocus).style("visibility","hidden"),g.grid_x_show&&e.updateXGrid(),e.xgridLines=f.select("."+l.xgridLines).selectAll("."+l.xgridLine).data(g.grid_x_lines),b=e.xgridLines.enter().append("g").attr("class",function(a){return l.xgridLine+(a["class"]?" "+a["class"]:"")}),b.append("line").style("opacity",0),b.append("text").attr("text-anchor",e.gridTextAnchor).attr("transform",g.axis_rotated?"":"rotate(-90)").attr("dx",e.gridTextDx).attr("dy",-5).style("opacity",0),e.xgridLines.exit().transition().duration(a).style("opacity",0).remove(),g.grid_y_show&&e.updateYGrid(),e.ygridLines=f.select("."+l.ygridLines).selectAll("."+l.ygridLine).data(g.grid_y_lines),c=e.ygridLines.enter().append("g").attr("class",function(a){return l.ygridLine+(a["class"]?" "+a["class"]:"")}),c.append("line").style("opacity",0),c.append("text").attr("text-anchor",e.gridTextAnchor).attr("transform",g.axis_rotated?"rotate(-90)":"").attr("dx",e.gridTextDx).attr("dy",-5).style("opacity",0),d=e.yv.bind(e),e.ygridLines.select("line").transition().duration(a).attr("x1",g.axis_rotated?d:0).attr("x2",g.axis_rotated?d:e.width).attr("y1",g.axis_rotated?0:d).attr("y2",g.axis_rotated?e.height:d).style("opacity",1),e.ygridLines.select("text").transition().duration(a).attr("x",g.axis_rotated?e.xGridTextX.bind(e):e.yGridTextX.bind(e)).attr("y",d).text(function(a){return a.text}).style("opacity",1),e.ygridLines.exit().transition().duration(a).style("opacity",0).remove()},i.redrawGrid=function(a){var b=this,c=b.config,d=b.xv.bind(b),e=b.xgridLines.select("line"),f=b.xgridLines.select("text");return[(a?e.transition():e).attr("x1",c.axis_rotated?0:d).attr("x2",c.axis_rotated?b.width:d).attr("y1",c.axis_rotated?d:0).attr("y2",c.axis_rotated?d:b.height).style("opacity",1),(a?f.transition():f).attr("x",c.axis_rotated?b.yGridTextX.bind(b):b.xGridTextX.bind(b)).attr("y",d).text(function(a){return a.text}).style("opacity",1)]},i.showXGridFocus=function(a){var b=this,c=b.config,d=a.filter(function(a){return a&&m(a.value)}),e=b.main.selectAll("line."+l.xgridFocus),f=b.xx.bind(b);c.tooltip_show&&(b.hasType("scatter")||b.hasArcType()||(e.style("visibility","visible").data([d[0]]).attr(c.axis_rotated?"y1":"x1",f).attr(c.axis_rotated?"y2":"x2",f),b.smoothLines(e,"grid")))},i.hideXGridFocus=function(){this.main.select("line."+l.xgridFocus).style("visibility","hidden")},i.updateXgridFocus=function(){var a=this,b=a.config;a.main.select("line."+l.xgridFocus).attr("x1",b.axis_rotated?0:-10).attr("x2",b.axis_rotated?a.width:-10).attr("y1",b.axis_rotated?-10:0).attr("y2",b.axis_rotated?-10:a.height)},i.generateGridData=function(a,b){var c,d,e,f,g=this,h=[],i=g.main.select("."+l.axisX).selectAll(".tick").size();if("year"===a)for(c=g.getXDomain(),d=c[0].getFullYear(),e=c[1].getFullYear(),f=d;e>=f;f++)h.push(new Date(f+"-01-01 00:00:00"));else h=b.ticks(10),h.length>i&&(h=h.filter(function(a){return(""+a).indexOf(".")<0}));return h},i.getGridFilterToRemove=function(a){return a?function(b){var c=!1;return[].concat(a).forEach(function(a){("value"in a&&b.value===a.value||"class"in a&&b["class"]===a["class"])&&(c=!0)}),c}:function(){return!0}},i.removeGridLines=function(a,b){var c=this,d=c.config,e=c.getGridFilterToRemove(a),f=function(a){return!e(a)},g=b?l.xgridLines:l.ygridLines,h=b?l.xgridLine:l.ygridLine;c.main.select("."+g).selectAll("."+h).filter(e).transition().duration(d.transition_duration).style("opacity",0).remove(),b?d.grid_x_lines=d.grid_x_lines.filter(f):d.grid_y_lines=d.grid_y_lines.filter(f)},i.initTooltip=function(){var a,b=this,c=b.config;if(b.tooltip=b.selectChart.style("position","relative").append("div").attr("class",l.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),c.tooltip_init_show){if(b.isTimeSeries()&&o(c.tooltip_init_x)){for(c.tooltip_init_x=b.parseDate(c.tooltip_init_x),a=0;a<b.data.targets[0].values.length&&b.data.targets[0].values[a].x-c.tooltip_init_x!==0;a++);c.tooltip_init_x=a}b.tooltip.html(c.tooltip_contents.call(b,b.data.targets.map(function(a){return b.addName(a.values[c.tooltip_init_x])}),b.axis.getXAxisTickFormat(),b.getYFormat(b.hasArcType()),b.color)),b.tooltip.style("top",c.tooltip_init_position.top).style("left",c.tooltip_init_position.left).style("display","block")}},i.getTooltipContent=function(a,b,c,d){var e,f,g,h,i,j,k=this,l=k.config,m=l.tooltip_format_title||b,n=l.tooltip_format_name||function(a){return a},o=l.tooltip_format_value||c,p=k.isOrderAsc();if(0===l.data_groups.length)a.sort(function(a,b){var c=a?a.value:null,d=b?b.value:null;return p?c-d:d-c});else{var q=k.orderTargets(k.data.targets).map(function(a){return a.id});a.sort(function(a,b){var c=a?a.value:null,d=b?b.value:null;return c>0&&d>0&&(c=a?q.indexOf(a.id):null,d=b?q.indexOf(b.id):null),p?c-d:d-c})}for(f=0;f<a.length;f++)if(a[f]&&(a[f].value||0===a[f].value)&&(e||(g=y(m?m(a[f].x):a[f].x),e="<table class='"+k.CLASS.tooltip+"'>"+(g||0===g?"<tr><th colspan='2'>"+g+"</th></tr>":"")),h=y(o(a[f].value,a[f].ratio,a[f].id,a[f].index,a)),void 0!==h)){if(null===a[f].name)continue;i=y(n(a[f].name,a[f].ratio,a[f].id,a[f].index)),j=k.levelColor?k.levelColor(a[f].value):d(a[f].id),e+="<tr class='"+k.CLASS.tooltipName+"-"+k.getTargetSelectorSuffix(a[f].id)+"'>",e+="<td class='name'><span style='background-color:"+j+"'></span>"+i+"</td>",e+="<td class='value'>"+h+"</td>",e+="</tr>"}return e+"</table>"},i.tooltipPosition=function(a,b,c,d){var e,f,g,h,i,j=this,k=j.config,l=j.d3,m=j.hasArcType(),n=l.mouse(d);return m?(f=(j.width-(j.isLegendRight?j.getLegendWidth():0))/2+n[0],h=j.height/2+n[1]+20):(e=j.getSvgLeft(!0),k.axis_rotated?(f=e+n[0]+100,g=f+b,i=j.currentWidth-j.getCurrentPaddingRight(),h=j.x(a[0].x)+20):(f=e+j.getCurrentPaddingLeft(!0)+j.x(a[0].x)+20,g=f+b,i=e+j.currentWidth-j.getCurrentPaddingRight(),h=n[1]+15),g>i&&(f-=g-i+20),h+c>j.currentHeight&&(h-=c+30)),0>h&&(h=0),{top:h,left:f}},i.showTooltip=function(a,b){var c,d,e,f=this,g=f.config,h=f.hasArcType(),j=a.filter(function(a){return a&&m(a.value)}),k=g.tooltip_position||i.tooltipPosition;0!==j.length&&g.tooltip_show&&(f.tooltip.html(g.tooltip_contents.call(f,a,f.axis.getXAxisTickFormat(),f.getYFormat(h),f.color)).style("display","block"),c=f.tooltip.property("offsetWidth"),d=f.tooltip.property("offsetHeight"),e=k.call(this,j,c,d,b),f.tooltip.style("top",e.top+"px").style("left",e.left+"px"))},i.hideTooltip=function(){this.tooltip.style("display","none")},i.initLegend=function(){var a=this;return a.legendItemTextBox={},a.legendHasRendered=!1,a.legend=a.svg.append("g").attr("transform",a.getTranslate("legend")),a.config.legend_show?void a.updateLegendWithDefaults():(a.legend.style("visibility","hidden"),void(a.hiddenLegendIds=a.mapToIds(a.data.targets)))},i.updateLegendWithDefaults=function(){var a=this;a.updateLegend(a.mapToIds(a.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},i.updateSizeForLegend=function(a,b){var c=this,d=c.config,e={top:c.isLegendTop?c.getCurrentPaddingTop()+d.legend_inset_y+5.5:c.currentHeight-a-c.getCurrentPaddingBottom()-d.legend_inset_y,left:c.isLegendLeft?c.getCurrentPaddingLeft()+d.legend_inset_x+.5:c.currentWidth-b-c.getCurrentPaddingRight()-d.legend_inset_x+.5};c.margin3={top:c.isLegendRight?0:c.isLegendInset?e.top:c.currentHeight-a,right:NaN,bottom:0,left:c.isLegendRight?c.currentWidth-b:c.isLegendInset?e.left:0}},i.transformLegend=function(a){var b=this;(a?b.legend.transition():b.legend).attr("transform",b.getTranslate("legend"))},i.updateLegendStep=function(a){this.legendStep=a},i.updateLegendItemWidth=function(a){this.legendItemWidth=a},i.updateLegendItemHeight=function(a){this.legendItemHeight=a},i.getLegendWidth=function(){var a=this;return a.config.legend_show?a.isLegendRight||a.isLegendInset?a.legendItemWidth*(a.legendStep+1):a.currentWidth:0},i.getLegendHeight=function(){var a=this,b=0;return a.config.legend_show&&(b=a.isLegendRight?a.currentHeight:Math.max(20,a.legendItemHeight)*(a.legendStep+1)),b},i.opacityForLegend=function(a){return a.classed(l.legendItemHidden)?null:1},i.opacityForUnfocusedLegend=function(a){return a.classed(l.legendItemHidden)?null:.3},i.toggleFocusLegend=function(a,b){var c=this;a=c.mapToTargetIds(a),c.legend.selectAll("."+l.legendItem).filter(function(b){return a.indexOf(b)>=0}).classed(l.legendItemFocused,b).transition().duration(100).style("opacity",function(){var a=b?c.opacityForLegend:c.opacityForUnfocusedLegend;return a.call(c,c.d3.select(this))})},i.revertLegend=function(){var a=this,b=a.d3;a.legend.selectAll("."+l.legendItem).classed(l.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return a.opacityForLegend(b.select(this))})},i.showLegend=function(a){var b=this,c=b.config;c.legend_show||(c.legend_show=!0,b.legend.style("visibility","visible"),b.legendHasRendered||b.updateLegendWithDefaults()),b.removeHiddenLegendIds(a),b.legend.selectAll(b.selectorLegends(a)).style("visibility","visible").transition().style("opacity",function(){return b.opacityForLegend(b.d3.select(this))})},i.hideLegend=function(a){var b=this,c=b.config;c.legend_show&&u(a)&&(c.legend_show=!1,b.legend.style("visibility","hidden")),b.addHiddenLegendIds(a),b.legend.selectAll(b.selectorLegends(a)).style("opacity",0).style("visibility","hidden")},i.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},i.updateLegend=function(a,b,c){function d(a,b){return y.legendItemTextBox[b]||(y.legendItemTextBox[b]=y.getTextRect(a.textContent,l.legendItem,a)),y.legendItemTextBox[b]}function e(b,c,e){function f(a,b){b||(g=(o-G-n)/2,E>g&&(g=(o-n)/2,G=0,M++)),L[a]=M,K[M]=y.isLegendInset?10:g,H[a]=G,G+=n}var g,h,i=0===e,j=e===a.length-1,k=d(b,c),l=k.width+F+(!j||y.isLegendRight||y.isLegendInset?B:0)+z.legend_padding,m=k.height+A,n=y.isLegendRight||y.isLegendInset?m:l,o=y.isLegendRight||y.isLegendInset?y.getLegendHeight():y.getLegendWidth();return i&&(G=0,M=0,C=0,D=0),z.legend_show&&!y.isLegendToShow(c)?void(I[c]=J[c]=L[c]=H[c]=0):(I[c]=l,J[c]=m,(!C||l>=C)&&(C=l),(!D||m>=D)&&(D=m),h=y.isLegendRight||y.isLegendInset?D:C,void(z.legend_equally?(Object.keys(I).forEach(function(a){I[a]=C}),Object.keys(J).forEach(function(a){J[a]=D}),g=(o-h*a.length)/2,E>g?(G=0,M=0,a.forEach(function(a){f(a)})):f(c,!0)):f(c)))}var f,g,h,i,j,k,m,n,o,p,r,s,t,u,v,x,y=this,z=y.config,A=4,B=10,C=0,D=0,E=10,F=z.legend_item_tile_width+5,G=0,H={},I={},J={},K=[0],L={},M=0;a=a.filter(function(a){return!q(z.data_names[a])||null!==z.data_names[a]}),b=b||{},r=w(b,"withTransition",!0),s=w(b,"withTransitionForTransform",!0),y.isLegendInset&&(M=z.legend_inset_step?z.legend_inset_step:a.length,y.updateLegendStep(M)),y.isLegendRight?(f=function(a){return C*L[a]},i=function(a){return K[L[a]]+H[a]}):y.isLegendInset?(f=function(a){return C*L[a]+10},i=function(a){return K[L[a]]+H[a]}):(f=function(a){return K[L[a]]+H[a]},i=function(a){return D*L[a]}),g=function(a,b){return f(a,b)+4+z.legend_item_tile_width},j=function(a,b){return i(a,b)+9},h=function(a,b){return f(a,b)},k=function(a,b){return i(a,b)-5},m=function(a,b){return f(a,b)-2},n=function(a,b){return f(a,b)-2+z.legend_item_tile_width},o=function(a,b){return i(a,b)+4},p=y.legend.selectAll("."+l.legendItem).data(a).enter().append("g").attr("class",function(a){return y.generateClass(l.legendItem,a)}).style("visibility",function(a){return y.isLegendToShow(a)?"visible":"hidden"}).style("cursor","pointer").on("click",function(a){z.legend_item_onclick?z.legend_item_onclick.call(y,a):y.d3.event.altKey?(y.api.hide(),y.api.show(a)):(y.api.toggle(a),y.isTargetToShow(a)?y.api.focus(a):y.api.revert())}).on("mouseover",function(a){z.legend_item_onmouseover?z.legend_item_onmouseover.call(y,a):(y.d3.select(this).classed(l.legendItemFocused,!0),!y.transiting&&y.isTargetToShow(a)&&y.api.focus(a))}).on("mouseout",function(a){z.legend_item_onmouseout?z.legend_item_onmouseout.call(y,a):(y.d3.select(this).classed(l.legendItemFocused,!1),y.api.revert())}),p.append("text").text(function(a){return q(z.data_names[a])?z.data_names[a]:a}).each(function(a,b){e(this,a,b)}).style("pointer-events","none").attr("x",y.isLegendRight||y.isLegendInset?g:-200).attr("y",y.isLegendRight||y.isLegendInset?-200:j),p.append("rect").attr("class",l.legendItemEvent).style("fill-opacity",0).attr("x",y.isLegendRight||y.isLegendInset?h:-200).attr("y",y.isLegendRight||y.isLegendInset?-200:k),p.append("line").attr("class",l.legendItemTile).style("stroke",y.color).style("pointer-events","none").attr("x1",y.isLegendRight||y.isLegendInset?m:-200).attr("y1",y.isLegendRight||y.isLegendInset?-200:o).attr("x2",y.isLegendRight||y.isLegendInset?n:-200).attr("y2",y.isLegendRight||y.isLegendInset?-200:o).attr("stroke-width",z.legend_item_tile_height),x=y.legend.select("."+l.legendBackground+" rect"),y.isLegendInset&&C>0&&0===x.size()&&(x=y.legend.insert("g","."+l.legendItem).attr("class",l.legendBackground).append("rect")),t=y.legend.selectAll("text").data(a).text(function(a){return q(z.data_names[a])?z.data_names[a]:a}).each(function(a,b){e(this,a,b)}),(r?t.transition():t).attr("x",g).attr("y",j),u=y.legend.selectAll("rect."+l.legendItemEvent).data(a),(r?u.transition():u).attr("width",function(a){return I[a]}).attr("height",function(a){return J[a]}).attr("x",h).attr("y",k),v=y.legend.selectAll("line."+l.legendItemTile).data(a),(r?v.transition():v).style("stroke",y.color).attr("x1",m).attr("y1",o).attr("x2",n).attr("y2",o),x&&(r?x.transition():x).attr("height",y.getLegendHeight()-12).attr("width",C*(M+1)+10),y.legend.selectAll("."+l.legendItem).classed(l.legendItemHidden,function(a){return!y.isTargetToShow(a)}),y.updateLegendItemWidth(C),y.updateLegendItemHeight(D),y.updateLegendStep(M),y.updateSizes(),y.updateScales(),y.updateSvgSize(),y.transformAll(s,c),y.legendHasRendered=!0},i.initTitle=function(){var a=this;a.title=a.svg.append("text").text(a.config.title_text).attr("class",a.CLASS.title)},i.redrawTitle=function(){var a=this;a.title.attr("x",a.xForTitle.bind(a)).attr("y",a.yForTitle.bind(a))},i.xForTitle=function(){var a,b=this,c=b.config,d=c.title_position||"left";return a=d.indexOf("right")>=0?b.currentWidth-b.getTextRect(b.title.node().textContent,b.CLASS.title,b.title.node()).width-c.title_padding.right:d.indexOf("center")>=0?(b.currentWidth-b.getTextRect(b.title.node().textContent,b.CLASS.title,b.title.node()).width)/2:c.title_padding.left},i.yForTitle=function(){var a=this;return a.config.title_padding.top+a.getTextRect(a.title.node().textContent,a.CLASS.title,a.title.node()).height},i.getTitlePadding=function(){var a=this;return a.yForTitle()+a.config.title_padding.bottom},c(b,f),f.prototype.init=function(){var a=this.owner,b=a.config,c=a.main;a.axes.x=c.append("g").attr("class",l.axis+" "+l.axisX).attr("clip-path",a.clipPathForXAxis).attr("transform",a.getTranslate("x")).style("visibility",b.axis_x_show?"visible":"hidden"),a.axes.x.append("text").attr("class",l.axisXLabel).attr("transform",b.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),a.axes.y=c.append("g").attr("class",l.axis+" "+l.axisY).attr("clip-path",b.axis_y_inner?"":a.clipPathForYAxis).attr("transform",a.getTranslate("y")).style("visibility",b.axis_y_show?"visible":"hidden"),a.axes.y.append("text").attr("class",l.axisYLabel).attr("transform",b.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),a.axes.y2=c.append("g").attr("class",l.axis+" "+l.axisY2).attr("transform",a.getTranslate("y2")).style("visibility",b.axis_y2_show?"visible":"hidden"),a.axes.y2.append("text").attr("class",l.axisY2Label).attr("transform",b.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},f.prototype.getXAxis=function(a,b,c,d,e,f,h){var i=this.owner,j=i.config,k={isCategory:i.isCategorized(),withOuterTick:e,tickMultiline:j.axis_x_tick_multiline,tickWidth:j.axis_x_tick_width,tickTextRotate:h?0:j.axis_x_tick_rotate,withoutTransition:f},l=g(i.d3,k).scale(a).orient(b);return i.isTimeSeries()&&d&&"function"!=typeof d&&(d=d.map(function(a){return i.parseDate(a)})),l.tickFormat(c).tickValues(d),i.isCategorized()&&(l.tickCentered(j.axis_x_tick_centered),u(j.axis_x_tick_culling)&&(j.axis_x_tick_culling=!1)),l},f.prototype.updateXAxisTickValues=function(a,b){var c,d=this.owner,e=d.config;return(e.axis_x_tick_fit||e.axis_x_tick_count)&&(c=this.generateTickValues(d.mapTargetsToUniqueXs(a),e.axis_x_tick_count,d.isTimeSeries())),b?b.tickValues(c):(d.xAxis.tickValues(c),d.subXAxis.tickValues(c)),c},f.prototype.getYAxis=function(a,b,c,d,e,f,h){var i=this.owner,j=i.config,k={withOuterTick:e,withoutTransition:f,tickTextRotate:h?0:j.axis_y_tick_rotate},l=g(i.d3,k).scale(a).orient(b).tickFormat(c);return i.isTimeSeriesY()?l.ticks(i.d3.time[j.axis_y_tick_time_value],j.axis_y_tick_time_interval):l.tickValues(d),l},f.prototype.getId=function(a){var b=this.owner.config;return a in b.data_axes?b.data_axes[a]:"y"},f.prototype.getXAxisTickFormat=function(){var a=this.owner,b=a.config,c=a.isTimeSeries()?a.defaultAxisTimeFormat:a.isCategorized()?a.categoryName:function(a){return 0>a?a.toFixed(0):a};return b.axis_x_tick_format&&(n(b.axis_x_tick_format)?c=b.axis_x_tick_format:a.isTimeSeries()&&(c=function(c){return c?a.axisTimeFormat(b.axis_x_tick_format)(c):""})),n(c)?function(b){return c.call(a,b)}:c},f.prototype.getTickValues=function(a,b){return a?a:b?b.tickValues():void 0},f.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},f.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},f.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},f.prototype.getLabelOptionByAxisId=function(a){var b,c=this.owner,d=c.config;return"y"===a?b=d.axis_y_label:"y2"===a?b=d.axis_y2_label:"x"===a&&(b=d.axis_x_label),b},f.prototype.getLabelText=function(a){var b=this.getLabelOptionByAxisId(a);return o(b)?b:b?b.text:null},f.prototype.setLabelText=function(a,b){var c=this.owner,d=c.config,e=this.getLabelOptionByAxisId(a);o(e)?"y"===a?d.axis_y_label=b:"y2"===a?d.axis_y2_label=b:"x"===a&&(d.axis_x_label=b):e&&(e.text=b)},f.prototype.getLabelPosition=function(a,b){var c=this.getLabelOptionByAxisId(a),d=c&&"object"==typeof c&&c.position?c.position:b;return{isInner:d.indexOf("inner")>=0,isOuter:d.indexOf("outer")>=0,isLeft:d.indexOf("left")>=0,isCenter:d.indexOf("center")>=0,isRight:d.indexOf("right")>=0,isTop:d.indexOf("top")>=0,isMiddle:d.indexOf("middle")>=0,isBottom:d.indexOf("bottom")>=0}},f.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},f.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getLabelPositionById=function(a){return"y2"===a?this.getY2AxisLabelPosition():"y"===a?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},f.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},f.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},f.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},f.prototype.xForAxisLabel=function(a,b){var c=this.owner;return a?b.isLeft?0:b.isCenter?c.width/2:c.width:b.isBottom?-c.height:b.isMiddle?-c.height/2:0},f.prototype.dxForAxisLabel=function(a,b){return a?b.isLeft?"0.5em":b.isRight?"-0.5em":"0":b.isTop?"-0.5em":b.isBottom?"0.5em":"0"},f.prototype.textAnchorForAxisLabel=function(a,b){return a?b.isLeft?"start":b.isCenter?"middle":"end":b.isBottom?"start":b.isMiddle?"middle":"end"},f.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dyForXAxisLabel=function(){var a=this.owner,b=a.config,c=this.getXAxisLabelPosition();return b.axis_rotated?c.isInner?"1.2em":-25-this.getMaxTickWidth("x"):c.isInner?"-0.5em":b.axis_x_height?b.axis_x_height-10:"3em"},f.prototype.dyForYAxisLabel=function(){var a=this.owner,b=this.getYAxisLabelPosition();return a.config.axis_rotated?b.isInner?"-0.5em":"3em":b.isInner?"1.2em":-10-(a.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},f.prototype.dyForY2AxisLabel=function(){var a=this.owner,b=this.getY2AxisLabelPosition();return a.config.axis_rotated?b.isInner?"1.2em":"-2.2em":b.isInner?"-0.5em":15+(a.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},f.prototype.textAnchorForXAxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(!a.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.textAnchorForYAxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(a.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.textAnchorForY2AxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(a.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.getMaxTickWidth=function(a,b){var c,d,e,f,g,h=this.owner,i=h.config,j=0;return b&&h.currentMaxTickWidths[a]?h.currentMaxTickWidths[a]:(h.svg&&(c=h.filterTargetsToShow(h.data.targets),"y"===a?(d=h.y.copy().domain(h.getYDomain(c,"y")),e=this.getYAxis(d,h.yOrient,i.axis_y_tick_format,h.yAxisTickValues,!1,!0,!0)):"y2"===a?(d=h.y2.copy().domain(h.getYDomain(c,"y2")),
2355 e=this.getYAxis(d,h.y2Orient,i.axis_y2_tick_format,h.y2AxisTickValues,!1,!0,!0)):(d=h.x.copy().domain(h.getXDomain(c)),e=this.getXAxis(d,h.xOrient,h.xAxisTickFormat,h.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(c,e)),f=h.d3.select("body").append("div").classed("c3",!0),g=f.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),g.append("g").call(e).each(function(){h.d3.select(this).selectAll("text").each(function(){var a=this.getBoundingClientRect();j<a.width&&(j=a.width)}),f.remove()})),h.currentMaxTickWidths[a]=0>=j?h.currentMaxTickWidths[a]:j,h.currentMaxTickWidths[a])},f.prototype.updateLabels=function(a){var b=this.owner,c=b.main.select("."+l.axisX+" ."+l.axisXLabel),d=b.main.select("."+l.axisY+" ."+l.axisYLabel),e=b.main.select("."+l.axisY2+" ."+l.axisY2Label);(a?c.transition():c).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(a?d.transition():d).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(a?e.transition():e).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},f.prototype.getPadding=function(a,b,c,d){var e="number"==typeof a?a:a[b];return m(e)?"ratio"===a.unit?a[b]*d:this.convertPixelsToAxisPadding(e,d):c},f.prototype.convertPixelsToAxisPadding=function(a,b){var c=this.owner,d=c.config.axis_rotated?c.width:c.height;return b*(a/d)},f.prototype.generateTickValues=function(a,b,c){var d,e,f,g,h,i,j,k=a;if(b)if(d=n(b)?b():b,1===d)k=[a[0]];else if(2===d)k=[a[0],a[a.length-1]];else if(d>2){for(g=d-2,e=a[0],f=a[a.length-1],h=(f-e)/(g+1),k=[e],i=0;g>i;i++)j=+e+h*(i+1),k.push(c?new Date(j):j);k.push(f)}return c||(k=k.sort(function(a,b){return a-b})),k},f.prototype.generateTransitions=function(a){var b=this.owner,c=b.axes;return{axisX:a?c.x.transition().duration(a):c.x,axisY:a?c.y.transition().duration(a):c.y,axisY2:a?c.y2.transition().duration(a):c.y2,axisSubX:a?c.subx.transition().duration(a):c.subx}},f.prototype.redraw=function(a,b){var c=this.owner;c.axes.x.style("opacity",b?0:1),c.axes.y.style("opacity",b?0:1),c.axes.y2.style("opacity",b?0:1),c.axes.subx.style("opacity",b?0:1),a.axisX.call(c.xAxis),a.axisY.call(c.yAxis),a.axisY2.call(c.y2Axis),a.axisSubX.call(c.subXAxis)},i.getClipPath=function(b){var c=a.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url("+(c?"":document.URL.split("#")[0])+"#"+b+")"},i.appendClip=function(a,b){return a.append("clipPath").attr("id",b).append("rect")},i.getAxisClipX=function(a){var b=Math.max(30,this.margin.left);return a?-(1+b):-(b-1)},i.getAxisClipY=function(a){return a?-20:-this.margin.top},i.getXAxisClipX=function(){var a=this;return a.getAxisClipX(!a.config.axis_rotated)},i.getXAxisClipY=function(){var a=this;return a.getAxisClipY(!a.config.axis_rotated)},i.getYAxisClipX=function(){var a=this;return a.config.axis_y_inner?-1:a.getAxisClipX(a.config.axis_rotated)},i.getYAxisClipY=function(){var a=this;return a.getAxisClipY(a.config.axis_rotated)},i.getAxisClipWidth=function(a){var b=this,c=Math.max(30,b.margin.left),d=Math.max(30,b.margin.right);return a?b.width+2+c+d:b.margin.left+20},i.getAxisClipHeight=function(a){return(a?this.margin.bottom:this.margin.top+this.height)+20},i.getXAxisClipWidth=function(){var a=this;return a.getAxisClipWidth(!a.config.axis_rotated)},i.getXAxisClipHeight=function(){var a=this;return a.getAxisClipHeight(!a.config.axis_rotated)},i.getYAxisClipWidth=function(){var a=this;return a.getAxisClipWidth(a.config.axis_rotated)+(a.config.axis_y_inner?20:0)},i.getYAxisClipHeight=function(){var a=this;return a.getAxisClipHeight(a.config.axis_rotated)},i.initPie=function(){var a=this,b=a.d3,c=a.config;a.pie=b.layout.pie().value(function(a){return a.values.reduce(function(a,b){return a+b.value},0)}),c.data_order||a.pie.sort(null)},i.updateRadius=function(){var a=this,b=a.config,c=b.gauge_width||b.donut_width;a.radiusExpanded=Math.min(a.arcWidth,a.arcHeight)/2,a.radius=.95*a.radiusExpanded,a.innerRadiusRatio=c?(a.radius-c)/a.radius:.6,a.innerRadius=a.hasType("donut")||a.hasType("gauge")?a.radius*a.innerRadiusRatio:0},i.updateArc=function(){var a=this;a.svgArc=a.getSvgArc(),a.svgArcExpanded=a.getSvgArcExpanded(),a.svgArcExpandedSub=a.getSvgArcExpanded(.98)},i.updateAngle=function(a){var b,c,d,e,f=this,g=f.config,h=!1,i=0;return g?(f.pie(f.filterTargetsToShow(f.data.targets)).forEach(function(b){h||b.data.id!==a.data.id||(h=!0,a=b,a.index=i),i++}),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),f.isGaugeType(a.data)&&(b=g.gauge_min,c=g.gauge_max,d=Math.PI*(g.gauge_fullCircle?2:1)/(c-b),e=a.value<b?0:a.value<c?a.value-b:c-b,a.startAngle=g.gauge_startingAngle,a.endAngle=a.startAngle+d*e),h?a:null):null},i.getSvgArc=function(){var a=this,b=a.d3.svg.arc().outerRadius(a.radius).innerRadius(a.innerRadius),c=function(c,d){var e;return d?b(c):(e=a.updateAngle(c),e?b(e):"M 0 0")};return c.centroid=b.centroid,c},i.getSvgArcExpanded=function(a){var b=this,c=b.d3.svg.arc().outerRadius(b.radiusExpanded*(a?a:1)).innerRadius(b.innerRadius);return function(a){var d=b.updateAngle(a);return d?c(d):"M 0 0"}},i.getArc=function(a,b,c){return c||this.isArcType(a.data)?this.svgArc(a,b):"M 0 0"},i.transformForArcLabel=function(a){var b,c,d,e,f,g=this,h=g.config,i=g.updateAngle(a),j="";return i&&!g.hasType("gauge")&&(b=this.svgArc.centroid(i),c=isNaN(b[0])?0:b[0],d=isNaN(b[1])?0:b[1],e=Math.sqrt(c*c+d*d),f=g.hasType("donut")&&h.donut_label_ratio?n(h.donut_label_ratio)?h.donut_label_ratio(a,g.radius,e):h.donut_label_ratio:g.hasType("pie")&&h.pie_label_ratio?n(h.pie_label_ratio)?h.pie_label_ratio(a,g.radius,e):h.pie_label_ratio:g.radius&&e?(36/g.radius>.375?1.175-36/g.radius:.8)*g.radius/e:0,j="translate("+c*f+","+d*f+")"),j},i.getArcRatio=function(a){var b=this,c=b.config,d=Math.PI*(b.hasType("gauge")&&!c.gauge_fullCircle?1:2);return a?(a.endAngle-a.startAngle)/d:null},i.convertToArcData=function(a){return this.addName({id:a.data.id,value:a.value,ratio:this.getArcRatio(a),index:a.index})},i.textForArcLabel=function(a){var b,c,d,e,f,g=this;return g.shouldShowArcLabel()?(b=g.updateAngle(a),c=b?b.value:null,d=g.getArcRatio(b),e=a.data.id,g.hasType("gauge")||g.meetsArcLabelThreshold(d)?(f=g.getArcLabelFormat(),f?f(c,d,e):g.defaultArcValueFormat(c,d)):""):""},i.expandArc=function(b){var c,d=this;return d.transiting?void(c=a.setInterval(function(){d.transiting||(a.clearInterval(c),d.legend.selectAll(".c3-legend-item-focused").size()>0&&d.expandArc(b))},10)):(b=d.mapToTargetIds(b),void d.svg.selectAll(d.selectorTargets(b,"."+l.chartArc)).each(function(a){d.shouldExpand(a.data.id)&&d.d3.select(this).selectAll("path").transition().duration(d.expandDuration(a.data.id)).attr("d",d.svgArcExpanded).transition().duration(2*d.expandDuration(a.data.id)).attr("d",d.svgArcExpandedSub).each(function(a){d.isDonutType(a.data)})}))},i.unexpandArc=function(a){var b=this;b.transiting||(a=b.mapToTargetIds(a),b.svg.selectAll(b.selectorTargets(a,"."+l.chartArc)).selectAll("path").transition().duration(function(a){return b.expandDuration(a.data.id)}).attr("d",b.svgArc),b.svg.selectAll("."+l.arc).style("opacity",1))},i.expandDuration=function(a){var b=this,c=b.config;return b.isDonutType(a)?c.donut_expand_duration:b.isGaugeType(a)?c.gauge_expand_duration:b.isPieType(a)?c.pie_expand_duration:50},i.shouldExpand=function(a){var b=this,c=b.config;return b.isDonutType(a)&&c.donut_expand||b.isGaugeType(a)&&c.gauge_expand||b.isPieType(a)&&c.pie_expand},i.shouldShowArcLabel=function(){var a=this,b=a.config,c=!0;return a.hasType("donut")?c=b.donut_label_show:a.hasType("pie")&&(c=b.pie_label_show),c},i.meetsArcLabelThreshold=function(a){var b=this,c=b.config,d=b.hasType("donut")?c.donut_label_threshold:c.pie_label_threshold;return a>=d},i.getArcLabelFormat=function(){var a=this,b=a.config,c=b.pie_label_format;return a.hasType("gauge")?c=b.gauge_label_format:a.hasType("donut")&&(c=b.donut_label_format),c},i.getArcTitle=function(){var a=this;return a.hasType("donut")?a.config.donut_title:""},i.updateTargetsForArc=function(a){var b,c,d=this,e=d.main,f=d.classChartArc.bind(d),g=d.classArcs.bind(d),h=d.classFocus.bind(d);b=e.select("."+l.chartArcs).selectAll("."+l.chartArc).data(d.pie(a)).attr("class",function(a){return f(a)+h(a.data)}),c=b.enter().append("g").attr("class",f),c.append("g").attr("class",g),c.append("text").attr("dy",d.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},i.initArc=function(){var a=this;a.arcs=a.main.select("."+l.chart).append("g").attr("class",l.chartArcs).attr("transform",a.getTranslate("arc")),a.arcs.append("text").attr("class",l.chartArcsTitle).style("text-anchor","middle").text(a.getArcTitle())},i.redrawArc=function(a,b,c){var d,e=this,f=e.d3,g=e.config,h=e.main;d=h.selectAll("."+l.arcs).selectAll("."+l.arc).data(e.arcData.bind(e)),d.enter().append("path").attr("class",e.classArc.bind(e)).style("fill",function(a){return e.color(a.data)}).style("cursor",function(a){return g.interaction_enabled&&g.data_selection_isselectable(a)?"pointer":null}).style("opacity",0).each(function(a){e.isGaugeType(a.data)&&(a.startAngle=a.endAngle=g.gauge_startingAngle),this._current=a}),d.attr("transform",function(a){return!e.isGaugeType(a.data)&&c?"scale(0)":""}).style("opacity",function(a){return a===this._current?0:1}).on("mouseover",g.interaction_enabled?function(a){var b,c;e.transiting||(b=e.updateAngle(a),b&&(c=e.convertToArcData(b),e.expandArc(b.data.id),e.api.focus(b.data.id),e.toggleFocusLegend(b.data.id,!0),e.config.data_onmouseover(c,this)))}:null).on("mousemove",g.interaction_enabled?function(a){var b,c,d=e.updateAngle(a);d&&(b=e.convertToArcData(d),c=[b],e.showTooltip(c,this))}:null).on("mouseout",g.interaction_enabled?function(a){var b,c;e.transiting||(b=e.updateAngle(a),b&&(c=e.convertToArcData(b),e.unexpandArc(b.data.id),e.api.revert(),e.revertLegend(),e.hideTooltip(),e.config.data_onmouseout(c,this)))}:null).on("click",g.interaction_enabled?function(a,b){var c,d=e.updateAngle(a);d&&(c=e.convertToArcData(d),e.toggleShape&&e.toggleShape(this,c,b),e.config.data_onclick.call(e.api,c,this))}:null).each(function(){e.transiting=!0}).transition().duration(a).attrTween("d",function(a){var b,c=e.updateAngle(a);return c?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),b=f.interpolate(this._current,c),this._current=b(0),function(c){var d=b(c);return d.data=a.data,e.getArc(d,!0)}):function(){return"M 0 0"}}).attr("transform",c?"scale(1)":"").style("fill",function(a){return e.levelColor?e.levelColor(a.data.values[0].value):e.color(a.data.id)}).style("opacity",1).call(e.endall,function(){e.transiting=!1}),d.exit().transition().duration(b).style("opacity",0).remove(),h.selectAll("."+l.chartArc).select("text").style("opacity",0).attr("class",function(a){return e.isGaugeType(a.data)?l.gaugeValue:""}).text(e.textForArcLabel.bind(e)).attr("transform",e.transformForArcLabel.bind(e)).style("font-size",function(a){return e.isGaugeType(a.data)?Math.round(e.radius/5)+"px":""}).transition().duration(a).style("opacity",function(a){return e.isTargetToShow(a.data.id)&&e.isArcType(a.data)?1:0}),h.select("."+l.chartArcsTitle).style("opacity",e.hasType("donut")||e.hasType("gauge")?1:0),e.hasType("gauge")&&(e.arcs.select("."+l.chartArcsBackground).attr("d",function(){var a={data:[{value:g.gauge_max}],startAngle:g.gauge_startingAngle,endAngle:-1*g.gauge_startingAngle};return e.getArc(a,!0,!0)}),e.arcs.select("."+l.chartArcsGaugeUnit).attr("dy",".75em").text(g.gauge_label_show?g.gauge_units:""),e.arcs.select("."+l.chartArcsGaugeMin).attr("dx",-1*(e.innerRadius+(e.radius-e.innerRadius)/(g.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(g.gauge_label_show?g.gauge_min:""),e.arcs.select("."+l.chartArcsGaugeMax).attr("dx",e.innerRadius+(e.radius-e.innerRadius)/(g.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(g.gauge_label_show?g.gauge_max:""))},i.initGauge=function(){var a=this.arcs;this.hasType("gauge")&&(a.append("path").attr("class",l.chartArcsBackground),a.append("text").attr("class",l.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),a.append("text").attr("class",l.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),a.append("text").attr("class",l.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},i.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},i.initRegion=function(){var a=this;a.region=a.main.append("g").attr("clip-path",a.clipPath).attr("class",l.regions)},i.updateRegion=function(a){var b=this,c=b.config;b.region.style("visibility",b.hasArcType()?"hidden":"visible"),b.mainRegion=b.main.select("."+l.regions).selectAll("."+l.region).data(c.regions),b.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),b.mainRegion.attr("class",b.classRegion.bind(b)),b.mainRegion.exit().transition().duration(a).style("opacity",0).remove()},i.redrawRegion=function(a){var b=this,c=b.mainRegion.selectAll("rect").each(function(){var a=b.d3.select(this.parentNode).datum();b.d3.select(this).datum(a)}),d=b.regionX.bind(b),e=b.regionY.bind(b),f=b.regionWidth.bind(b),g=b.regionHeight.bind(b);return[(a?c.transition():c).attr("x",d).attr("y",e).attr("width",f).attr("height",g).style("fill-opacity",function(a){return m(a.opacity)?a.opacity:.1})]},i.regionX=function(a){var b,c=this,d=c.config,e="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated&&"start"in a?e(a.start):0:d.axis_rotated?0:"start"in a?c.x(c.isTimeSeries()?c.parseDate(a.start):a.start):0},i.regionY=function(a){var b,c=this,d=c.config,e="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated?0:"end"in a?e(a.end):0:d.axis_rotated&&"start"in a?c.x(c.isTimeSeries()?c.parseDate(a.start):a.start):0},i.regionWidth=function(a){var b,c=this,d=c.config,e=c.regionX(a),f="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated&&"end"in a?f(a.end):c.width:d.axis_rotated?c.width:"end"in a?c.x(c.isTimeSeries()?c.parseDate(a.end):a.end):c.width,e>b?0:b-e},i.regionHeight=function(a){var b,c=this,d=c.config,e=this.regionY(a),f="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated?c.height:"start"in a?f(a.start):c.height:d.axis_rotated&&"end"in a?c.x(c.isTimeSeries()?c.parseDate(a.end):a.end):c.height,e>b?0:b-e},i.isRegionOnX=function(a){return!a.axis||"x"===a.axis},i.drag=function(a){var b,c,d,e,f,g,h,i,j=this,k=j.config,m=j.main,n=j.d3;j.hasArcType()||k.data_selection_enabled&&(k.zoom_enabled&&!j.zoom.altDomain||k.data_selection_multiple&&(b=j.dragStart[0],c=j.dragStart[1],d=a[0],e=a[1],f=Math.min(b,d),g=Math.max(b,d),h=k.data_selection_grouped?j.margin.top:Math.min(c,e),i=k.data_selection_grouped?j.height:Math.max(c,e),m.select("."+l.dragarea).attr("x",f).attr("y",h).attr("width",g-f).attr("height",i-h),m.selectAll("."+l.shapes).selectAll("."+l.shape).filter(function(a){return k.data_selection_isselectable(a)}).each(function(a,b){var c,d,e,k,m,o,p=n.select(this),q=p.classed(l.SELECTED),r=p.classed(l.INCLUDED),s=!1;if(p.classed(l.circle))c=1*p.attr("cx"),d=1*p.attr("cy"),m=j.togglePoint,s=c>f&&g>c&&d>h&&i>d;else{if(!p.classed(l.bar))return;o=z(this),c=o.x,d=o.y,e=o.width,k=o.height,m=j.togglePath,s=!(c>g||f>c+e||d>i||h>d+k)}s^r&&(p.classed(l.INCLUDED,!r),p.classed(l.SELECTED,!q),m.call(j,!q,p,a,b))})))},i.dragstart=function(a){var b=this,c=b.config;b.hasArcType()||c.data_selection_enabled&&(b.dragStart=a,b.main.select("."+l.chart).append("rect").attr("class",l.dragarea).style("opacity",.1),b.dragging=!0)},i.dragend=function(){var a=this,b=a.config;a.hasArcType()||b.data_selection_enabled&&(a.main.select("."+l.dragarea).transition().duration(100).style("opacity",0).remove(),a.main.selectAll("."+l.shape).classed(l.INCLUDED,!1),a.dragging=!1)},i.selectPoint=function(a,b,c){var d=this,e=d.config,f=(e.axis_rotated?d.circleY:d.circleX).bind(d),g=(e.axis_rotated?d.circleX:d.circleY).bind(d),h=d.pointSelectR.bind(d);e.data_onselected.call(d.api,b,a.node()),d.main.select("."+l.selectedCircles+d.getTargetSelectorSuffix(b.id)).selectAll("."+l.selectedCircle+"-"+c).data([b]).enter().append("circle").attr("class",function(){return d.generateClass(l.selectedCircle,c)}).attr("cx",f).attr("cy",g).attr("stroke",function(){return d.color(b)}).attr("r",function(a){return 1.4*d.pointSelectR(a)}).transition().duration(100).attr("r",h)},i.unselectPoint=function(a,b,c){var d=this;d.config.data_onunselected.call(d.api,b,a.node()),d.main.select("."+l.selectedCircles+d.getTargetSelectorSuffix(b.id)).selectAll("."+l.selectedCircle+"-"+c).transition().duration(100).attr("r",0).remove()},i.togglePoint=function(a,b,c,d){a?this.selectPoint(b,c,d):this.unselectPoint(b,c,d)},i.selectPath=function(a,b){var c=this;c.config.data_onselected.call(c,b,a.node()),c.config.interaction_brighten&&a.transition().duration(100).style("fill",function(){return c.d3.rgb(c.color(b)).brighter(.75)})},i.unselectPath=function(a,b){var c=this;c.config.data_onunselected.call(c,b,a.node()),c.config.interaction_brighten&&a.transition().duration(100).style("fill",function(){return c.color(b)})},i.togglePath=function(a,b,c,d){a?this.selectPath(b,c,d):this.unselectPath(b,c,d)},i.getToggle=function(a,b){var c,d=this;return"circle"===a.nodeName?c=d.isStepType(b)?function(){}:d.togglePoint:"path"===a.nodeName&&(c=d.togglePath),c},i.toggleShape=function(a,b,c){var d=this,e=d.d3,f=d.config,g=e.select(a),h=g.classed(l.SELECTED),i=d.getToggle(a,b).bind(d);f.data_selection_enabled&&f.data_selection_isselectable(b)&&(f.data_selection_multiple||d.main.selectAll("."+l.shapes+(f.data_selection_grouped?d.getTargetSelectorSuffix(b.id):"")).selectAll("."+l.shape).each(function(a,b){var c=e.select(this);c.classed(l.SELECTED)&&i(!1,c.classed(l.SELECTED,!1),a,b)}),g.classed(l.SELECTED,!h),i(!h,g,b,c))},i.initBrush=function(){var a=this,b=a.d3;a.brush=b.svg.brush().on("brush",function(){a.redrawForBrush()}),a.brush.update=function(){return a.context&&a.context.select("."+l.brush).call(this),this},a.brush.scale=function(b){return a.config.axis_rotated?this.y(b):this.x(b)}},i.initSubchart=function(){var a=this,b=a.config,c=a.context=a.svg.append("g").attr("transform",a.getTranslate("context")),d=b.subchart_show?"visible":"hidden";c.style("visibility",d),c.append("g").attr("clip-path",a.clipPathForSubchart).attr("class",l.chart),c.select("."+l.chart).append("g").attr("class",l.chartBars),c.select("."+l.chart).append("g").attr("class",l.chartLines),c.append("g").attr("clip-path",a.clipPath).attr("class",l.brush).call(a.brush),a.axes.subx=c.append("g").attr("class",l.axisX).attr("transform",a.getTranslate("subx")).attr("clip-path",b.axis_rotated?"":a.clipPathForXAxis).style("visibility",b.subchart_axis_x_show?d:"hidden")},i.updateTargetsForSubchart=function(a){var b,c,d,e,f=this,g=f.context,h=f.config,i=f.classChartBar.bind(f),j=f.classBars.bind(f),k=f.classChartLine.bind(f),m=f.classLines.bind(f),n=f.classAreas.bind(f);h.subchart_show&&(e=g.select("."+l.chartBars).selectAll("."+l.chartBar).data(a).attr("class",i),d=e.enter().append("g").style("opacity",0).attr("class",i),d.append("g").attr("class",j),c=g.select("."+l.chartLines).selectAll("."+l.chartLine).data(a).attr("class",k),b=c.enter().append("g").style("opacity",0).attr("class",k),b.append("g").attr("class",m),b.append("g").attr("class",n),g.selectAll("."+l.brush+" rect").attr(h.axis_rotated?"width":"height",h.axis_rotated?f.width2:f.height2))},i.updateBarForSubchart=function(a){var b=this;b.contextBar=b.context.selectAll("."+l.bars).selectAll("."+l.bar).data(b.barData.bind(b)),b.contextBar.enter().append("path").attr("class",b.classBar.bind(b)).style("stroke","none").style("fill",b.color),b.contextBar.style("opacity",b.initialOpacity.bind(b)),b.contextBar.exit().transition().duration(a).style("opacity",0).remove()},i.redrawBarForSubchart=function(a,b,c){(b?this.contextBar.transition(Math.random().toString()).duration(c):this.contextBar).attr("d",a).style("opacity",1)},i.updateLineForSubchart=function(a){var b=this;b.contextLine=b.context.selectAll("."+l.lines).selectAll("."+l.line).data(b.lineData.bind(b)),b.contextLine.enter().append("path").attr("class",b.classLine.bind(b)).style("stroke",b.color),b.contextLine.style("opacity",b.initialOpacity.bind(b)),b.contextLine.exit().transition().duration(a).style("opacity",0).remove()},i.redrawLineForSubchart=function(a,b,c){(b?this.contextLine.transition(Math.random().toString()).duration(c):this.contextLine).attr("d",a).style("opacity",1)},i.updateAreaForSubchart=function(a){var b=this,c=b.d3;b.contextArea=b.context.selectAll("."+l.areas).selectAll("."+l.area).data(b.lineData.bind(b)),b.contextArea.enter().append("path").attr("class",b.classArea.bind(b)).style("fill",b.color).style("opacity",function(){return b.orgAreaOpacity=+c.select(this).style("opacity"),0}),b.contextArea.style("opacity",0),b.contextArea.exit().transition().duration(a).style("opacity",0).remove()},i.redrawAreaForSubchart=function(a,b,c){(b?this.contextArea.transition(Math.random().toString()).duration(c):this.contextArea).attr("d",a).style("fill",this.color).style("opacity",this.orgAreaOpacity)},i.redrawSubchart=function(a,b,c,d,e,f,g){var h,i,j,k=this,l=k.d3,m=k.config;k.context.style("visibility",m.subchart_show?"visible":"hidden"),m.subchart_show&&(l.event&&"zoom"===l.event.type&&k.brush.extent(k.x.orgDomain()).update(),a&&(k.brush.empty()||k.brush.extent(k.x.orgDomain()).update(),h=k.generateDrawArea(e,!0),i=k.generateDrawBar(f,!0),j=k.generateDrawLine(g,!0),k.updateBarForSubchart(c),k.updateLineForSubchart(c),k.updateAreaForSubchart(c),k.redrawBarForSubchart(i,c,c),k.redrawLineForSubchart(j,c,c),k.redrawAreaForSubchart(h,c,c)))},i.redrawForBrush=function(){var a=this,b=a.x;a.redraw({withTransition:!1,withY:a.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),a.config.subchart_onbrush.call(a.api,b.orgDomain())},i.transformContext=function(a,b){var c,d=this;b&&b.axisSubX?c=b.axisSubX:(c=d.context.select("."+l.axisX),a&&(c=c.transition())),d.context.attr("transform",d.getTranslate("context")),c.attr("transform",d.getTranslate("subx"))},i.getDefaultExtent=function(){var a=this,b=a.config,c=n(b.axis_x_extent)?b.axis_x_extent(a.getXDomain(a.data.targets)):b.axis_x_extent;return a.isTimeSeries()&&(c=[a.parseDate(c[0]),a.parseDate(c[1])]),c},i.initZoom=function(){var a,b=this,c=b.d3,d=b.config;b.zoom=c.behavior.zoom().on("zoomstart",function(){a=c.event.sourceEvent,b.zoom.altDomain=c.event.sourceEvent.altKey?b.x.orgDomain():null,d.zoom_onzoomstart.call(b.api,c.event.sourceEvent)}).on("zoom",function(){b.redrawForZoom.call(b)}).on("zoomend",function(){var e=c.event.sourceEvent;e&&a.clientX===e.clientX&&a.clientY===e.clientY||(b.redrawEventRect(),b.updateZoom(),d.zoom_onzoomend.call(b.api,b.x.orgDomain()))}),b.zoom.scale=function(a){return d.axis_rotated?this.y(a):this.x(a)},b.zoom.orgScaleExtent=function(){var a=d.zoom_extent?d.zoom_extent:[1,10];return[a[0],Math.max(b.getMaxDataCount()/a[1],a[1])]},b.zoom.updateScaleExtent=function(){var a=t(b.x.orgDomain())/t(b.getZoomDomain()),c=this.orgScaleExtent();return this.scaleExtent([c[0]*a,c[1]*a]),this}},i.getZoomDomain=function(){var a=this,b=a.config,c=a.d3,d=c.min([a.orgXDomain[0],b.zoom_x_min]),e=c.max([a.orgXDomain[1],b.zoom_x_max]);return[d,e]},i.updateZoom=function(){var a=this,b=a.config.zoom_enabled?a.zoom:function(){};a.main.select("."+l.zoomRect).call(b).on("dblclick.zoom",null),a.main.selectAll("."+l.eventRect).call(b).on("dblclick.zoom",null)},i.redrawForZoom=function(){var a=this,b=a.d3,c=a.config,d=a.zoom,e=a.x;if(c.zoom_enabled&&0!==a.filterTargetsToShow(a.data.targets).length){if("mousemove"===b.event.sourceEvent.type&&d.altDomain)return e.domain(d.altDomain),void d.scale(e).updateScaleExtent();a.isCategorized()&&e.orgDomain()[0]===a.orgXDomain[0]&&e.domain([a.orgXDomain[0]-1e-10,e.orgDomain()[1]]),a.redraw({withTransition:!1,withY:c.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===b.event.sourceEvent.type&&(a.cancelClick=!0),c.zoom_onzoom.call(a.api,e.orgDomain())}},i.generateColor=function(){var a=this,b=a.config,c=a.d3,d=b.data_colors,e=v(b.color_pattern)?b.color_pattern:c.scale.category10().range(),f=b.data_color,g=[];return function(a){var b,c=a.id||a.data&&a.data.id||a;return d[c]instanceof Function?b=d[c](a):d[c]?b=d[c]:(g.indexOf(c)<0&&g.push(c),b=e[g.indexOf(c)%e.length],d[c]=b),f instanceof Function?f(b,a):b}},i.generateLevelColor=function(){var a=this,b=a.config,c=b.color_pattern,d=b.color_threshold,e="value"===d.unit,f=d.values&&d.values.length?d.values:[],g=d.max||100;return v(b.color_threshold)?function(a){var b,d,h=c[c.length-1];for(b=0;b<f.length;b++)if(d=e?a:100*a/g,d<f[b]){h=c[b];break}return h}:null},i.getYFormat=function(a){var b=this,c=a&&!b.hasType("gauge")?b.defaultArcValueFormat:b.yFormat,d=a&&!b.hasType("gauge")?b.defaultArcValueFormat:b.y2Format;return function(a,e,f){var g="y2"===b.axis.getId(f)?d:c;return g.call(b,a,e)}},i.yFormat=function(a){var b=this,c=b.config,d=c.axis_y_tick_format?c.axis_y_tick_format:b.defaultValueFormat;return d(a)},i.y2Format=function(a){var b=this,c=b.config,d=c.axis_y2_tick_format?c.axis_y2_tick_format:b.defaultValueFormat;return d(a)},i.defaultValueFormat=function(a){return m(a)?+a:""},i.defaultArcValueFormat=function(a,b){return(100*b).toFixed(1)+"%"},i.dataLabelFormat=function(a){var b,c=this,d=c.config.data_labels,e=function(a){return m(a)?+a:""};return b="function"==typeof d.format?d.format:"object"==typeof d.format?d.format[a]?d.format[a]===!0?e:d.format[a]:function(){return""}:e},i.hasCaches=function(a){for(var b=0;b<a.length;b++)if(!(a[b]in this.cache))return!1;return!0},i.addCache=function(a,b){this.cache[a]=this.cloneTarget(b)},i.getCaches=function(a){var b,c=[];for(b=0;b<a.length;b++)a[b]in this.cache&&c.push(this.cloneTarget(this.cache[a[b]]));return c};var l=i.CLASS={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};i.generateClass=function(a,b){return" "+a+" "+a+this.getTargetSelectorSuffix(b)},i.classText=function(a){return this.generateClass(l.text,a.index)},i.classTexts=function(a){return this.generateClass(l.texts,a.id)},i.classShape=function(a){return this.generateClass(l.shape,a.index)},i.classShapes=function(a){return this.generateClass(l.shapes,a.id)},i.classLine=function(a){return this.classShape(a)+this.generateClass(l.line,a.id)},i.classLines=function(a){return this.classShapes(a)+this.generateClass(l.lines,a.id)},i.classCircle=function(a){return this.classShape(a)+this.generateClass(l.circle,a.index)},i.classCircles=function(a){return this.classShapes(a)+this.generateClass(l.circles,a.id)},i.classBar=function(a){return this.classShape(a)+this.generateClass(l.bar,a.index)},i.classBars=function(a){return this.classShapes(a)+this.generateClass(l.bars,a.id)},i.classArc=function(a){return this.classShape(a.data)+this.generateClass(l.arc,a.data.id)},i.classArcs=function(a){return this.classShapes(a.data)+this.generateClass(l.arcs,a.data.id)},i.classArea=function(a){return this.classShape(a)+this.generateClass(l.area,a.id)},i.classAreas=function(a){return this.classShapes(a)+this.generateClass(l.areas,a.id)},i.classRegion=function(a,b){return this.generateClass(l.region,b)+" "+("class"in a?a["class"]:"")},i.classEvent=function(a){return this.generateClass(l.eventRect,a.index)},i.classTarget=function(a){var b=this,c=b.config.data_classes[a],d="";return c&&(d=" "+l.target+"-"+c),b.generateClass(l.target,a)+d},i.classFocus=function(a){return this.classFocused(a)+this.classDefocused(a)},i.classFocused=function(a){return" "+(this.focusedTargetIds.indexOf(a.id)>=0?l.focused:"")},i.classDefocused=function(a){return" "+(this.defocusedTargetIds.indexOf(a.id)>=0?l.defocused:"")},i.classChartText=function(a){return l.chartText+this.classTarget(a.id)},i.classChartLine=function(a){return l.chartLine+this.classTarget(a.id)},i.classChartBar=function(a){return l.chartBar+this.classTarget(a.id)},i.classChartArc=function(a){return l.chartArc+this.classTarget(a.data.id)},i.getTargetSelectorSuffix=function(a){return a||0===a?("-"+a).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},i.selectorTarget=function(a,b){return(b||"")+"."+l.target+this.getTargetSelectorSuffix(a)},i.selectorTargets=function(a,b){var c=this;return a=a||[],a.length?a.map(function(a){return c.selectorTarget(a,b)}):null},i.selectorLegend=function(a){return"."+l.legendItem+this.getTargetSelectorSuffix(a)},i.selectorLegends=function(a){var b=this;return a&&a.length?a.map(function(a){return b.selectorLegend(a)}):null};var m=i.isValue=function(a){return a||0===a},n=i.isFunction=function(a){return"function"==typeof a},o=i.isString=function(a){return"string"==typeof a},p=i.isUndefined=function(a){return"undefined"==typeof a},q=i.isDefined=function(a){return"undefined"!=typeof a},r=i.ceil10=function(a){return 10*Math.ceil(a/10)},s=i.asHalfPixel=function(a){return Math.ceil(a)+.5},t=i.diffDomain=function(a){return a[1]-a[0]},u=i.isEmpty=function(a){return"undefined"==typeof a||null===a||o(a)&&0===a.length||"object"==typeof a&&0===Object.keys(a).length},v=i.notEmpty=function(a){return!i.isEmpty(a)},w=i.getOption=function(a,b,c){return q(a[b])?a[b]:c},x=i.hasValue=function(a,b){var c=!1;return Object.keys(a).forEach(function(d){a[d]===b&&(c=!0)}),c},y=i.sanitise=function(a){return"string"==typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;"):a},z=i.getPathBox=function(a){var b=a.getBoundingClientRect(),c=[a.pathSegList.getItem(0),a.pathSegList.getItem(1)],d=c[0].x,e=Math.min(c[0].y,c[1].y);return{x:d,y:e,width:b.width,height:b.height}};h.focus=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a.filter(c.isTargetToShow,c))),this.revert(),this.defocus(),b.classed(l.focused,!0).classed(l.defocused,!1),
2355 e=this.getYAxis(d,h.y2Orient,i.axis_y2_tick_format,h.y2AxisTickValues,!1,!0,!0)):(d=h.x.copy().domain(h.getXDomain(c)),e=this.getXAxis(d,h.xOrient,h.xAxisTickFormat,h.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(c,e)),f=h.d3.select("body").append("div").classed("c3",!0),g=f.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),g.append("g").call(e).each(function(){h.d3.select(this).selectAll("text").each(function(){var a=this.getBoundingClientRect();j<a.width&&(j=a.width)}),f.remove()})),h.currentMaxTickWidths[a]=0>=j?h.currentMaxTickWidths[a]:j,h.currentMaxTickWidths[a])},f.prototype.updateLabels=function(a){var b=this.owner,c=b.main.select("."+l.axisX+" ."+l.axisXLabel),d=b.main.select("."+l.axisY+" ."+l.axisYLabel),e=b.main.select("."+l.axisY2+" ."+l.axisY2Label);(a?c.transition():c).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(a?d.transition():d).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(a?e.transition():e).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},f.prototype.getPadding=function(a,b,c,d){var e="number"==typeof a?a:a[b];return m(e)?"ratio"===a.unit?a[b]*d:this.convertPixelsToAxisPadding(e,d):c},f.prototype.convertPixelsToAxisPadding=function(a,b){var c=this.owner,d=c.config.axis_rotated?c.width:c.height;return b*(a/d)},f.prototype.generateTickValues=function(a,b,c){var d,e,f,g,h,i,j,k=a;if(b)if(d=n(b)?b():b,1===d)k=[a[0]];else if(2===d)k=[a[0],a[a.length-1]];else if(d>2){for(g=d-2,e=a[0],f=a[a.length-1],h=(f-e)/(g+1),k=[e],i=0;g>i;i++)j=+e+h*(i+1),k.push(c?new Date(j):j);k.push(f)}return c||(k=k.sort(function(a,b){return a-b})),k},f.prototype.generateTransitions=function(a){var b=this.owner,c=b.axes;return{axisX:a?c.x.transition().duration(a):c.x,axisY:a?c.y.transition().duration(a):c.y,axisY2:a?c.y2.transition().duration(a):c.y2,axisSubX:a?c.subx.transition().duration(a):c.subx}},f.prototype.redraw=function(a,b){var c=this.owner;c.axes.x.style("opacity",b?0:1),c.axes.y.style("opacity",b?0:1),c.axes.y2.style("opacity",b?0:1),c.axes.subx.style("opacity",b?0:1),a.axisX.call(c.xAxis),a.axisY.call(c.yAxis),a.axisY2.call(c.y2Axis),a.axisSubX.call(c.subXAxis)},i.getClipPath=function(b){var c=a.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url("+(c?"":document.URL.split("#")[0])+"#"+b+")"},i.appendClip=function(a,b){return a.append("clipPath").attr("id",b).append("rect")},i.getAxisClipX=function(a){var b=Math.max(30,this.margin.left);return a?-(1+b):-(b-1)},i.getAxisClipY=function(a){return a?-20:-this.margin.top},i.getXAxisClipX=function(){var a=this;return a.getAxisClipX(!a.config.axis_rotated)},i.getXAxisClipY=function(){var a=this;return a.getAxisClipY(!a.config.axis_rotated)},i.getYAxisClipX=function(){var a=this;return a.config.axis_y_inner?-1:a.getAxisClipX(a.config.axis_rotated)},i.getYAxisClipY=function(){var a=this;return a.getAxisClipY(a.config.axis_rotated)},i.getAxisClipWidth=function(a){var b=this,c=Math.max(30,b.margin.left),d=Math.max(30,b.margin.right);return a?b.width+2+c+d:b.margin.left+20},i.getAxisClipHeight=function(a){return(a?this.margin.bottom:this.margin.top+this.height)+20},i.getXAxisClipWidth=function(){var a=this;return a.getAxisClipWidth(!a.config.axis_rotated)},i.getXAxisClipHeight=function(){var a=this;return a.getAxisClipHeight(!a.config.axis_rotated)},i.getYAxisClipWidth=function(){var a=this;return a.getAxisClipWidth(a.config.axis_rotated)+(a.config.axis_y_inner?20:0)},i.getYAxisClipHeight=function(){var a=this;return a.getAxisClipHeight(a.config.axis_rotated)},i.initPie=function(){var a=this,b=a.d3,c=a.config;a.pie=b.layout.pie().value(function(a){return a.values.reduce(function(a,b){return a+b.value},0)}),c.data_order||a.pie.sort(null)},i.updateRadius=function(){var a=this,b=a.config,c=b.gauge_width||b.donut_width;a.radiusExpanded=Math.min(a.arcWidth,a.arcHeight)/2,a.radius=.95*a.radiusExpanded,a.innerRadiusRatio=c?(a.radius-c)/a.radius:.6,a.innerRadius=a.hasType("donut")||a.hasType("gauge")?a.radius*a.innerRadiusRatio:0},i.updateArc=function(){var a=this;a.svgArc=a.getSvgArc(),a.svgArcExpanded=a.getSvgArcExpanded(),a.svgArcExpandedSub=a.getSvgArcExpanded(.98)},i.updateAngle=function(a){var b,c,d,e,f=this,g=f.config,h=!1,i=0;return g?(f.pie(f.filterTargetsToShow(f.data.targets)).forEach(function(b){h||b.data.id!==a.data.id||(h=!0,a=b,a.index=i),i++}),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),f.isGaugeType(a.data)&&(b=g.gauge_min,c=g.gauge_max,d=Math.PI*(g.gauge_fullCircle?2:1)/(c-b),e=a.value<b?0:a.value<c?a.value-b:c-b,a.startAngle=g.gauge_startingAngle,a.endAngle=a.startAngle+d*e),h?a:null):null},i.getSvgArc=function(){var a=this,b=a.d3.svg.arc().outerRadius(a.radius).innerRadius(a.innerRadius),c=function(c,d){var e;return d?b(c):(e=a.updateAngle(c),e?b(e):"M 0 0")};return c.centroid=b.centroid,c},i.getSvgArcExpanded=function(a){var b=this,c=b.d3.svg.arc().outerRadius(b.radiusExpanded*(a?a:1)).innerRadius(b.innerRadius);return function(a){var d=b.updateAngle(a);return d?c(d):"M 0 0"}},i.getArc=function(a,b,c){return c||this.isArcType(a.data)?this.svgArc(a,b):"M 0 0"},i.transformForArcLabel=function(a){var b,c,d,e,f,g=this,h=g.config,i=g.updateAngle(a),j="";return i&&!g.hasType("gauge")&&(b=this.svgArc.centroid(i),c=isNaN(b[0])?0:b[0],d=isNaN(b[1])?0:b[1],e=Math.sqrt(c*c+d*d),f=g.hasType("donut")&&h.donut_label_ratio?n(h.donut_label_ratio)?h.donut_label_ratio(a,g.radius,e):h.donut_label_ratio:g.hasType("pie")&&h.pie_label_ratio?n(h.pie_label_ratio)?h.pie_label_ratio(a,g.radius,e):h.pie_label_ratio:g.radius&&e?(36/g.radius>.375?1.175-36/g.radius:.8)*g.radius/e:0,j="translate("+c*f+","+d*f+")"),j},i.getArcRatio=function(a){var b=this,c=b.config,d=Math.PI*(b.hasType("gauge")&&!c.gauge_fullCircle?1:2);return a?(a.endAngle-a.startAngle)/d:null},i.convertToArcData=function(a){return this.addName({id:a.data.id,value:a.value,ratio:this.getArcRatio(a),index:a.index})},i.textForArcLabel=function(a){var b,c,d,e,f,g=this;return g.shouldShowArcLabel()?(b=g.updateAngle(a),c=b?b.value:null,d=g.getArcRatio(b),e=a.data.id,g.hasType("gauge")||g.meetsArcLabelThreshold(d)?(f=g.getArcLabelFormat(),f?f(c,d,e):g.defaultArcValueFormat(c,d)):""):""},i.expandArc=function(b){var c,d=this;return d.transiting?void(c=a.setInterval(function(){d.transiting||(a.clearInterval(c),d.legend.selectAll(".c3-legend-item-focused").size()>0&&d.expandArc(b))},10)):(b=d.mapToTargetIds(b),void d.svg.selectAll(d.selectorTargets(b,"."+l.chartArc)).each(function(a){d.shouldExpand(a.data.id)&&d.d3.select(this).selectAll("path").transition().duration(d.expandDuration(a.data.id)).attr("d",d.svgArcExpanded).transition().duration(2*d.expandDuration(a.data.id)).attr("d",d.svgArcExpandedSub).each(function(a){d.isDonutType(a.data)})}))},i.unexpandArc=function(a){var b=this;b.transiting||(a=b.mapToTargetIds(a),b.svg.selectAll(b.selectorTargets(a,"."+l.chartArc)).selectAll("path").transition().duration(function(a){return b.expandDuration(a.data.id)}).attr("d",b.svgArc),b.svg.selectAll("."+l.arc).style("opacity",1))},i.expandDuration=function(a){var b=this,c=b.config;return b.isDonutType(a)?c.donut_expand_duration:b.isGaugeType(a)?c.gauge_expand_duration:b.isPieType(a)?c.pie_expand_duration:50},i.shouldExpand=function(a){var b=this,c=b.config;return b.isDonutType(a)&&c.donut_expand||b.isGaugeType(a)&&c.gauge_expand||b.isPieType(a)&&c.pie_expand},i.shouldShowArcLabel=function(){var a=this,b=a.config,c=!0;return a.hasType("donut")?c=b.donut_label_show:a.hasType("pie")&&(c=b.pie_label_show),c},i.meetsArcLabelThreshold=function(a){var b=this,c=b.config,d=b.hasType("donut")?c.donut_label_threshold:c.pie_label_threshold;return a>=d},i.getArcLabelFormat=function(){var a=this,b=a.config,c=b.pie_label_format;return a.hasType("gauge")?c=b.gauge_label_format:a.hasType("donut")&&(c=b.donut_label_format),c},i.getArcTitle=function(){var a=this;return a.hasType("donut")?a.config.donut_title:""},i.updateTargetsForArc=function(a){var b,c,d=this,e=d.main,f=d.classChartArc.bind(d),g=d.classArcs.bind(d),h=d.classFocus.bind(d);b=e.select("."+l.chartArcs).selectAll("."+l.chartArc).data(d.pie(a)).attr("class",function(a){return f(a)+h(a.data)}),c=b.enter().append("g").attr("class",f),c.append("g").attr("class",g),c.append("text").attr("dy",d.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},i.initArc=function(){var a=this;a.arcs=a.main.select("."+l.chart).append("g").attr("class",l.chartArcs).attr("transform",a.getTranslate("arc")),a.arcs.append("text").attr("class",l.chartArcsTitle).style("text-anchor","middle").text(a.getArcTitle())},i.redrawArc=function(a,b,c){var d,e=this,f=e.d3,g=e.config,h=e.main;d=h.selectAll("."+l.arcs).selectAll("."+l.arc).data(e.arcData.bind(e)),d.enter().append("path").attr("class",e.classArc.bind(e)).style("fill",function(a){return e.color(a.data)}).style("cursor",function(a){return g.interaction_enabled&&g.data_selection_isselectable(a)?"pointer":null}).style("opacity",0).each(function(a){e.isGaugeType(a.data)&&(a.startAngle=a.endAngle=g.gauge_startingAngle),this._current=a}),d.attr("transform",function(a){return!e.isGaugeType(a.data)&&c?"scale(0)":""}).style("opacity",function(a){return a===this._current?0:1}).on("mouseover",g.interaction_enabled?function(a){var b,c;e.transiting||(b=e.updateAngle(a),b&&(c=e.convertToArcData(b),e.expandArc(b.data.id),e.api.focus(b.data.id),e.toggleFocusLegend(b.data.id,!0),e.config.data_onmouseover(c,this)))}:null).on("mousemove",g.interaction_enabled?function(a){var b,c,d=e.updateAngle(a);d&&(b=e.convertToArcData(d),c=[b],e.showTooltip(c,this))}:null).on("mouseout",g.interaction_enabled?function(a){var b,c;e.transiting||(b=e.updateAngle(a),b&&(c=e.convertToArcData(b),e.unexpandArc(b.data.id),e.api.revert(),e.revertLegend(),e.hideTooltip(),e.config.data_onmouseout(c,this)))}:null).on("click",g.interaction_enabled?function(a,b){var c,d=e.updateAngle(a);d&&(c=e.convertToArcData(d),e.toggleShape&&e.toggleShape(this,c,b),e.config.data_onclick.call(e.api,c,this))}:null).each(function(){e.transiting=!0}).transition().duration(a).attrTween("d",function(a){var b,c=e.updateAngle(a);return c?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),b=f.interpolate(this._current,c),this._current=b(0),function(c){var d=b(c);return d.data=a.data,e.getArc(d,!0)}):function(){return"M 0 0"}}).attr("transform",c?"scale(1)":"").style("fill",function(a){return e.levelColor?e.levelColor(a.data.values[0].value):e.color(a.data.id)}).style("opacity",1).call(e.endall,function(){e.transiting=!1}),d.exit().transition().duration(b).style("opacity",0).remove(),h.selectAll("."+l.chartArc).select("text").style("opacity",0).attr("class",function(a){return e.isGaugeType(a.data)?l.gaugeValue:""}).text(e.textForArcLabel.bind(e)).attr("transform",e.transformForArcLabel.bind(e)).style("font-size",function(a){return e.isGaugeType(a.data)?Math.round(e.radius/5)+"px":""}).transition().duration(a).style("opacity",function(a){return e.isTargetToShow(a.data.id)&&e.isArcType(a.data)?1:0}),h.select("."+l.chartArcsTitle).style("opacity",e.hasType("donut")||e.hasType("gauge")?1:0),e.hasType("gauge")&&(e.arcs.select("."+l.chartArcsBackground).attr("d",function(){var a={data:[{value:g.gauge_max}],startAngle:g.gauge_startingAngle,endAngle:-1*g.gauge_startingAngle};return e.getArc(a,!0,!0)}),e.arcs.select("."+l.chartArcsGaugeUnit).attr("dy",".75em").text(g.gauge_label_show?g.gauge_units:""),e.arcs.select("."+l.chartArcsGaugeMin).attr("dx",-1*(e.innerRadius+(e.radius-e.innerRadius)/(g.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(g.gauge_label_show?g.gauge_min:""),e.arcs.select("."+l.chartArcsGaugeMax).attr("dx",e.innerRadius+(e.radius-e.innerRadius)/(g.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(g.gauge_label_show?g.gauge_max:""))},i.initGauge=function(){var a=this.arcs;this.hasType("gauge")&&(a.append("path").attr("class",l.chartArcsBackground),a.append("text").attr("class",l.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),a.append("text").attr("class",l.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),a.append("text").attr("class",l.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},i.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},i.initRegion=function(){var a=this;a.region=a.main.append("g").attr("clip-path",a.clipPath).attr("class",l.regions)},i.updateRegion=function(a){var b=this,c=b.config;b.region.style("visibility",b.hasArcType()?"hidden":"visible"),b.mainRegion=b.main.select("."+l.regions).selectAll("."+l.region).data(c.regions),b.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),b.mainRegion.attr("class",b.classRegion.bind(b)),b.mainRegion.exit().transition().duration(a).style("opacity",0).remove()},i.redrawRegion=function(a){var b=this,c=b.mainRegion.selectAll("rect").each(function(){var a=b.d3.select(this.parentNode).datum();b.d3.select(this).datum(a)}),d=b.regionX.bind(b),e=b.regionY.bind(b),f=b.regionWidth.bind(b),g=b.regionHeight.bind(b);return[(a?c.transition():c).attr("x",d).attr("y",e).attr("width",f).attr("height",g).style("fill-opacity",function(a){return m(a.opacity)?a.opacity:.1})]},i.regionX=function(a){var b,c=this,d=c.config,e="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated&&"start"in a?e(a.start):0:d.axis_rotated?0:"start"in a?c.x(c.isTimeSeries()?c.parseDate(a.start):a.start):0},i.regionY=function(a){var b,c=this,d=c.config,e="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated?0:"end"in a?e(a.end):0:d.axis_rotated&&"start"in a?c.x(c.isTimeSeries()?c.parseDate(a.start):a.start):0},i.regionWidth=function(a){var b,c=this,d=c.config,e=c.regionX(a),f="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated&&"end"in a?f(a.end):c.width:d.axis_rotated?c.width:"end"in a?c.x(c.isTimeSeries()?c.parseDate(a.end):a.end):c.width,e>b?0:b-e},i.regionHeight=function(a){var b,c=this,d=c.config,e=this.regionY(a),f="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated?c.height:"start"in a?f(a.start):c.height:d.axis_rotated&&"end"in a?c.x(c.isTimeSeries()?c.parseDate(a.end):a.end):c.height,e>b?0:b-e},i.isRegionOnX=function(a){return!a.axis||"x"===a.axis},i.drag=function(a){var b,c,d,e,f,g,h,i,j=this,k=j.config,m=j.main,n=j.d3;j.hasArcType()||k.data_selection_enabled&&(k.zoom_enabled&&!j.zoom.altDomain||k.data_selection_multiple&&(b=j.dragStart[0],c=j.dragStart[1],d=a[0],e=a[1],f=Math.min(b,d),g=Math.max(b,d),h=k.data_selection_grouped?j.margin.top:Math.min(c,e),i=k.data_selection_grouped?j.height:Math.max(c,e),m.select("."+l.dragarea).attr("x",f).attr("y",h).attr("width",g-f).attr("height",i-h),m.selectAll("."+l.shapes).selectAll("."+l.shape).filter(function(a){return k.data_selection_isselectable(a)}).each(function(a,b){var c,d,e,k,m,o,p=n.select(this),q=p.classed(l.SELECTED),r=p.classed(l.INCLUDED),s=!1;if(p.classed(l.circle))c=1*p.attr("cx"),d=1*p.attr("cy"),m=j.togglePoint,s=c>f&&g>c&&d>h&&i>d;else{if(!p.classed(l.bar))return;o=z(this),c=o.x,d=o.y,e=o.width,k=o.height,m=j.togglePath,s=!(c>g||f>c+e||d>i||h>d+k)}s^r&&(p.classed(l.INCLUDED,!r),p.classed(l.SELECTED,!q),m.call(j,!q,p,a,b))})))},i.dragstart=function(a){var b=this,c=b.config;b.hasArcType()||c.data_selection_enabled&&(b.dragStart=a,b.main.select("."+l.chart).append("rect").attr("class",l.dragarea).style("opacity",.1),b.dragging=!0)},i.dragend=function(){var a=this,b=a.config;a.hasArcType()||b.data_selection_enabled&&(a.main.select("."+l.dragarea).transition().duration(100).style("opacity",0).remove(),a.main.selectAll("."+l.shape).classed(l.INCLUDED,!1),a.dragging=!1)},i.selectPoint=function(a,b,c){var d=this,e=d.config,f=(e.axis_rotated?d.circleY:d.circleX).bind(d),g=(e.axis_rotated?d.circleX:d.circleY).bind(d),h=d.pointSelectR.bind(d);e.data_onselected.call(d.api,b,a.node()),d.main.select("."+l.selectedCircles+d.getTargetSelectorSuffix(b.id)).selectAll("."+l.selectedCircle+"-"+c).data([b]).enter().append("circle").attr("class",function(){return d.generateClass(l.selectedCircle,c)}).attr("cx",f).attr("cy",g).attr("stroke",function(){return d.color(b)}).attr("r",function(a){return 1.4*d.pointSelectR(a)}).transition().duration(100).attr("r",h)},i.unselectPoint=function(a,b,c){var d=this;d.config.data_onunselected.call(d.api,b,a.node()),d.main.select("."+l.selectedCircles+d.getTargetSelectorSuffix(b.id)).selectAll("."+l.selectedCircle+"-"+c).transition().duration(100).attr("r",0).remove()},i.togglePoint=function(a,b,c,d){a?this.selectPoint(b,c,d):this.unselectPoint(b,c,d)},i.selectPath=function(a,b){var c=this;c.config.data_onselected.call(c,b,a.node()),c.config.interaction_brighten&&a.transition().duration(100).style("fill",function(){return c.d3.rgb(c.color(b)).brighter(.75)})},i.unselectPath=function(a,b){var c=this;c.config.data_onunselected.call(c,b,a.node()),c.config.interaction_brighten&&a.transition().duration(100).style("fill",function(){return c.color(b)})},i.togglePath=function(a,b,c,d){a?this.selectPath(b,c,d):this.unselectPath(b,c,d)},i.getToggle=function(a,b){var c,d=this;return"circle"===a.nodeName?c=d.isStepType(b)?function(){}:d.togglePoint:"path"===a.nodeName&&(c=d.togglePath),c},i.toggleShape=function(a,b,c){var d=this,e=d.d3,f=d.config,g=e.select(a),h=g.classed(l.SELECTED),i=d.getToggle(a,b).bind(d);f.data_selection_enabled&&f.data_selection_isselectable(b)&&(f.data_selection_multiple||d.main.selectAll("."+l.shapes+(f.data_selection_grouped?d.getTargetSelectorSuffix(b.id):"")).selectAll("."+l.shape).each(function(a,b){var c=e.select(this);c.classed(l.SELECTED)&&i(!1,c.classed(l.SELECTED,!1),a,b)}),g.classed(l.SELECTED,!h),i(!h,g,b,c))},i.initBrush=function(){var a=this,b=a.d3;a.brush=b.svg.brush().on("brush",function(){a.redrawForBrush()}),a.brush.update=function(){return a.context&&a.context.select("."+l.brush).call(this),this},a.brush.scale=function(b){return a.config.axis_rotated?this.y(b):this.x(b)}},i.initSubchart=function(){var a=this,b=a.config,c=a.context=a.svg.append("g").attr("transform",a.getTranslate("context")),d=b.subchart_show?"visible":"hidden";c.style("visibility",d),c.append("g").attr("clip-path",a.clipPathForSubchart).attr("class",l.chart),c.select("."+l.chart).append("g").attr("class",l.chartBars),c.select("."+l.chart).append("g").attr("class",l.chartLines),c.append("g").attr("clip-path",a.clipPath).attr("class",l.brush).call(a.brush),a.axes.subx=c.append("g").attr("class",l.axisX).attr("transform",a.getTranslate("subx")).attr("clip-path",b.axis_rotated?"":a.clipPathForXAxis).style("visibility",b.subchart_axis_x_show?d:"hidden")},i.updateTargetsForSubchart=function(a){var b,c,d,e,f=this,g=f.context,h=f.config,i=f.classChartBar.bind(f),j=f.classBars.bind(f),k=f.classChartLine.bind(f),m=f.classLines.bind(f),n=f.classAreas.bind(f);h.subchart_show&&(e=g.select("."+l.chartBars).selectAll("."+l.chartBar).data(a).attr("class",i),d=e.enter().append("g").style("opacity",0).attr("class",i),d.append("g").attr("class",j),c=g.select("."+l.chartLines).selectAll("."+l.chartLine).data(a).attr("class",k),b=c.enter().append("g").style("opacity",0).attr("class",k),b.append("g").attr("class",m),b.append("g").attr("class",n),g.selectAll("."+l.brush+" rect").attr(h.axis_rotated?"width":"height",h.axis_rotated?f.width2:f.height2))},i.updateBarForSubchart=function(a){var b=this;b.contextBar=b.context.selectAll("."+l.bars).selectAll("."+l.bar).data(b.barData.bind(b)),b.contextBar.enter().append("path").attr("class",b.classBar.bind(b)).style("stroke","none").style("fill",b.color),b.contextBar.style("opacity",b.initialOpacity.bind(b)),b.contextBar.exit().transition().duration(a).style("opacity",0).remove()},i.redrawBarForSubchart=function(a,b,c){(b?this.contextBar.transition(Math.random().toString()).duration(c):this.contextBar).attr("d",a).style("opacity",1)},i.updateLineForSubchart=function(a){var b=this;b.contextLine=b.context.selectAll("."+l.lines).selectAll("."+l.line).data(b.lineData.bind(b)),b.contextLine.enter().append("path").attr("class",b.classLine.bind(b)).style("stroke",b.color),b.contextLine.style("opacity",b.initialOpacity.bind(b)),b.contextLine.exit().transition().duration(a).style("opacity",0).remove()},i.redrawLineForSubchart=function(a,b,c){(b?this.contextLine.transition(Math.random().toString()).duration(c):this.contextLine).attr("d",a).style("opacity",1)},i.updateAreaForSubchart=function(a){var b=this,c=b.d3;b.contextArea=b.context.selectAll("."+l.areas).selectAll("."+l.area).data(b.lineData.bind(b)),b.contextArea.enter().append("path").attr("class",b.classArea.bind(b)).style("fill",b.color).style("opacity",function(){return b.orgAreaOpacity=+c.select(this).style("opacity"),0}),b.contextArea.style("opacity",0),b.contextArea.exit().transition().duration(a).style("opacity",0).remove()},i.redrawAreaForSubchart=function(a,b,c){(b?this.contextArea.transition(Math.random().toString()).duration(c):this.contextArea).attr("d",a).style("fill",this.color).style("opacity",this.orgAreaOpacity)},i.redrawSubchart=function(a,b,c,d,e,f,g){var h,i,j,k=this,l=k.d3,m=k.config;k.context.style("visibility",m.subchart_show?"visible":"hidden"),m.subchart_show&&(l.event&&"zoom"===l.event.type&&k.brush.extent(k.x.orgDomain()).update(),a&&(k.brush.empty()||k.brush.extent(k.x.orgDomain()).update(),h=k.generateDrawArea(e,!0),i=k.generateDrawBar(f,!0),j=k.generateDrawLine(g,!0),k.updateBarForSubchart(c),k.updateLineForSubchart(c),k.updateAreaForSubchart(c),k.redrawBarForSubchart(i,c,c),k.redrawLineForSubchart(j,c,c),k.redrawAreaForSubchart(h,c,c)))},i.redrawForBrush=function(){var a=this,b=a.x;a.redraw({withTransition:!1,withY:a.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),a.config.subchart_onbrush.call(a.api,b.orgDomain())},i.transformContext=function(a,b){var c,d=this;b&&b.axisSubX?c=b.axisSubX:(c=d.context.select("."+l.axisX),a&&(c=c.transition())),d.context.attr("transform",d.getTranslate("context")),c.attr("transform",d.getTranslate("subx"))},i.getDefaultExtent=function(){var a=this,b=a.config,c=n(b.axis_x_extent)?b.axis_x_extent(a.getXDomain(a.data.targets)):b.axis_x_extent;return a.isTimeSeries()&&(c=[a.parseDate(c[0]),a.parseDate(c[1])]),c},i.initZoom=function(){var a,b=this,c=b.d3,d=b.config;b.zoom=c.behavior.zoom().on("zoomstart",function(){a=c.event.sourceEvent,b.zoom.altDomain=c.event.sourceEvent.altKey?b.x.orgDomain():null,d.zoom_onzoomstart.call(b.api,c.event.sourceEvent)}).on("zoom",function(){b.redrawForZoom.call(b)}).on("zoomend",function(){var e=c.event.sourceEvent;e&&a.clientX===e.clientX&&a.clientY===e.clientY||(b.redrawEventRect(),b.updateZoom(),d.zoom_onzoomend.call(b.api,b.x.orgDomain()))}),b.zoom.scale=function(a){return d.axis_rotated?this.y(a):this.x(a)},b.zoom.orgScaleExtent=function(){var a=d.zoom_extent?d.zoom_extent:[1,10];return[a[0],Math.max(b.getMaxDataCount()/a[1],a[1])]},b.zoom.updateScaleExtent=function(){var a=t(b.x.orgDomain())/t(b.getZoomDomain()),c=this.orgScaleExtent();return this.scaleExtent([c[0]*a,c[1]*a]),this}},i.getZoomDomain=function(){var a=this,b=a.config,c=a.d3,d=c.min([a.orgXDomain[0],b.zoom_x_min]),e=c.max([a.orgXDomain[1],b.zoom_x_max]);return[d,e]},i.updateZoom=function(){var a=this,b=a.config.zoom_enabled?a.zoom:function(){};a.main.select("."+l.zoomRect).call(b).on("dblclick.zoom",null),a.main.selectAll("."+l.eventRect).call(b).on("dblclick.zoom",null)},i.redrawForZoom=function(){var a=this,b=a.d3,c=a.config,d=a.zoom,e=a.x;if(c.zoom_enabled&&0!==a.filterTargetsToShow(a.data.targets).length){if("mousemove"===b.event.sourceEvent.type&&d.altDomain)return e.domain(d.altDomain),void d.scale(e).updateScaleExtent();a.isCategorized()&&e.orgDomain()[0]===a.orgXDomain[0]&&e.domain([a.orgXDomain[0]-1e-10,e.orgDomain()[1]]),a.redraw({withTransition:!1,withY:c.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===b.event.sourceEvent.type&&(a.cancelClick=!0),c.zoom_onzoom.call(a.api,e.orgDomain())}},i.generateColor=function(){var a=this,b=a.config,c=a.d3,d=b.data_colors,e=v(b.color_pattern)?b.color_pattern:c.scale.category10().range(),f=b.data_color,g=[];return function(a){var b,c=a.id||a.data&&a.data.id||a;return d[c]instanceof Function?b=d[c](a):d[c]?b=d[c]:(g.indexOf(c)<0&&g.push(c),b=e[g.indexOf(c)%e.length],d[c]=b),f instanceof Function?f(b,a):b}},i.generateLevelColor=function(){var a=this,b=a.config,c=b.color_pattern,d=b.color_threshold,e="value"===d.unit,f=d.values&&d.values.length?d.values:[],g=d.max||100;return v(b.color_threshold)?function(a){var b,d,h=c[c.length-1];for(b=0;b<f.length;b++)if(d=e?a:100*a/g,d<f[b]){h=c[b];break}return h}:null},i.getYFormat=function(a){var b=this,c=a&&!b.hasType("gauge")?b.defaultArcValueFormat:b.yFormat,d=a&&!b.hasType("gauge")?b.defaultArcValueFormat:b.y2Format;return function(a,e,f){var g="y2"===b.axis.getId(f)?d:c;return g.call(b,a,e)}},i.yFormat=function(a){var b=this,c=b.config,d=c.axis_y_tick_format?c.axis_y_tick_format:b.defaultValueFormat;return d(a)},i.y2Format=function(a){var b=this,c=b.config,d=c.axis_y2_tick_format?c.axis_y2_tick_format:b.defaultValueFormat;return d(a)},i.defaultValueFormat=function(a){return m(a)?+a:""},i.defaultArcValueFormat=function(a,b){return(100*b).toFixed(1)+"%"},i.dataLabelFormat=function(a){var b,c=this,d=c.config.data_labels,e=function(a){return m(a)?+a:""};return b="function"==typeof d.format?d.format:"object"==typeof d.format?d.format[a]?d.format[a]===!0?e:d.format[a]:function(){return""}:e},i.hasCaches=function(a){for(var b=0;b<a.length;b++)if(!(a[b]in this.cache))return!1;return!0},i.addCache=function(a,b){this.cache[a]=this.cloneTarget(b)},i.getCaches=function(a){var b,c=[];for(b=0;b<a.length;b++)a[b]in this.cache&&c.push(this.cloneTarget(this.cache[a[b]]));return c};var l=i.CLASS={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};i.generateClass=function(a,b){return" "+a+" "+a+this.getTargetSelectorSuffix(b)},i.classText=function(a){return this.generateClass(l.text,a.index)},i.classTexts=function(a){return this.generateClass(l.texts,a.id)},i.classShape=function(a){return this.generateClass(l.shape,a.index)},i.classShapes=function(a){return this.generateClass(l.shapes,a.id)},i.classLine=function(a){return this.classShape(a)+this.generateClass(l.line,a.id)},i.classLines=function(a){return this.classShapes(a)+this.generateClass(l.lines,a.id)},i.classCircle=function(a){return this.classShape(a)+this.generateClass(l.circle,a.index)},i.classCircles=function(a){return this.classShapes(a)+this.generateClass(l.circles,a.id)},i.classBar=function(a){return this.classShape(a)+this.generateClass(l.bar,a.index)},i.classBars=function(a){return this.classShapes(a)+this.generateClass(l.bars,a.id)},i.classArc=function(a){return this.classShape(a.data)+this.generateClass(l.arc,a.data.id)},i.classArcs=function(a){return this.classShapes(a.data)+this.generateClass(l.arcs,a.data.id)},i.classArea=function(a){return this.classShape(a)+this.generateClass(l.area,a.id)},i.classAreas=function(a){return this.classShapes(a)+this.generateClass(l.areas,a.id)},i.classRegion=function(a,b){return this.generateClass(l.region,b)+" "+("class"in a?a["class"]:"")},i.classEvent=function(a){return this.generateClass(l.eventRect,a.index)},i.classTarget=function(a){var b=this,c=b.config.data_classes[a],d="";return c&&(d=" "+l.target+"-"+c),b.generateClass(l.target,a)+d},i.classFocus=function(a){return this.classFocused(a)+this.classDefocused(a)},i.classFocused=function(a){return" "+(this.focusedTargetIds.indexOf(a.id)>=0?l.focused:"")},i.classDefocused=function(a){return" "+(this.defocusedTargetIds.indexOf(a.id)>=0?l.defocused:"")},i.classChartText=function(a){return l.chartText+this.classTarget(a.id)},i.classChartLine=function(a){return l.chartLine+this.classTarget(a.id)},i.classChartBar=function(a){return l.chartBar+this.classTarget(a.id)},i.classChartArc=function(a){return l.chartArc+this.classTarget(a.data.id)},i.getTargetSelectorSuffix=function(a){return a||0===a?("-"+a).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},i.selectorTarget=function(a,b){return(b||"")+"."+l.target+this.getTargetSelectorSuffix(a)},i.selectorTargets=function(a,b){var c=this;return a=a||[],a.length?a.map(function(a){return c.selectorTarget(a,b)}):null},i.selectorLegend=function(a){return"."+l.legendItem+this.getTargetSelectorSuffix(a)},i.selectorLegends=function(a){var b=this;return a&&a.length?a.map(function(a){return b.selectorLegend(a)}):null};var m=i.isValue=function(a){return a||0===a},n=i.isFunction=function(a){return"function"==typeof a},o=i.isString=function(a){return"string"==typeof a},p=i.isUndefined=function(a){return"undefined"==typeof a},q=i.isDefined=function(a){return"undefined"!=typeof a},r=i.ceil10=function(a){return 10*Math.ceil(a/10)},s=i.asHalfPixel=function(a){return Math.ceil(a)+.5},t=i.diffDomain=function(a){return a[1]-a[0]},u=i.isEmpty=function(a){return"undefined"==typeof a||null===a||o(a)&&0===a.length||"object"==typeof a&&0===Object.keys(a).length},v=i.notEmpty=function(a){return!i.isEmpty(a)},w=i.getOption=function(a,b,c){return q(a[b])?a[b]:c},x=i.hasValue=function(a,b){var c=!1;return Object.keys(a).forEach(function(d){a[d]===b&&(c=!0)}),c},y=i.sanitise=function(a){return"string"==typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;"):a},z=i.getPathBox=function(a){var b=a.getBoundingClientRect(),c=[a.pathSegList.getItem(0),a.pathSegList.getItem(1)],d=c[0].x,e=Math.min(c[0].y,c[1].y);return{x:d,y:e,width:b.width,height:b.height}};h.focus=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a.filter(c.isTargetToShow,c))),this.revert(),this.defocus(),b.classed(l.focused,!0).classed(l.defocused,!1),
2356 c.hasArcType()&&c.expandArc(a),c.toggleFocusLegend(a,!0),c.focusedTargetIds=a,c.defocusedTargetIds=c.defocusedTargetIds.filter(function(b){return a.indexOf(b)<0})},h.defocus=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a.filter(c.isTargetToShow,c))),b.classed(l.focused,!1).classed(l.defocused,!0),c.hasArcType()&&c.unexpandArc(a),c.toggleFocusLegend(a,!1),c.focusedTargetIds=c.focusedTargetIds.filter(function(b){return a.indexOf(b)<0}),c.defocusedTargetIds=a},h.revert=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a)),b.classed(l.focused,!1).classed(l.defocused,!1),c.hasArcType()&&c.unexpandArc(a),c.config.legend_show&&(c.showLegend(a.filter(c.isLegendToShow.bind(c))),c.legend.selectAll(c.selectorLegends(a)).filter(function(){return c.d3.select(this).classed(l.legendItemFocused)}).classed(l.legendItemFocused,!1)),c.focusedTargetIds=[],c.defocusedTargetIds=[]},h.show=function(a,b){var c,d=this.internal;a=d.mapToTargetIds(a),b=b||{},d.removeHiddenTargetIds(a),c=d.svg.selectAll(d.selectorTargets(a)),c.transition().style("opacity",1,"important").call(d.endall,function(){c.style("opacity",null).style("opacity",1)}),b.withLegend&&d.showLegend(a),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.hide=function(a,b){var c,d=this.internal;a=d.mapToTargetIds(a),b=b||{},d.addHiddenTargetIds(a),c=d.svg.selectAll(d.selectorTargets(a)),c.transition().style("opacity",0,"important").call(d.endall,function(){c.style("opacity",null).style("opacity",0)}),b.withLegend&&d.hideLegend(a),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.toggle=function(a,b){var c=this,d=this.internal;d.mapToTargetIds(a).forEach(function(a){d.isTargetToShow(a)?c.hide(a,b):c.show(a,b)})},h.zoom=function(a){var b=this.internal;return a&&(b.isTimeSeries()&&(a=a.map(function(a){return b.parseDate(a)})),b.brush.extent(a),b.redraw({withUpdateXDomain:!0,withY:b.config.zoom_rescale}),b.config.zoom_onzoom.call(this,b.x.orgDomain())),b.brush.extent()},h.zoom.enable=function(a){var b=this.internal;b.config.zoom_enabled=a,b.updateAndRedraw()},h.unzoom=function(){var a=this.internal;a.brush.clear().update(),a.redraw({withUpdateXDomain:!0})},h.zoom.max=function(a){var b=this.internal,c=b.config,d=b.d3;return 0===a||a?void(c.zoom_x_max=d.max([b.orgXDomain[1],a])):c.zoom_x_max},h.zoom.min=function(a){var b=this.internal,c=b.config,d=b.d3;return 0===a||a?void(c.zoom_x_min=d.min([b.orgXDomain[0],a])):c.zoom_x_min},h.zoom.range=function(a){return arguments.length?(q(a.max)&&this.domain.max(a.max),void(q(a.min)&&this.domain.min(a.min))):{max:this.domain.max(),min:this.domain.min()}},h.load=function(a){var b=this.internal,c=b.config;return a.xs&&b.addXs(a.xs),"names"in a&&h.data.names.bind(this)(a.names),"classes"in a&&Object.keys(a.classes).forEach(function(b){c.data_classes[b]=a.classes[b]}),"categories"in a&&b.isCategorized()&&(c.axis_x_categories=a.categories),"axes"in a&&Object.keys(a.axes).forEach(function(b){c.data_axes[b]=a.axes[b]}),"colors"in a&&Object.keys(a.colors).forEach(function(b){c.data_colors[b]=a.colors[b]}),"cacheIds"in a&&b.hasCaches(a.cacheIds)?void b.load(b.getCaches(a.cacheIds),a.done):void("unload"in a?b.unload(b.mapToTargetIds("boolean"==typeof a.unload&&a.unload?null:a.unload),function(){b.loadFromArgs(a)}):b.loadFromArgs(a))},h.unload=function(a){var b=this.internal;a=a||{},a instanceof Array?a={ids:a}:"string"==typeof a&&(a={ids:[a]}),b.unload(b.mapToTargetIds(a.ids),function(){b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.done&&a.done()})},h.flow=function(a){var b,c,d,e,f,g,h,i,j=this.internal,k=[],l=j.getMaxDataCount(),n=0,o=0;if(a.json)c=j.convertJsonToData(a.json,a.keys);else if(a.rows)c=j.convertRowsToData(a.rows);else{if(!a.columns)return;c=j.convertColumnsToData(a.columns)}b=j.convertDataToTargets(c,!0),j.data.targets.forEach(function(a){var c,d,e=!1;for(c=0;c<b.length;c++)if(a.id===b[c].id){for(e=!0,a.values[a.values.length-1]&&(o=a.values[a.values.length-1].index+1),n=b[c].values.length,d=0;n>d;d++)b[c].values[d].index=o+d,j.isTimeSeries()||(b[c].values[d].x=o+d);a.values=a.values.concat(b[c].values),b.splice(c,1);break}e||k.push(a.id)}),j.data.targets.forEach(function(a){var b,c;for(b=0;b<k.length;b++)if(a.id===k[b])for(o=a.values[a.values.length-1].index+1,c=0;n>c;c++)a.values.push({id:a.id,index:o+c,x:j.isTimeSeries()?j.getOtherTargetX(o+c):o+c,value:null})}),j.data.targets.length&&b.forEach(function(a){var b,c=[];for(b=j.data.targets[0].values[0].index;o>b;b++)c.push({id:a.id,index:b,x:j.isTimeSeries()?j.getOtherTargetX(b):b,value:null});a.values.forEach(function(a){a.index+=o,j.isTimeSeries()||(a.x+=o)}),a.values=c.concat(a.values)}),j.data.targets=j.data.targets.concat(b),d=j.getMaxDataCount(),f=j.data.targets[0],g=f.values[0],q(a.to)?(n=0,i=j.isTimeSeries()?j.parseDate(a.to):a.to,f.values.forEach(function(a){a.x<i&&n++})):q(a.length)&&(n=a.length),l?1===l&&j.isTimeSeries()&&(h=(f.values[f.values.length-1].x-g.x)/2,e=[new Date(+g.x-h),new Date(+g.x+h)],j.updateXDomain(null,!0,!0,!1,e)):(h=j.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-g.x:g.x-j.getXDomain(j.data.targets)[0]:1,e=[g.x-h,g.x],j.updateXDomain(null,!0,!0,!1,e)),j.updateTargets(j.data.targets),j.redraw({flow:{index:g.index,length:n,duration:m(a.duration)?a.duration:j.config.transition_duration,done:a.done,orgDataCount:l},withLegend:!0,withTransition:l>1,withTrimXDomain:!1,withUpdateXAxis:!0})},i.generateFlow=function(a){var b=this,c=b.config,d=b.d3;return function(){var e,f,g,h=a.targets,i=a.flow,j=a.drawBar,k=a.drawLine,m=a.drawArea,n=a.cx,o=a.cy,p=a.xv,q=a.xForText,r=a.yForText,s=a.duration,u=1,v=i.index,w=i.length,x=b.getValueOnIndex(b.data.targets[0].values,v),y=b.getValueOnIndex(b.data.targets[0].values,v+w),z=b.x.domain(),A=i.duration||s,B=i.done||function(){},C=b.generateWait(),D=b.xgrid||d.selectAll([]),E=b.xgridLines||d.selectAll([]),F=b.mainRegion||d.selectAll([]),G=b.mainText||d.selectAll([]),H=b.mainBar||d.selectAll([]),I=b.mainLine||d.selectAll([]),J=b.mainArea||d.selectAll([]),K=b.mainCircle||d.selectAll([]);b.flowing=!0,b.data.targets.forEach(function(a){a.values.splice(0,w)}),g=b.updateXDomain(h,!0,!0),b.updateXGrid&&b.updateXGrid(!0),i.orgDataCount?e=1===i.orgDataCount||(x&&x.x)===(y&&y.x)?b.x(z[0])-b.x(g[0]):b.isTimeSeries()?b.x(z[0])-b.x(g[0]):b.x(x.x)-b.x(y.x):1!==b.data.targets[0].values.length?e=b.x(z[0])-b.x(g[0]):b.isTimeSeries()?(x=b.getValueOnIndex(b.data.targets[0].values,0),y=b.getValueOnIndex(b.data.targets[0].values,b.data.targets[0].values.length-1),e=b.x(x.x)-b.x(y.x)):e=t(g)/2,u=t(z)/t(g),f="translate("+e+",0) scale("+u+",1)",b.hideXGridFocus(),d.transition().ease("linear").duration(A).each(function(){C.add(b.axes.x.transition().call(b.xAxis)),C.add(H.transition().attr("transform",f)),C.add(I.transition().attr("transform",f)),C.add(J.transition().attr("transform",f)),C.add(K.transition().attr("transform",f)),C.add(G.transition().attr("transform",f)),C.add(F.filter(b.isRegionOnX).transition().attr("transform",f)),C.add(D.transition().attr("transform",f)),C.add(E.transition().attr("transform",f))}).call(C,function(){var a,d=[],e=[],f=[];if(w){for(a=0;w>a;a++)d.push("."+l.shape+"-"+(v+a)),e.push("."+l.text+"-"+(v+a)),f.push("."+l.eventRect+"-"+(v+a));b.svg.selectAll("."+l.shapes).selectAll(d).remove(),b.svg.selectAll("."+l.texts).selectAll(e).remove(),b.svg.selectAll("."+l.eventRects).selectAll(f).remove(),b.svg.select("."+l.xgrid).remove()}D.attr("transform",null).attr(b.xgridAttr),E.attr("transform",null),E.select("line").attr("x1",c.axis_rotated?0:p).attr("x2",c.axis_rotated?b.width:p),E.select("text").attr("x",c.axis_rotated?b.width:0).attr("y",p),H.attr("transform",null).attr("d",j),I.attr("transform",null).attr("d",k),J.attr("transform",null).attr("d",m),K.attr("transform",null).attr("cx",n).attr("cy",o),G.attr("transform",null).attr("x",q).attr("y",r).style("fill-opacity",b.opacityForText.bind(b)),F.attr("transform",null),F.select("rect").filter(b.isRegionOnX).attr("x",b.regionX.bind(b)).attr("width",b.regionWidth.bind(b)),c.interaction_enabled&&b.redrawEventRect(),B(),b.flowing=!1})}},h.selected=function(a){var b=this.internal,c=b.d3;return c.merge(b.main.selectAll("."+l.shapes+b.getTargetSelectorSuffix(a)).selectAll("."+l.shape).filter(function(){return c.select(this).classed(l.SELECTED)}).map(function(a){return a.map(function(a){var b=a.__data__;return b.data?b.data:b})}))},h.select=function(a,b,c){var d=this.internal,e=d.d3,f=d.config;f.data_selection_enabled&&d.main.selectAll("."+l.shapes).selectAll("."+l.shape).each(function(g,h){var i=e.select(this),j=g.data?g.data.id:g.id,k=d.getToggle(this,g).bind(d),m=f.data_selection_grouped||!a||a.indexOf(j)>=0,n=!b||b.indexOf(h)>=0,o=i.classed(l.SELECTED);i.classed(l.line)||i.classed(l.area)||(m&&n?f.data_selection_isselectable(g)&&!o&&k(!0,i.classed(l.SELECTED,!0),g,h):q(c)&&c&&o&&k(!1,i.classed(l.SELECTED,!1),g,h))})},h.unselect=function(a,b){var c=this.internal,d=c.d3,e=c.config;e.data_selection_enabled&&c.main.selectAll("."+l.shapes).selectAll("."+l.shape).each(function(f,g){var h=d.select(this),i=f.data?f.data.id:f.id,j=c.getToggle(this,f).bind(c),k=e.data_selection_grouped||!a||a.indexOf(i)>=0,m=!b||b.indexOf(g)>=0,n=h.classed(l.SELECTED);h.classed(l.line)||h.classed(l.area)||k&&m&&e.data_selection_isselectable(f)&&n&&j(!1,h.classed(l.SELECTED,!1),f,g)})},h.transform=function(a,b){var c=this.internal,d=["pie","donut"].indexOf(a)>=0?{withTransform:!0}:null;c.transformTo(b,a,d)},i.transformTo=function(a,b,c){var d=this,e=!d.hasArcType(),f=c||{withTransitionForAxis:e};f.withTransitionForTransform=!1,d.transiting=!1,d.setTargetType(a,b),d.updateTargets(d.data.targets),d.updateAndRedraw(f)},h.groups=function(a){var b=this.internal,c=b.config;return p(a)?c.data_groups:(c.data_groups=a,b.redraw(),c.data_groups)},h.xgrids=function(a){var b=this.internal,c=b.config;return a?(c.grid_x_lines=a,b.redrawWithoutRescale(),c.grid_x_lines):c.grid_x_lines},h.xgrids.add=function(a){var b=this.internal;return this.xgrids(b.config.grid_x_lines.concat(a?a:[]))},h.xgrids.remove=function(a){var b=this.internal;b.removeGridLines(a,!0)},h.ygrids=function(a){var b=this.internal,c=b.config;return a?(c.grid_y_lines=a,b.redrawWithoutRescale(),c.grid_y_lines):c.grid_y_lines},h.ygrids.add=function(a){var b=this.internal;return this.ygrids(b.config.grid_y_lines.concat(a?a:[]))},h.ygrids.remove=function(a){var b=this.internal;b.removeGridLines(a,!1)},h.regions=function(a){var b=this.internal,c=b.config;return a?(c.regions=a,b.redrawWithoutRescale(),c.regions):c.regions},h.regions.add=function(a){var b=this.internal,c=b.config;return a?(c.regions=c.regions.concat(a),b.redrawWithoutRescale(),c.regions):c.regions},h.regions.remove=function(a){var b,c,d,e=this.internal,f=e.config;return a=a||{},b=e.getOption(a,"duration",f.transition_duration),c=e.getOption(a,"classes",[l.region]),d=e.main.select("."+l.regions).selectAll(c.map(function(a){return"."+a})),(b?d.transition().duration(b):d).style("opacity",0).remove(),f.regions=f.regions.filter(function(a){var b=!1;return a["class"]?(a["class"].split(" ").forEach(function(a){c.indexOf(a)>=0&&(b=!0)}),!b):!0}),f.regions},h.data=function(a){var b=this.internal.data.targets;return"undefined"==typeof a?b:b.filter(function(b){return[].concat(a).indexOf(b.id)>=0})},h.data.shown=function(a){return this.internal.filterTargetsToShow(this.data(a))},h.data.values=function(a){var b,c=null;return a&&(b=this.data(a),c=b[0]?b[0].values.map(function(a){return a.value}):null),c},h.data.names=function(a){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",a)},h.data.colors=function(a){return this.internal.updateDataAttributes("colors",a)},h.data.axes=function(a){return this.internal.updateDataAttributes("axes",a)},h.category=function(a,b){var c=this.internal,d=c.config;return arguments.length>1&&(d.axis_x_categories[a]=b,c.redraw()),d.axis_x_categories[a]},h.categories=function(a){var b=this.internal,c=b.config;return arguments.length?(c.axis_x_categories=a,b.redraw(),c.axis_x_categories):c.axis_x_categories},h.color=function(a){var b=this.internal;return b.color(a)},h.x=function(a){var b=this.internal;return arguments.length&&(b.updateTargetX(b.data.targets,a),b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),b.data.xs},h.xs=function(a){var b=this.internal;return arguments.length&&(b.updateTargetXs(b.data.targets,a),b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),b.data.xs},h.axis=function(){},h.axis.labels=function(a){var b=this.internal;arguments.length&&(Object.keys(a).forEach(function(c){b.axis.setLabelText(c,a[c])}),b.axis.updateLabels())},h.axis.max=function(a){var b=this.internal,c=b.config;return arguments.length?("object"==typeof a?(m(a.x)&&(c.axis_x_max=a.x),m(a.y)&&(c.axis_y_max=a.y),m(a.y2)&&(c.axis_y2_max=a.y2)):c.axis_y_max=c.axis_y2_max=a,void b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:c.axis_x_max,y:c.axis_y_max,y2:c.axis_y2_max}},h.axis.min=function(a){var b=this.internal,c=b.config;return arguments.length?("object"==typeof a?(m(a.x)&&(c.axis_x_min=a.x),m(a.y)&&(c.axis_y_min=a.y),m(a.y2)&&(c.axis_y2_min=a.y2)):c.axis_y_min=c.axis_y2_min=a,void b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:c.axis_x_min,y:c.axis_y_min,y2:c.axis_y2_min}},h.axis.range=function(a){return arguments.length?(q(a.max)&&this.axis.max(a.max),void(q(a.min)&&this.axis.min(a.min))):{max:this.axis.max(),min:this.axis.min()}},h.legend=function(){},h.legend.show=function(a){var b=this.internal;b.showLegend(b.mapToTargetIds(a)),b.updateAndRedraw({withLegend:!0})},h.legend.hide=function(a){var b=this.internal;b.hideLegend(b.mapToTargetIds(a)),b.updateAndRedraw({withLegend:!0})},h.resize=function(a){var b=this.internal,c=b.config;c.size_width=a?a.width:null,c.size_height=a?a.height:null,this.flush()},h.flush=function(){var a=this.internal;a.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},h.destroy=function(){var b=this.internal;if(a.clearInterval(b.intervalForObserveInserted),void 0!==b.resizeTimeout&&a.clearTimeout(b.resizeTimeout),a.detachEvent)a.detachEvent("onresize",b.resizeFunction);else if(a.removeEventListener)a.removeEventListener("resize",b.resizeFunction);else{var c=a.onresize;c&&c.add&&c.remove&&c.remove(b.resizeFunction)}return b.selectChart.classed("c3",!1).html(""),Object.keys(b).forEach(function(a){b[a]=null}),null},h.tooltip=function(){},h.tooltip.show=function(a){var b,c,d=this.internal;a.mouse&&(c=a.mouse),a.data?d.isMultipleX()?(c=[d.x(a.data.x),d.getYScale(a.data.id)(a.data.value)],b=null):b=m(a.data.index)?a.data.index:d.getIndexByX(a.data.x):"undefined"!=typeof a.x?b=d.getIndexByX(a.x):"undefined"!=typeof a.index&&(b=a.index),d.dispatchEvent("mouseover",b,c),d.dispatchEvent("mousemove",b,c),d.config.tooltip_onshow.call(d,a.data)},h.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)};var A;i.isSafari=function(){var b=a.navigator.userAgent;return b.indexOf("Safari")>=0&&b.indexOf("Chrome")<0},i.isChrome=function(){var b=a.navigator.userAgent;return b.indexOf("Chrome")>=0},Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(){"SVGPathSeg"in a||(a.SVGPathSeg=function(a,b,c){this.pathSegType=a,this.pathSegTypeAsLetter=b,this._owningPathSegList=c},SVGPathSeg.PATHSEG_UNKNOWN=0,SVGPathSeg.PATHSEG_CLOSEPATH=1,SVGPathSeg.PATHSEG_MOVETO_ABS=2,SVGPathSeg.PATHSEG_MOVETO_REL=3,SVGPathSeg.PATHSEG_LINETO_ABS=4,SVGPathSeg.PATHSEG_LINETO_REL=5,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,SVGPathSeg.PATHSEG_ARC_ABS=10,SVGPathSeg.PATHSEG_ARC_REL=11,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},a.SVGPathSegClosePath=function(a){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CLOSEPATH,"z",a)},SVGPathSegClosePath.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},SVGPathSegClosePath.prototype.clone=function(){return new SVGPathSegClosePath(void 0)},a.SVGPathSegMovetoAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_ABS,"M",a),this._x=b,this._y=c},SVGPathSegMovetoAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegMovetoAbs.prototype.clone=function(){return new SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegMovetoRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_REL,"m",a),this._x=b,this._y=c},SVGPathSegMovetoRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegMovetoRel.prototype.clone=function(){return new SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_ABS,"L",a),this._x=b,this._y=c},SVGPathSegLinetoAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegLinetoAbs.prototype.clone=function(){return new SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_REL,"l",a),this._x=b,this._y=c},SVGPathSegLinetoRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegLinetoRel.prototype.clone=function(){return new SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicAbs=function(a,b,c,d,e,f,g){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",a),this._x=b,this._y=c,this._x1=d,this._y1=e,this._x2=f,this._y2=g},SVGPathSegCurvetoCubicAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicRel=function(a,b,c,d,e,f,g){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",a),this._x=b,this._y=c,this._x1=d,this._y1=e,this._x2=f,this._y2=g},SVGPathSegCurvetoCubicRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticAbs=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",a),this._x=b,this._y=c,this._x1=d,this._y1=e},SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticRel=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",a),this._x=b,this._y=c,this._x1=d,this._y1=e},SVGPathSegCurvetoQuadraticRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegArcAbs=function(a,b,c,d,e,f,g,h){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_ABS,"A",a),this._x=b,this._y=c,this._r1=d,this._r2=e,this._angle=f,this._largeArcFlag=g,this._sweepFlag=h},SVGPathSegArcAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},SVGPathSegArcAbs.prototype.clone=function(){return new SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(a){this._r1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(a){this._r2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(a){this._largeArcFlag=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(a){this._sweepFlag=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegArcRel=function(a,b,c,d,e,f,g,h){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_REL,"a",a),this._x=b,this._y=c,this._r1=d,this._r2=e,this._angle=f,this._largeArcFlag=g,this._sweepFlag=h},SVGPathSegArcRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},SVGPathSegArcRel.prototype.clone=function(){return new SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(a){this._r1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(a){this._r2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(a){this._largeArcFlag=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(a){this._sweepFlag=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoHorizontalAbs=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",a),this._x=b},SVGPathSegLinetoHorizontalAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoHorizontalRel=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",a),this._x=b},SVGPathSegLinetoHorizontalRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoVerticalAbs=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",a),this._y=b},SVGPathSegLinetoVerticalAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoVerticalRel=function(a,b){
2356 c.hasArcType()&&c.expandArc(a),c.toggleFocusLegend(a,!0),c.focusedTargetIds=a,c.defocusedTargetIds=c.defocusedTargetIds.filter(function(b){return a.indexOf(b)<0})},h.defocus=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a.filter(c.isTargetToShow,c))),b.classed(l.focused,!1).classed(l.defocused,!0),c.hasArcType()&&c.unexpandArc(a),c.toggleFocusLegend(a,!1),c.focusedTargetIds=c.focusedTargetIds.filter(function(b){return a.indexOf(b)<0}),c.defocusedTargetIds=a},h.revert=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a)),b.classed(l.focused,!1).classed(l.defocused,!1),c.hasArcType()&&c.unexpandArc(a),c.config.legend_show&&(c.showLegend(a.filter(c.isLegendToShow.bind(c))),c.legend.selectAll(c.selectorLegends(a)).filter(function(){return c.d3.select(this).classed(l.legendItemFocused)}).classed(l.legendItemFocused,!1)),c.focusedTargetIds=[],c.defocusedTargetIds=[]},h.show=function(a,b){var c,d=this.internal;a=d.mapToTargetIds(a),b=b||{},d.removeHiddenTargetIds(a),c=d.svg.selectAll(d.selectorTargets(a)),c.transition().style("opacity",1,"important").call(d.endall,function(){c.style("opacity",null).style("opacity",1)}),b.withLegend&&d.showLegend(a),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.hide=function(a,b){var c,d=this.internal;a=d.mapToTargetIds(a),b=b||{},d.addHiddenTargetIds(a),c=d.svg.selectAll(d.selectorTargets(a)),c.transition().style("opacity",0,"important").call(d.endall,function(){c.style("opacity",null).style("opacity",0)}),b.withLegend&&d.hideLegend(a),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.toggle=function(a,b){var c=this,d=this.internal;d.mapToTargetIds(a).forEach(function(a){d.isTargetToShow(a)?c.hide(a,b):c.show(a,b)})},h.zoom=function(a){var b=this.internal;return a&&(b.isTimeSeries()&&(a=a.map(function(a){return b.parseDate(a)})),b.brush.extent(a),b.redraw({withUpdateXDomain:!0,withY:b.config.zoom_rescale}),b.config.zoom_onzoom.call(this,b.x.orgDomain())),b.brush.extent()},h.zoom.enable=function(a){var b=this.internal;b.config.zoom_enabled=a,b.updateAndRedraw()},h.unzoom=function(){var a=this.internal;a.brush.clear().update(),a.redraw({withUpdateXDomain:!0})},h.zoom.max=function(a){var b=this.internal,c=b.config,d=b.d3;return 0===a||a?void(c.zoom_x_max=d.max([b.orgXDomain[1],a])):c.zoom_x_max},h.zoom.min=function(a){var b=this.internal,c=b.config,d=b.d3;return 0===a||a?void(c.zoom_x_min=d.min([b.orgXDomain[0],a])):c.zoom_x_min},h.zoom.range=function(a){return arguments.length?(q(a.max)&&this.domain.max(a.max),void(q(a.min)&&this.domain.min(a.min))):{max:this.domain.max(),min:this.domain.min()}},h.load=function(a){var b=this.internal,c=b.config;return a.xs&&b.addXs(a.xs),"names"in a&&h.data.names.bind(this)(a.names),"classes"in a&&Object.keys(a.classes).forEach(function(b){c.data_classes[b]=a.classes[b]}),"categories"in a&&b.isCategorized()&&(c.axis_x_categories=a.categories),"axes"in a&&Object.keys(a.axes).forEach(function(b){c.data_axes[b]=a.axes[b]}),"colors"in a&&Object.keys(a.colors).forEach(function(b){c.data_colors[b]=a.colors[b]}),"cacheIds"in a&&b.hasCaches(a.cacheIds)?void b.load(b.getCaches(a.cacheIds),a.done):void("unload"in a?b.unload(b.mapToTargetIds("boolean"==typeof a.unload&&a.unload?null:a.unload),function(){b.loadFromArgs(a)}):b.loadFromArgs(a))},h.unload=function(a){var b=this.internal;a=a||{},a instanceof Array?a={ids:a}:"string"==typeof a&&(a={ids:[a]}),b.unload(b.mapToTargetIds(a.ids),function(){b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.done&&a.done()})},h.flow=function(a){var b,c,d,e,f,g,h,i,j=this.internal,k=[],l=j.getMaxDataCount(),n=0,o=0;if(a.json)c=j.convertJsonToData(a.json,a.keys);else if(a.rows)c=j.convertRowsToData(a.rows);else{if(!a.columns)return;c=j.convertColumnsToData(a.columns)}b=j.convertDataToTargets(c,!0),j.data.targets.forEach(function(a){var c,d,e=!1;for(c=0;c<b.length;c++)if(a.id===b[c].id){for(e=!0,a.values[a.values.length-1]&&(o=a.values[a.values.length-1].index+1),n=b[c].values.length,d=0;n>d;d++)b[c].values[d].index=o+d,j.isTimeSeries()||(b[c].values[d].x=o+d);a.values=a.values.concat(b[c].values),b.splice(c,1);break}e||k.push(a.id)}),j.data.targets.forEach(function(a){var b,c;for(b=0;b<k.length;b++)if(a.id===k[b])for(o=a.values[a.values.length-1].index+1,c=0;n>c;c++)a.values.push({id:a.id,index:o+c,x:j.isTimeSeries()?j.getOtherTargetX(o+c):o+c,value:null})}),j.data.targets.length&&b.forEach(function(a){var b,c=[];for(b=j.data.targets[0].values[0].index;o>b;b++)c.push({id:a.id,index:b,x:j.isTimeSeries()?j.getOtherTargetX(b):b,value:null});a.values.forEach(function(a){a.index+=o,j.isTimeSeries()||(a.x+=o)}),a.values=c.concat(a.values)}),j.data.targets=j.data.targets.concat(b),d=j.getMaxDataCount(),f=j.data.targets[0],g=f.values[0],q(a.to)?(n=0,i=j.isTimeSeries()?j.parseDate(a.to):a.to,f.values.forEach(function(a){a.x<i&&n++})):q(a.length)&&(n=a.length),l?1===l&&j.isTimeSeries()&&(h=(f.values[f.values.length-1].x-g.x)/2,e=[new Date(+g.x-h),new Date(+g.x+h)],j.updateXDomain(null,!0,!0,!1,e)):(h=j.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-g.x:g.x-j.getXDomain(j.data.targets)[0]:1,e=[g.x-h,g.x],j.updateXDomain(null,!0,!0,!1,e)),j.updateTargets(j.data.targets),j.redraw({flow:{index:g.index,length:n,duration:m(a.duration)?a.duration:j.config.transition_duration,done:a.done,orgDataCount:l},withLegend:!0,withTransition:l>1,withTrimXDomain:!1,withUpdateXAxis:!0})},i.generateFlow=function(a){var b=this,c=b.config,d=b.d3;return function(){var e,f,g,h=a.targets,i=a.flow,j=a.drawBar,k=a.drawLine,m=a.drawArea,n=a.cx,o=a.cy,p=a.xv,q=a.xForText,r=a.yForText,s=a.duration,u=1,v=i.index,w=i.length,x=b.getValueOnIndex(b.data.targets[0].values,v),y=b.getValueOnIndex(b.data.targets[0].values,v+w),z=b.x.domain(),A=i.duration||s,B=i.done||function(){},C=b.generateWait(),D=b.xgrid||d.selectAll([]),E=b.xgridLines||d.selectAll([]),F=b.mainRegion||d.selectAll([]),G=b.mainText||d.selectAll([]),H=b.mainBar||d.selectAll([]),I=b.mainLine||d.selectAll([]),J=b.mainArea||d.selectAll([]),K=b.mainCircle||d.selectAll([]);b.flowing=!0,b.data.targets.forEach(function(a){a.values.splice(0,w)}),g=b.updateXDomain(h,!0,!0),b.updateXGrid&&b.updateXGrid(!0),i.orgDataCount?e=1===i.orgDataCount||(x&&x.x)===(y&&y.x)?b.x(z[0])-b.x(g[0]):b.isTimeSeries()?b.x(z[0])-b.x(g[0]):b.x(x.x)-b.x(y.x):1!==b.data.targets[0].values.length?e=b.x(z[0])-b.x(g[0]):b.isTimeSeries()?(x=b.getValueOnIndex(b.data.targets[0].values,0),y=b.getValueOnIndex(b.data.targets[0].values,b.data.targets[0].values.length-1),e=b.x(x.x)-b.x(y.x)):e=t(g)/2,u=t(z)/t(g),f="translate("+e+",0) scale("+u+",1)",b.hideXGridFocus(),d.transition().ease("linear").duration(A).each(function(){C.add(b.axes.x.transition().call(b.xAxis)),C.add(H.transition().attr("transform",f)),C.add(I.transition().attr("transform",f)),C.add(J.transition().attr("transform",f)),C.add(K.transition().attr("transform",f)),C.add(G.transition().attr("transform",f)),C.add(F.filter(b.isRegionOnX).transition().attr("transform",f)),C.add(D.transition().attr("transform",f)),C.add(E.transition().attr("transform",f))}).call(C,function(){var a,d=[],e=[],f=[];if(w){for(a=0;w>a;a++)d.push("."+l.shape+"-"+(v+a)),e.push("."+l.text+"-"+(v+a)),f.push("."+l.eventRect+"-"+(v+a));b.svg.selectAll("."+l.shapes).selectAll(d).remove(),b.svg.selectAll("."+l.texts).selectAll(e).remove(),b.svg.selectAll("."+l.eventRects).selectAll(f).remove(),b.svg.select("."+l.xgrid).remove()}D.attr("transform",null).attr(b.xgridAttr),E.attr("transform",null),E.select("line").attr("x1",c.axis_rotated?0:p).attr("x2",c.axis_rotated?b.width:p),E.select("text").attr("x",c.axis_rotated?b.width:0).attr("y",p),H.attr("transform",null).attr("d",j),I.attr("transform",null).attr("d",k),J.attr("transform",null).attr("d",m),K.attr("transform",null).attr("cx",n).attr("cy",o),G.attr("transform",null).attr("x",q).attr("y",r).style("fill-opacity",b.opacityForText.bind(b)),F.attr("transform",null),F.select("rect").filter(b.isRegionOnX).attr("x",b.regionX.bind(b)).attr("width",b.regionWidth.bind(b)),c.interaction_enabled&&b.redrawEventRect(),B(),b.flowing=!1})}},h.selected=function(a){var b=this.internal,c=b.d3;return c.merge(b.main.selectAll("."+l.shapes+b.getTargetSelectorSuffix(a)).selectAll("."+l.shape).filter(function(){return c.select(this).classed(l.SELECTED)}).map(function(a){return a.map(function(a){var b=a.__data__;return b.data?b.data:b})}))},h.select=function(a,b,c){var d=this.internal,e=d.d3,f=d.config;f.data_selection_enabled&&d.main.selectAll("."+l.shapes).selectAll("."+l.shape).each(function(g,h){var i=e.select(this),j=g.data?g.data.id:g.id,k=d.getToggle(this,g).bind(d),m=f.data_selection_grouped||!a||a.indexOf(j)>=0,n=!b||b.indexOf(h)>=0,o=i.classed(l.SELECTED);i.classed(l.line)||i.classed(l.area)||(m&&n?f.data_selection_isselectable(g)&&!o&&k(!0,i.classed(l.SELECTED,!0),g,h):q(c)&&c&&o&&k(!1,i.classed(l.SELECTED,!1),g,h))})},h.unselect=function(a,b){var c=this.internal,d=c.d3,e=c.config;e.data_selection_enabled&&c.main.selectAll("."+l.shapes).selectAll("."+l.shape).each(function(f,g){var h=d.select(this),i=f.data?f.data.id:f.id,j=c.getToggle(this,f).bind(c),k=e.data_selection_grouped||!a||a.indexOf(i)>=0,m=!b||b.indexOf(g)>=0,n=h.classed(l.SELECTED);h.classed(l.line)||h.classed(l.area)||k&&m&&e.data_selection_isselectable(f)&&n&&j(!1,h.classed(l.SELECTED,!1),f,g)})},h.transform=function(a,b){var c=this.internal,d=["pie","donut"].indexOf(a)>=0?{withTransform:!0}:null;c.transformTo(b,a,d)},i.transformTo=function(a,b,c){var d=this,e=!d.hasArcType(),f=c||{withTransitionForAxis:e};f.withTransitionForTransform=!1,d.transiting=!1,d.setTargetType(a,b),d.updateTargets(d.data.targets),d.updateAndRedraw(f)},h.groups=function(a){var b=this.internal,c=b.config;return p(a)?c.data_groups:(c.data_groups=a,b.redraw(),c.data_groups)},h.xgrids=function(a){var b=this.internal,c=b.config;return a?(c.grid_x_lines=a,b.redrawWithoutRescale(),c.grid_x_lines):c.grid_x_lines},h.xgrids.add=function(a){var b=this.internal;return this.xgrids(b.config.grid_x_lines.concat(a?a:[]))},h.xgrids.remove=function(a){var b=this.internal;b.removeGridLines(a,!0)},h.ygrids=function(a){var b=this.internal,c=b.config;return a?(c.grid_y_lines=a,b.redrawWithoutRescale(),c.grid_y_lines):c.grid_y_lines},h.ygrids.add=function(a){var b=this.internal;return this.ygrids(b.config.grid_y_lines.concat(a?a:[]))},h.ygrids.remove=function(a){var b=this.internal;b.removeGridLines(a,!1)},h.regions=function(a){var b=this.internal,c=b.config;return a?(c.regions=a,b.redrawWithoutRescale(),c.regions):c.regions},h.regions.add=function(a){var b=this.internal,c=b.config;return a?(c.regions=c.regions.concat(a),b.redrawWithoutRescale(),c.regions):c.regions},h.regions.remove=function(a){var b,c,d,e=this.internal,f=e.config;return a=a||{},b=e.getOption(a,"duration",f.transition_duration),c=e.getOption(a,"classes",[l.region]),d=e.main.select("."+l.regions).selectAll(c.map(function(a){return"."+a})),(b?d.transition().duration(b):d).style("opacity",0).remove(),f.regions=f.regions.filter(function(a){var b=!1;return a["class"]?(a["class"].split(" ").forEach(function(a){c.indexOf(a)>=0&&(b=!0)}),!b):!0}),f.regions},h.data=function(a){var b=this.internal.data.targets;return"undefined"==typeof a?b:b.filter(function(b){return[].concat(a).indexOf(b.id)>=0})},h.data.shown=function(a){return this.internal.filterTargetsToShow(this.data(a))},h.data.values=function(a){var b,c=null;return a&&(b=this.data(a),c=b[0]?b[0].values.map(function(a){return a.value}):null),c},h.data.names=function(a){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",a)},h.data.colors=function(a){return this.internal.updateDataAttributes("colors",a)},h.data.axes=function(a){return this.internal.updateDataAttributes("axes",a)},h.category=function(a,b){var c=this.internal,d=c.config;return arguments.length>1&&(d.axis_x_categories[a]=b,c.redraw()),d.axis_x_categories[a]},h.categories=function(a){var b=this.internal,c=b.config;return arguments.length?(c.axis_x_categories=a,b.redraw(),c.axis_x_categories):c.axis_x_categories},h.color=function(a){var b=this.internal;return b.color(a)},h.x=function(a){var b=this.internal;return arguments.length&&(b.updateTargetX(b.data.targets,a),b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),b.data.xs},h.xs=function(a){var b=this.internal;return arguments.length&&(b.updateTargetXs(b.data.targets,a),b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),b.data.xs},h.axis=function(){},h.axis.labels=function(a){var b=this.internal;arguments.length&&(Object.keys(a).forEach(function(c){b.axis.setLabelText(c,a[c])}),b.axis.updateLabels())},h.axis.max=function(a){var b=this.internal,c=b.config;return arguments.length?("object"==typeof a?(m(a.x)&&(c.axis_x_max=a.x),m(a.y)&&(c.axis_y_max=a.y),m(a.y2)&&(c.axis_y2_max=a.y2)):c.axis_y_max=c.axis_y2_max=a,void b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:c.axis_x_max,y:c.axis_y_max,y2:c.axis_y2_max}},h.axis.min=function(a){var b=this.internal,c=b.config;return arguments.length?("object"==typeof a?(m(a.x)&&(c.axis_x_min=a.x),m(a.y)&&(c.axis_y_min=a.y),m(a.y2)&&(c.axis_y2_min=a.y2)):c.axis_y_min=c.axis_y2_min=a,void b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:c.axis_x_min,y:c.axis_y_min,y2:c.axis_y2_min}},h.axis.range=function(a){return arguments.length?(q(a.max)&&this.axis.max(a.max),void(q(a.min)&&this.axis.min(a.min))):{max:this.axis.max(),min:this.axis.min()}},h.legend=function(){},h.legend.show=function(a){var b=this.internal;b.showLegend(b.mapToTargetIds(a)),b.updateAndRedraw({withLegend:!0})},h.legend.hide=function(a){var b=this.internal;b.hideLegend(b.mapToTargetIds(a)),b.updateAndRedraw({withLegend:!0})},h.resize=function(a){var b=this.internal,c=b.config;c.size_width=a?a.width:null,c.size_height=a?a.height:null,this.flush()},h.flush=function(){var a=this.internal;a.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},h.destroy=function(){var b=this.internal;if(a.clearInterval(b.intervalForObserveInserted),void 0!==b.resizeTimeout&&a.clearTimeout(b.resizeTimeout),a.detachEvent)a.detachEvent("onresize",b.resizeFunction);else if(a.removeEventListener)a.removeEventListener("resize",b.resizeFunction);else{var c=a.onresize;c&&c.add&&c.remove&&c.remove(b.resizeFunction)}return b.selectChart.classed("c3",!1).html(""),Object.keys(b).forEach(function(a){b[a]=null}),null},h.tooltip=function(){},h.tooltip.show=function(a){var b,c,d=this.internal;a.mouse&&(c=a.mouse),a.data?d.isMultipleX()?(c=[d.x(a.data.x),d.getYScale(a.data.id)(a.data.value)],b=null):b=m(a.data.index)?a.data.index:d.getIndexByX(a.data.x):"undefined"!=typeof a.x?b=d.getIndexByX(a.x):"undefined"!=typeof a.index&&(b=a.index),d.dispatchEvent("mouseover",b,c),d.dispatchEvent("mousemove",b,c),d.config.tooltip_onshow.call(d,a.data)},h.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)};var A;i.isSafari=function(){var b=a.navigator.userAgent;return b.indexOf("Safari")>=0&&b.indexOf("Chrome")<0},i.isChrome=function(){var b=a.navigator.userAgent;return b.indexOf("Chrome")>=0},Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(){"SVGPathSeg"in a||(a.SVGPathSeg=function(a,b,c){this.pathSegType=a,this.pathSegTypeAsLetter=b,this._owningPathSegList=c},SVGPathSeg.PATHSEG_UNKNOWN=0,SVGPathSeg.PATHSEG_CLOSEPATH=1,SVGPathSeg.PATHSEG_MOVETO_ABS=2,SVGPathSeg.PATHSEG_MOVETO_REL=3,SVGPathSeg.PATHSEG_LINETO_ABS=4,SVGPathSeg.PATHSEG_LINETO_REL=5,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,SVGPathSeg.PATHSEG_ARC_ABS=10,SVGPathSeg.PATHSEG_ARC_REL=11,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},a.SVGPathSegClosePath=function(a){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CLOSEPATH,"z",a)},SVGPathSegClosePath.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},SVGPathSegClosePath.prototype.clone=function(){return new SVGPathSegClosePath(void 0)},a.SVGPathSegMovetoAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_ABS,"M",a),this._x=b,this._y=c},SVGPathSegMovetoAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegMovetoAbs.prototype.clone=function(){return new SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegMovetoRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_REL,"m",a),this._x=b,this._y=c},SVGPathSegMovetoRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegMovetoRel.prototype.clone=function(){return new SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_ABS,"L",a),this._x=b,this._y=c},SVGPathSegLinetoAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegLinetoAbs.prototype.clone=function(){return new SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_REL,"l",a),this._x=b,this._y=c},SVGPathSegLinetoRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegLinetoRel.prototype.clone=function(){return new SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicAbs=function(a,b,c,d,e,f,g){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",a),this._x=b,this._y=c,this._x1=d,this._y1=e,this._x2=f,this._y2=g},SVGPathSegCurvetoCubicAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicRel=function(a,b,c,d,e,f,g){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",a),this._x=b,this._y=c,this._x1=d,this._y1=e,this._x2=f,this._y2=g},SVGPathSegCurvetoCubicRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticAbs=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",a),this._x=b,this._y=c,this._x1=d,this._y1=e},SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticRel=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",a),this._x=b,this._y=c,this._x1=d,this._y1=e},SVGPathSegCurvetoQuadraticRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegArcAbs=function(a,b,c,d,e,f,g,h){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_ABS,"A",a),this._x=b,this._y=c,this._r1=d,this._r2=e,this._angle=f,this._largeArcFlag=g,this._sweepFlag=h},SVGPathSegArcAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},SVGPathSegArcAbs.prototype.clone=function(){return new SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(a){this._r1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(a){this._r2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(a){this._largeArcFlag=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(a){this._sweepFlag=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegArcRel=function(a,b,c,d,e,f,g,h){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_REL,"a",a),this._x=b,this._y=c,this._r1=d,this._r2=e,this._angle=f,this._largeArcFlag=g,this._sweepFlag=h},SVGPathSegArcRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},SVGPathSegArcRel.prototype.clone=function(){return new SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(a){this._r1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(a){this._r2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(a){this._largeArcFlag=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(a){this._sweepFlag=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoHorizontalAbs=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",a),this._x=b},SVGPathSegLinetoHorizontalAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoHorizontalRel=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",a),this._x=b},SVGPathSegLinetoHorizontalRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoVerticalAbs=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",a),this._y=b},SVGPathSegLinetoVerticalAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoVerticalRel=function(a,b){
2357 SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",a),this._y=b},SVGPathSegLinetoVerticalRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicSmoothAbs=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",a),this._x=b,this._y=c,this._x2=d,this._y2=e},SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicSmoothRel=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",a),this._x=b,this._y=c,this._x2=d,this._y2=e},SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticSmoothAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",a),this._x=b,this._y=c},SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticSmoothRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",a),this._x=b,this._y=c},SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new SVGPathSegClosePath(void 0)},SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(a,b){return new SVGPathSegMovetoAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegMovetoRel=function(a,b){return new SVGPathSegMovetoRel(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(a,b){return new SVGPathSegLinetoAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegLinetoRel=function(a,b){return new SVGPathSegLinetoRel(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(a,b,c,d,e,f){return new SVGPathSegCurvetoCubicAbs(void 0,a,b,c,d,e,f)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(a,b,c,d,e,f){return new SVGPathSegCurvetoCubicRel(void 0,a,b,c,d,e,f)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(a,b,c,d){return new SVGPathSegCurvetoQuadraticAbs(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(a,b,c,d){return new SVGPathSegCurvetoQuadraticRel(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegArcAbs=function(a,b,c,d,e,f,g){return new SVGPathSegArcAbs(void 0,a,b,c,d,e,f,g)},SVGPathElement.prototype.createSVGPathSegArcRel=function(a,b,c,d,e,f,g){return new SVGPathSegArcRel(void 0,a,b,c,d,e,f,g)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(a){return new SVGPathSegLinetoHorizontalAbs(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(a){return new SVGPathSegLinetoHorizontalRel(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(a){return new SVGPathSegLinetoVerticalAbs(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(a){return new SVGPathSegLinetoVerticalRel(void 0,a)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(a,b,c,d){return new SVGPathSegCurvetoCubicSmoothAbs(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(a,b,c,d){return new SVGPathSegCurvetoCubicSmoothRel(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(a,b){return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(a,b){return new SVGPathSegCurvetoQuadraticSmoothRel(void 0,a,b)}),"SVGPathSegList"in a||(a.SVGPathSegList=function(a){this._pathElement=a,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},Object.defineProperty(SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},SVGPathSegList.prototype._updateListFromPathMutations=function(a){if(this._pathElement){var b=!1;a.forEach(function(a){"d"==a.attributeName&&(b=!0)}),b&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},SVGPathSegList.prototype.segmentChanged=function(a){this._writeListToPath()},SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(a){a._owningPathSegList=null}),this._list=[],this._writeListToPath()},SVGPathSegList.prototype.initialize=function(a){return this._checkPathSynchronizedToList(),this._list=[a],a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype._checkValidIndex=function(a){if(isNaN(a)||0>a||a>=this.numberOfItems)throw"INDEX_SIZE_ERR"},SVGPathSegList.prototype.getItem=function(a){return this._checkPathSynchronizedToList(),this._checkValidIndex(a),this._list[a]},SVGPathSegList.prototype.insertItemBefore=function(a,b){return this._checkPathSynchronizedToList(),b>this.numberOfItems&&(b=this.numberOfItems),a._owningPathSegList&&(a=a.clone()),this._list.splice(b,0,a),a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype.replaceItem=function(a,b){return this._checkPathSynchronizedToList(),a._owningPathSegList&&(a=a.clone()),this._checkValidIndex(b),this._list[b]=a,a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype.removeItem=function(a){this._checkPathSynchronizedToList(),this._checkValidIndex(a);var b=this._list[a];return this._list.splice(a,1),this._writeListToPath(),b},SVGPathSegList.prototype.appendItem=function(a){return this._checkPathSynchronizedToList(),a._owningPathSegList&&(a=a.clone()),this._list.push(a),a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList._pathSegArrayAsString=function(a){var b="",c=!0;return a.forEach(function(a){c?(c=!1,b+=a._asPathString()):b+=" "+a._asPathString()}),b},SVGPathSegList.prototype._parsePath=function(a){if(!a||0==a.length)return[];var b=this,c=function(){this.pathSegList=[]};c.prototype.appendSegment=function(a){this.pathSegList.push(a)};var d=function(a){this._string=a,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};d.prototype._isCurrentSpace=function(){var a=this._string[this._currentIndex];return" ">=a&&(" "==a||"\n"==a||" "==a||"\r"==a||"\f"==a)},d.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},d.prototype._skipOptionalSpacesOrDelimiter=function(){return this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex)?!1:(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},d.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},d.prototype.peekSegmentType=function(){var a=this._string[this._currentIndex];return this._pathSegTypeFromChar(a)},d.prototype._pathSegTypeFromChar=function(a){switch(a){case"Z":case"z":return SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return SVGPathSeg.PATHSEG_LINETO_REL;case"C":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return SVGPathSeg.PATHSEG_ARC_ABS;case"a":return SVGPathSeg.PATHSEG_ARC_REL;case"H":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return SVGPathSeg.PATHSEG_UNKNOWN}},d.prototype._nextCommandHelper=function(a,b){return("+"==a||"-"==a||"."==a||a>="0"&&"9">=a)&&b!=SVGPathSeg.PATHSEG_CLOSEPATH?b==SVGPathSeg.PATHSEG_MOVETO_ABS?SVGPathSeg.PATHSEG_LINETO_ABS:b==SVGPathSeg.PATHSEG_MOVETO_REL?SVGPathSeg.PATHSEG_LINETO_REL:b:SVGPathSeg.PATHSEG_UNKNOWN},d.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var a=this.peekSegmentType();return a==SVGPathSeg.PATHSEG_MOVETO_ABS||a==SVGPathSeg.PATHSEG_MOVETO_REL},d.prototype._parseNumber=function(){var a=0,b=0,c=1,d=0,e=1,f=1,g=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,e=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var h=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=h)for(var i=this._currentIndex-1,j=1;i>=h;)b+=j*(this._string.charAt(i--)-"0"),j*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)d+=(this._string.charAt(this._currentIndex++)-"0")*(c*=.1)}if(this._currentIndex!=g&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,f=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)a*=10,a+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var k=b+d;if(k*=e,a&&(k*=Math.pow(10,f*a)),g!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),k}},d.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var a=!1,b=this._string.charAt(this._currentIndex++);if("0"==b)a=!1;else{if("1"!=b)return;a=!0}return this._skipOptionalSpacesOrDelimiter(),a}},d.prototype.parseSegment=function(){var a=this._string[this._currentIndex],c=this._pathSegTypeFromChar(a);if(c==SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==SVGPathSeg.PATHSEG_UNKNOWN)return null;if(c=this._nextCommandHelper(a,this._previousCommand),c==SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=c,c){case SVGPathSeg.PATHSEG_MOVETO_REL:return new SVGPathSegMovetoRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_MOVETO_ABS:return new SVGPathSegMovetoAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_REL:return new SVGPathSegLinetoRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_ABS:return new SVGPathSegLinetoAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new SVGPathSegLinetoHorizontalRel(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new SVGPathSegLinetoHorizontalAbs(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new SVGPathSegLinetoVerticalRel(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new SVGPathSegLinetoVerticalAbs(b,this._parseNumber());case SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new SVGPathSegClosePath(b);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicRel(b,d.x,d.y,d.x1,d.y1,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicAbs(b,d.x,d.y,d.x1,d.y1,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var d={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothRel(b,d.x,d.y,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var d={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothAbs(b,d.x,d.y,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticRel(b,d.x,d.y,d.x1,d.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticAbs(b,d.x,d.y,d.x1,d.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new SVGPathSegCurvetoQuadraticSmoothRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new SVGPathSegCurvetoQuadraticSmoothAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_ARC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcRel(b,d.x,d.y,d.x1,d.y1,d.arcAngle,d.arcLarge,d.arcSweep);case SVGPathSeg.PATHSEG_ARC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcAbs(b,d.x,d.y,d.x1,d.y1,d.arcAngle,d.arcLarge,d.arcSweep);default:throw"Unknown path seg type."}};var e=new c,f=new d(a);if(!f.initialCommandIsMoveTo())return[];for(;f.hasMoreData();){var g=f.parseSegment();if(!g)return[];e.appendSegment(g)}return e.pathSegList})}(),"function"==typeof define&&define.amd?define("c3",["d3"],function(){return k}):"undefined"!=typeof exports&&"undefined"!=typeof module?module.exports=k:a.c3=k}(window);
2357 SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",a),this._y=b},SVGPathSegLinetoVerticalRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicSmoothAbs=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",a),this._x=b,this._y=c,this._x2=d,this._y2=e},SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicSmoothRel=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",a),this._x=b,this._y=c,this._x2=d,this._y2=e},SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticSmoothAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",a),this._x=b,this._y=c},SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticSmoothRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",a),this._x=b,this._y=c},SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new SVGPathSegClosePath(void 0)},SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(a,b){return new SVGPathSegMovetoAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegMovetoRel=function(a,b){return new SVGPathSegMovetoRel(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(a,b){return new SVGPathSegLinetoAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegLinetoRel=function(a,b){return new SVGPathSegLinetoRel(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(a,b,c,d,e,f){return new SVGPathSegCurvetoCubicAbs(void 0,a,b,c,d,e,f)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(a,b,c,d,e,f){return new SVGPathSegCurvetoCubicRel(void 0,a,b,c,d,e,f)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(a,b,c,d){return new SVGPathSegCurvetoQuadraticAbs(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(a,b,c,d){return new SVGPathSegCurvetoQuadraticRel(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegArcAbs=function(a,b,c,d,e,f,g){return new SVGPathSegArcAbs(void 0,a,b,c,d,e,f,g)},SVGPathElement.prototype.createSVGPathSegArcRel=function(a,b,c,d,e,f,g){return new SVGPathSegArcRel(void 0,a,b,c,d,e,f,g)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(a){return new SVGPathSegLinetoHorizontalAbs(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(a){return new SVGPathSegLinetoHorizontalRel(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(a){return new SVGPathSegLinetoVerticalAbs(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(a){return new SVGPathSegLinetoVerticalRel(void 0,a)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(a,b,c,d){return new SVGPathSegCurvetoCubicSmoothAbs(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(a,b,c,d){return new SVGPathSegCurvetoCubicSmoothRel(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(a,b){return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(a,b){return new SVGPathSegCurvetoQuadraticSmoothRel(void 0,a,b)}),"SVGPathSegList"in a||(a.SVGPathSegList=function(a){this._pathElement=a,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},Object.defineProperty(SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},SVGPathSegList.prototype._updateListFromPathMutations=function(a){if(this._pathElement){var b=!1;a.forEach(function(a){"d"==a.attributeName&&(b=!0)}),b&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},SVGPathSegList.prototype.segmentChanged=function(a){this._writeListToPath()},SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(a){a._owningPathSegList=null}),this._list=[],this._writeListToPath()},SVGPathSegList.prototype.initialize=function(a){return this._checkPathSynchronizedToList(),this._list=[a],a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype._checkValidIndex=function(a){if(isNaN(a)||0>a||a>=this.numberOfItems)throw"INDEX_SIZE_ERR"},SVGPathSegList.prototype.getItem=function(a){return this._checkPathSynchronizedToList(),this._checkValidIndex(a),this._list[a]},SVGPathSegList.prototype.insertItemBefore=function(a,b){return this._checkPathSynchronizedToList(),b>this.numberOfItems&&(b=this.numberOfItems),a._owningPathSegList&&(a=a.clone()),this._list.splice(b,0,a),a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype.replaceItem=function(a,b){return this._checkPathSynchronizedToList(),a._owningPathSegList&&(a=a.clone()),this._checkValidIndex(b),this._list[b]=a,a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype.removeItem=function(a){this._checkPathSynchronizedToList(),this._checkValidIndex(a);var b=this._list[a];return this._list.splice(a,1),this._writeListToPath(),b},SVGPathSegList.prototype.appendItem=function(a){return this._checkPathSynchronizedToList(),a._owningPathSegList&&(a=a.clone()),this._list.push(a),a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList._pathSegArrayAsString=function(a){var b="",c=!0;return a.forEach(function(a){c?(c=!1,b+=a._asPathString()):b+=" "+a._asPathString()}),b},SVGPathSegList.prototype._parsePath=function(a){if(!a||0==a.length)return[];var b=this,c=function(){this.pathSegList=[]};c.prototype.appendSegment=function(a){this.pathSegList.push(a)};var d=function(a){this._string=a,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};d.prototype._isCurrentSpace=function(){var a=this._string[this._currentIndex];return" ">=a&&(" "==a||"\n"==a||" "==a||"\r"==a||"\f"==a)},d.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},d.prototype._skipOptionalSpacesOrDelimiter=function(){return this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex)?!1:(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},d.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},d.prototype.peekSegmentType=function(){var a=this._string[this._currentIndex];return this._pathSegTypeFromChar(a)},d.prototype._pathSegTypeFromChar=function(a){switch(a){case"Z":case"z":return SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return SVGPathSeg.PATHSEG_LINETO_REL;case"C":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return SVGPathSeg.PATHSEG_ARC_ABS;case"a":return SVGPathSeg.PATHSEG_ARC_REL;case"H":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return SVGPathSeg.PATHSEG_UNKNOWN}},d.prototype._nextCommandHelper=function(a,b){return("+"==a||"-"==a||"."==a||a>="0"&&"9">=a)&&b!=SVGPathSeg.PATHSEG_CLOSEPATH?b==SVGPathSeg.PATHSEG_MOVETO_ABS?SVGPathSeg.PATHSEG_LINETO_ABS:b==SVGPathSeg.PATHSEG_MOVETO_REL?SVGPathSeg.PATHSEG_LINETO_REL:b:SVGPathSeg.PATHSEG_UNKNOWN},d.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var a=this.peekSegmentType();return a==SVGPathSeg.PATHSEG_MOVETO_ABS||a==SVGPathSeg.PATHSEG_MOVETO_REL},d.prototype._parseNumber=function(){var a=0,b=0,c=1,d=0,e=1,f=1,g=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,e=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var h=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=h)for(var i=this._currentIndex-1,j=1;i>=h;)b+=j*(this._string.charAt(i--)-"0"),j*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)d+=(this._string.charAt(this._currentIndex++)-"0")*(c*=.1)}if(this._currentIndex!=g&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,f=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)a*=10,a+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var k=b+d;if(k*=e,a&&(k*=Math.pow(10,f*a)),g!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),k}},d.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var a=!1,b=this._string.charAt(this._currentIndex++);if("0"==b)a=!1;else{if("1"!=b)return;a=!0}return this._skipOptionalSpacesOrDelimiter(),a}},d.prototype.parseSegment=function(){var a=this._string[this._currentIndex],c=this._pathSegTypeFromChar(a);if(c==SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==SVGPathSeg.PATHSEG_UNKNOWN)return null;if(c=this._nextCommandHelper(a,this._previousCommand),c==SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=c,c){case SVGPathSeg.PATHSEG_MOVETO_REL:return new SVGPathSegMovetoRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_MOVETO_ABS:return new SVGPathSegMovetoAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_REL:return new SVGPathSegLinetoRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_ABS:return new SVGPathSegLinetoAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new SVGPathSegLinetoHorizontalRel(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new SVGPathSegLinetoHorizontalAbs(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new SVGPathSegLinetoVerticalRel(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new SVGPathSegLinetoVerticalAbs(b,this._parseNumber());case SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new SVGPathSegClosePath(b);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicRel(b,d.x,d.y,d.x1,d.y1,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicAbs(b,d.x,d.y,d.x1,d.y1,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var d={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothRel(b,d.x,d.y,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var d={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothAbs(b,d.x,d.y,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticRel(b,d.x,d.y,d.x1,d.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticAbs(b,d.x,d.y,d.x1,d.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new SVGPathSegCurvetoQuadraticSmoothRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new SVGPathSegCurvetoQuadraticSmoothAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_ARC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcRel(b,d.x,d.y,d.x1,d.y1,d.arcAngle,d.arcLarge,d.arcSweep);case SVGPathSeg.PATHSEG_ARC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcAbs(b,d.x,d.y,d.x1,d.y1,d.arcAngle,d.arcLarge,d.arcSweep);default:throw"Unknown path seg type."}};var e=new c,f=new d(a);if(!f.initialCommandIsMoveTo())return[];for(;f.hasMoreData();){var g=f.parseSegment();if(!g)return[];e.appendSegment(g)}return e.pathSegList})}(),"function"==typeof define&&define.amd?define("c3",["d3"],function(){return k}):"undefined"!=typeof exports&&"undefined"!=typeof module?module.exports=k:a.c3=k}(window);
2358 ;/**
2358 ;/**
2359 * @version 2.1.8
2359 * @version 2.1.8
2360 * @license MIT
2360 * @license MIT
2361 */
2361 */
2362 !function(t,e){"use strict";t.module("smart-table",[]).run(["$templateCache",function(t){t.put("template/smart-table/pagination.html",'<nav ng-if="numPages && pages.length >= 2"><ul class="pagination"><li ng-repeat="page in pages" ng-class="{active: page==currentPage}"><a href="javascript: void(0);" ng-click="selectPage(page)">{{page}}</a></li></ul></nav>')}]),t.module("smart-table").constant("stConfig",{pagination:{template:"template/smart-table/pagination.html",itemsByPage:10,displayedPages:5},search:{delay:400,inputEvent:"input"},select:{mode:"single",selectedClass:"st-selected"},sort:{ascentClass:"st-sort-ascent",descentClass:"st-sort-descent",descendingFirst:!1,skipNatural:!1,delay:300},pipe:{delay:100}}),t.module("smart-table").controller("stTableController",["$scope","$parse","$filter","$attrs",function(a,n,s,i){function r(t){return t?[].concat(t):[]}function l(){b=r(o(a)),v===!0&&S.pipe()}function c(t,e){if(-1!=e.indexOf(".")){var a=e.split("."),s=a.pop(),i=a.join("."),r=n(i)(t);delete r[s],0==Object.keys(r).length&&c(t,i)}else delete t[e]}var o,u,p,g=i.stTable,d=n(g),f=d.assign,m=s("orderBy"),h=s("filter"),b=r(d(a)),P={sort:{},search:{},pagination:{start:0,totalItemCount:0}},v=!0,S=this;i.stSafeSrc&&(o=n(i.stSafeSrc),a.$watch(function(){var t=o(a);return t&&t.length?t[0]:e},function(t,e){t!==e&&l()}),a.$watch(function(){var t=o(a);return t?t.length:0},function(t){t!==b.length&&l()}),a.$watch(function(){return o(a)},function(t,e){t!==e&&(P.pagination.start=0,l())})),this.sortBy=function(e,a){return P.sort.predicate=e,P.sort.reverse=a===!0,t.isFunction(e)?P.sort.functionName=e.name:delete P.sort.functionName,P.pagination.start=0,this.pipe()},this.search=function(e,a){var s=P.search.predicateObject||{},i=a?a:"$";return e=t.isString(e)?e.trim():e,n(i).assign(s,e),e||c(s,i),P.search.predicateObject=s,P.pagination.start=0,this.pipe()},this.pipe=function(){var t,n=P.pagination;u=P.search.predicateObject?h(b,P.search.predicateObject):b,P.sort.predicate&&(u=m(u,P.sort.predicate,P.sort.reverse)),n.totalItemCount=u.length,n.number!==e&&(n.numberOfPages=u.length>0?Math.ceil(u.length/n.number):1,n.start=n.start>=u.length?(n.numberOfPages-1)*n.number:n.start,t=u.slice(n.start,n.start+parseInt(n.number))),f(a,t||u)},this.select=function(t,n){var s=r(d(a)),i=s.indexOf(t);-1!==i&&("single"===n?(t.isSelected=t.isSelected!==!0,p&&(p.isSelected=!1),p=t.isSelected===!0?t:e):s[i].isSelected=!s[i].isSelected)},this.slice=function(t,e){return P.pagination.start=t,P.pagination.number=e,this.pipe()},this.tableState=function(){return P},this.getFilteredCollection=function(){return u||b},this.setFilterFunction=function(t){h=s(t)},this.setSortFunction=function(t){m=s(t)},this.preventPipeOnWatch=function(){v=!1}}]).directive("stTable",function(){return{restrict:"A",controller:"stTableController",link:function(t,e,a,n){a.stSetFilter&&n.setFilterFunction(a.stSetFilter),a.stSetSort&&n.setSortFunction(a.stSetSort)}}}),t.module("smart-table").directive("stSearch",["stConfig","$timeout","$parse",function(t,e,a){return{require:"^stTable",link:function(n,s,i,r){var l=r,c=null,o=i.stDelay||t.search.delay,u=i.stInputEvent||t.search.inputEvent;i.$observe("stSearch",function(t,e){var a=s[0].value;t!==e&&a&&(r.tableState().search={},l.search(a,t))}),n.$watch(function(){return r.tableState().search},function(t){var e=i.stSearch||"$";t.predicateObject&&a(e)(t.predicateObject)!==s[0].value&&(s[0].value=a(e)(t.predicateObject)||"")},!0),s.bind(u,function(t){t=t.originalEvent||t,null!==c&&e.cancel(c),c=e(function(){l.search(t.target.value,i.stSearch||""),c=null},o)})}}}]),t.module("smart-table").directive("stSelectRow",["stConfig",function(t){return{restrict:"A",require:"^stTable",scope:{row:"=stSelectRow"},link:function(e,a,n,s){var i=n.stSelectMode||t.select.mode;a.bind("click",function(){e.$apply(function(){s.select(e.row,i)})}),e.$watch("row.isSelected",function(e){e===!0?a.addClass(t.select.selectedClass):a.removeClass(t.select.selectedClass)})}}}]),t.module("smart-table").directive("stSort",["stConfig","$parse","$timeout",function(a,n,s){return{restrict:"A",require:"^stTable",link:function(i,r,l,c){function o(){P?d=0===d?2:d-1:d++;var e;p=t.isFunction(g(i))||t.isArray(g(i))?g(i):l.stSort,d%3===0&&!!b!=!0?(d=0,c.tableState().sort={},c.tableState().pagination.start=0,e=c.pipe.bind(c)):e=c.sortBy.bind(c,p,d%2===0),null!==v&&s.cancel(v),0>S?e():v=s(e,S)}var u,p=l.stSort,g=n(p),d=0,f=l.stClassAscent||a.sort.ascentClass,m=l.stClassDescent||a.sort.descentClass,h=[f,m],b=l.stSkipNatural!==e?l.stSkipNatural:a.sort.skipNatural,P=l.stDescendingFirst!==e?l.stDescendingFirst:a.sort.descendingFirst,v=null,S=l.stDelay||a.sort.delay;l.stSortDefault&&(u=i.$eval(l.stSortDefault)!==e?i.$eval(l.stSortDefault):l.stSortDefault),r.bind("click",function(){p&&i.$apply(o)}),u&&(d="reverse"===u?1:0,o()),i.$watch(function(){return c.tableState().sort},function(t){t.predicate!==p?(d=0,r.removeClass(f).removeClass(m)):(d=t.reverse===!0?2:1,r.removeClass(h[d%2]).addClass(h[d-1]))},!0)}}}]),t.module("smart-table").directive("stPagination",["stConfig",function(t){return{restrict:"EA",require:"^stTable",scope:{stItemsByPage:"=?",stDisplayedPages:"=?",stPageChange:"&"},templateUrl:function(e,a){return a.stTemplate?a.stTemplate:t.pagination.template},link:function(e,a,n,s){function i(){var t,a,n=s.tableState().pagination,i=1,r=e.currentPage;for(e.totalItemCount=n.totalItemCount,e.currentPage=Math.floor(n.start/n.number)+1,i=Math.max(i,e.currentPage-Math.abs(Math.floor(e.stDisplayedPages/2))),t=i+e.stDisplayedPages,t>n.numberOfPages&&(t=n.numberOfPages+1,i=Math.max(1,t-e.stDisplayedPages)),e.pages=[],e.numPages=n.numberOfPages,a=i;t>a;a++)e.pages.push(a);r!==e.currentPage&&e.stPageChange({newPage:e.currentPage})}e.stItemsByPage=e.stItemsByPage?+e.stItemsByPage:t.pagination.itemsByPage,e.stDisplayedPages=e.stDisplayedPages?+e.stDisplayedPages:t.pagination.displayedPages,e.currentPage=1,e.pages=[],e.$watch(function(){return s.tableState().pagination},i,!0),e.$watch("stItemsByPage",function(t,a){t!==a&&e.selectPage(1)}),e.$watch("stDisplayedPages",i),e.selectPage=function(t){t>0&&t<=e.numPages&&s.slice((t-1)*e.stItemsByPage,e.stItemsByPage)},s.tableState().pagination.number||s.slice(0,e.stItemsByPage)}}}]),t.module("smart-table").directive("stPipe",["stConfig","$timeout",function(e,a){return{require:"stTable",scope:{stPipe:"="},link:{pre:function(n,s,i,r){var l=null;t.isFunction(n.stPipe)&&(r.preventPipeOnWatch(),r.pipe=function(){return null!==l&&a.cancel(l),l=a(function(){n.stPipe(r.tableState(),r)},e.pipe.delay)})},post:function(t,e,a,n){n.pipe()}}}}])}(angular);
2362 !function(t,e){"use strict";t.module("smart-table",[]).run(["$templateCache",function(t){t.put("template/smart-table/pagination.html",'<nav ng-if="numPages && pages.length >= 2"><ul class="pagination"><li ng-repeat="page in pages" ng-class="{active: page==currentPage}"><a href="javascript: void(0);" ng-click="selectPage(page)">{{page}}</a></li></ul></nav>')}]),t.module("smart-table").constant("stConfig",{pagination:{template:"template/smart-table/pagination.html",itemsByPage:10,displayedPages:5},search:{delay:400,inputEvent:"input"},select:{mode:"single",selectedClass:"st-selected"},sort:{ascentClass:"st-sort-ascent",descentClass:"st-sort-descent",descendingFirst:!1,skipNatural:!1,delay:300},pipe:{delay:100}}),t.module("smart-table").controller("stTableController",["$scope","$parse","$filter","$attrs",function(a,n,s,i){function r(t){return t?[].concat(t):[]}function l(){b=r(o(a)),v===!0&&S.pipe()}function c(t,e){if(-1!=e.indexOf(".")){var a=e.split("."),s=a.pop(),i=a.join("."),r=n(i)(t);delete r[s],0==Object.keys(r).length&&c(t,i)}else delete t[e]}var o,u,p,g=i.stTable,d=n(g),f=d.assign,m=s("orderBy"),h=s("filter"),b=r(d(a)),P={sort:{},search:{},pagination:{start:0,totalItemCount:0}},v=!0,S=this;i.stSafeSrc&&(o=n(i.stSafeSrc),a.$watch(function(){var t=o(a);return t&&t.length?t[0]:e},function(t,e){t!==e&&l()}),a.$watch(function(){var t=o(a);return t?t.length:0},function(t){t!==b.length&&l()}),a.$watch(function(){return o(a)},function(t,e){t!==e&&(P.pagination.start=0,l())})),this.sortBy=function(e,a){return P.sort.predicate=e,P.sort.reverse=a===!0,t.isFunction(e)?P.sort.functionName=e.name:delete P.sort.functionName,P.pagination.start=0,this.pipe()},this.search=function(e,a){var s=P.search.predicateObject||{},i=a?a:"$";return e=t.isString(e)?e.trim():e,n(i).assign(s,e),e||c(s,i),P.search.predicateObject=s,P.pagination.start=0,this.pipe()},this.pipe=function(){var t,n=P.pagination;u=P.search.predicateObject?h(b,P.search.predicateObject):b,P.sort.predicate&&(u=m(u,P.sort.predicate,P.sort.reverse)),n.totalItemCount=u.length,n.number!==e&&(n.numberOfPages=u.length>0?Math.ceil(u.length/n.number):1,n.start=n.start>=u.length?(n.numberOfPages-1)*n.number:n.start,t=u.slice(n.start,n.start+parseInt(n.number))),f(a,t||u)},this.select=function(t,n){var s=r(d(a)),i=s.indexOf(t);-1!==i&&("single"===n?(t.isSelected=t.isSelected!==!0,p&&(p.isSelected=!1),p=t.isSelected===!0?t:e):s[i].isSelected=!s[i].isSelected)},this.slice=function(t,e){return P.pagination.start=t,P.pagination.number=e,this.pipe()},this.tableState=function(){return P},this.getFilteredCollection=function(){return u||b},this.setFilterFunction=function(t){h=s(t)},this.setSortFunction=function(t){m=s(t)},this.preventPipeOnWatch=function(){v=!1}}]).directive("stTable",function(){return{restrict:"A",controller:"stTableController",link:function(t,e,a,n){a.stSetFilter&&n.setFilterFunction(a.stSetFilter),a.stSetSort&&n.setSortFunction(a.stSetSort)}}}),t.module("smart-table").directive("stSearch",["stConfig","$timeout","$parse",function(t,e,a){return{require:"^stTable",link:function(n,s,i,r){var l=r,c=null,o=i.stDelay||t.search.delay,u=i.stInputEvent||t.search.inputEvent;i.$observe("stSearch",function(t,e){var a=s[0].value;t!==e&&a&&(r.tableState().search={},l.search(a,t))}),n.$watch(function(){return r.tableState().search},function(t){var e=i.stSearch||"$";t.predicateObject&&a(e)(t.predicateObject)!==s[0].value&&(s[0].value=a(e)(t.predicateObject)||"")},!0),s.bind(u,function(t){t=t.originalEvent||t,null!==c&&e.cancel(c),c=e(function(){l.search(t.target.value,i.stSearch||""),c=null},o)})}}}]),t.module("smart-table").directive("stSelectRow",["stConfig",function(t){return{restrict:"A",require:"^stTable",scope:{row:"=stSelectRow"},link:function(e,a,n,s){var i=n.stSelectMode||t.select.mode;a.bind("click",function(){e.$apply(function(){s.select(e.row,i)})}),e.$watch("row.isSelected",function(e){e===!0?a.addClass(t.select.selectedClass):a.removeClass(t.select.selectedClass)})}}}]),t.module("smart-table").directive("stSort",["stConfig","$parse","$timeout",function(a,n,s){return{restrict:"A",require:"^stTable",link:function(i,r,l,c){function o(){P?d=0===d?2:d-1:d++;var e;p=t.isFunction(g(i))||t.isArray(g(i))?g(i):l.stSort,d%3===0&&!!b!=!0?(d=0,c.tableState().sort={},c.tableState().pagination.start=0,e=c.pipe.bind(c)):e=c.sortBy.bind(c,p,d%2===0),null!==v&&s.cancel(v),0>S?e():v=s(e,S)}var u,p=l.stSort,g=n(p),d=0,f=l.stClassAscent||a.sort.ascentClass,m=l.stClassDescent||a.sort.descentClass,h=[f,m],b=l.stSkipNatural!==e?l.stSkipNatural:a.sort.skipNatural,P=l.stDescendingFirst!==e?l.stDescendingFirst:a.sort.descendingFirst,v=null,S=l.stDelay||a.sort.delay;l.stSortDefault&&(u=i.$eval(l.stSortDefault)!==e?i.$eval(l.stSortDefault):l.stSortDefault),r.bind("click",function(){p&&i.$apply(o)}),u&&(d="reverse"===u?1:0,o()),i.$watch(function(){return c.tableState().sort},function(t){t.predicate!==p?(d=0,r.removeClass(f).removeClass(m)):(d=t.reverse===!0?2:1,r.removeClass(h[d%2]).addClass(h[d-1]))},!0)}}}]),t.module("smart-table").directive("stPagination",["stConfig",function(t){return{restrict:"EA",require:"^stTable",scope:{stItemsByPage:"=?",stDisplayedPages:"=?",stPageChange:"&"},templateUrl:function(e,a){return a.stTemplate?a.stTemplate:t.pagination.template},link:function(e,a,n,s){function i(){var t,a,n=s.tableState().pagination,i=1,r=e.currentPage;for(e.totalItemCount=n.totalItemCount,e.currentPage=Math.floor(n.start/n.number)+1,i=Math.max(i,e.currentPage-Math.abs(Math.floor(e.stDisplayedPages/2))),t=i+e.stDisplayedPages,t>n.numberOfPages&&(t=n.numberOfPages+1,i=Math.max(1,t-e.stDisplayedPages)),e.pages=[],e.numPages=n.numberOfPages,a=i;t>a;a++)e.pages.push(a);r!==e.currentPage&&e.stPageChange({newPage:e.currentPage})}e.stItemsByPage=e.stItemsByPage?+e.stItemsByPage:t.pagination.itemsByPage,e.stDisplayedPages=e.stDisplayedPages?+e.stDisplayedPages:t.pagination.displayedPages,e.currentPage=1,e.pages=[],e.$watch(function(){return s.tableState().pagination},i,!0),e.$watch("stItemsByPage",function(t,a){t!==a&&e.selectPage(1)}),e.$watch("stDisplayedPages",i),e.selectPage=function(t){t>0&&t<=e.numPages&&s.slice((t-1)*e.stItemsByPage,e.stItemsByPage)},s.tableState().pagination.number||s.slice(0,e.stItemsByPage)}}}]),t.module("smart-table").directive("stPipe",["stConfig","$timeout",function(e,a){return{require:"stTable",scope:{stPipe:"="},link:{pre:function(n,s,i,r){var l=null;t.isFunction(n.stPipe)&&(r.preventPipeOnWatch(),r.pipe=function(){return null!==l&&a.cancel(l),l=a(function(){n.stPipe(r.tableState(),r)},e.pipe.delay)})},post:function(t,e,a,n){n.pipe()}}}}])}(angular);
2363 //# sourceMappingURL=smart-table.min.js.map
2363 //# sourceMappingURL=smart-table.min.js.map
2364
2364
2365 ;"use strict";angular.module("mentio",[]).directive("mentio",["mentioUtil","$document","$compile","$log","$timeout",function(e,t,n,r,i){return{restrict:"A",scope:{macros:"=mentioMacros",search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",typedTerm:"=mentioTypedTerm",altId:"=mentioId",iframeElement:"=mentioIframeElement",requireLeadingSpace:"=mentioRequireLeadingSpace",selectNotFound:"=mentioSelectNotFound",trimTerm:"=mentioTrimTerm",ngModel:"="},controller:["$scope","$timeout","$attrs",function(n,r,i){n.query=function(e,t){var r=n.triggerCharMap[e];(void 0===n.trimTerm||n.trimTerm)&&(t=t.trim()),r.showMenu(),r.search({term:t}),r.typedTerm=t},n.defaultSearch=function(e){var t=[];angular.forEach(n.items,function(n){n.label.toUpperCase().indexOf(e.term.toUpperCase())>=0&&t.push(n)}),n.localItems=t},n.bridgeSearch=function(e){var t=i.mentioSearch?n.search:n.defaultSearch;t({term:e})},n.defaultSelect=function(e){return n.defaultTriggerChar+e.item.label},n.bridgeSelect=function(e){var t=i.mentioSelect?n.select:n.defaultSelect;return t({item:e})},n.setTriggerText=function(e){n.syncTriggerText&&(n.typedTerm=void 0===n.trimTerm||n.trimTerm?e.trim():e)},n.context=function(){return n.iframeElement?{iframe:n.iframeElement}:void 0},n.replaceText=function(t,i){if(n.hideAll(),e.replaceTriggerText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.triggerCharSet,t,n.requireLeadingSpace,i),!i&&(n.setTriggerText(""),angular.element(n.targetElement).triggerHandler("change"),n.isContentEditable())){n.contentEditableMenuPasted=!0;var o=r(function(){n.contentEditableMenuPasted=!1},200);n.$on("$destroy",function(){r.cancel(o)})}},n.hideAll=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].hideMenu()},n.getActiveMenuScope=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return n.triggerCharMap[e];return null},n.selectActive=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible&&n.triggerCharMap[e].selectActive()},n.isActive=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return!0;return!1},n.isContentEditable=function(){return"INPUT"!==n.targetElement.nodeName&&"TEXTAREA"!==n.targetElement.nodeName},n.replaceMacro=function(t,i){i?e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]):(n.replacingMacro=!0,n.timer=r(function(){e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]),angular.element(n.targetElement).triggerHandler("change"),n.replacingMacro=!1},300),n.$on("$destroy",function(){r.cancel(n.timer)}))},n.addMenu=function(e){e.parentScope&&n.triggerCharMap.hasOwnProperty(e.triggerChar)||(n.triggerCharMap[e.triggerChar]=e,void 0===n.triggerCharSet&&(n.triggerCharSet=[]),n.triggerCharSet.push(e.triggerChar),e.setParent(n))},n.$on("menuCreated",function(e,t){(void 0!==i.id||void 0!==i.mentioId)&&(i.id===t.targetElement||void 0!==i.mentioId&&n.altId===t.targetElement)&&n.addMenu(t.scope)}),t.on("click",function(){n.isActive()&&n.$apply(function(){n.hideAll()})}),t.on("keydown keypress paste",function(e){var t=n.getActiveMenuScope();t&&((9===e.which||13===e.which)&&(e.preventDefault(),t.selectActive()),27===e.which&&(e.preventDefault(),t.$apply(function(){t.hideMenu()})),40===e.which&&(e.preventDefault(),t.$apply(function(){t.activateNextItem()}),t.adjustScroll(1)),38===e.which&&(e.preventDefault(),t.$apply(function(){t.activatePreviousItem()}),t.adjustScroll(-1)),(37===e.which||39===e.which)&&e.preventDefault())})}],link:function(t,o,a){function c(e){function n(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}var r=t.getActiveMenuScope();if(r){if(9===e.which||13===e.which)return n(e),r.selectActive(),!1;if(27===e.which)return n(e),r.$apply(function(){r.hideMenu()}),!1;if(40===e.which)return n(e),r.$apply(function(){r.activateNextItem()}),r.adjustScroll(1),!1;if(38===e.which)return n(e),r.$apply(function(){r.activatePreviousItem()}),r.adjustScroll(-1),!1;if(37===e.which||39===e.which)return n(e),!1}}if(t.triggerCharMap={},t.targetElement=o,a.$set("autocomplete","off"),a.mentioItems){t.localItems=[],t.parentScope=t;var l=a.mentioSearch?' mentio-items="items"':' mentio-items="localItems"';t.defaultTriggerChar=a.mentioTriggerChar?t.$eval(a.mentioTriggerChar):"@";var s='<mentio-menu mentio-search="bridgeSearch(term)" mentio-select="bridgeSelect(item)"'+l;a.mentioTemplateUrl&&(s=s+' mentio-template-url="'+a.mentioTemplateUrl+'"'),s=s+" mentio-trigger-char=\"'"+t.defaultTriggerChar+'\'" mentio-parent-scope="parentScope"/>';var m=n(s),u=m(t);o.parent().append(u),t.$on("$destroy",function(){u.remove()})}a.mentioTypedTerm&&(t.syncTriggerText=!0),t.$watch("iframeElement",function(e){if(e){var n=e.contentWindow.document;n.addEventListener("click",function(){t.isActive()&&t.$apply(function(){t.hideAll()})}),n.addEventListener("keydown",c,!0),t.$on("$destroy",function(){n.removeEventListener("keydown",c)})}}),t.$watch("ngModel",function(n){if(n&&""!==n||t.isActive()){if(void 0===t.triggerCharSet)return void r.error("Error, no mentio-items attribute was provided, and no separate mentio-menus were specified. Nothing to do.");if(t.contentEditableMenuPasted)return void(t.contentEditableMenuPasted=!1);t.replacingMacro&&(i.cancel(t.timer),t.replacingMacro=!1);var o=t.isActive(),a=t.isContentEditable(),c=e.getTriggerInfo(t.context(),t.triggerCharSet,t.requireLeadingSpace,o);if(void 0!==c&&(!o||o&&(a&&c.mentionTriggerChar===t.currentMentionTriggerChar||!a&&c.mentionPosition===t.currentMentionPosition)))c.mentionSelectedElement&&(t.targetElement=c.mentionSelectedElement,t.targetElementPath=c.mentionSelectedPath,t.targetElementSelectedOffset=c.mentionSelectedOffset),t.setTriggerText(c.mentionText),t.currentMentionPosition=c.mentionPosition,t.currentMentionTriggerChar=c.mentionTriggerChar,t.query(c.mentionTriggerChar,c.mentionText);else{var l=t.typedTerm;t.setTriggerText(""),t.hideAll();var s=e.getMacroMatch(t.context(),t.macros);if(void 0!==s)t.targetElement=s.macroSelectedElement,t.targetElementPath=s.macroSelectedPath,t.targetElementSelectedOffset=s.macroSelectedOffset,t.replaceMacro(s.macroText,s.macroHasTrailingSpace);else if(t.selectNotFound&&l&&""!==l){var m=t.triggerCharMap[t.currentMentionTriggerChar];if(m){var u=m.select({item:{label:l}});"function"==typeof u.then?u.then(t.replaceText):t.replaceText(u,!0)}}}}})}}}]).directive("mentioMenu",["mentioUtil","$rootScope","$log","$window","$document",function(e,t,n,r,i){return{restrict:"E",scope:{search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",triggerChar:"=mentioTriggerChar",forElem:"=mentioFor",parentScope:"=mentioParentScope"},templateUrl:function(e,t){return void 0!==t.mentioTemplateUrl?t.mentioTemplateUrl:"mentio-menu.tpl.html"},controller:["$scope",function(e){e.visible=!1,this.activate=e.activate=function(t){e.activeItem=t},this.isActive=e.isActive=function(t){return e.activeItem===t},this.selectItem=e.selectItem=function(t){var n=e.select({item:t});"function"==typeof n.then?n.then(e.parentMentio.replaceText):e.parentMentio.replaceText(n)},e.activateNextItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[(t+1)%e.items.length])},e.activatePreviousItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[0===t?e.items.length-1:t-1])},e.isFirstItemActive=function(){var t=e.items.indexOf(e.activeItem);return 0===t},e.isLastItemActive=function(){var t=e.items.indexOf(e.activeItem);return t===e.items.length-1},e.selectActive=function(){e.selectItem(e.activeItem)},e.isVisible=function(){return e.visible},e.showMenu=function(){e.visible||(e.requestVisiblePendingSearch=!0)},e.setParent=function(t){e.parentMentio=t,e.targetElement=t.targetElement}}],link:function(o,a){if(a[0].parentNode.removeChild(a[0]),i[0].body.appendChild(a[0]),o.menuElement=a,o.parentScope)o.parentScope.addMenu(o);else{if(!o.forElem)return void n.error("mentio-menu requires a target element in tbe mentio-for attribute");if(!o.triggerChar)return void n.error("mentio-menu requires a trigger char");t.$broadcast("menuCreated",{targetElement:o.forElem,scope:o})}angular.element(r).bind("resize",function(){if(o.isVisible()){var t=[];t.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),t,a,o.requireLeadingSpace)}}),o.$watch("items",function(e){e&&e.length>0?(o.activate(e[0]),!o.visible&&o.requestVisiblePendingSearch&&(o.visible=!0,o.requestVisiblePendingSearch=!1)):o.hideMenu()}),o.$watch("isVisible()",function(t){if(t){var n=[];n.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),n,a,o.requireLeadingSpace)}}),o.parentMentio.$on("$destroy",function(){a.remove()}),o.hideMenu=function(){o.visible=!1,a.css("display","none")},o.adjustScroll=function(e){var t=a[0],n=t.querySelector("ul"),r=t.querySelector("[mentio-menu-item].active")||t.querySelector("[data-mentio-menu-item].active");return o.isFirstItemActive()?n.scrollTop=0:o.isLastItemActive()?n.scrollTop=n.scrollHeight:void(1===e?n.scrollTop+=r.offsetHeight:n.scrollTop-=r.offsetHeight)}}}}]).directive("mentioMenuItem",function(){return{restrict:"A",scope:{item:"=mentioMenuItem"},require:"^mentioMenu",link:function(e,t,n,r){e.$watch(function(){return r.isActive(e.item)},function(e){e?t.addClass("active"):t.removeClass("active")}),t.bind("mouseenter",function(){e.$apply(function(){r.activate(e.item)})}),t.bind("click",function(){return r.selectItem(e.item),!1})}}}).filter("unsafe",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]).filter("mentioHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n,r){if(n){var i=r?'<span class="'+r+'">$&</span>':"<strong>$&</strong>";return(""+t).replace(new RegExp(e(n),"gi"),i)}return t}}),angular.module("mentio").factory("mentioUtil",["$window","$location","$anchorScroll","$timeout",function(e,t,n,r){function i(e,t,n,i){var c,l=h(e,t,i,!1);void 0!==l?(c=a(e)?b(e,v(e).activeElement,l.mentionPosition):S(e,l.mentionPosition),n.css({top:c.top+"px",left:c.left+"px",position:"absolute",zIndex:1e4,display:"block"}),r(function(){o(e,n)},0)):n.css({display:"none"})}function o(t,n){for(var r,i=20,o=100,a=n[0];void 0===r||0===r.height;)if(r=a.getBoundingClientRect(),0===r.height&&(a=a.childNodes[0],void 0===a||!a.getBoundingClientRect))return;var c=r.top,l=c+r.height;if(0>c)e.scrollTo(0,e.pageYOffset+r.top-i);else if(l>e.innerHeight){var s=e.pageYOffset+r.top-i;s-e.pageYOffset>o&&(s=e.pageYOffset+o);var m=e.pageYOffset-(e.innerHeight-l);m>s&&(m=s),e.scrollTo(0,m)}}function a(e){var t=v(e).activeElement;if(null!==t){var n=t.nodeName,r=t.getAttribute("type");return"INPUT"===n&&"text"===r||"TEXTAREA"===n}return!1}function c(e,t,n,r){var i,o=t;if(n)for(var a=0;a<n.length;a++){if(o=o.childNodes[n[a]],void 0===o)return;for(;o.length<r;)r-=o.length,o=o.nextSibling;0!==o.childNodes.length||o.length||(o=o.previousSibling)}var c=p(e);i=v(e).createRange(),i.setStart(o,r),i.setEnd(o,r),i.collapse(!0);try{c.removeAllRanges()}catch(l){}c.addRange(i),t.focus()}function l(e,t,n,r){var i,o;o=p(e),i=v(e).createRange(),i.setStart(o.anchorNode,n),i.setEnd(o.anchorNode,r),i.deleteContents();var a=v(e).createElement("div");a.innerHTML=t;for(var c,l,s=v(e).createDocumentFragment();c=a.firstChild;)l=s.appendChild(c);i.insertNode(s),l&&(i=i.cloneRange(),i.setStartAfter(l),i.collapse(!0),o.removeAllRanges(),o.addRange(i))}function s(e,t,n,r){var i=t.nodeName;"INPUT"===i||"TEXTAREA"===i?t!==v(e).activeElement&&t.focus():c(e,t,n,r)}function m(e,t,n,r,i,o){s(e,t,n,r);var c=d(e,i);if(c.macroHasTrailingSpace&&(c.macroText=c.macroText+"Β ",o+="Β "),void 0!==c){var m=v(e).activeElement;if(a(e)){var u=c.macroPosition,g=c.macroPosition+c.macroText.length;m.value=m.value.substring(0,u)+o+m.value.substring(g,m.value.length),m.selectionStart=u+o.length,m.selectionEnd=u+o.length}else l(e,o,c.macroPosition,c.macroPosition+c.macroText.length)}}function u(e,t,n,r,i,o,c,m){s(e,t,n,r);var u=h(e,i,c,!0,m);if(void 0!==u)if(a()){var g=v(e).activeElement;o+=" ";var d=u.mentionPosition,f=u.mentionPosition+u.mentionText.length+1;g.value=g.value.substring(0,d)+o+g.value.substring(f,g.value.length),g.selectionStart=d+o.length,g.selectionEnd=d+o.length}else o+="Β ",l(e,o,u.mentionPosition,u.mentionPosition+u.mentionText.length+1)}function g(e,t){if(null===t.parentNode)return 0;for(var n=0;n<t.parentNode.childNodes.length;n++){var r=t.parentNode.childNodes[n];if(r===t)return n}}function d(e,t){var n,r,i=[];if(a(e))n=v(e).activeElement;else{var o=f(e);o&&(n=o.selected,i=o.path,r=o.offset)}var c=T(e);if(void 0!==c&&null!==c){var l,s=!1;if(c.length>0&&("Β "===c.charAt(c.length-1)||" "===c.charAt(c.length-1))&&(s=!0,c=c.substring(0,c.length-1)),angular.forEach(t,function(e,t){var o=c.toUpperCase().lastIndexOf(t.toUpperCase());if(o>=0&&t.length+o===c.length){var a=o-1;(0===o||"Β "===c.charAt(a)||" "===c.charAt(a))&&(l={macroPosition:o,macroText:t,macroSelectedElement:n,macroSelectedPath:i,macroSelectedOffset:r,macroHasTrailingSpace:s})}}),l)return l}}function f(e){var t,n=p(e),r=n.anchorNode,i=[];if(null!=r){for(var o,a=r.contentEditable;null!==r&&"true"!==a;)o=g(e,r),i.push(o),r=r.parentNode,null!==r&&(a=r.contentEditable);return i.reverse(),t=n.getRangeAt(0).startOffset,{selected:r,path:i,offset:t}}}function h(e,t,n,r,i){var o,c,l;if(a(e))o=v(e).activeElement;else{var s=f(e);s&&(o=s.selected,c=s.path,l=s.offset)}var m=T(e);if(void 0!==m&&null!==m){var u,g=-1;if(t.forEach(function(e){var t=m.lastIndexOf(e);t>g&&(g=t,u=e)}),g>=0&&(0===g||!n||/[\xA0\s]/g.test(m.substring(g-1,g)))){var d=m.substring(g+1,m.length);u=m.substring(g,g+1);var h=d.substring(0,1),p=d.length>0&&(" "===h||"Β "===h);if(i&&(d=d.trim()),!p&&(r||!/[\xA0\s]/g.test(d)))return{mentionPosition:g,mentionText:d,mentionSelectedElement:o,mentionSelectedPath:c,mentionSelectedOffset:l,mentionTriggerChar:u}}}}function p(e){return e?e.iframe.contentWindow.getSelection():window.getSelection()}function v(e){return e?e.iframe.contentWindow.document:document}function T(e){var t;if(a(e)){var n=v(e).activeElement,r=n.selectionStart;t=n.value.substring(0,r)}else{var i=p(e).anchorNode;if(null!=i){var o=i.textContent,c=p(e).getRangeAt(0).startOffset;c>=0&&(t=o.substring(0,c))}}return t}function S(e,t){var n,r,i="ο»Ώ",o="sel_"+(new Date).getTime()+"_"+Math.random().toString().substr(2),a=p(e),c=a.getRangeAt(0);r=v(e).createRange(),r.setStart(a.anchorNode,t),r.setEnd(a.anchorNode,t),r.collapse(!1),n=v(e).createElement("span"),n.id=o,n.appendChild(v(e).createTextNode(i)),r.insertNode(n),a.removeAllRanges(),a.addRange(c);var l={left:0,top:n.offsetHeight};return E(e,n,l),n.parentNode.removeChild(n),l}function E(e,t,n){for(var r=t,i=e?e.iframe:null;r;)n.left+=r.offsetLeft+r.clientLeft,n.top+=r.offsetTop+r.clientTop,r=r.offsetParent,!r&&i&&(r=i,i=null);for(r=t,i=e?e.iframe:null;r!==v().body;)r.scrollTop&&r.scrollTop>0&&(n.top-=r.scrollTop),r.scrollLeft&&r.scrollLeft>0&&(n.left-=r.scrollLeft),r=r.parentNode,!r&&i&&(r=i,i=null)}function b(e,t,n){var r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],i=null!==window.mozInnerScreenX,o=v(e).createElement("div");o.id="input-textarea-caret-position-mirror-div",v(e).body.appendChild(o);var a=o.style,c=window.getComputedStyle?getComputedStyle(t):t.currentStyle;a.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(a.wordWrap="break-word"),a.position="absolute",a.visibility="hidden",r.forEach(function(e){a[e]=c[e]}),i?(a.width=parseInt(c.width)-2+"px",t.scrollHeight>parseInt(c.height)&&(a.overflowY="scroll")):a.overflow="hidden",o.textContent=t.value.substring(0,n),"INPUT"===t.nodeName&&(o.textContent=o.textContent.replace(/\s/g,"Β "));var l=v(e).createElement("span");l.textContent=t.value.substring(n)||".",o.appendChild(l);var s={top:l.offsetTop+parseInt(c.borderTopWidth)+parseInt(c.fontSize),left:l.offsetLeft+parseInt(c.borderLeftWidth)};return E(e,t,s),v(e).body.removeChild(o),s}return{popUnderMention:i,replaceMacroText:m,replaceTriggerText:u,getMacroMatch:d,getTriggerInfo:h,selectElement:c,getTextAreaOrInputUnderlinePosition:b,getTextPrecedingCurrentSelection:T,getContentEditableSelectedPath:f,getNodePositionInParent:g,getContentEditableCaretPosition:S,pasteHtml:l,resetSelection:s,scrollIntoView:o}}]),angular.module("mentio").run(["$templateCache",function(e){e.put("mentio-menu.tpl.html",'<style>\n.scrollable-menu {\n height: auto;\n max-height: 300px;\n overflow: auto;\n}\n\n.menu-highlighted {\n font-weight: bold;\n}\n</style>\n<ul class="dropdown-menu scrollable-menu" style="display:block">\n <li mentio-menu-item="item" ng-repeat="item in items track by $index">\n <a class="text-primary" ng-bind-html="item.label | mentioHighlight:typedTerm:\'menu-highlighted\' | unsafe"></a>\n </li>\n</ul>')}]);
2365 ;"use strict";angular.module("mentio",[]).directive("mentio",["mentioUtil","$document","$compile","$log","$timeout",function(e,t,n,r,i){return{restrict:"A",scope:{macros:"=mentioMacros",search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",typedTerm:"=mentioTypedTerm",altId:"=mentioId",iframeElement:"=mentioIframeElement",requireLeadingSpace:"=mentioRequireLeadingSpace",selectNotFound:"=mentioSelectNotFound",trimTerm:"=mentioTrimTerm",ngModel:"="},controller:["$scope","$timeout","$attrs",function(n,r,i){n.query=function(e,t){var r=n.triggerCharMap[e];(void 0===n.trimTerm||n.trimTerm)&&(t=t.trim()),r.showMenu(),r.search({term:t}),r.typedTerm=t},n.defaultSearch=function(e){var t=[];angular.forEach(n.items,function(n){n.label.toUpperCase().indexOf(e.term.toUpperCase())>=0&&t.push(n)}),n.localItems=t},n.bridgeSearch=function(e){var t=i.mentioSearch?n.search:n.defaultSearch;t({term:e})},n.defaultSelect=function(e){return n.defaultTriggerChar+e.item.label},n.bridgeSelect=function(e){var t=i.mentioSelect?n.select:n.defaultSelect;return t({item:e})},n.setTriggerText=function(e){n.syncTriggerText&&(n.typedTerm=void 0===n.trimTerm||n.trimTerm?e.trim():e)},n.context=function(){return n.iframeElement?{iframe:n.iframeElement}:void 0},n.replaceText=function(t,i){if(n.hideAll(),e.replaceTriggerText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.triggerCharSet,t,n.requireLeadingSpace,i),!i&&(n.setTriggerText(""),angular.element(n.targetElement).triggerHandler("change"),n.isContentEditable())){n.contentEditableMenuPasted=!0;var o=r(function(){n.contentEditableMenuPasted=!1},200);n.$on("$destroy",function(){r.cancel(o)})}},n.hideAll=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].hideMenu()},n.getActiveMenuScope=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return n.triggerCharMap[e];return null},n.selectActive=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible&&n.triggerCharMap[e].selectActive()},n.isActive=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return!0;return!1},n.isContentEditable=function(){return"INPUT"!==n.targetElement.nodeName&&"TEXTAREA"!==n.targetElement.nodeName},n.replaceMacro=function(t,i){i?e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]):(n.replacingMacro=!0,n.timer=r(function(){e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]),angular.element(n.targetElement).triggerHandler("change"),n.replacingMacro=!1},300),n.$on("$destroy",function(){r.cancel(n.timer)}))},n.addMenu=function(e){e.parentScope&&n.triggerCharMap.hasOwnProperty(e.triggerChar)||(n.triggerCharMap[e.triggerChar]=e,void 0===n.triggerCharSet&&(n.triggerCharSet=[]),n.triggerCharSet.push(e.triggerChar),e.setParent(n))},n.$on("menuCreated",function(e,t){(void 0!==i.id||void 0!==i.mentioId)&&(i.id===t.targetElement||void 0!==i.mentioId&&n.altId===t.targetElement)&&n.addMenu(t.scope)}),t.on("click",function(){n.isActive()&&n.$apply(function(){n.hideAll()})}),t.on("keydown keypress paste",function(e){var t=n.getActiveMenuScope();t&&((9===e.which||13===e.which)&&(e.preventDefault(),t.selectActive()),27===e.which&&(e.preventDefault(),t.$apply(function(){t.hideMenu()})),40===e.which&&(e.preventDefault(),t.$apply(function(){t.activateNextItem()}),t.adjustScroll(1)),38===e.which&&(e.preventDefault(),t.$apply(function(){t.activatePreviousItem()}),t.adjustScroll(-1)),(37===e.which||39===e.which)&&e.preventDefault())})}],link:function(t,o,a){function c(e){function n(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}var r=t.getActiveMenuScope();if(r){if(9===e.which||13===e.which)return n(e),r.selectActive(),!1;if(27===e.which)return n(e),r.$apply(function(){r.hideMenu()}),!1;if(40===e.which)return n(e),r.$apply(function(){r.activateNextItem()}),r.adjustScroll(1),!1;if(38===e.which)return n(e),r.$apply(function(){r.activatePreviousItem()}),r.adjustScroll(-1),!1;if(37===e.which||39===e.which)return n(e),!1}}if(t.triggerCharMap={},t.targetElement=o,a.$set("autocomplete","off"),a.mentioItems){t.localItems=[],t.parentScope=t;var l=a.mentioSearch?' mentio-items="items"':' mentio-items="localItems"';t.defaultTriggerChar=a.mentioTriggerChar?t.$eval(a.mentioTriggerChar):"@";var s='<mentio-menu mentio-search="bridgeSearch(term)" mentio-select="bridgeSelect(item)"'+l;a.mentioTemplateUrl&&(s=s+' mentio-template-url="'+a.mentioTemplateUrl+'"'),s=s+" mentio-trigger-char=\"'"+t.defaultTriggerChar+'\'" mentio-parent-scope="parentScope"/>';var m=n(s),u=m(t);o.parent().append(u),t.$on("$destroy",function(){u.remove()})}a.mentioTypedTerm&&(t.syncTriggerText=!0),t.$watch("iframeElement",function(e){if(e){var n=e.contentWindow.document;n.addEventListener("click",function(){t.isActive()&&t.$apply(function(){t.hideAll()})}),n.addEventListener("keydown",c,!0),t.$on("$destroy",function(){n.removeEventListener("keydown",c)})}}),t.$watch("ngModel",function(n){if(n&&""!==n||t.isActive()){if(void 0===t.triggerCharSet)return void r.error("Error, no mentio-items attribute was provided, and no separate mentio-menus were specified. Nothing to do.");if(t.contentEditableMenuPasted)return void(t.contentEditableMenuPasted=!1);t.replacingMacro&&(i.cancel(t.timer),t.replacingMacro=!1);var o=t.isActive(),a=t.isContentEditable(),c=e.getTriggerInfo(t.context(),t.triggerCharSet,t.requireLeadingSpace,o);if(void 0!==c&&(!o||o&&(a&&c.mentionTriggerChar===t.currentMentionTriggerChar||!a&&c.mentionPosition===t.currentMentionPosition)))c.mentionSelectedElement&&(t.targetElement=c.mentionSelectedElement,t.targetElementPath=c.mentionSelectedPath,t.targetElementSelectedOffset=c.mentionSelectedOffset),t.setTriggerText(c.mentionText),t.currentMentionPosition=c.mentionPosition,t.currentMentionTriggerChar=c.mentionTriggerChar,t.query(c.mentionTriggerChar,c.mentionText);else{var l=t.typedTerm;t.setTriggerText(""),t.hideAll();var s=e.getMacroMatch(t.context(),t.macros);if(void 0!==s)t.targetElement=s.macroSelectedElement,t.targetElementPath=s.macroSelectedPath,t.targetElementSelectedOffset=s.macroSelectedOffset,t.replaceMacro(s.macroText,s.macroHasTrailingSpace);else if(t.selectNotFound&&l&&""!==l){var m=t.triggerCharMap[t.currentMentionTriggerChar];if(m){var u=m.select({item:{label:l}});"function"==typeof u.then?u.then(t.replaceText):t.replaceText(u,!0)}}}}})}}}]).directive("mentioMenu",["mentioUtil","$rootScope","$log","$window","$document",function(e,t,n,r,i){return{restrict:"E",scope:{search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",triggerChar:"=mentioTriggerChar",forElem:"=mentioFor",parentScope:"=mentioParentScope"},templateUrl:function(e,t){return void 0!==t.mentioTemplateUrl?t.mentioTemplateUrl:"mentio-menu.tpl.html"},controller:["$scope",function(e){e.visible=!1,this.activate=e.activate=function(t){e.activeItem=t},this.isActive=e.isActive=function(t){return e.activeItem===t},this.selectItem=e.selectItem=function(t){var n=e.select({item:t});"function"==typeof n.then?n.then(e.parentMentio.replaceText):e.parentMentio.replaceText(n)},e.activateNextItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[(t+1)%e.items.length])},e.activatePreviousItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[0===t?e.items.length-1:t-1])},e.isFirstItemActive=function(){var t=e.items.indexOf(e.activeItem);return 0===t},e.isLastItemActive=function(){var t=e.items.indexOf(e.activeItem);return t===e.items.length-1},e.selectActive=function(){e.selectItem(e.activeItem)},e.isVisible=function(){return e.visible},e.showMenu=function(){e.visible||(e.requestVisiblePendingSearch=!0)},e.setParent=function(t){e.parentMentio=t,e.targetElement=t.targetElement}}],link:function(o,a){if(a[0].parentNode.removeChild(a[0]),i[0].body.appendChild(a[0]),o.menuElement=a,o.parentScope)o.parentScope.addMenu(o);else{if(!o.forElem)return void n.error("mentio-menu requires a target element in tbe mentio-for attribute");if(!o.triggerChar)return void n.error("mentio-menu requires a trigger char");t.$broadcast("menuCreated",{targetElement:o.forElem,scope:o})}angular.element(r).bind("resize",function(){if(o.isVisible()){var t=[];t.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),t,a,o.requireLeadingSpace)}}),o.$watch("items",function(e){e&&e.length>0?(o.activate(e[0]),!o.visible&&o.requestVisiblePendingSearch&&(o.visible=!0,o.requestVisiblePendingSearch=!1)):o.hideMenu()}),o.$watch("isVisible()",function(t){if(t){var n=[];n.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),n,a,o.requireLeadingSpace)}}),o.parentMentio.$on("$destroy",function(){a.remove()}),o.hideMenu=function(){o.visible=!1,a.css("display","none")},o.adjustScroll=function(e){var t=a[0],n=t.querySelector("ul"),r=t.querySelector("[mentio-menu-item].active")||t.querySelector("[data-mentio-menu-item].active");return o.isFirstItemActive()?n.scrollTop=0:o.isLastItemActive()?n.scrollTop=n.scrollHeight:void(1===e?n.scrollTop+=r.offsetHeight:n.scrollTop-=r.offsetHeight)}}}}]).directive("mentioMenuItem",function(){return{restrict:"A",scope:{item:"=mentioMenuItem"},require:"^mentioMenu",link:function(e,t,n,r){e.$watch(function(){return r.isActive(e.item)},function(e){e?t.addClass("active"):t.removeClass("active")}),t.bind("mouseenter",function(){e.$apply(function(){r.activate(e.item)})}),t.bind("click",function(){return r.selectItem(e.item),!1})}}}).filter("unsafe",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]).filter("mentioHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n,r){if(n){var i=r?'<span class="'+r+'">$&</span>':"<strong>$&</strong>";return(""+t).replace(new RegExp(e(n),"gi"),i)}return t}}),angular.module("mentio").factory("mentioUtil",["$window","$location","$anchorScroll","$timeout",function(e,t,n,r){function i(e,t,n,i){var c,l=h(e,t,i,!1);void 0!==l?(c=a(e)?b(e,v(e).activeElement,l.mentionPosition):S(e,l.mentionPosition),n.css({top:c.top+"px",left:c.left+"px",position:"absolute",zIndex:1e4,display:"block"}),r(function(){o(e,n)},0)):n.css({display:"none"})}function o(t,n){for(var r,i=20,o=100,a=n[0];void 0===r||0===r.height;)if(r=a.getBoundingClientRect(),0===r.height&&(a=a.childNodes[0],void 0===a||!a.getBoundingClientRect))return;var c=r.top,l=c+r.height;if(0>c)e.scrollTo(0,e.pageYOffset+r.top-i);else if(l>e.innerHeight){var s=e.pageYOffset+r.top-i;s-e.pageYOffset>o&&(s=e.pageYOffset+o);var m=e.pageYOffset-(e.innerHeight-l);m>s&&(m=s),e.scrollTo(0,m)}}function a(e){var t=v(e).activeElement;if(null!==t){var n=t.nodeName,r=t.getAttribute("type");return"INPUT"===n&&"text"===r||"TEXTAREA"===n}return!1}function c(e,t,n,r){var i,o=t;if(n)for(var a=0;a<n.length;a++){if(o=o.childNodes[n[a]],void 0===o)return;for(;o.length<r;)r-=o.length,o=o.nextSibling;0!==o.childNodes.length||o.length||(o=o.previousSibling)}var c=p(e);i=v(e).createRange(),i.setStart(o,r),i.setEnd(o,r),i.collapse(!0);try{c.removeAllRanges()}catch(l){}c.addRange(i),t.focus()}function l(e,t,n,r){var i,o;o=p(e),i=v(e).createRange(),i.setStart(o.anchorNode,n),i.setEnd(o.anchorNode,r),i.deleteContents();var a=v(e).createElement("div");a.innerHTML=t;for(var c,l,s=v(e).createDocumentFragment();c=a.firstChild;)l=s.appendChild(c);i.insertNode(s),l&&(i=i.cloneRange(),i.setStartAfter(l),i.collapse(!0),o.removeAllRanges(),o.addRange(i))}function s(e,t,n,r){var i=t.nodeName;"INPUT"===i||"TEXTAREA"===i?t!==v(e).activeElement&&t.focus():c(e,t,n,r)}function m(e,t,n,r,i,o){s(e,t,n,r);var c=d(e,i);if(c.macroHasTrailingSpace&&(c.macroText=c.macroText+"Β ",o+="Β "),void 0!==c){var m=v(e).activeElement;if(a(e)){var u=c.macroPosition,g=c.macroPosition+c.macroText.length;m.value=m.value.substring(0,u)+o+m.value.substring(g,m.value.length),m.selectionStart=u+o.length,m.selectionEnd=u+o.length}else l(e,o,c.macroPosition,c.macroPosition+c.macroText.length)}}function u(e,t,n,r,i,o,c,m){s(e,t,n,r);var u=h(e,i,c,!0,m);if(void 0!==u)if(a()){var g=v(e).activeElement;o+=" ";var d=u.mentionPosition,f=u.mentionPosition+u.mentionText.length+1;g.value=g.value.substring(0,d)+o+g.value.substring(f,g.value.length),g.selectionStart=d+o.length,g.selectionEnd=d+o.length}else o+="Β ",l(e,o,u.mentionPosition,u.mentionPosition+u.mentionText.length+1)}function g(e,t){if(null===t.parentNode)return 0;for(var n=0;n<t.parentNode.childNodes.length;n++){var r=t.parentNode.childNodes[n];if(r===t)return n}}function d(e,t){var n,r,i=[];if(a(e))n=v(e).activeElement;else{var o=f(e);o&&(n=o.selected,i=o.path,r=o.offset)}var c=T(e);if(void 0!==c&&null!==c){var l,s=!1;if(c.length>0&&("Β "===c.charAt(c.length-1)||" "===c.charAt(c.length-1))&&(s=!0,c=c.substring(0,c.length-1)),angular.forEach(t,function(e,t){var o=c.toUpperCase().lastIndexOf(t.toUpperCase());if(o>=0&&t.length+o===c.length){var a=o-1;(0===o||"Β "===c.charAt(a)||" "===c.charAt(a))&&(l={macroPosition:o,macroText:t,macroSelectedElement:n,macroSelectedPath:i,macroSelectedOffset:r,macroHasTrailingSpace:s})}}),l)return l}}function f(e){var t,n=p(e),r=n.anchorNode,i=[];if(null!=r){for(var o,a=r.contentEditable;null!==r&&"true"!==a;)o=g(e,r),i.push(o),r=r.parentNode,null!==r&&(a=r.contentEditable);return i.reverse(),t=n.getRangeAt(0).startOffset,{selected:r,path:i,offset:t}}}function h(e,t,n,r,i){var o,c,l;if(a(e))o=v(e).activeElement;else{var s=f(e);s&&(o=s.selected,c=s.path,l=s.offset)}var m=T(e);if(void 0!==m&&null!==m){var u,g=-1;if(t.forEach(function(e){var t=m.lastIndexOf(e);t>g&&(g=t,u=e)}),g>=0&&(0===g||!n||/[\xA0\s]/g.test(m.substring(g-1,g)))){var d=m.substring(g+1,m.length);u=m.substring(g,g+1);var h=d.substring(0,1),p=d.length>0&&(" "===h||"Β "===h);if(i&&(d=d.trim()),!p&&(r||!/[\xA0\s]/g.test(d)))return{mentionPosition:g,mentionText:d,mentionSelectedElement:o,mentionSelectedPath:c,mentionSelectedOffset:l,mentionTriggerChar:u}}}}function p(e){return e?e.iframe.contentWindow.getSelection():window.getSelection()}function v(e){return e?e.iframe.contentWindow.document:document}function T(e){var t;if(a(e)){var n=v(e).activeElement,r=n.selectionStart;t=n.value.substring(0,r)}else{var i=p(e).anchorNode;if(null!=i){var o=i.textContent,c=p(e).getRangeAt(0).startOffset;c>=0&&(t=o.substring(0,c))}}return t}function S(e,t){var n,r,i="ο»Ώ",o="sel_"+(new Date).getTime()+"_"+Math.random().toString().substr(2),a=p(e),c=a.getRangeAt(0);r=v(e).createRange(),r.setStart(a.anchorNode,t),r.setEnd(a.anchorNode,t),r.collapse(!1),n=v(e).createElement("span"),n.id=o,n.appendChild(v(e).createTextNode(i)),r.insertNode(n),a.removeAllRanges(),a.addRange(c);var l={left:0,top:n.offsetHeight};return E(e,n,l),n.parentNode.removeChild(n),l}function E(e,t,n){for(var r=t,i=e?e.iframe:null;r;)n.left+=r.offsetLeft+r.clientLeft,n.top+=r.offsetTop+r.clientTop,r=r.offsetParent,!r&&i&&(r=i,i=null);for(r=t,i=e?e.iframe:null;r!==v().body;)r.scrollTop&&r.scrollTop>0&&(n.top-=r.scrollTop),r.scrollLeft&&r.scrollLeft>0&&(n.left-=r.scrollLeft),r=r.parentNode,!r&&i&&(r=i,i=null)}function b(e,t,n){var r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],i=null!==window.mozInnerScreenX,o=v(e).createElement("div");o.id="input-textarea-caret-position-mirror-div",v(e).body.appendChild(o);var a=o.style,c=window.getComputedStyle?getComputedStyle(t):t.currentStyle;a.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(a.wordWrap="break-word"),a.position="absolute",a.visibility="hidden",r.forEach(function(e){a[e]=c[e]}),i?(a.width=parseInt(c.width)-2+"px",t.scrollHeight>parseInt(c.height)&&(a.overflowY="scroll")):a.overflow="hidden",o.textContent=t.value.substring(0,n),"INPUT"===t.nodeName&&(o.textContent=o.textContent.replace(/\s/g,"Β "));var l=v(e).createElement("span");l.textContent=t.value.substring(n)||".",o.appendChild(l);var s={top:l.offsetTop+parseInt(c.borderTopWidth)+parseInt(c.fontSize),left:l.offsetLeft+parseInt(c.borderLeftWidth)};return E(e,t,s),v(e).body.removeChild(o),s}return{popUnderMention:i,replaceMacroText:m,replaceTriggerText:u,getMacroMatch:d,getTriggerInfo:h,selectElement:c,getTextAreaOrInputUnderlinePosition:b,getTextPrecedingCurrentSelection:T,getContentEditableSelectedPath:f,getNodePositionInParent:g,getContentEditableCaretPosition:S,pasteHtml:l,resetSelection:s,scrollIntoView:o}}]),angular.module("mentio").run(["$templateCache",function(e){e.put("mentio-menu.tpl.html",'<style>\n.scrollable-menu {\n height: auto;\n max-height: 300px;\n overflow: auto;\n}\n\n.menu-highlighted {\n font-weight: bold;\n}\n</style>\n<ul class="dropdown-menu scrollable-menu" style="display:block">\n <li mentio-menu-item="item" ng-repeat="item in items track by $index">\n <a class="text-primary" ng-bind-html="item.label | mentioHighlight:typedTerm:\'menu-highlighted\' | unsafe"></a>\n </li>\n</ul>')}]);
2366 ;moment.defaultFormat = 'YYYY-MM-DDTHH:mm';
2366 ;moment.defaultFormat = 'YYYY-MM-DDTHH:mm';
2367
2367
2368 ;// MIT License:
2368 ;// MIT License:
2369 //
2369 //
2370 // Copyright (c) 2010-2012, Joe Walnes
2370 // Copyright (c) 2010-2012, Joe Walnes
2371 //
2371 //
2372 // Permission is hereby granted, free of charge, to any person obtaining a copy
2372 // Permission is hereby granted, free of charge, to any person obtaining a copy
2373 // of this software and associated documentation files (the "Software"), to deal
2373 // of this software and associated documentation files (the "Software"), to deal
2374 // in the Software without restriction, including without limitation the rights
2374 // in the Software without restriction, including without limitation the rights
2375 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2375 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2376 // copies of the Software, and to permit persons to whom the Software is
2376 // copies of the Software, and to permit persons to whom the Software is
2377 // furnished to do so, subject to the following conditions:
2377 // furnished to do so, subject to the following conditions:
2378 //
2378 //
2379 // The above copyright notice and this permission notice shall be included in
2379 // The above copyright notice and this permission notice shall be included in
2380 // all copies or substantial portions of the Software.
2380 // all copies or substantial portions of the Software.
2381 //
2381 //
2382 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2382 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2383 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2383 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2384 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2384 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2385 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2385 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2386 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2386 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2387 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2387 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2388 // THE SOFTWARE.
2388 // THE SOFTWARE.
2389
2389
2390 /**
2390 /**
2391 * This behaves like a WebSocket in every way, except if it fails to connect,
2391 * This behaves like a WebSocket in every way, except if it fails to connect,
2392 * or it gets disconnected, it will repeatedly poll until it succesfully connects
2392 * or it gets disconnected, it will repeatedly poll until it succesfully connects
2393 * again.
2393 * again.
2394 *
2394 *
2395 * It is API compatible, so when you have:
2395 * It is API compatible, so when you have:
2396 * ws = new WebSocket('ws://....');
2396 * ws = new WebSocket('ws://....');
2397 * you can replace with:
2397 * you can replace with:
2398 * ws = new ReconnectingWebSocket('ws://....');
2398 * ws = new ReconnectingWebSocket('ws://....');
2399 *
2399 *
2400 * The event stream will typically look like:
2400 * The event stream will typically look like:
2401 * onconnecting
2401 * onconnecting
2402 * onopen
2402 * onopen
2403 * onmessage
2403 * onmessage
2404 * onmessage
2404 * onmessage
2405 * onclose // lost connection
2405 * onclose // lost connection
2406 * onconnecting
2406 * onconnecting
2407 * onopen // sometime later...
2407 * onopen // sometime later...
2408 * onmessage
2408 * onmessage
2409 * onmessage
2409 * onmessage
2410 * etc...
2410 * etc...
2411 *
2411 *
2412 * It is API compatible with the standard WebSocket API.
2412 * It is API compatible with the standard WebSocket API.
2413 *
2413 *
2414 * Latest version: https://github.com/joewalnes/reconnecting-websocket/
2414 * Latest version: https://github.com/joewalnes/reconnecting-websocket/
2415 * - Joe Walnes
2415 * - Joe Walnes
2416 */
2416 */
2417 function ReconnectingWebSocket(url, protocols) {
2417 function ReconnectingWebSocket(url, protocols) {
2418 protocols = protocols || [];
2418 protocols = protocols || [];
2419
2419
2420 // These can be altered by calling code.
2420 // These can be altered by calling code.
2421 this.debug = false;
2421 this.debug = false;
2422 this.reconnectInterval = 1000;
2422 this.reconnectInterval = 1000;
2423 this.timeoutInterval = 2000;
2423 this.timeoutInterval = 2000;
2424
2424
2425 var self = this;
2425 var self = this;
2426 var ws;
2426 var ws;
2427 var forcedClose = false;
2427 var forcedClose = false;
2428 var timedOut = false;
2428 var timedOut = false;
2429
2429
2430 this.url = url;
2430 this.url = url;
2431 this.protocols = protocols;
2431 this.protocols = protocols;
2432 this.readyState = WebSocket.CONNECTING;
2432 this.readyState = WebSocket.CONNECTING;
2433 this.URL = url; // Public API
2433 this.URL = url; // Public API
2434
2434
2435 this.onopen = function(event) {
2435 this.onopen = function(event) {
2436 };
2436 };
2437
2437
2438 this.onclose = function(event) {
2438 this.onclose = function(event) {
2439 };
2439 };
2440
2440
2441 this.onconnecting = function(event) {
2441 this.onconnecting = function(event) {
2442 };
2442 };
2443
2443
2444 this.onmessage = function(event) {
2444 this.onmessage = function(event) {
2445 };
2445 };
2446
2446
2447 this.onerror = function(event) {
2447 this.onerror = function(event) {
2448 };
2448 };
2449
2449
2450 function connect(reconnectAttempt) {
2450 function connect(reconnectAttempt) {
2451 ws = new WebSocket(url, protocols);
2451 ws = new WebSocket(url, protocols);
2452
2452
2453 self.onconnecting();
2453 self.onconnecting();
2454 if (self.debug || ReconnectingWebSocket.debugAll) {
2454 if (self.debug || ReconnectingWebSocket.debugAll) {
2455 console.debug('ReconnectingWebSocket', 'attempt-connect', url);
2455 console.debug('ReconnectingWebSocket', 'attempt-connect', url);
2456 }
2456 }
2457
2457
2458 var localWs = ws;
2458 var localWs = ws;
2459 var timeout = setTimeout(function() {
2459 var timeout = setTimeout(function() {
2460 if (self.debug || ReconnectingWebSocket.debugAll) {
2460 if (self.debug || ReconnectingWebSocket.debugAll) {
2461 console.debug('ReconnectingWebSocket', 'connection-timeout', url);
2461 console.debug('ReconnectingWebSocket', 'connection-timeout', url);
2462 }
2462 }
2463 timedOut = true;
2463 timedOut = true;
2464 localWs.close();
2464 localWs.close();
2465 timedOut = false;
2465 timedOut = false;
2466 }, self.timeoutInterval);
2466 }, self.timeoutInterval);
2467
2467
2468 ws.onopen = function(event) {
2468 ws.onopen = function(event) {
2469 clearTimeout(timeout);
2469 clearTimeout(timeout);
2470 if (self.debug || ReconnectingWebSocket.debugAll) {
2470 if (self.debug || ReconnectingWebSocket.debugAll) {
2471 console.debug('ReconnectingWebSocket', 'onopen', url);
2471 console.debug('ReconnectingWebSocket', 'onopen', url);
2472 }
2472 }
2473 self.readyState = WebSocket.OPEN;
2473 self.readyState = WebSocket.OPEN;
2474 reconnectAttempt = false;
2474 reconnectAttempt = false;
2475 self.onopen(event);
2475 self.onopen(event);
2476 };
2476 };
2477
2477
2478 ws.onclose = function(event) {
2478 ws.onclose = function(event) {
2479 clearTimeout(timeout);
2479 clearTimeout(timeout);
2480 ws = null;
2480 ws = null;
2481 if (forcedClose) {
2481 if (forcedClose) {
2482 self.readyState = WebSocket.CLOSED;
2482 self.readyState = WebSocket.CLOSED;
2483 self.onclose(event);
2483 self.onclose(event);
2484 } else {
2484 } else {
2485 self.readyState = WebSocket.CONNECTING;
2485 self.readyState = WebSocket.CONNECTING;
2486 self.onconnecting();
2486 self.onconnecting();
2487 if (!reconnectAttempt && !timedOut) {
2487 if (!reconnectAttempt && !timedOut) {
2488 if (self.debug || ReconnectingWebSocket.debugAll) {
2488 if (self.debug || ReconnectingWebSocket.debugAll) {
2489 console.debug('ReconnectingWebSocket', 'onclose', url);
2489 console.debug('ReconnectingWebSocket', 'onclose', url);
2490 }
2490 }
2491 self.onclose(event);
2491 self.onclose(event);
2492 }
2492 }
2493 setTimeout(function() {
2493 setTimeout(function() {
2494 connect(true);
2494 connect(true);
2495 }, self.reconnectInterval);
2495 }, self.reconnectInterval);
2496 }
2496 }
2497 };
2497 };
2498 ws.onmessage = function(event) {
2498 ws.onmessage = function(event) {
2499 if (self.debug || ReconnectingWebSocket.debugAll) {
2499 if (self.debug || ReconnectingWebSocket.debugAll) {
2500 console.debug('ReconnectingWebSocket', 'onmessage', url, event.data);
2500 console.debug('ReconnectingWebSocket', 'onmessage', url, event.data);
2501 }
2501 }
2502 self.onmessage(event);
2502 self.onmessage(event);
2503 };
2503 };
2504 ws.onerror = function(event) {
2504 ws.onerror = function(event) {
2505 if (self.debug || ReconnectingWebSocket.debugAll) {
2505 if (self.debug || ReconnectingWebSocket.debugAll) {
2506 console.debug('ReconnectingWebSocket', 'onerror', url, event);
2506 console.debug('ReconnectingWebSocket', 'onerror', url, event);
2507 }
2507 }
2508 self.onerror(event);
2508 self.onerror(event);
2509 };
2509 };
2510 }
2510 }
2511 connect(url);
2511 connect(url);
2512
2512
2513 this.send = function(data) {
2513 this.send = function(data) {
2514 if (ws) {
2514 if (ws) {
2515 if (self.debug || ReconnectingWebSocket.debugAll) {
2515 if (self.debug || ReconnectingWebSocket.debugAll) {
2516 console.debug('ReconnectingWebSocket', 'send', url, data);
2516 console.debug('ReconnectingWebSocket', 'send', url, data);
2517 }
2517 }
2518 return ws.send(data);
2518 return ws.send(data);
2519 } else {
2519 } else {
2520 throw 'INVALID_STATE_ERR : Pausing to reconnect websocket';
2520 throw 'INVALID_STATE_ERR : Pausing to reconnect websocket';
2521 }
2521 }
2522 };
2522 };
2523
2523
2524 this.close = function() {
2524 this.close = function() {
2525 if (ws) {
2525 if (ws) {
2526 forcedClose = true;
2526 forcedClose = true;
2527 ws.close();
2527 ws.close();
2528 }
2528 }
2529 };
2529 };
2530
2530
2531 /**
2531 /**
2532 * Additional public API method to refresh the connection if still open (close, re-open).
2532 * Additional public API method to refresh the connection if still open (close, re-open).
2533 * For example, if the app suspects bad data / missed heart beats, it can try to refresh.
2533 * For example, if the app suspects bad data / missed heart beats, it can try to refresh.
2534 */
2534 */
2535 this.refresh = function() {
2535 this.refresh = function() {
2536 if (ws) {
2536 if (ws) {
2537 ws.close();
2537 ws.close();
2538 }
2538 }
2539 };
2539 };
2540 }
2540 }
2541
2541
2542 /**
2542 /**
2543 * Setting this to true is the equivalent of setting all instances of ReconnectingWebSocket.debug to true.
2543 * Setting this to true is the equivalent of setting all instances of ReconnectingWebSocket.debug to true.
2544 */
2544 */
2545 ReconnectingWebSocket.debugAll = false;
2545 ReconnectingWebSocket.debugAll = false;
2546
2546
2547
2547
2548 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2548 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2549 //
2549 //
2550 // Licensed under the Apache License, Version 2.0 (the "License");
2550 // Licensed under the Apache License, Version 2.0 (the "License");
2551 // you may not use this file except in compliance with the License.
2551 // you may not use this file except in compliance with the License.
2552 // You may obtain a copy of the License at
2552 // You may obtain a copy of the License at
2553 //
2553 //
2554 // http://www.apache.org/licenses/LICENSE-2.0
2554 // http://www.apache.org/licenses/LICENSE-2.0
2555 //
2555 //
2556 // Unless required by applicable law or agreed to in writing, software
2556 // Unless required by applicable law or agreed to in writing, software
2557 // distributed under the License is distributed on an "AS IS" BASIS,
2557 // distributed under the License is distributed on an "AS IS" BASIS,
2558 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2558 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2559 // See the License for the specific language governing permissions and
2559 // See the License for the specific language governing permissions and
2560 // limitations under the License.
2560 // limitations under the License.
2561
2561
2562 if (!String.prototype.trim) {
2562 if (!String.prototype.trim) {
2563 String.prototype.trim = function () {
2563 String.prototype.trim = function () {
2564 return this.replace(/^\s+|\s+$/g, '');
2564 return this.replace(/^\s+|\s+$/g, '');
2565 };
2565 };
2566
2566
2567 String.prototype.ltrim = function () {
2567 String.prototype.ltrim = function () {
2568 return this.replace(/^\s+/, '');
2568 return this.replace(/^\s+/, '');
2569 };
2569 };
2570
2570
2571 String.prototype.rtrim = function () {
2571 String.prototype.rtrim = function () {
2572 return this.replace(/\s+$/, '');
2572 return this.replace(/\s+$/, '');
2573 };
2573 };
2574
2574
2575 String.prototype.fulltrim = function () {
2575 String.prototype.fulltrim = function () {
2576 return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g, '').replace(/\s+/g, ' ');
2576 return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g, '').replace(/\s+/g, ' ');
2577 };
2577 };
2578 }
2578 }
2579
2579
2580 function decodeEncodedJSON (input){
2580 function decodeEncodedJSON (input){
2581 try{
2581 try{
2582 var val = JSON.parse(input);
2582 var val = JSON.parse(input);
2583 delete doc;
2583 delete doc;
2584 return val;
2584 return val;
2585 }catch(exc){
2585 }catch(exc){
2586
2586
2587 delete doc;
2587 delete doc;
2588 }
2588 }
2589 }
2589 }
2590
2590
2591 function parseTagsToSearch(searchParams) {
2591 function parseTagsToSearch(searchParams) {
2592 var params = {};
2592 var params = {};
2593 _.each(searchParams.tags, function (t) {
2593 _.each(searchParams.tags, function (t) {
2594 if (!_.has(params, t.type)) {
2594 if (!_.has(params, t.type)) {
2595 params[t.type] = [];
2595 params[t.type] = [];
2596 }
2596 }
2597 params[t.type].push(t.value);
2597 params[t.type].push(t.value);
2598 });
2598 });
2599 if (searchParams.page > 1){
2599 if (searchParams.page > 1){
2600 params.page = searchParams.page;
2600 params.page = searchParams.page;
2601 }
2601 }
2602 return params;
2602 return params;
2603 }
2603 }
2604
2604
2605 function parseSearchToTags(search) {
2605 function parseSearchToTags(search) {
2606 var config = {page: 1, tags: [], type:''};
2606 var config = {page: 1, tags: [], type:''};
2607 _.each(_.pairs(search), function (obj) {
2607 _.each(_.pairs(search), function (obj) {
2608 if (_.isArray(obj[1])) {
2608 if (_.isArray(obj[1])) {
2609 _.each(obj[1], function (obj2) {
2609 _.each(obj[1], function (obj2) {
2610 config.tags.push({type: obj[0], value: obj2});
2610 config.tags.push({type: obj[0], value: obj2});
2611 })
2611 })
2612 } else {
2612 } else {
2613 if (obj[0] == 'page') {
2613 if (obj[0] == 'page') {
2614 config.page = obj[1];
2614 config.page = obj[1];
2615 }
2615 }
2616 else if (obj[0] == 'type') {
2616 else if (obj[0] == 'type') {
2617 config.type = obj[1];
2617 config.type = obj[1];
2618 }
2618 }
2619 else {
2619 else {
2620 config.tags.push({type: obj[0], value: obj[1]});
2620 config.tags.push({type: obj[0], value: obj[1]});
2621 }
2621 }
2622
2622
2623 }
2623 }
2624 });
2624 });
2625 return config;
2625 return config;
2626 }
2626 }
2627
2627
2628
2628
2629 /* returns ISO date string from UTC now - timespan */
2629 /* returns ISO date string from UTC now - timespan */
2630 function timeSpanToStartDate(timeSpan){
2630 function timeSpanToStartDate(timeSpan){
2631 var amount = Number(timeSpan.slice(0,-1));
2631 var amount = Number(timeSpan.slice(0,-1));
2632 var unit = timeSpan.slice(-1);
2632 var unit = timeSpan.slice(-1);
2633 return moment.utc().subtract(amount, unit).format();
2633 return moment.utc().subtract(amount, unit).format();
2634 }
2634 }
2635
2635
2636 /* Sets server validation messages on form using angular machinery +
2636 /* Sets server validation messages on form using angular machinery +
2637 * custom key holding actual error messages */
2637 * custom key holding actual error messages */
2638 function setServerValidation(form, errors){
2638 function setServerValidation(form, errors){
2639
2639
2640 if (typeof form.ae_validation === 'undefined'){
2640 if (typeof form.ae_validation === 'undefined'){
2641 form.ae_validation = {};
2641 form.ae_validation = {};
2642
2642
2643 }
2643 }
2644 for (var key in form.ae_validation){
2644 for (var key in form.ae_validation){
2645 form.ae_validation[key] = [];
2645 form.ae_validation[key] = [];
2646
2646
2647 }
2647 }
2648
2648
2649
2649
2650 for (var key in form){
2650 for (var key in form){
2651 if (key[0] !== '$' && key !== 'ae_validation'){
2651 if (key[0] !== '$' && key !== 'ae_validation'){
2652 form[key].$setValidity('ae_validation', true);
2652 form[key].$setValidity('ae_validation', true);
2653 }
2653 }
2654 }
2654 }
2655 if (typeof errors !== undefined){
2655 if (typeof errors !== undefined){
2656 for (var key in errors){
2656 for (var key in errors){
2657 if (typeof form[key] !== 'undefined'){
2657 if (typeof form[key] !== 'undefined'){
2658 form[key].$setValidity('ae_validation', false);
2658 form[key].$setValidity('ae_validation', false);
2659 }
2659 }
2660 // handle wtforms and colander errors based on
2660 // handle wtforms and colander errors based on
2661 // whether we have list of erors or a single error in a key
2661 // whether we have list of erors or a single error in a key
2662 if (angular.isArray(errors[key])){
2662 if (angular.isArray(errors[key])){
2663 form.ae_validation[key] = errors[key];
2663 form.ae_validation[key] = errors[key];
2664 }
2664 }
2665 else{
2665 else{
2666 form.ae_validation[key] = [errors[key]];
2666 form.ae_validation[key] = [errors[key]];
2667 }
2667 }
2668 }
2668 }
2669 }
2669 }
2670 return form;
2670 return form;
2671 }
2671 }
2672
2672
2673 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2673 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2674 //
2674 //
2675 // Licensed under the Apache License, Version 2.0 (the "License");
2675 // Licensed under the Apache License, Version 2.0 (the "License");
2676 // you may not use this file except in compliance with the License.
2676 // you may not use this file except in compliance with the License.
2677 // You may obtain a copy of the License at
2677 // You may obtain a copy of the License at
2678 //
2678 //
2679 // http://www.apache.org/licenses/LICENSE-2.0
2679 // http://www.apache.org/licenses/LICENSE-2.0
2680 //
2680 //
2681 // Unless required by applicable law or agreed to in writing, software
2681 // Unless required by applicable law or agreed to in writing, software
2682 // distributed under the License is distributed on an "AS IS" BASIS,
2682 // distributed under the License is distributed on an "AS IS" BASIS,
2683 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2683 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2684 // See the License for the specific language governing permissions and
2684 // See the License for the specific language governing permissions and
2685 // limitations under the License.
2685 // limitations under the License.
2686
2686
2687 'use strict';
2687 'use strict';
2688
2688
2689 // Declare app level module which depends on filters, and services
2689 // Declare app level module which depends on filters, and services
2690 angular.module('appenlight.base', [
2690 angular.module('appenlight.base', [
2691 'ngRoute',
2691 'ngRoute',
2692 'ui.router',
2692 'ui.router',
2693 'ui.router.router',
2693 'ui.router.router',
2694 'underscore',
2694 'underscore',
2695 'ui.bootstrap',
2695 'ui.bootstrap',
2696 'ngResource',
2696 'ngResource',
2697 'ngAnimate',
2697 'ngAnimate',
2698 'ngCookies',
2698 'ngCookies',
2699 'smart-table',
2699 'smart-table',
2700 'angular-toArrayFilter',
2700 'angular-toArrayFilter',
2701 'mentio'
2701 'mentio'
2702 ]);
2702 ]);
2703
2703
2704 angular.module('appenlight.filters', []);
2704 angular.module('appenlight.filters', []);
2705 angular.module('appenlight.templates', []);
2705 angular.module('appenlight.templates', []);
2706 angular.module('appenlight.controllers', [
2706 angular.module('appenlight.controllers', [
2707 'appenlight.base'
2707 'appenlight.base'
2708 ]);
2708 ]);
2709 angular.module('appenlight.components', [
2709 angular.module('appenlight.components', [
2710 'appenlight.components.channelstream',
2710 'appenlight.components.channelstream',
2711 'appenlight.components.appenlightApp',
2711 'appenlight.components.appenlightApp',
2712 'appenlight.components.appenlightHeader',
2712 'appenlight.components.appenlightHeader',
2713 'appenlight.components.indexDashboardView',
2713 'appenlight.components.indexDashboardView',
2714 'appenlight.components.logsBrowserView',
2714 'appenlight.components.logsBrowserView',
2715 'appenlight.components.reportView',
2715 'appenlight.components.reportView',
2716 'appenlight.components.reportsBrowserView',
2716 'appenlight.components.reportsBrowserView',
2717 'appenlight.components.reportsSlowBrowserView',
2717 'appenlight.components.reportsSlowBrowserView',
2718 'appenlight.components.eventBrowserView',
2718 'appenlight.components.eventBrowserView',
2719 'appenlight.components.userProfileView',
2719 'appenlight.components.userProfileView',
2720 'appenlight.components.userIdentitiesView',
2720 'appenlight.components.userIdentitiesView',
2721 'appenlight.components.userPasswordView',
2721 'appenlight.components.userPasswordView',
2722 'appenlight.components.userAuthTokensView',
2722 'appenlight.components.userAuthTokensView',
2723 'appenlight.components.userAlertChannelsListView',
2723 'appenlight.components.userAlertChannelsListView',
2724 'appenlight.components.userAlertChannelsEmailNewView',
2724 'appenlight.components.userAlertChannelsEmailNewView',
2725 'appenlight.components.applicationsListView',
2725 'appenlight.components.applicationsListView',
2726 'appenlight.components.applicationsPurgeLogsView',
2726 'appenlight.components.applicationsPurgeLogsView',
2727 'appenlight.components.applicationsUpdateView',
2727 'appenlight.components.applicationsUpdateView',
2728 'appenlight.components.integrationsListView',
2728 'appenlight.components.integrationsListView',
2729 'appenlight.components.bitbucketIntegrationConfigView',
2729 'appenlight.components.bitbucketIntegrationConfigView',
2730 'appenlight.components.campfireIntegrationConfigView',
2730 'appenlight.components.campfireIntegrationConfigView',
2731 'appenlight.components.flowdockIntegrationConfigView',
2731 'appenlight.components.flowdockIntegrationConfigView',
2732 'appenlight.components.githubIntegrationConfigView',
2732 'appenlight.components.githubIntegrationConfigView',
2733 'appenlight.components.hipchatIntegrationConfigView',
2733 'appenlight.components.hipchatIntegrationConfigView',
2734 'appenlight.components.jiraIntegrationConfigView',
2734 'appenlight.components.jiraIntegrationConfigView',
2735 'appenlight.components.slackIntegrationConfigView',
2735 'appenlight.components.slackIntegrationConfigView',
2736 'appenlight.components.webhooksIntegrationConfigView',
2736 'appenlight.components.webhooksIntegrationConfigView',
2737 'appenlight.components.adminView',
2737 'appenlight.components.adminView',
2738 'appenlight.components.adminApplicationsListView',
2738 'appenlight.components.adminApplicationsListView',
2739 'appenlight.components.adminUsersListView',
2739 'appenlight.components.adminUsersListView',
2740 'appenlight.components.adminUsersCreateView',
2740 'appenlight.components.adminUsersCreateView',
2741 'appenlight.components.adminGroupsListView',
2741 'appenlight.components.adminGroupsListView',
2742 'appenlight.components.adminGroupsCreateView',
2742 'appenlight.components.adminGroupsCreateView',
2743 'appenlight.components.adminConfigurationView',
2743 'appenlight.components.adminConfigurationView',
2744 'appenlight.components.adminSystemView',
2744 'appenlight.components.adminSystemView',
2745 'appenlight.components.adminPartitionsView',
2745 'appenlight.components.adminPartitionsView',
2746 'appenlight.components.settingsView'
2746 'appenlight.components.settingsView'
2747 ]);
2747 ]);
2748 angular.module('appenlight.directives', [
2748 angular.module('appenlight.directives', [
2749 'appenlight.directives.c3chart',
2749 'appenlight.directives.c3chart',
2750 'appenlight.directives.confirmValidate',
2750 'appenlight.directives.confirmValidate',
2751 'appenlight.directives.focus',
2751 'appenlight.directives.focus',
2752 'appenlight.directives.formErrors',
2752 'appenlight.directives.formErrors',
2753 'appenlight.directives.humanFormat',
2753 'appenlight.directives.humanFormat',
2754 'appenlight.directives.isoToRelativeTime',
2754 'appenlight.directives.isoToRelativeTime',
2755 'appenlight.directives.permissionsForm',
2755 'appenlight.directives.permissionsForm',
2756 'appenlight.directives.smallReportGroupList',
2756 'appenlight.directives.smallReportGroupList',
2757 'appenlight.directives.smallReportList',
2757 'appenlight.directives.smallReportList',
2758 'appenlight.directives.pluginConfig',
2758 'appenlight.directives.pluginConfig',
2759 'appenlight.directives.recursive',
2759 'appenlight.directives.recursive',
2760 'appenlight.directives.reportAlertAction',
2760 'appenlight.directives.reportAlertAction',
2761 'appenlight.directives.postProcessAction',
2761 'appenlight.directives.postProcessAction',
2762 'appenlight.directives.rule',
2762 'appenlight.directives.rule',
2763 'appenlight.directives.ruleReadOnly'
2763 'appenlight.directives.ruleReadOnly'
2764 ]);
2764 ]);
2765 angular.module('appenlight.services', [
2765 angular.module('appenlight.services', [
2766 'appenlight.services.chartResultParser',
2766 'appenlight.services.chartResultParser',
2767 'appenlight.services.resources',
2767 'appenlight.services.resources',
2768 'appenlight.services.stateHolder',
2768 'appenlight.services.stateHolder',
2769 'appenlight.services.typeAheadTagHelper',
2769 'appenlight.services.typeAheadTagHelper',
2770 'appenlight.services.UUIDProvider'
2770 'appenlight.services.UUIDProvider'
2771 ]).value('version', '0.1');
2771 ]).value('version', '0.1');
2772
2772
2773
2773
2774 var pluginsToLoad = _.map(decodeEncodedJSON(window.AE.plugins),
2774 var pluginsToLoad = _.map(decodeEncodedJSON(window.AE.plugins),
2775 function(item){
2775 function(item){
2776 return item.config.javascript.angular_module
2776 return item.config.javascript.angular_module
2777 });
2777 });
2778 console.info(pluginsToLoad);
2778 console.info(pluginsToLoad);
2779
2779
2780 angular.module('appenlight.plugins', pluginsToLoad);
2780 angular.module('appenlight.plugins', pluginsToLoad);
2781
2781
2782 var app = angular.module('appenlight', [
2782 var app = angular.module('appenlight', [
2783 'appenlight.base',
2783 'appenlight.base',
2784 'appenlight.config',
2784 'appenlight.config',
2785 'appenlight.templates',
2785 'appenlight.templates',
2786 'appenlight.filters',
2786 'appenlight.filters',
2787 'appenlight.services',
2787 'appenlight.services',
2788 'appenlight.directives',
2788 'appenlight.directives',
2789 'appenlight.controllers',
2789 'appenlight.controllers',
2790 'appenlight.components',
2790 'appenlight.components',
2791 'appenlight.plugins'
2791 'appenlight.plugins'
2792 ]);
2792 ]);
2793
2793
2794 // needs manual execution because of plugin files
2794 // needs manual execution because of plugin files
2795 function kickstartAE(initialUserData) {
2795 function kickstartAE(initialUserData) {
2796 app.config(['$httpProvider', '$uibTooltipProvider', '$locationProvider', function ($httpProvider, $uibTooltipProvider, $locationProvider) {
2796 app.config(['$httpProvider', '$uibTooltipProvider', '$locationProvider', function ($httpProvider, $uibTooltipProvider, $locationProvider) {
2797 $locationProvider.html5Mode(true);
2797 $locationProvider.html5Mode(true);
2798 $httpProvider.interceptors.push(['$q', '$rootScope', '$timeout', 'stateHolder', function ($q, $rootScope, $timeout, stateHolder) {
2798 $httpProvider.interceptors.push(['$q', '$rootScope', '$timeout', 'stateHolder', function ($q, $rootScope, $timeout, stateHolder) {
2799 return {
2799 return {
2800 'response': function (response) {
2800 'response': function (response) {
2801 var flashMessages = angular.fromJson(response.headers('x-flash-messages'));
2801 var flashMessages = angular.fromJson(response.headers('x-flash-messages'));
2802 if (flashMessages && flashMessages.length > 0) {
2802 if (flashMessages && flashMessages.length > 0) {
2803 stateHolder.flashMessages.extend(flashMessages);
2803 stateHolder.flashMessages.extend(flashMessages);
2804 }
2804 }
2805 return response;
2805 return response;
2806 },
2806 },
2807 'responseError': function (rejection) {
2807 'responseError': function (rejection) {
2808 if (rejection.status > 299 && rejection.status !== 422) {
2808 if (rejection.status > 299 && rejection.status !== 422) {
2809 stateHolder.flashMessages.extend([{
2809 stateHolder.flashMessages.extend([{
2810 msg: 'Response status code: ' + rejection.status + ', "' + rejection.statusText + '", url: ' + rejection.config.url,
2810 msg: 'Response status code: ' + rejection.status + ', "' + rejection.statusText + '", url: ' + rejection.config.url,
2811 type: 'error'
2811 type: 'error'
2812 }]);
2812 }]);
2813 }
2813 }
2814 if (rejection.status == 0) {
2814 if (rejection.status == 0) {
2815 stateHolder.flashMessages.extend([{
2815 stateHolder.flashMessages.extend([{
2816 msg: 'Response timeout',
2816 msg: 'Response timeout',
2817 type: 'error'
2817 type: 'error'
2818 }]);
2818 }]);
2819 }
2819 }
2820 var flashMessages = angular.fromJson(rejection.headers('x-flash-messages'));
2820 var flashMessages = angular.fromJson(rejection.headers('x-flash-messages'));
2821 if (flashMessages && flashMessages.length > 0) {
2821 if (flashMessages && flashMessages.length > 0) {
2822 stateHolder.flashMessages.extend(flashMessages);
2822 stateHolder.flashMessages.extend(flashMessages);
2823 }
2823 }
2824
2824
2825 return $q.reject(rejection);
2825 return $q.reject(rejection);
2826 }
2826 }
2827 }
2827 }
2828 }]);
2828 }]);
2829
2829
2830 $uibTooltipProvider.options({appendToBody: true});
2830 $uibTooltipProvider.options({appendToBody: true});
2831
2831
2832 }]);
2832 }]);
2833
2833
2834
2834
2835 app.config(function ($provide) {
2835 app.config(function ($provide) {
2836 $provide.decorator("$exceptionHandler", function ($delegate) {
2836 $provide.decorator("$exceptionHandler", function ($delegate) {
2837 return function (exception, cause) {
2837 return function (exception, cause) {
2838 $delegate(exception, cause);
2838 $delegate(exception, cause);
2839 if (typeof AppEnlight !== 'undefined') {
2839 if (typeof AppEnlight !== 'undefined') {
2840 AppEnlight.grabError(exception);
2840 AppEnlight.grabError(exception);
2841 }
2841 }
2842 };
2842 };
2843 });
2843 });
2844 });
2844 });
2845
2845
2846 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
2846 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
2847 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
2847 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
2848
2848
2849 if (initialUserData){
2849 if (initialUserData){
2850 stateHolder.AeUser.update(initialUserData);
2850 stateHolder.AeUser.update(initialUserData);
2851
2851
2852 if (stateHolder.AeUser.hasAppPermission('root_administration'
2852 if (stateHolder.AeUser.hasAppPermission('root_administration'
2853 )){
2853 )){
2854 AeConfig.topNav.menuAdminItems.push(
2854 AeConfig.topNav.menuAdminItems.push(
2855 {'sref': 'admin', 'label': 'Admin Settings'}
2855 {'sref': 'admin', 'label': 'Admin Settings'}
2856 )
2856 )
2857 }
2857 }
2858
2858
2859 }
2859 }
2860 $rootScope.$state = $state;
2860 $rootScope.$state = $state;
2861 $rootScope.stateHolder = stateHolder;
2861 $rootScope.stateHolder = stateHolder;
2862 $rootScope.flash = stateHolder.flashMessages.list;
2862 $rootScope.flash = stateHolder.flashMessages.list;
2863 $rootScope.closeAlert = stateHolder.flashMessages.closeAlert;
2863 $rootScope.closeAlert = stateHolder.flashMessages.closeAlert;
2864 $rootScope.AeConfig = AeConfig;
2864 $rootScope.AeConfig = AeConfig;
2865
2865
2866 var transitionApp = function($transition$, $state) {
2866 var transitionApp = function($transition$, $state) {
2867 // redirect user to /register unless its one of open views
2867 // redirect user to /register unless its one of open views
2868 var isGuestState = [
2868 var isGuestState = [
2869 'report.view_detail',
2869 'report.view_detail',
2870 'report.view_group',
2870 'report.view_group',
2871 'dashboard.view'
2871 'dashboard.view'
2872 ].indexOf($transition$.to().name) !== -1;
2872 ].indexOf($transition$.to().name) !== -1;
2873
2873
2874 var path = $window.location.pathname;
2874 var path = $window.location.pathname;
2875 // strip trailing slash
2875 // strip trailing slash
2876 if (path.substr(path.length - 1) === '/') {
2876 if (path.substr(path.length - 1) === '/') {
2877 path = path.substr(0, path.length - 1);
2877 path = path.substr(0, path.length - 1);
2878 }
2878 }
2879 var isOpenView = false;
2879 var isOpenView = false;
2880 var openViews = [
2880 var openViews = [
2881 AeConfig.urls.otherRoutes.lostPassword,
2881 AeConfig.urls.otherRoutes.lostPassword,
2882 AeConfig.urls.otherRoutes.lostPasswordGenerate
2882 AeConfig.urls.otherRoutes.lostPasswordGenerate
2883 ];
2883 ];
2884
2884
2885 _.each(openViews, function (url) {
2885 _.each(openViews, function (url) {
2886 var url = '/' + url.split('/').slice(3).join('/');
2886 var url = '/' + url.split('/').slice(3).join('/');
2887 if (url === path) {
2887 if (url === path) {
2888 isOpenView = true;
2888 isOpenView = true;
2889 }
2889 }
2890 });
2890 });
2891 if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) {
2891 if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) {
2892 if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) {
2892 if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) {
2893
2893
2894 var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location);
2894 var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location);
2895 // fix infinite digest here
2895 // fix infinite digest here
2896 $rootScope.$on('$locationChangeStart',
2896 $rootScope.$on('$locationChangeStart',
2897 function(event, toState, toParams, fromState, fromParams, options){
2897 function(event, toState, toParams, fromState, fromParams, options){
2898 event.preventDefault();
2898 event.preventDefault();
2899 $window.location = newLocation;
2899 $window.location = newLocation;
2900 });
2900 });
2901 $window.location = newLocation;
2901 $window.location = newLocation;
2902 return false;
2902 return false;
2903 }
2903 }
2904 return false;
2904 return false;
2905 }
2905 }
2906 return true;
2906 return true;
2907 };
2907 };
2908
2908
2909 for (var i=0; i < stateHolder.plugins.callables.length; i++){
2909 for (var i=0; i < stateHolder.plugins.callables.length; i++){
2910 stateHolder.plugins.callables[i]();
2910 stateHolder.plugins.callables[i]();
2911 }
2911 }
2912
2912
2913 $transitions.onBefore({}, transitionApp);
2913 $transitions.onBefore({}, transitionApp);
2914 }]);
2914 }]);
2915 }
2915 }
2916
2916
2917 ;angular.module('appenlight.templates').run(['$templateCache', function($templateCache) {
2917 ;angular.module('appenlight.templates').run(['$templateCache', function($templateCache) {
2918 'use strict';
2918 'use strict';
2919
2919
2920 $templateCache.put('components/appenlight-app/appenlight-app.html',
2920 $templateCache.put('components/appenlight-app/appenlight-app.html',
2921 "<channelstream config=\"AeConfig\"></channelstream>\n" +
2921 "<channelstream config=\"AeConfig\"></channelstream>\n" +
2922 "<appenlight-header></appenlight-header>\n" +
2922 "<appenlight-header></appenlight-header>\n" +
2923 "<div class=\"container\" data-ng-if=\"flash.length\">\n" +
2923 "<div class=\"container\" data-ng-if=\"flash.length\">\n" +
2924 " <div class=\"row\" style=\"margin-bottom: 10px\">\n" +
2924 " <div class=\"row\" style=\"margin-bottom: 10px\">\n" +
2925 " <div class=\"col-xs-12\">\n" +
2925 " <div class=\"col-xs-12\">\n" +
2926 " <uib-alert data-ng-repeat=\"message in flash\"\n" +
2926 " <uib-alert data-ng-repeat=\"message in flash\"\n" +
2927 " type=\"{{ message.type }}\"\n" +
2927 " type=\"{{ message.type }}\"\n" +
2928 " close=\"closeAlert($index)\" class=\"animate-repeat\">\n" +
2928 " close=\"closeAlert($index)\" class=\"animate-repeat\">\n" +
2929 " {{ message.msg }}</uib-alert>\n" +
2929 " {{ message.msg }}</uib-alert>\n" +
2930 " </div>\n" +
2930 " </div>\n" +
2931 " </div>\n" +
2931 " </div>\n" +
2932 "</div>\n" +
2932 "</div>\n" +
2933 "\n" +
2933 "\n" +
2934 "<div id=\"outer-content\">\n" +
2934 "<div id=\"outer-content\">\n" +
2935 " <div ui-view class=\"container\"></div>\n" +
2935 " <div ui-view class=\"container\"></div>\n" +
2936 "</div>\n"
2936 "</div>\n"
2937 );
2937 );
2938
2938
2939
2939
2940 $templateCache.put('components/appenlight-header/appenlight-header.html',
2940 $templateCache.put('components/appenlight-header/appenlight-header.html',
2941 "<!-- Fixed navbar -->\n" +
2941 "<!-- Fixed navbar -->\n" +
2942 "<div id=\"top-navbar\" class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n" +
2942 "<div id=\"top-navbar\" class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n" +
2943 " <div class=\"pattern\">\n" +
2943 " <div class=\"pattern\">\n" +
2944 " <div class=\"container\">\n" +
2944 " <div class=\"container\">\n" +
2945 " <div class=\"navbar-header pull-left\">\n" +
2945 " <div class=\"navbar-header pull-left\">\n" +
2946 " <a data-ui-sref=\"front_dashboard\" class=\"navbar-brand\">\n" +
2946 " <a data-ui-sref=\"front_dashboard\" class=\"navbar-brand\">\n" +
2947 " <div id=\"logo-normal\" class=\"hidden-sm hidden-xs\"></div>\n" +
2947 " <div id=\"logo-normal\" class=\"hidden-sm hidden-xs\"></div>\n" +
2948 " <div id=\"logo-icon\" class=\"visible-sm visible-xs\"></div>\n" +
2948 " <div id=\"logo-icon\" class=\"visible-sm visible-xs\"></div>\n" +
2949 " </a>\n" +
2949 " </a>\n" +
2950 " </div>\n" +
2950 " </div>\n" +
2951 "\n" +
2951 "\n" +
2952 " <div class=\"container-fluid\">\n" +
2952 " <div class=\"container-fluid\">\n" +
2953 " <div>\n" +
2953 " <div>\n" +
2954 " <ul class=\"nav navbar-nav navbar-right\" ng-if=\"$ctrl.stateHolder.AeUser.id !== null\">\n" +
2954 " <ul class=\"nav navbar-nav navbar-right\" ng-if=\"$ctrl.stateHolder.AeUser.id !== null\">\n" +
2955 " <li id=\"user-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown>\n" +
2955 " <li id=\"user-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown>\n" +
2956 "\n" +
2956 "\n" +
2957 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" +
2957 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" +
2958 " <span class=\"badge\">{{$ctrl.assignedReports.length}}</span>\n" +
2958 " <span class=\"badge\">{{$ctrl.assignedReports.length}}</span>\n" +
2959 " <span class=\"fa fa-envelope-o\"></span>\n" +
2959 " <span class=\"fa fa-envelope-o\"></span>\n" +
2960 " </a>\n" +
2960 " </a>\n" +
2961 " <ul class=\"dropdown-menu\">\n" +
2961 " <ul class=\"dropdown-menu\">\n" +
2962 " <li role=\"presentation\" class=\"dropdown-header\">Assigned reports</li>\n" +
2962 " <li role=\"presentation\" class=\"dropdown-header\">Assigned reports</li>\n" +
2963 " <li data-ng-repeat=\"report in $ctrl.assignedReports\" role=\"presentation\">\n" +
2963 " <li data-ng-repeat=\"report in $ctrl.assignedReports\" role=\"presentation\">\n" +
2964 " <a href=\"{{report.front_url}}\" role=\"menuitem\" tabindex=\"-1\">\n" +
2964 " <a href=\"{{report.front_url}}\" role=\"menuitem\" tabindex=\"-1\">\n" +
2965 " <small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small>\n" +
2965 " <small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small>\n" +
2966 " </a>\n" +
2966 " </a>\n" +
2967 "\n" +
2967 "\n" +
2968 " </li>\n" +
2968 " </li>\n" +
2969 " <li data-ng-if=\"$ctrl.assignedReports.length == 0\"><a><small>No reports</small></a></li>\n" +
2969 " <li data-ng-if=\"$ctrl.assignedReports.length == 0\"><a><small>No reports</small></a></li>\n" +
2970 " </ul>\n" +
2970 " </ul>\n" +
2971 " </li>\n" +
2971 " </li>\n" +
2972 " <li id=\"alert-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown auto-close=\"outsideClick\">\n" +
2972 " <li id=\"alert-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown auto-close=\"outsideClick\">\n" +
2973 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" +
2973 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" +
2974 " <span class=\"badge {{ activeEvents ? 'danger' : '' }}\">{{$ctrl.activeEvents}}</span>\n" +
2974 " <span class=\"badge {{ activeEvents ? 'danger' : '' }}\">{{$ctrl.activeEvents}}</span>\n" +
2975 " <span class=\"fa fa-bell-o\"></span></a>\n" +
2975 " <span class=\"fa fa-bell-o\"></span></a>\n" +
2976 " <ul class=\"dropdown-menu\">\n" +
2976 " <ul class=\"dropdown-menu\">\n" +
2977 " <li role=\"presentation\" class=\"dropdown-header\">\n" +
2977 " <li role=\"presentation\" class=\"dropdown-header\">\n" +
2978 " <a data-ui-sref=\"events\" class=\"btn btn-xs btn-default\">Show me more</a></li>\n" +
2978 " <a data-ui-sref=\"events\" class=\"btn btn-xs btn-default\">Show me more</a></li>\n" +
2979 " <li role=\"presentation\" class=\"dropdown-header\">Latest events</li>\n" +
2979 " <li role=\"presentation\" class=\"dropdown-header\">Latest events</li>\n" +
2980 " <li data-ng-repeat=\"event in $ctrl.latestEvents\" role=\"presentation\">\n" +
2980 " <li data-ng-repeat=\"event in $ctrl.latestEvents\" role=\"presentation\">\n" +
2981 " <a data-ng-click=\"$ctrl.clickedEvent(event)\"><small class=\"resource-name\">For {{ event.resource_name }}</small><br/>\n" +
2981 " <a data-ng-click=\"$ctrl.clickedEvent(event)\"><small class=\"resource-name\">For {{ event.resource_name }}</small><br/>\n" +
2982 " <small>{{ event.text |truncate:65}}</small><br/>\n" +
2982 " <small>{{ event.text |truncate:65}}</small><br/>\n" +
2983 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\">created: <iso-to-relative-time time=\"{{event.start_date}}\"/></small>\n" +
2983 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\">created: <iso-to-relative-time time=\"{{event.start_date}}\"/></small>\n" +
2984 " <small class=\"date\" data-ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\">closed: <iso-to-relative-time time=\"{{event.end_date}}\"/></small>\n" +
2984 " <small class=\"date\" data-ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\">closed: <iso-to-relative-time time=\"{{event.end_date}}\"/></small>\n" +
2985 " </a>\n" +
2985 " </a>\n" +
2986 " </li>\n" +
2986 " </li>\n" +
2987 " <li data-ng-if=\"$ctrl.latestEvents.length == 0\"><a><small>No events</small></a></li>\n" +
2987 " <li data-ng-if=\"$ctrl.latestEvents.length == 0\"><a><small>No events</small></a></li>\n" +
2988 " </ul>\n" +
2988 " </ul>\n" +
2989 " </li>\n" +
2989 " </li>\n" +
2990 "\n" +
2990 "\n" +
2991 " <li id=\"dashboards\" class=\"dropdown\" data-uib-dropdown>\n" +
2991 " <li id=\"dashboards\" class=\"dropdown\" data-uib-dropdown>\n" +
2992 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Dashboards\">\n" +
2992 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Dashboards\">\n" +
2993 " <span class=\"fa fa-bar-chart-o \"></span></a>\n" +
2993 " <span class=\"fa fa-bar-chart-o \"></span></a>\n" +
2994 " <ul class=\"dropdown-menu\">\n" +
2994 " <ul class=\"dropdown-menu\">\n" +
2995 " <li role=\"presentation\"><a data-ui-sref=\"front_dashboard\">Main dashboard</a></li>\n" +
2995 " <li role=\"presentation\"><a data-ui-sref=\"front_dashboard\">Main dashboard</a></li>\n" +
2996 " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menuDashboardsItems\">\n" +
2996 " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menuDashboardsItems\">\n" +
2997 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
2997 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
2998 " </li>\n" +
2998 " </li>\n" +
2999 " </ul>\n" +
2999 " </ul>\n" +
3000 " </li>\n" +
3000 " </li>\n" +
3001 "\n" +
3001 "\n" +
3002 " <li class=\"dropdown\" data-uib-dropdown>\n" +
3002 " <li class=\"dropdown\" data-uib-dropdown>\n" +
3003 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Reports\">\n" +
3003 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Reports\">\n" +
3004 " <span class=\"fa fa-exclamation-triangle\"></span></a>\n" +
3004 " <span class=\"fa fa-exclamation-triangle\"></span></a>\n" +
3005 " <ul class=\"dropdown-menu\">\n" +
3005 " <ul class=\"dropdown-menu\">\n" +
3006 " <li role=\"presentation\">\n" +
3006 " <li role=\"presentation\">\n" +
3007 " <a data-ui-sref=\"report.list({resource:$ctrl.stateHolder.resource})\">Error Reports</a>\n" +
3007 " <a data-ui-sref=\"report.list({resource:$ctrl.stateHolder.resource})\">Error Reports</a>\n" +
3008 " </li>\n" +
3008 " </li>\n" +
3009 " <li role=\"presentation\">\n" +
3009 " <li role=\"presentation\">\n" +
3010 " <a data-ui-sref=\"report.list_slow({resource:$ctrl.stateHolder.resource})\">Slowness Reports</a>\n" +
3010 " <a data-ui-sref=\"report.list_slow({resource:$ctrl.stateHolder.resource})\">Slowness Reports</a>\n" +
3011 " </li>\n" +
3011 " </li>\n" +
3012 "\n" +
3012 "\n" +
3013 " </ul>\n" +
3013 " </ul>\n" +
3014 " </li>\n" +
3014 " </li>\n" +
3015 "\n" +
3015 "\n" +
3016 " <li>\n" +
3016 " <li>\n" +
3017 " <a data-ui-sref=\"logs({resource:$ctrl.stateHolder.resource})\" data-uib-tooltip=\"Logs\" tooltip-placement=\"bottom\"><span class=\"fa fa-list-alt \"></span></a></li>\n" +
3017 " <a data-ui-sref=\"logs({resource:$ctrl.stateHolder.resource})\" data-uib-tooltip=\"Logs\" tooltip-placement=\"bottom\"><span class=\"fa fa-list-alt \"></span></a></li>\n" +
3018 " <li>\n" +
3018 " <li>\n" +
3019 " <a data-ui-sref=\"user\" data-uib-tooltip=\"Settings\" tooltip-placement=\"bottom\"><span class=\"fa fa-cog \"></span></a>\n" +
3019 " <a data-ui-sref=\"user\" data-uib-tooltip=\"Settings\" tooltip-placement=\"bottom\"><span class=\"fa fa-cog \"></span></a>\n" +
3020 " </li>\n" +
3020 " </li>\n" +
3021 " <li class=\"dropdown\" data-uib-dropdown data-ng-if=\"$ctrl.AeConfig.topNav.menuAdminItems.length\">\n" +
3021 " <li class=\"dropdown\" data-uib-dropdown data-ng-if=\"$ctrl.AeConfig.topNav.menuAdminItems.length\">\n" +
3022 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Admin Settings\">\n" +
3022 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Admin Settings\">\n" +
3023 " <span class=\"fa fa-wrench\"></span></a>\n" +
3023 " <span class=\"fa fa-wrench\"></span></a>\n" +
3024 " <ul class=\"dropdown-menu\">\n" +
3024 " <ul class=\"dropdown-menu\">\n" +
3025 " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menuAdminItems\">\n" +
3025 " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menuAdminItems\">\n" +
3026 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3026 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3027 " </li>\n" +
3027 " </li>\n" +
3028 " </ul>\n" +
3028 " </ul>\n" +
3029 " </li>\n" +
3029 " </li>\n" +
3030 " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.signOut }}\" target=\"_self\"\n" +
3030 " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.signOut }}\" target=\"_self\"\n" +
3031 " data-uib-tooltip=\"Sign out\" tooltip-placement=\"bottom\">\n" +
3031 " data-uib-tooltip=\"Sign out\" tooltip-placement=\"bottom\">\n" +
3032 " <span class=\"fa fa-power-off \"></span></a></li>\n" +
3032 " <span class=\"fa fa-power-off \"></span></a></li>\n" +
3033 " </ul>\n" +
3033 " </ul>\n" +
3034 " <ul class=\"nav navbar-nav pull-right\" ng-if=\"$ctrl.stateHolder.AeUser.id === null\">\n" +
3034 " <ul class=\"nav navbar-nav pull-right\" ng-if=\"$ctrl.stateHolder.AeUser.id === null\">\n" +
3035 " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.register }}\" target=\"_self\" class=\"btn btn-orange\">Sign In</a></li>\n" +
3035 " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.register }}\" target=\"_self\" class=\"btn btn-orange\">Sign In</a></li>\n" +
3036 " </ul>\n" +
3036 " </ul>\n" +
3037 " </div><!-- /.navbar-collapse -->\n" +
3037 " </div><!-- /.navbar-collapse -->\n" +
3038 " </div><!-- /.container-fluid -->\n" +
3038 " </div><!-- /.container-fluid -->\n" +
3039 " </div>\n" +
3039 " </div>\n" +
3040 " </div>\n" +
3040 " </div>\n" +
3041 "</div>\n"
3041 "</div>\n"
3042 );
3042 );
3043
3043
3044
3044
3045 $templateCache.put('components/views/admin-applications-list-view/admin-applications-list-view.html',
3045 $templateCache.put('components/views/admin-applications-list-view/admin-applications-list-view.html',
3046 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3046 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3047 "\n" +
3047 "\n" +
3048 "<div class=\"panel panel-default\" ng-if=\"!$ctrl.loading.applications\">\n" +
3048 "<div class=\"panel panel-default\" ng-if=\"!$ctrl.loading.applications\">\n" +
3049 " <div class=\"panel-heading\">\n" +
3049 " <div class=\"panel-heading\">\n" +
3050 "\n" +
3050 "\n" +
3051 " Currently active applications: {{$ctrl.applications.length}}\n" +
3051 " Currently active applications: {{$ctrl.applications.length}}\n" +
3052 "\n" +
3052 "\n" +
3053 " </div>\n" +
3053 " </div>\n" +
3054 "\n" +
3054 "\n" +
3055 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.applications\" class=\"table table-striped\">\n" +
3055 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.applications\" class=\"table table-striped\">\n" +
3056 " <thead>\n" +
3056 " <thead>\n" +
3057 " <tr>\n" +
3057 " <tr>\n" +
3058 " <th st-sort=\"resource_name\"><a>Application name</a></th>\n" +
3058 " <th st-sort=\"resource_name\"><a>Application name</a></th>\n" +
3059 " <th st-sort=\"owner_user_name\"><a>Owner User</a></th>\n" +
3059 " <th st-sort=\"owner_user_name\"><a>Owner User</a></th>\n" +
3060 " <th st-sort=\"owner_group_name\"><a>Owner Group</a></th>\n" +
3060 " <th st-sort=\"owner_group_name\"><a>Owner Group</a></th>\n" +
3061 " <th class=\"options\"></th>\n" +
3061 " <th class=\"options\"></th>\n" +
3062 " </tr>\n" +
3062 " </tr>\n" +
3063 " <tr>\n" +
3063 " <tr>\n" +
3064 " <th><input st-search=\"resource_name\" placeholder=\"search for application\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3064 " <th><input st-search=\"resource_name\" placeholder=\"search for application\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3065 " <th><input st-search=\"owner_user_name\" placeholder=\"search for user\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3065 " <th><input st-search=\"owner_user_name\" placeholder=\"search for user\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3066 " <th><input st-search=\"owner_group_name\" placeholder=\"search for group\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3066 " <th><input st-search=\"owner_group_name\" placeholder=\"search for group\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3067 " <th></th>\n" +
3067 " <th></th>\n" +
3068 " </tr>\n" +
3068 " </tr>\n" +
3069 " </thead>\n" +
3069 " </thead>\n" +
3070 " <tbody>\n" +
3070 " <tbody>\n" +
3071 "\n" +
3071 "\n" +
3072 " <tr ng-repeat=\"resource in displayedCollection track by resource.resource_id\">\n" +
3072 " <tr ng-repeat=\"resource in displayedCollection track by resource.resource_id\">\n" +
3073 " <td> {{resource.resource_name}}</td>\n" +
3073 " <td> {{resource.resource_name}}</td>\n" +
3074 " <td>{{resource.owner_user_name}}</td>\n" +
3074 " <td>{{resource.owner_user_name}}</td>\n" +
3075 " <td>{{resource.owner_group_name}}</td>\n" +
3075 " <td>{{resource.owner_group_name}}</td>\n" +
3076 " <td>\n" +
3076 " <td>\n" +
3077 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"applications.update({resourceId:resource.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span></a>\n" +
3077 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"applications.update({resourceId:resource.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span></a>\n" +
3078 " </td>\n" +
3078 " </td>\n" +
3079 " </tr>\n" +
3079 " </tr>\n" +
3080 " <tfoot>\n" +
3080 " <tfoot>\n" +
3081 " <tr>\n" +
3081 " <tr>\n" +
3082 " <td colspan=\"4\" class=\"text-center\">\n" +
3082 " <td colspan=\"4\" class=\"text-center\">\n" +
3083 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3083 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3084 " </td>\n" +
3084 " </td>\n" +
3085 " </tr>\n" +
3085 " </tr>\n" +
3086 " </tfoot>\n" +
3086 " </tfoot>\n" +
3087 " </tbody>\n" +
3087 " </tbody>\n" +
3088 " </table>\n" +
3088 " </table>\n" +
3089 "\n" +
3089 "\n" +
3090 "</div>\n"
3090 "</div>\n"
3091 );
3091 );
3092
3092
3093
3093
3094 $templateCache.put('components/views/admin-configuration-view/admin-configuration-view.html',
3094 $templateCache.put('components/views/admin-configuration-view/admin-configuration-view.html',
3095 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.config\"></ng-include>\n" +
3095 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.config\"></ng-include>\n" +
3096 "\n" +
3096 "\n" +
3097 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.config\">\n" +
3097 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.config\">\n" +
3098 " <div class=\"panel-heading\">\n" +
3098 " <div class=\"panel-heading\">\n" +
3099 " <h3 class=\"panel-title\">Basic Configuration</h3>\n" +
3099 " <h3 class=\"panel-title\">Basic Configuration</h3>\n" +
3100 " </div>\n" +
3100 " </div>\n" +
3101 " <div class=\"panel-body\">\n" +
3101 " <div class=\"panel-body\">\n" +
3102 " <h2>Visual</h2>\n" +
3102 " <h2>Visual</h2>\n" +
3103 " <form class=\"form-horizontal\">\n" +
3103 " <form class=\"form-horizontal\">\n" +
3104 " <div class=\"form-group\">\n" +
3104 " <div class=\"form-group\">\n" +
3105 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3105 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3106 " Footer HTML\n" +
3106 " Footer HTML\n" +
3107 " </label>\n" +
3107 " </label>\n" +
3108 " <div class=\"col-sm-8 col-lg-9\">\n" +
3108 " <div class=\"col-sm-8 col-lg-9\">\n" +
3109 " <textarea class=\"form-control\" type=\"text\" ng-model=\"$ctrl.configs.global.template_footer_html.value\" style=\"min-height: 150px\"></textarea>\n" +
3109 " <textarea class=\"form-control\" type=\"text\" ng-model=\"$ctrl.configs.global.template_footer_html.value\" style=\"min-height: 150px\"></textarea>\n" +
3110 " </div>\n" +
3110 " </div>\n" +
3111 " </div>\n" +
3111 " </div>\n" +
3112 " </form>\n" +
3112 " </form>\n" +
3113 "\n" +
3113 "\n" +
3114 " <h2>Functional</h2>\n" +
3114 " <h2>Functional</h2>\n" +
3115 "\n" +
3115 "\n" +
3116 " <form class=\"form-horizontal\">\n" +
3116 " <form class=\"form-horizontal\">\n" +
3117 " <div class=\"form-group\">\n" +
3117 " <div class=\"form-group\">\n" +
3118 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3118 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3119 " Show user groups to non-admin users\n" +
3119 " Show user groups to non-admin users\n" +
3120 " </label>\n" +
3120 " </label>\n" +
3121 " <div class=\"col-sm-8 col-lg-9\">\n" +
3121 " <div class=\"col-sm-8 col-lg-9\">\n" +
3122 " <button type=\"button\" class=\"btn btn-default\" ng-model=\"$ctrl.configs.global.list_groups_to_non_admins.value\" uib-btn-checkbox>\n" +
3122 " <button type=\"button\" class=\"btn btn-default\" ng-model=\"$ctrl.configs.global.list_groups_to_non_admins.value\" uib-btn-checkbox>\n" +
3123 " Enable\n" +
3123 " Enable\n" +
3124 " </button>\n" +
3124 " </button>\n" +
3125 " </div>\n" +
3125 " </div>\n" +
3126 " </div>\n" +
3126 " </div>\n" +
3127 " </form>\n" +
3127 " </form>\n" +
3128 "\n" +
3128 "\n" +
3129 " <h2>Global Rate Limiting</h2>\n" +
3129 " <h2>Global Rate Limiting</h2>\n" +
3130 "\n" +
3130 "\n" +
3131 " <form class=\"form-horizontal\">\n" +
3131 " <form class=\"form-horizontal\">\n" +
3132 " <div class=\"form-group\">\n" +
3132 " <div class=\"form-group\">\n" +
3133 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3133 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3134 " Ignore reports per minute/per application\n" +
3134 " Ignore reports per minute/per application\n" +
3135 " </label>\n" +
3135 " </label>\n" +
3136 " <div class=\"col-sm-8 col-lg-9\">\n" +
3136 " <div class=\"col-sm-8 col-lg-9\">\n" +
3137 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_reports_rate_limit.value\" />\n" +
3137 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_reports_rate_limit.value\" />\n" +
3138 " </div>\n" +
3138 " </div>\n" +
3139 " </div>\n" +
3139 " </div>\n" +
3140 "\n" +
3140 "\n" +
3141 " <div class=\"form-group\">\n" +
3141 " <div class=\"form-group\">\n" +
3142 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3142 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3143 " Ignore logs per minute/per application\n" +
3143 " Ignore logs per minute/per application\n" +
3144 " </label>\n" +
3144 " </label>\n" +
3145 " <div class=\"col-sm-8 col-lg-9\">\n" +
3145 " <div class=\"col-sm-8 col-lg-9\">\n" +
3146 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_logs_rate_limit.value\" />\n" +
3146 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_logs_rate_limit.value\" />\n" +
3147 " </div>\n" +
3147 " </div>\n" +
3148 " </div>\n" +
3148 " </div>\n" +
3149 "\n" +
3149 "\n" +
3150 " <div class=\"form-group\">\n" +
3150 " <div class=\"form-group\">\n" +
3151 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3151 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3152 " Ignore metrics per minute/per application\n" +
3152 " Ignore metrics per minute/per application\n" +
3153 " </label>\n" +
3153 " </label>\n" +
3154 " <div class=\"col-sm-8 col-lg-9\">\n" +
3154 " <div class=\"col-sm-8 col-lg-9\">\n" +
3155 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_metrics_rate_limit.value\" />\n" +
3155 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_metrics_rate_limit.value\" />\n" +
3156 " </div>\n" +
3156 " </div>\n" +
3157 " </div>\n" +
3157 " </div>\n" +
3158 "\n" +
3158 "\n" +
3159 " </form>\n" +
3159 " </form>\n" +
3160 "\n" +
3160 "\n" +
3161 " <hr/>\n" +
3161 " <hr/>\n" +
3162 "\n" +
3162 "\n" +
3163 " <a class=\"btn btn-primary\" ng-click=\"$ctrl.save()\">Save configuration</a>\n" +
3163 " <a class=\"btn btn-primary\" ng-click=\"$ctrl.save()\">Save configuration</a>\n" +
3164 " </div>\n" +
3164 " </div>\n" +
3165 "\n" +
3165 "\n" +
3166 "</div>\n" +
3166 "</div>\n" +
3167 "\n" +
3167 "\n" +
3168 "\n" +
3168 "\n" +
3169 "<div class=\"panel panel-default\">\n" +
3169 "<div class=\"panel panel-default\">\n" +
3170 " <div class=\"panel-heading\">\n" +
3170 " <div class=\"panel-heading\">\n" +
3171 " <h3 class=\"panel-title\">Plugin Configuration</h3>\n" +
3171 " <h3 class=\"panel-title\">Plugin Configuration</h3>\n" +
3172 " </div>\n" +
3172 " </div>\n" +
3173 " <div class=\"panel-body\">\n" +
3173 " <div class=\"panel-body\">\n" +
3174 " <plugin-config section=\"'admin.config'\">\n" +
3174 " <plugin-config section=\"'admin.config'\">\n" +
3175 " </plugin-config>\n" +
3175 " </plugin-config>\n" +
3176 " </div>\n" +
3176 " </div>\n" +
3177 "</div>\n"
3177 "</div>\n"
3178 );
3178 );
3179
3179
3180
3180
3181 $templateCache.put('components/views/admin-groups-create-view/admin-groups-create-view.html',
3181 $templateCache.put('components/views/admin-groups-create-view/admin-groups-create-view.html',
3182 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.group\"></ng-include>\n" +
3182 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.group\"></ng-include>\n" +
3183 "\n" +
3183 "\n" +
3184 "<div ng-show=\"!$ctrl.loading.group\">\n" +
3184 "<div ng-show=\"!$ctrl.loading.group\">\n" +
3185 "\n" +
3185 "\n" +
3186 " <div class=\"panel panel-default\">\n" +
3186 " <div class=\"panel panel-default\">\n" +
3187 " <div class=\"panel-body\">\n" +
3187 " <div class=\"panel-body\">\n" +
3188 " <form name=\"$ctrl.groupForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createGroup()\">\n" +
3188 " <form name=\"$ctrl.groupForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createGroup()\">\n" +
3189 " <div class=\"form-group\" id=\"row-group_name\">\n" +
3189 " <div class=\"form-group\" id=\"row-group_name\">\n" +
3190 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.group_name\"></data-form-errors>\n" +
3190 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.group_name\"></data-form-errors>\n" +
3191 " <label for=\"group_name\" id=\"label-group_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3191 " <label for=\"group_name\" id=\"label-group_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3192 " Group name\n" +
3192 " Group name\n" +
3193 " <span class=\"required\">*</span>\n" +
3193 " <span class=\"required\">*</span>\n" +
3194 " </label>\n" +
3194 " </label>\n" +
3195 " <div class=\"col-sm-8 col-lg-9\">\n" +
3195 " <div class=\"col-sm-8 col-lg-9\">\n" +
3196 " <input class=\"form-control\" id=\"group_name\" name=\"group_name\" type=\"text\" ng-model=\"$ctrl.group.group_name\">\n" +
3196 " <input class=\"form-control\" id=\"group_name\" name=\"group_name\" type=\"text\" ng-model=\"$ctrl.group.group_name\">\n" +
3197 " </div>\n" +
3197 " </div>\n" +
3198 " </div>\n" +
3198 " </div>\n" +
3199 "\n" +
3199 "\n" +
3200 " <div class=\"form-group\" id=\"row-description\">\n" +
3200 " <div class=\"form-group\" id=\"row-description\">\n" +
3201 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.description\"></data-form-errors>\n" +
3201 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.description\"></data-form-errors>\n" +
3202 " <label for=\"description\" id=\"label-description\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3202 " <label for=\"description\" id=\"label-description\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3203 " Description\n" +
3203 " Description\n" +
3204 " <span class=\"required\">*</span>\n" +
3204 " <span class=\"required\">*</span>\n" +
3205 " </label>\n" +
3205 " </label>\n" +
3206 " <div class=\"col-sm-8 col-lg-9\">\n" +
3206 " <div class=\"col-sm-8 col-lg-9\">\n" +
3207 " <input class=\"form-control\" id=\"description\" name=\"description\" type=\"text\" ng-model=\"$ctrl.group.description\">\n" +
3207 " <input class=\"form-control\" id=\"description\" name=\"description\" type=\"text\" ng-model=\"$ctrl.group.description\">\n" +
3208 " </div>\n" +
3208 " </div>\n" +
3209 " </div>\n" +
3209 " </div>\n" +
3210 "\n" +
3210 "\n" +
3211 "\n" +
3211 "\n" +
3212 " <div class=\"form-group\" id=\"row-submit\">\n" +
3212 " <div class=\"form-group\" id=\"row-submit\">\n" +
3213 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3213 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3214 " </label>\n" +
3214 " </label>\n" +
3215 " <div class=\"col-sm-8 col-lg-9\">\n" +
3215 " <div class=\"col-sm-8 col-lg-9\">\n" +
3216 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.groupId ? 'Update' : 'Add'}} Group\">\n" +
3216 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.groupId ? 'Update' : 'Add'}} Group\">\n" +
3217 " </div>\n" +
3217 " </div>\n" +
3218 " </div>\n" +
3218 " </div>\n" +
3219 " </form>\n" +
3219 " </form>\n" +
3220 " </div>\n" +
3220 " </div>\n" +
3221 " </div>\n" +
3221 " </div>\n" +
3222 "\n" +
3222 "\n" +
3223 "\n" +
3223 "\n" +
3224 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3224 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3225 " <div class=\"panel-heading\">\n" +
3225 " <div class=\"panel-heading\">\n" +
3226 " <h3 class=\"panel-title\">Permissions summary</h3>\n" +
3226 " <h3 class=\"panel-title\">Permissions summary</h3>\n" +
3227 " </div>\n" +
3227 " </div>\n" +
3228 " <div class=\"panel-body\">\n" +
3228 " <div class=\"panel-body\">\n" +
3229 " <h3>Direct application permissions</h3>\n" +
3229 " <h3>Direct application permissions</h3>\n" +
3230 "\n" +
3230 "\n" +
3231 " <ul class=\"list-group\">\n" +
3231 " <ul class=\"list-group\">\n" +
3232 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.application\" class=\"animate-repeat list-group-item\">\n" +
3232 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.application\" class=\"animate-repeat list-group-item\">\n" +
3233 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3233 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3234 "\n" +
3234 "\n" +
3235 " <div class=\"pull-right\">\n" +
3235 " <div class=\"pull-right\">\n" +
3236 "\n" +
3236 "\n" +
3237 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3237 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3238 "\n" +
3238 "\n" +
3239 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3239 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3240 " <span class=\"fa fa-cog\"></span>\n" +
3240 " <span class=\"fa fa-cog\"></span>\n" +
3241 " </a>\n" +
3241 " </a>\n" +
3242 " </div>\n" +
3242 " </div>\n" +
3243 " </li>\n" +
3243 " </li>\n" +
3244 " </ul>\n" +
3244 " </ul>\n" +
3245 "\n" +
3245 "\n" +
3246 " <h3>Direct dashboard permissions</h3>\n" +
3246 " <h3>Direct dashboard permissions</h3>\n" +
3247 "\n" +
3247 "\n" +
3248 " <ul class=\"list-group\">\n" +
3248 " <ul class=\"list-group\">\n" +
3249 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3249 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3250 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3250 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3251 "\n" +
3251 "\n" +
3252 " <div class=\"pull-right\">\n" +
3252 " <div class=\"pull-right\">\n" +
3253 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3253 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3254 "\n" +
3254 "\n" +
3255 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3255 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3256 " <span class=\"fa fa-cog\"></span>\n" +
3256 " <span class=\"fa fa-cog\"></span>\n" +
3257 " </a>\n" +
3257 " </a>\n" +
3258 " </div>\n" +
3258 " </div>\n" +
3259 " </li>\n" +
3259 " </li>\n" +
3260 " </ul>\n" +
3260 " </ul>\n" +
3261 "\n" +
3261 "\n" +
3262 " </div>\n" +
3262 " </div>\n" +
3263 "\n" +
3263 "\n" +
3264 " </div>\n" +
3264 " </div>\n" +
3265 "\n" +
3265 "\n" +
3266 "\n" +
3266 "\n" +
3267 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3267 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3268 " <div class=\"panel-heading\">\n" +
3268 " <div class=\"panel-heading\">\n" +
3269 " <h3 class=\"panel-title\">User list</h3>\n" +
3269 " <h3 class=\"panel-title\">User list</h3>\n" +
3270 " </div>\n" +
3270 " </div>\n" +
3271 " <div class=\"panel-body\">\n" +
3271 " <div class=\"panel-body\">\n" +
3272 "\n" +
3272 "\n" +
3273 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"$ctrl.addUser()\">\n" +
3273 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"$ctrl.addUser()\">\n" +
3274 " <div class=\"form-group\">\n" +
3274 " <div class=\"form-group\">\n" +
3275 " <input placeholder=\"Username or email\" type=\"text\" class=\"autocomplete form-control\" ng-model=\"$ctrl.form.autocompleteUser\" uib-typeahead=\"u for u in $ctrl.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"searchingUsers\" typeahead-wait-ms=\"250\"/>\n" +
3275 " <input placeholder=\"Username or email\" type=\"text\" class=\"autocomplete form-control\" ng-model=\"$ctrl.form.autocompleteUser\" uib-typeahead=\"u for u in $ctrl.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"searchingUsers\" typeahead-wait-ms=\"250\"/>\n" +
3276 " </div>\n" +
3276 " </div>\n" +
3277 " <div class=\"form-group\">\n" +
3277 " <div class=\"form-group\">\n" +
3278 " <button class=\"btn btn-info\" ng-disabled=\"!$ctrl.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Add user</button>\n" +
3278 " <button class=\"btn btn-info\" ng-disabled=\"!$ctrl.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Add user</button>\n" +
3279 " </div>\n" +
3279 " </div>\n" +
3280 " </form>\n" +
3280 " </form>\n" +
3281 "\n" +
3281 "\n" +
3282 " </div>\n" +
3282 " </div>\n" +
3283 "\n" +
3283 "\n" +
3284 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3284 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3285 " <thead>\n" +
3285 " <thead>\n" +
3286 " <tr>\n" +
3286 " <tr>\n" +
3287 " <th st-sort=\"user_name\"><a>Username</a></th>\n" +
3287 " <th st-sort=\"user_name\"><a>Username</a></th>\n" +
3288 " <th st-sort=\"email\"><a>Email</a></th>\n" +
3288 " <th st-sort=\"email\"><a>Email</a></th>\n" +
3289 " <th st-sort=\"status\"><a>Status</a></th>\n" +
3289 " <th st-sort=\"status\"><a>Status</a></th>\n" +
3290 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3290 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3291 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3291 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3292 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3292 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3293 " <th class=\"options\" style=\"width: 130px\"></th>\n" +
3293 " <th class=\"options\" style=\"width: 130px\"></th>\n" +
3294 " </tr>\n" +
3294 " </tr>\n" +
3295 " <tr>\n" +
3295 " <tr>\n" +
3296 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3296 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3297 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3297 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3298 " <th></th>\n" +
3298 " <th></th>\n" +
3299 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3299 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3300 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3300 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3301 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3301 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3302 " <th></th>\n" +
3302 " <th></th>\n" +
3303 " </tr>\n" +
3303 " </tr>\n" +
3304 " </thead>\n" +
3304 " </thead>\n" +
3305 " <tbody>\n" +
3305 " <tbody>\n" +
3306 "\n" +
3306 "\n" +
3307 " <tr ng-repeat=\"user in displayedCollection\">\n" +
3307 " <tr ng-repeat=\"user in displayedCollection\">\n" +
3308 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3308 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3309 " <td>{{user.email}}</td>\n" +
3309 " <td>{{user.email}}</td>\n" +
3310 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3310 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3311 " <td>{{user.first_name}}</td>\n" +
3311 " <td>{{user.first_name}}</td>\n" +
3312 " <td>{{user.last_name}}</td>\n" +
3312 " <td>{{user.last_name}}</td>\n" +
3313 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3313 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3314 " <td>\n" +
3314 " <td>\n" +
3315 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3315 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3316 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3316 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3317 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3317 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3318 " <ul class=\"dropdown-menu\">\n" +
3318 " <ul class=\"dropdown-menu\">\n" +
3319 " <li><a>No</a></li>\n" +
3319 " <li><a>No</a></li>\n" +
3320 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3320 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3321 " </ul>\n" +
3321 " </ul>\n" +
3322 " </span>\n" +
3322 " </span>\n" +
3323 " </tr>\n" +
3323 " </tr>\n" +
3324 " <tfoot>\n" +
3324 " <tfoot>\n" +
3325 " <tr>\n" +
3325 " <tr>\n" +
3326 " <td colspan=\"7\" class=\"text-center\">\n" +
3326 " <td colspan=\"7\" class=\"text-center\">\n" +
3327 " <div st-pagination=\"\" st-items-by-page=\"50\" st-displayed-pages=\"7\"></div>\n" +
3327 " <div st-pagination=\"\" st-items-by-page=\"50\" st-displayed-pages=\"7\"></div>\n" +
3328 " </td>\n" +
3328 " </td>\n" +
3329 " </tr>\n" +
3329 " </tr>\n" +
3330 " </tfoot>\n" +
3330 " </tfoot>\n" +
3331 " </tbody>\n" +
3331 " </tbody>\n" +
3332 " </table>\n" +
3332 " </table>\n" +
3333 "\n" +
3333 "\n" +
3334 " </div>\n" +
3334 " </div>\n" +
3335 "\n" +
3335 "\n" +
3336 "\n" +
3336 "\n" +
3337 "</div>\n"
3337 "</div>\n"
3338 );
3338 );
3339
3339
3340
3340
3341 $templateCache.put('components/views/admin-groups-list-view/admin-groups-list-view.html',
3341 $templateCache.put('components/views/admin-groups-list-view/admin-groups-list-view.html',
3342 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.groups\"></ng-include>\n" +
3342 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.groups\"></ng-include>\n" +
3343 "\n" +
3343 "\n" +
3344 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.groups\">\n" +
3344 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.groups\">\n" +
3345 "\n" +
3345 "\n" +
3346 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.groups\" class=\"table table-striped\">\n" +
3346 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.groups\" class=\"table table-striped\">\n" +
3347 " <thead>\n" +
3347 " <thead>\n" +
3348 " <tr>\n" +
3348 " <tr>\n" +
3349 " <th st-sort=\"group_name\"><a>Group name</a></th>\n" +
3349 " <th st-sort=\"group_name\"><a>Group name</a></th>\n" +
3350 " <th st-sort=\"description\"><a>Description</a></th>\n" +
3350 " <th st-sort=\"description\"><a>Description</a></th>\n" +
3351 " <th st-sort=\"members\"><a>Member count</a></th>\n" +
3351 " <th st-sort=\"members\"><a>Member count</a></th>\n" +
3352 " <th class=\"options\"></th>\n" +
3352 " <th class=\"options\"></th>\n" +
3353 " </tr>\n" +
3353 " </tr>\n" +
3354 " <tr>\n" +
3354 " <tr>\n" +
3355 " <th><input st-search=\"group_name\" placeholder=\"search for group name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3355 " <th><input st-search=\"group_name\" placeholder=\"search for group name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3356 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3356 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3357 " <th></th>\n" +
3357 " <th></th>\n" +
3358 " <th></th>\n" +
3358 " <th></th>\n" +
3359 " </tr>\n" +
3359 " </tr>\n" +
3360 " </thead>\n" +
3360 " </thead>\n" +
3361 " <tbody>\n" +
3361 " <tbody>\n" +
3362 "\n" +
3362 "\n" +
3363 " <tr ng-repeat=\"group in displayedCollection track by group.id\">\n" +
3363 " <tr ng-repeat=\"group in displayedCollection track by group.id\">\n" +
3364 " <td>{{group.group_name}}</td>\n" +
3364 " <td>{{group.group_name}}</td>\n" +
3365 " <td>{{group.description}}</td>\n" +
3365 " <td>{{group.description}}</td>\n" +
3366 " <td>{{group.member_count}}</td>\n" +
3366 " <td>{{group.member_count}}</td>\n" +
3367 " <td>\n" +
3367 " <td>\n" +
3368 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.group.update({groupId:group.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3368 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.group.update({groupId:group.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3369 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3369 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3370 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3370 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3371 " <ul class=\"dropdown-menu\">\n" +
3371 " <ul class=\"dropdown-menu\">\n" +
3372 " <li><a>No</a></li>\n" +
3372 " <li><a>No</a></li>\n" +
3373 " <li><a ng-click=\"$ctrl.removeGroup(group)\">Yes</a></li>\n" +
3373 " <li><a ng-click=\"$ctrl.removeGroup(group)\">Yes</a></li>\n" +
3374 " </ul>\n" +
3374 " </ul>\n" +
3375 " </span>\n" +
3375 " </span>\n" +
3376 " </tr>\n" +
3376 " </tr>\n" +
3377 " <tfoot>\n" +
3377 " <tfoot>\n" +
3378 " <tr>\n" +
3378 " <tr>\n" +
3379 " <td colspan=\"4\" class=\"text-center\">\n" +
3379 " <td colspan=\"4\" class=\"text-center\">\n" +
3380 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3380 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3381 " </td>\n" +
3381 " </td>\n" +
3382 " </tr>\n" +
3382 " </tr>\n" +
3383 " </tfoot>\n" +
3383 " </tfoot>\n" +
3384 " </tbody>\n" +
3384 " </tbody>\n" +
3385 " </table>\n" +
3385 " </table>\n" +
3386 "\n" +
3386 "\n" +
3387 "</div>\n" +
3387 "</div>\n" +
3388 "\n"
3388 "\n"
3389 );
3389 );
3390
3390
3391
3391
3392 $templateCache.put('components/views/admin-partitions-view/admin-partitions-view.html',
3392 $templateCache.put('components/views/admin-partitions-view/admin-partitions-view.html',
3393 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.partitions\"></ng-include>\n" +
3393 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.partitions\"></ng-include>\n" +
3394 "\n" +
3394 "\n" +
3395 "<div ng-show=\"!$ctrl.loading.partitions\">\n" +
3395 "<div ng-show=\"!$ctrl.loading.partitions\">\n" +
3396 "\n" +
3396 "\n" +
3397 " <div class=\"panel panel-default\">\n" +
3397 " <div class=\"panel panel-default\">\n" +
3398 " <div class=\"panel-heading\">\n" +
3398 " <div class=\"panel-heading\">\n" +
3399 " DELETE Daily Partitions\n" +
3399 " DELETE Daily Partitions\n" +
3400 " </div>\n" +
3400 " </div>\n" +
3401 "\n" +
3401 "\n" +
3402 " <form name=\"$ctrl.dailyPartitionsForm\"\n" +
3402 " <form name=\"$ctrl.dailyPartitionsForm\"\n" +
3403 " novalidate ng-submit=\"$ctrl.partitionsDelete('dailyPartitions')\"\n" +
3403 " novalidate ng-submit=\"$ctrl.partitionsDelete('dailyPartitions')\"\n" +
3404 " class=\"form-inline\"\n" +
3404 " class=\"form-inline\"\n" +
3405 " ng-class=\"{'has-error':$ctrl.dailyPartitionsForm.$invalid}\">\n" +
3405 " ng-class=\"{'has-error':$ctrl.dailyPartitionsForm.$invalid}\">\n" +
3406 "\n" +
3406 "\n" +
3407 " <div class=\"panel-body\">\n" +
3407 " <div class=\"panel-body\">\n" +
3408 "\n" +
3408 "\n" +
3409 " <input type=\"text\" name=\"confirm\"\n" +
3409 " <input type=\"text\" name=\"confirm\"\n" +
3410 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control input-autosize\" confirm-validate required ng-model=\"$ctrl.dailyConfirm\">\n" +
3410 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control input-autosize\" confirm-validate required ng-model=\"$ctrl.dailyConfirm\">\n" +
3411 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.dailyPartitionsForm.$invalid\">\n" +
3411 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.dailyPartitionsForm.$invalid\">\n" +
3412 " <input type=\"checkbox\" ng-model=\"$ctrl.dailyChecked\" ng-change=\"$ctrl.setCheckedList('dailyPartitions')\"> Check All\n" +
3412 " <input type=\"checkbox\" ng-model=\"$ctrl.dailyChecked\" ng-change=\"$ctrl.setCheckedList('dailyPartitions')\"> Check All\n" +
3413 "\n" +
3413 "\n" +
3414 " </div>\n" +
3414 " </div>\n" +
3415 "\n" +
3415 "\n" +
3416 " <table class=\"table table-striped\">\n" +
3416 " <table class=\"table table-striped\">\n" +
3417 " <tr>\n" +
3417 " <tr>\n" +
3418 " <th class=\"c1 date\">Date</th>\n" +
3418 " <th class=\"c1 date\">Date</th>\n" +
3419 " <th class=\"c2 indices\">Indices</th>\n" +
3419 " <th class=\"c2 indices\">Indices</th>\n" +
3420 " </tr>\n" +
3420 " </tr>\n" +
3421 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.dailyPartitions\">\n" +
3421 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.dailyPartitions\">\n" +
3422 " <td class=\"c1\">{{row[0]}}</td>\n" +
3422 " <td class=\"c1\">{{row[0]}}</td>\n" +
3423 " <td class=\"c2\">\n" +
3423 " <td class=\"c2\">\n" +
3424 " <ul class=\"list-group\">\n" +
3424 " <ul class=\"list-group\">\n" +
3425 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3425 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3426 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3426 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3427 " </li>\n" +
3427 " </li>\n" +
3428 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3428 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3429 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3429 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3430 " </li>\n" +
3430 " </li>\n" +
3431 " </ul>\n" +
3431 " </ul>\n" +
3432 " </td>\n" +
3432 " </td>\n" +
3433 " </tr>\n" +
3433 " </tr>\n" +
3434 " </table>\n" +
3434 " </table>\n" +
3435 " </form>\n" +
3435 " </form>\n" +
3436 "\n" +
3436 "\n" +
3437 " </div>\n" +
3437 " </div>\n" +
3438 "\n" +
3438 "\n" +
3439 " <div class=\"panel panel-default\">\n" +
3439 " <div class=\"panel panel-default\">\n" +
3440 " <div class=\"panel-heading\">\n" +
3440 " <div class=\"panel-heading\">\n" +
3441 " DELETE Permanent Partitions\n" +
3441 " DELETE Permanent Partitions\n" +
3442 " </div>\n" +
3442 " </div>\n" +
3443 "\n" +
3443 "\n" +
3444 " <form name=\"$ctrl.permanentPartitionsForm\" novalidate\n" +
3444 " <form name=\"$ctrl.permanentPartitionsForm\" novalidate\n" +
3445 " ng-submit=\"$ctrl.partitionsDelete('permanentPartitions')\"\n" +
3445 " ng-submit=\"$ctrl.partitionsDelete('permanentPartitions')\"\n" +
3446 " class=\"form-inline\"\n" +
3446 " class=\"form-inline\"\n" +
3447 " ng-class=\"{'has-error':$ctrl.permanentPartitionsForm.$invalid}\">\n" +
3447 " ng-class=\"{'has-error':$ctrl.permanentPartitionsForm.$invalid}\">\n" +
3448 "\n" +
3448 "\n" +
3449 "\n" +
3449 "\n" +
3450 " <div class=\"panel-body\">\n" +
3450 " <div class=\"panel-body\">\n" +
3451 "\n" +
3451 "\n" +
3452 " <div class=\"form-group\">\n" +
3452 " <div class=\"form-group\">\n" +
3453 " <input type=\"text\" name=\"confirm\"\n" +
3453 " <input type=\"text\" name=\"confirm\"\n" +
3454 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control\" confirm-validate required ng-model=\"$ctrl.permConfirm\">\n" +
3454 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control\" confirm-validate required ng-model=\"$ctrl.permConfirm\">\n" +
3455 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.permanentPartitionsForm.$invalid\">\n" +
3455 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.permanentPartitionsForm.$invalid\">\n" +
3456 " <input type=\"checkbox\" ng-model=\"$ctrl.permChecked\" ng-change=\"$ctrl.setCheckedList('permanentPartitions')\"> Check All\n" +
3456 " <input type=\"checkbox\" ng-model=\"$ctrl.permChecked\" ng-change=\"$ctrl.setCheckedList('permanentPartitions')\"> Check All\n" +
3457 " </div>\n" +
3457 " </div>\n" +
3458 "\n" +
3458 "\n" +
3459 " </div>\n" +
3459 " </div>\n" +
3460 "\n" +
3460 "\n" +
3461 " <table class=\"table table-striped\">\n" +
3461 " <table class=\"table table-striped\">\n" +
3462 " <tr>\n" +
3462 " <tr>\n" +
3463 " <th class=\"c1 date\">Date</th>\n" +
3463 " <th class=\"c1 date\">Date</th>\n" +
3464 " <th class=\"c2 indices\">Indices</th>\n" +
3464 " <th class=\"c2 indices\">Indices</th>\n" +
3465 " </tr>\n" +
3465 " </tr>\n" +
3466 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.permanentPartitions\">\n" +
3466 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.permanentPartitions\">\n" +
3467 " <td class=\"c1\">{{row[0]}}</td>\n" +
3467 " <td class=\"c1\">{{row[0]}}</td>\n" +
3468 " <td class=\"c2\">\n" +
3468 " <td class=\"c2\">\n" +
3469 " <ul class=\"list-group\">\n" +
3469 " <ul class=\"list-group\">\n" +
3470 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3470 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3471 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3471 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3472 " </li>\n" +
3472 " </li>\n" +
3473 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3473 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3474 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3474 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3475 " </li>\n" +
3475 " </li>\n" +
3476 " </ul>\n" +
3476 " </ul>\n" +
3477 " </td>\n" +
3477 " </td>\n" +
3478 " </tr>\n" +
3478 " </tr>\n" +
3479 " </table>\n" +
3479 " </table>\n" +
3480 " </form>\n" +
3480 " </form>\n" +
3481 "\n" +
3481 "\n" +
3482 " </div>\n" +
3482 " </div>\n" +
3483 "\n" +
3483 "\n" +
3484 "</div>\n"
3484 "</div>\n"
3485 );
3485 );
3486
3486
3487
3487
3488 $templateCache.put('components/views/admin-system-view/admin-system-view.html',
3488 $templateCache.put('components/views/admin-system-view/admin-system-view.html',
3489 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.system\"></ng-include>\n" +
3489 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.system\"></ng-include>\n" +
3490 "\n" +
3490 "\n" +
3491 "<div ng-if=\"$ctrl.loading.system == false\">\n" +
3491 "<div ng-if=\"$ctrl.loading.system == false\">\n" +
3492 " <div class=\"row\">\n" +
3492 " <div class=\"row\">\n" +
3493 " <div class=\"col-sm-12\">\n" +
3493 " <div class=\"col-sm-12\">\n" +
3494 " <div class=\"panel panel-default\">\n" +
3494 " <div class=\"panel panel-default\">\n" +
3495 " <div class=\"panel-heading\">\n" +
3495 " <div class=\"panel-heading\">\n" +
3496 " <h3 class=\"panel-title\">\n" +
3496 " <h3 class=\"panel-title\">\n" +
3497 " System Info\n" +
3497 " System Info\n" +
3498 " </h3>\n" +
3498 " </h3>\n" +
3499 " </div>\n" +
3499 " </div>\n" +
3500 " <div class=\"panel-body\">\n" +
3500 " <div class=\"panel-body\">\n" +
3501 "\n" +
3501 "\n" +
3502 " <p><strong>System Load:</strong>\n" +
3502 " <p><strong>System Load:</strong>\n" +
3503 " 1min: {{$ctrl.systemLoad[0]}}, 5min: {{$ctrl.systemLoad[1]}}, 15min: {{$ctrl.systemLoad[2]}}\n" +
3503 " 1min: {{$ctrl.systemLoad[0]}}, 5min: {{$ctrl.systemLoad[1]}}, 15min: {{$ctrl.systemLoad[2]}}\n" +
3504 " </p>\n" +
3504 " </p>\n" +
3505 " <p><strong>Awaiting tasks:</strong>\n" +
3505 " <p><strong>Awaiting tasks:</strong>\n" +
3506 " <ul>\n" +
3506 " <ul>\n" +
3507 " <li>reports: {{$ctrl.queueStats.waiting_reports}}</li>\n" +
3507 " <li>reports: {{$ctrl.queueStats.waiting_reports}}</li>\n" +
3508 " <li>logs: {{$ctrl.queueStats.waiting_logs}}</li>\n" +
3508 " <li>logs: {{$ctrl.queueStats.waiting_logs}}</li>\n" +
3509 " <li>metrics: {{$ctrl.queueStats.waiting_metrics}}</li>\n" +
3509 " <li>metrics: {{$ctrl.queueStats.waiting_metrics}}</li>\n" +
3510 " <li>other: {{$ctrl.queueStats.waiting_other}}</li>\n" +
3510 " <li>other: {{$ctrl.queueStats.waiting_other}}</li>\n" +
3511 " </ul>\n" +
3511 " </ul>\n" +
3512 " </p>\n" +
3512 " </p>\n" +
3513 " <p><strong>Queue stats from last minute:</strong>\n" +
3513 " <p><strong>Queue stats from last minute:</strong>\n" +
3514 " <ul>\n" +
3514 " <ul>\n" +
3515 " <li>Processed reports: {{$ctrl.queueStats.processed_reports}}</li>\n" +
3515 " <li>Processed reports: {{$ctrl.queueStats.processed_reports}}</li>\n" +
3516 " <li>Processed logs: {{$ctrl.queueStats.processed_logs}}</li>\n" +
3516 " <li>Processed logs: {{$ctrl.queueStats.processed_logs}}</li>\n" +
3517 " <li>Processed metrics: {{$ctrl.queueStats.processed_metrics}}</li>\n" +
3517 " <li>Processed metrics: {{$ctrl.queueStats.processed_metrics}}</li>\n" +
3518 " </ul>\n" +
3518 " </ul>\n" +
3519 " </p>\n" +
3519 " </p>\n" +
3520 "\n" +
3520 "\n" +
3521 " <p><strong>Disks:</strong>\n" +
3521 " <p><strong>Disks:</strong>\n" +
3522 " <ul>\n" +
3522 " <ul>\n" +
3523 " <li ng-repeat=\"disk in $ctrl.disks\">\n" +
3523 " <li ng-repeat=\"disk in $ctrl.disks\">\n" +
3524 " <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used\n" +
3524 " <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used\n" +
3525 " </li>\n" +
3525 " </li>\n" +
3526 " </ul>\n" +
3526 " </ul>\n" +
3527 " </p>\n" +
3527 " </p>\n" +
3528 "\n" +
3528 "\n" +
3529 " <p><strong>Process stats:</strong>\n" +
3529 " <p><strong>Process stats:</strong>\n" +
3530 " <ul>\n" +
3530 " <ul>\n" +
3531 " <li>FD soft limits: {{$ctrl.selfInfo.fds.soft}}</li>\n" +
3531 " <li>FD soft limits: {{$ctrl.selfInfo.fds.soft}}</li>\n" +
3532 " <li>FD hard limits: {{$ctrl.selfInfo.fds.hard}}</li>\n" +
3532 " <li>FD hard limits: {{$ctrl.selfInfo.fds.hard}}</li>\n" +
3533 " <li>Memlock soft limits: {{$ctrl.selfInfo.memlock.soft}}</li>\n" +
3533 " <li>Memlock soft limits: {{$ctrl.selfInfo.memlock.soft}}</li>\n" +
3534 " <li>Memlock hard limits: {{$ctrl.selfInfo.memlock.hard}}</li>\n" +
3534 " <li>Memlock hard limits: {{$ctrl.selfInfo.memlock.hard}}</li>\n" +
3535 " </ul>\n" +
3535 " </ul>\n" +
3536 " </p>\n" +
3536 " </p>\n" +
3537 "\n" +
3537 "\n" +
3538 " </div>\n" +
3538 " </div>\n" +
3539 " </div>\n" +
3539 " </div>\n" +
3540 " </div>\n" +
3540 " </div>\n" +
3541 " </div>\n" +
3541 " </div>\n" +
3542 " <div class=\"row\">\n" +
3542 " <div class=\"row\">\n" +
3543 " <div class=\"col-sm-12\">\n" +
3543 " <div class=\"col-sm-12\">\n" +
3544 "\n" +
3544 "\n" +
3545 " <div class=\"panel panel-default\">\n" +
3545 " <div class=\"panel panel-default\">\n" +
3546 " <div class=\"panel-body\">\n" +
3546 " <div class=\"panel-body\">\n" +
3547 "\n" +
3547 "\n" +
3548 " <uib-tabset>\n" +
3548 " <uib-tabset>\n" +
3549 " <uib-tab>\n" +
3549 " <uib-tab>\n" +
3550 " <uib-tab-heading>\n" +
3550 " <uib-tab-heading>\n" +
3551 " Postgresql Tables\n" +
3551 " Postgresql Tables\n" +
3552 " </uib-tab-heading>\n" +
3552 " </uib-tab-heading>\n" +
3553 "\n" +
3553 "\n" +
3554 " <table class=\"table table-striped\">\n" +
3554 " <table class=\"table table-striped\">\n" +
3555 " <thead>\n" +
3555 " <thead>\n" +
3556 " <tr>\n" +
3556 " <tr>\n" +
3557 " <th class=\"c1 tablename\">Table name</th>\n" +
3557 " <th class=\"c1 tablename\">Table name</th>\n" +
3558 " <th class=\"c2 size_human\">Size</th>\n" +
3558 " <th class=\"c2 size_human\">Size</th>\n" +
3559 " </tr>\n" +
3559 " </tr>\n" +
3560 " </thead>\n" +
3560 " </thead>\n" +
3561 " <tbody>\n" +
3561 " <tbody>\n" +
3562 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.DBtables\">\n" +
3562 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.DBtables\">\n" +
3563 " <td class=\"c1\">{{row.table_name}}</td>\n" +
3563 " <td class=\"c1\">{{row.table_name}}</td>\n" +
3564 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3564 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3565 " </tr>\n" +
3565 " </tr>\n" +
3566 " </tbody>\n" +
3566 " </tbody>\n" +
3567 " </table>\n" +
3567 " </table>\n" +
3568 "\n" +
3568 "\n" +
3569 " </uib-tab>\n" +
3569 " </uib-tab>\n" +
3570 "\n" +
3570 "\n" +
3571 " <uib-tab>\n" +
3571 " <uib-tab>\n" +
3572 " <uib-tab-heading>\n" +
3572 " <uib-tab-heading>\n" +
3573 " Elasticsearch Indices\n" +
3573 " Elasticsearch Indices\n" +
3574 " </uib-tab-heading>\n" +
3574 " </uib-tab-heading>\n" +
3575 "\n" +
3575 "\n" +
3576 " <table class=\"table table-striped\">\n" +
3576 " <table class=\"table table-striped\">\n" +
3577 " <thead>\n" +
3577 " <thead>\n" +
3578 " <tr>\n" +
3578 " <tr>\n" +
3579 " <th class=\"c1 tablename\">Index name</th>\n" +
3579 " <th class=\"c1 tablename\">Index name</th>\n" +
3580 " <th class=\"c2 size_human\">Size</th>\n" +
3580 " <th class=\"c2 size_human\">Size</th>\n" +
3581 " </tr>\n" +
3581 " </tr>\n" +
3582 " </thead>\n" +
3582 " </thead>\n" +
3583 " <tbody>\n" +
3583 " <tbody>\n" +
3584 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.ESIndices\">\n" +
3584 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.ESIndices\">\n" +
3585 " <td class=\"c1\">{{row.name}}</td>\n" +
3585 " <td class=\"c1\">{{row.name}}</td>\n" +
3586 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3586 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3587 " </tr>\n" +
3587 " </tr>\n" +
3588 " </tbody>\n" +
3588 " </tbody>\n" +
3589 " </table>\n" +
3589 " </table>\n" +
3590 "\n" +
3590 "\n" +
3591 " </uib-tab>\n" +
3591 " </uib-tab>\n" +
3592 "\n" +
3592 "\n" +
3593 " <uib-tab>\n" +
3593 " <uib-tab>\n" +
3594 " <uib-tab-heading>\n" +
3594 " <uib-tab-heading>\n" +
3595 " Processes\n" +
3595 " Processes\n" +
3596 " </uib-tab-heading>\n" +
3596 " </uib-tab-heading>\n" +
3597 "\n" +
3597 "\n" +
3598 " <table class=\"table table-striped\">\n" +
3598 " <table class=\"table table-striped\">\n" +
3599 " <thead>\n" +
3599 " <thead>\n" +
3600 " <tr>\n" +
3600 " <tr>\n" +
3601 " <th class=\"c1 tablename\">Owner</th>\n" +
3601 " <th class=\"c1 tablename\">Owner</th>\n" +
3602 " <th class=\"c2 tablename\">PID</th>\n" +
3602 " <th class=\"c2 tablename\">PID</th>\n" +
3603 " <th class=\"c3 tablename\">CPU</th>\n" +
3603 " <th class=\"c3 tablename\">CPU</th>\n" +
3604 " <th class=\"c4 tablename\">MEM</th>\n" +
3604 " <th class=\"c4 tablename\">MEM</th>\n" +
3605 " <th class=\"c4 tablename\">Name</th>\n" +
3605 " <th class=\"c4 tablename\">Name</th>\n" +
3606 " </tr>\n" +
3606 " </tr>\n" +
3607 " </thead>\n" +
3607 " </thead>\n" +
3608 " <tbody>\n" +
3608 " <tbody>\n" +
3609 " <tr class=\"r{{$index}}\" ng-repeat-start=\"row in $ctrl.processInfo\">\n" +
3609 " <tr class=\"r{{$index}}\" ng-repeat-start=\"row in $ctrl.processInfo\">\n" +
3610 " <td class=\"c1\">{{row.owner}}</td>\n" +
3610 " <td class=\"c1\">{{row.owner}}</td>\n" +
3611 " <td class=\"c2\">{{row.pid}}</td>\n" +
3611 " <td class=\"c2\">{{row.pid}}</td>\n" +
3612 " <td class=\"c3\">{{row.cpu}}</td>\n" +
3612 " <td class=\"c3\">{{row.cpu}}</td>\n" +
3613 " <td class=\"c4\">{{row.mem_usage}} ({{row.mem_percentage}}%)</td>\n" +
3613 " <td class=\"c4\">{{row.mem_usage}} ({{row.mem_percentage}}%)</td>\n" +
3614 " <td class=\"c5\"><strong>{{row.name}}</strong></td>\n" +
3614 " <td class=\"c5\"><strong>{{row.name}}</strong></td>\n" +
3615 " </tr>\n" +
3615 " </tr>\n" +
3616 " <tr ng-repeat-end>\n" +
3616 " <tr ng-repeat-end>\n" +
3617 " <td colspan=\"5\" class=\"word-wrap\">{{row.command}}</td>\n" +
3617 " <td colspan=\"5\" class=\"word-wrap\">{{row.command}}</td>\n" +
3618 " </tr>\n" +
3618 " </tr>\n" +
3619 " </tbody>\n" +
3619 " </tbody>\n" +
3620 " </table>\n" +
3620 " </table>\n" +
3621 "\n" +
3621 "\n" +
3622 " </uib-tab>\n" +
3622 " </uib-tab>\n" +
3623 "\n" +
3623 "\n" +
3624 " <uib-tab>\n" +
3624 " <uib-tab>\n" +
3625 " <uib-tab-heading>\n" +
3625 " <uib-tab-heading>\n" +
3626 " Python packages\n" +
3626 " Python packages\n" +
3627 " </uib-tab-heading>\n" +
3627 " </uib-tab-heading>\n" +
3628 "\n" +
3628 "\n" +
3629 " <table class=\"table\">\n" +
3629 " <table class=\"table\">\n" +
3630 " <tr ng-repeat=\"package in $ctrl.packages\">\n" +
3630 " <tr ng-repeat=\"package in $ctrl.packages\">\n" +
3631 " <td>{{package.name}}</td>\n" +
3631 " <td>{{package.name}}</td>\n" +
3632 " <td>{{package.version}}</td>\n" +
3632 " <td>{{package.version}}</td>\n" +
3633 " </tr>\n" +
3633 " </tr>\n" +
3634 " </table>\n" +
3634 " </table>\n" +
3635 " </p>\n" +
3635 " </p>\n" +
3636 "\n" +
3636 "\n" +
3637 " </uib-tab>\n" +
3637 " </uib-tab>\n" +
3638 "\n" +
3638 "\n" +
3639 " </uib-tabset>\n" +
3639 " </uib-tabset>\n" +
3640 " </div>\n" +
3640 " </div>\n" +
3641 " </div>\n" +
3641 " </div>\n" +
3642 " </div>\n" +
3642 " </div>\n" +
3643 " </div>\n" +
3643 " </div>\n" +
3644 "</div>\n"
3644 "</div>\n"
3645 );
3645 );
3646
3646
3647
3647
3648 $templateCache.put('components/views/admin-users-create-view/admin-users-create-view.html',
3648 $templateCache.put('components/views/admin-users-create-view/admin-users-create-view.html',
3649 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.user\"></ng-include>\n" +
3649 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.user\"></ng-include>\n" +
3650 "\n" +
3650 "\n" +
3651 "<div ng-show=\"!$ctrl.loading.user\">\n" +
3651 "<div ng-show=\"!$ctrl.loading.user\">\n" +
3652 "\n" +
3652 "\n" +
3653 " <div class=\"panel panel-default\">\n" +
3653 " <div class=\"panel panel-default\">\n" +
3654 " <div class=\"panel-body\">\n" +
3654 " <div class=\"panel-body\">\n" +
3655 "\n" +
3655 "\n" +
3656 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"$ctrl.user.id\">\n" +
3656 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"$ctrl.user.id\">\n" +
3657 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-user-secret\"></span> Re-login to user</a>\n" +
3657 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-user-secret\"></span> Re-login to user</a>\n" +
3658 " <ul class=\"dropdown-menu\">\n" +
3658 " <ul class=\"dropdown-menu\">\n" +
3659 " <li><a>No</a></li>\n" +
3659 " <li><a>No</a></li>\n" +
3660 " <li><a ng-click=\"$ctrl.reloginUser(user)\">Yes</a></li>\n" +
3660 " <li><a ng-click=\"$ctrl.reloginUser(user)\">Yes</a></li>\n" +
3661 " </ul>\n" +
3661 " </ul>\n" +
3662 " </span>\n" +
3662 " </span>\n" +
3663 "\n" +
3663 "\n" +
3664 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createUser()\">\n" +
3664 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createUser()\">\n" +
3665 " <div class=\"form-group\" id=\"row-user_name\">\n" +
3665 " <div class=\"form-group\" id=\"row-user_name\">\n" +
3666 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_name\"></data-form-errors>\n" +
3666 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_name\"></data-form-errors>\n" +
3667 " <label for=\"user_name\" id=\"label-user_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3667 " <label for=\"user_name\" id=\"label-user_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3668 " User name\n" +
3668 " User name\n" +
3669 " <span class=\"required\">*</span>\n" +
3669 " <span class=\"required\">*</span>\n" +
3670 " </label>\n" +
3670 " </label>\n" +
3671 " <div class=\"col-sm-8 col-lg-9\">\n" +
3671 " <div class=\"col-sm-8 col-lg-9\">\n" +
3672 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.user.user_name\">\n" +
3672 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.user.user_name\">\n" +
3673 " </div>\n" +
3673 " </div>\n" +
3674 " </div>\n" +
3674 " </div>\n" +
3675 "\n" +
3675 "\n" +
3676 " <div class=\"form-group\" id=\"row-user_password\">\n" +
3676 " <div class=\"form-group\" id=\"row-user_password\">\n" +
3677 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_password\"></data-form-errors>\n" +
3677 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_password\"></data-form-errors>\n" +
3678 " <label for=\"user_password\" id=\"label-user_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3678 " <label for=\"user_password\" id=\"label-user_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3679 " Password\n" +
3679 " Password\n" +
3680 " <span class=\"required\">*</span>\n" +
3680 " <span class=\"required\">*</span>\n" +
3681 " </label>\n" +
3681 " </label>\n" +
3682 " <div class=\"col-sm-8 col-lg-9\">\n" +
3682 " <div class=\"col-sm-8 col-lg-9\">\n" +
3683 " <input class=\"form-control\" id=\"user_password\" name=\"user_password\" type=\"password\" ng-model=\"$ctrl.user.user_password\">\n" +
3683 " <input class=\"form-control\" id=\"user_password\" name=\"user_password\" type=\"password\" ng-model=\"$ctrl.user.user_password\">\n" +
3684 "\n" +
3684 "\n" +
3685 " <p class=\"m-t-1\"><a class=\"btn btn-info btn-sm\" ng-click=\"$ctrl.generatePassword()\"><span class=\"fa fa-lock\"></span> Generate password</a>\n" +
3685 " <p class=\"m-t-1\"><a class=\"btn btn-info btn-sm\" ng-click=\"$ctrl.generatePassword()\"><span class=\"fa fa-lock\"></span> Generate password</a>\n" +
3686 " <span ng-show=\"$ctrl.gen_pass.length > 0\">(generated password: {{$ctrl.gen_pass}})</span>\n" +
3686 " <span ng-show=\"$ctrl.gen_pass.length > 0\">(generated password: {{$ctrl.gen_pass}})</span>\n" +
3687 " </p>\n" +
3687 " </p>\n" +
3688 "\n" +
3688 "\n" +
3689 " </div>\n" +
3689 " </div>\n" +
3690 " </div>\n" +
3690 " </div>\n" +
3691 "\n" +
3691 "\n" +
3692 "\n" +
3692 "\n" +
3693 " <div class=\"form-group\" id=\"row-email\">\n" +
3693 " <div class=\"form-group\" id=\"row-email\">\n" +
3694 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
3694 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
3695 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3695 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3696 " Email Address\n" +
3696 " Email Address\n" +
3697 " <span class=\"required\">*</span>\n" +
3697 " <span class=\"required\">*</span>\n" +
3698 " </label>\n" +
3698 " </label>\n" +
3699 " <div class=\"col-sm-8 col-lg-9\">\n" +
3699 " <div class=\"col-sm-8 col-lg-9\">\n" +
3700 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
3700 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
3701 " </div>\n" +
3701 " </div>\n" +
3702 " </div>\n" +
3702 " </div>\n" +
3703 "\n" +
3703 "\n" +
3704 " <div class=\"form-group\" id=\"row-first_name\">\n" +
3704 " <div class=\"form-group\" id=\"row-first_name\">\n" +
3705 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
3705 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
3706 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3706 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3707 " First Name\n" +
3707 " First Name\n" +
3708 " </label>\n" +
3708 " </label>\n" +
3709 " <div class=\"col-sm-8 col-lg-9\">\n" +
3709 " <div class=\"col-sm-8 col-lg-9\">\n" +
3710 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
3710 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
3711 " </div>\n" +
3711 " </div>\n" +
3712 " </div>\n" +
3712 " </div>\n" +
3713 " <div class=\"form-group\" id=\"row-last_name\">\n" +
3713 " <div class=\"form-group\" id=\"row-last_name\">\n" +
3714 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
3714 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
3715 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3715 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3716 " Last Name\n" +
3716 " Last Name\n" +
3717 " </label>\n" +
3717 " </label>\n" +
3718 " <div class=\"col-sm-8 col-lg-9\">\n" +
3718 " <div class=\"col-sm-8 col-lg-9\">\n" +
3719 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
3719 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
3720 " </div>\n" +
3720 " </div>\n" +
3721 " </div>\n" +
3721 " </div>\n" +
3722 "\n" +
3722 "\n" +
3723 " <div class=\"form-group\" id=\"row-status\">\n" +
3723 " <div class=\"form-group\" id=\"row-status\">\n" +
3724 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.status\"></data-form-errors>\n" +
3724 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.status\"></data-form-errors>\n" +
3725 " <label for=\"status\" id=\"label-status\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3725 " <label for=\"status\" id=\"label-status\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3726 " Active\n" +
3726 " Active\n" +
3727 " </label>\n" +
3727 " </label>\n" +
3728 " <div class=\"col-sm-8 col-lg-9\">\n" +
3728 " <div class=\"col-sm-8 col-lg-9\">\n" +
3729 " <input checked class=\"form-control\" id=\"status\" name=\"status\" type=\"checkbox\" ng-model=\"$ctrl.user.status\">\n" +
3729 " <input checked class=\"form-control\" id=\"status\" name=\"status\" type=\"checkbox\" ng-model=\"$ctrl.user.status\">\n" +
3730 " </div>\n" +
3730 " </div>\n" +
3731 " </div>\n" +
3731 " </div>\n" +
3732 "\n" +
3732 "\n" +
3733 " <div class=\"form-group\" id=\"row-submit\">\n" +
3733 " <div class=\"form-group\" id=\"row-submit\">\n" +
3734 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3734 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3735 " </label>\n" +
3735 " </label>\n" +
3736 " <div class=\"col-sm-8 col-lg-9\">\n" +
3736 " <div class=\"col-sm-8 col-lg-9\">\n" +
3737 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.userId ? 'Update' : 'Add'}} User\">\n" +
3737 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.userId ? 'Update' : 'Add'}} User\">\n" +
3738 " </div>\n" +
3738 " </div>\n" +
3739 " </div>\n" +
3739 " </div>\n" +
3740 " </form>\n" +
3740 " </form>\n" +
3741 " </div>\n" +
3741 " </div>\n" +
3742 " </div>\n" +
3742 " </div>\n" +
3743 "\n" +
3743 "\n" +
3744 "\n" +
3744 "\n" +
3745 " <div class=\"panel panel-default\" ng-if=\"$ctrl.user.id\">\n" +
3745 " <div class=\"panel panel-default\" ng-if=\"$ctrl.user.id\">\n" +
3746 " <div class=\"panel-heading\">\n" +
3746 " <div class=\"panel-heading\">\n" +
3747 " <h3 class=\"panel-title\">Permission Summary</h3>\n" +
3747 " <h3 class=\"panel-title\">Permission Summary</h3>\n" +
3748 " </div>\n" +
3748 " </div>\n" +
3749 " <div class=\"panel-body\">\n" +
3749 " <div class=\"panel-body\">\n" +
3750 " <h3>Direct application permissions</h3>\n" +
3750 " <h3>Direct application permissions</h3>\n" +
3751 "\n" +
3751 "\n" +
3752 " <ul class=\"list-group\">\n" +
3752 " <ul class=\"list-group\">\n" +
3753 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.application\" class=\"animate-repeat list-group-item\">\n" +
3753 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.application\" class=\"animate-repeat list-group-item\">\n" +
3754 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3754 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3755 " <div class=\"pull-right\">\n" +
3755 " <div class=\"pull-right\">\n" +
3756 "\n" +
3756 "\n" +
3757 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3757 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3758 "\n" +
3758 "\n" +
3759 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3759 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3760 " <span class=\"fa fa-cog\"></span>\n" +
3760 " <span class=\"fa fa-cog\"></span>\n" +
3761 " </a>\n" +
3761 " </a>\n" +
3762 " </div>\n" +
3762 " </div>\n" +
3763 " </li>\n" +
3763 " </li>\n" +
3764 " </ul>\n" +
3764 " </ul>\n" +
3765 "\n" +
3765 "\n" +
3766 " <h3>Direct dashboard permissions</h3>\n" +
3766 " <h3>Direct dashboard permissions</h3>\n" +
3767 "\n" +
3767 "\n" +
3768 " <ul class=\"list-group\">\n" +
3768 " <ul class=\"list-group\">\n" +
3769 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3769 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3770 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3770 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3771 " <div class=\"pull-right\">\n" +
3771 " <div class=\"pull-right\">\n" +
3772 "\n" +
3772 "\n" +
3773 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3773 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3774 "\n" +
3774 "\n" +
3775 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3775 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3776 " <span class=\"fa fa-cog\"></span>\n" +
3776 " <span class=\"fa fa-cog\"></span>\n" +
3777 " </a>\n" +
3777 " </a>\n" +
3778 " </div>\n" +
3778 " </div>\n" +
3779 " </li>\n" +
3779 " </li>\n" +
3780 " </ul>\n" +
3780 " </ul>\n" +
3781 "\n" +
3781 "\n" +
3782 " </div>\n" +
3782 " </div>\n" +
3783 "\n" +
3783 "\n" +
3784 " </div>\n" +
3784 " </div>\n" +
3785 "\n" +
3785 "\n" +
3786 "\n" +
3786 "\n" +
3787 "</div>\n"
3787 "</div>\n"
3788 );
3788 );
3789
3789
3790
3790
3791 $templateCache.put('components/views/admin-users-list-view/admin-users-list-view.html',
3791 $templateCache.put('components/views/admin-users-list-view/admin-users-list-view.html',
3792 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.users\"></ng-include>\n" +
3792 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.users\"></ng-include>\n" +
3793 "\n" +
3793 "\n" +
3794 "<div ng-show=\"!$ctrl.loading.users\">\n" +
3794 "<div ng-show=\"!$ctrl.loading.users\">\n" +
3795 "\n" +
3795 "\n" +
3796 " <div class=\"panel panel-default\">\n" +
3796 " <div class=\"panel panel-default\">\n" +
3797 "\n" +
3797 "\n" +
3798 " <div class=\"panel-heading\">\n" +
3798 " <div class=\"panel-heading\">\n" +
3799 " {{$ctrl.activeUsers}} active out of {{$ctrl.users.length}} users\n" +
3799 " {{$ctrl.activeUsers}} active out of {{$ctrl.users.length}} users\n" +
3800 " </div>\n" +
3800 " </div>\n" +
3801 "\n" +
3801 "\n" +
3802 "\n" +
3802 "\n" +
3803 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3803 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3804 " <thead>\n" +
3804 " <thead>\n" +
3805 " <tr>\n" +
3805 " <tr>\n" +
3806 " <th class=\"user_name\" st-sort=\"user_name\"><a>Username</a></th>\n" +
3806 " <th class=\"user_name\" st-sort=\"user_name\"><a>Username</a></th>\n" +
3807 " <th class=\"email\" st-sort=\"email\"><a>Email</a></th>\n" +
3807 " <th class=\"email\" st-sort=\"email\"><a>Email</a></th>\n" +
3808 " <th class=\"status\" st-sort=\"status\"><a>Status</a></th>\n" +
3808 " <th class=\"status\" st-sort=\"status\"><a>Status</a></th>\n" +
3809 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3809 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3810 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3810 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3811 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3811 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3812 " <th class=\"options\"></th>\n" +
3812 " <th class=\"options\"></th>\n" +
3813 " </tr>\n" +
3813 " </tr>\n" +
3814 " <tr>\n" +
3814 " <tr>\n" +
3815 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3815 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3816 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3816 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3817 " <th></th>\n" +
3817 " <th></th>\n" +
3818 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3818 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3819 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3819 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3820 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3820 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3821 " <th></th>\n" +
3821 " <th></th>\n" +
3822 " </tr>\n" +
3822 " </tr>\n" +
3823 " </thead>\n" +
3823 " </thead>\n" +
3824 " <tbody>\n" +
3824 " <tbody>\n" +
3825 "\n" +
3825 "\n" +
3826 " <tr ng-repeat=\"user in displayedCollection track by user.id\">\n" +
3826 " <tr ng-repeat=\"user in displayedCollection track by user.id\">\n" +
3827 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3827 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3828 " <td class=\"word-wrap small\">{{user.email}}</td>\n" +
3828 " <td class=\"word-wrap small\">{{user.email}}</td>\n" +
3829 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3829 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3830 " <td class=\"word-wrap small\">{{user.first_name}}</td>\n" +
3830 " <td class=\"word-wrap small\">{{user.first_name}}</td>\n" +
3831 " <td class=\"word-wrap small\">{{user.last_name}}</td>\n" +
3831 " <td class=\"word-wrap small\">{{user.last_name}}</td>\n" +
3832 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\" class=\"small\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3832 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\" class=\"small\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3833 " <td>\n" +
3833 " <td>\n" +
3834 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3834 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3835 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3835 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3836 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3836 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3837 " <ul class=\"dropdown-menu\">\n" +
3837 " <ul class=\"dropdown-menu\">\n" +
3838 " <li><a>No</a></li>\n" +
3838 " <li><a>No</a></li>\n" +
3839 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3839 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3840 " </ul>\n" +
3840 " </ul>\n" +
3841 " </span>\n" +
3841 " </span>\n" +
3842 " </tr>\n" +
3842 " </tr>\n" +
3843 " <tfoot>\n" +
3843 " <tfoot>\n" +
3844 " <tr>\n" +
3844 " <tr>\n" +
3845 " <td colspan=\"6\" class=\"text-center\">\n" +
3845 " <td colspan=\"6\" class=\"text-center\">\n" +
3846 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3846 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3847 " </td>\n" +
3847 " </td>\n" +
3848 " </tr>\n" +
3848 " </tr>\n" +
3849 " </tfoot>\n" +
3849 " </tfoot>\n" +
3850 " </tbody>\n" +
3850 " </tbody>\n" +
3851 " </table>\n" +
3851 " </table>\n" +
3852 "\n" +
3852 "\n" +
3853 "\n" +
3853 "\n" +
3854 " </div>\n" +
3854 " </div>\n" +
3855 "</div>\n"
3855 "</div>\n"
3856 );
3856 );
3857
3857
3858
3858
3859 $templateCache.put('components/views/admin-view/admin-view.html',
3859 $templateCache.put('components/views/admin-view/admin-view.html',
3860 "<div class=\"row\">\n" +
3860 "<div class=\"row\">\n" +
3861 " <div class=\"col-sm-3\" id=\"menu\">\n" +
3861 " <div class=\"col-sm-3\" id=\"menu\">\n" +
3862 " <div class=\"panel panel-default\">\n" +
3862 " <div class=\"panel panel-default\">\n" +
3863 " <div class=\"panel-heading\">Users and groups</div>\n" +
3863 " <div class=\"panel-heading\">Users and groups</div>\n" +
3864 " <ul class=\"list-group\">\n" +
3864 " <ul class=\"list-group\">\n" +
3865 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.list\"> Users</a></li>\n" +
3865 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.list\"> Users</a></li>\n" +
3866 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.create\"> Create user</a></li>\n" +
3866 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.create\"> Create user</a></li>\n" +
3867 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.list\"> Groups</a></li>\n" +
3867 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.list\"> Groups</a></li>\n" +
3868 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.create\"> Create group</a></li>\n" +
3868 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.create\"> Create group</a></li>\n" +
3869 " </ul>\n" +
3869 " </ul>\n" +
3870 "\n" +
3870 "\n" +
3871 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuUsersItems.length\">\n" +
3871 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuUsersItems.length\">\n" +
3872 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuUsersItems\">\n" +
3872 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuUsersItems\">\n" +
3873 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3873 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3874 " </li>\n" +
3874 " </li>\n" +
3875 " </ul>\n" +
3875 " </ul>\n" +
3876 "\n" +
3876 "\n" +
3877 " </div>\n" +
3877 " </div>\n" +
3878 " <div class=\"panel panel-default\">\n" +
3878 " <div class=\"panel panel-default\">\n" +
3879 " <div class=\"panel-heading\">Resources</div>\n" +
3879 " <div class=\"panel-heading\">Resources</div>\n" +
3880 " <ul class=\"list-group\">\n" +
3880 " <ul class=\"list-group\">\n" +
3881 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.application.list\"> List applications</a></li>\n" +
3881 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.application.list\"> List applications</a></li>\n" +
3882 " </ul>\n" +
3882 " </ul>\n" +
3883 "\n" +
3883 "\n" +
3884 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuResourcesItems.length\">\n" +
3884 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuResourcesItems.length\">\n" +
3885 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuResourcesItems\">\n" +
3885 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuResourcesItems\">\n" +
3886 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3886 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3887 " </li>\n" +
3887 " </li>\n" +
3888 " </ul>\n" +
3888 " </ul>\n" +
3889 "\n" +
3889 "\n" +
3890 " </div>\n" +
3890 " </div>\n" +
3891 "\n" +
3891 "\n" +
3892 " <div class=\"panel panel-default\">\n" +
3892 " <div class=\"panel panel-default\">\n" +
3893 " <div class=\"panel-heading\">System</div>\n" +
3893 " <div class=\"panel-heading\">System</div>\n" +
3894 " <ul class=\"list-group\">\n" +
3894 " <ul class=\"list-group\">\n" +
3895 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.configs.list\"> Config variables</a></li>\n" +
3895 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.configs.list\"> Config variables</a></li>\n" +
3896 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.system\"> System</a></li>\n" +
3896 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.system\"> System</a></li>\n" +
3897 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.partitions\"> Partition Management</a></li>\n" +
3897 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.partitions\"> Partition Management</a></li>\n" +
3898 " </ul>\n" +
3898 " </ul>\n" +
3899 "\n" +
3899 "\n" +
3900 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuSystemItems.length\">\n" +
3900 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuSystemItems.length\">\n" +
3901 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuSystemItems\">\n" +
3901 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuSystemItems\">\n" +
3902 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3902 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3903 " </li>\n" +
3903 " </li>\n" +
3904 " </ul>\n" +
3904 " </ul>\n" +
3905 "\n" +
3905 "\n" +
3906 " </div>\n" +
3906 " </div>\n" +
3907 " </div>\n" +
3907 " </div>\n" +
3908 "\n" +
3908 "\n" +
3909 " <div class=\"col-sm-9\" ui-view></div>\n" +
3909 " <div class=\"col-sm-9\" ui-view></div>\n" +
3910 "</div>\n"
3910 "</div>\n"
3911 );
3911 );
3912
3912
3913
3913
3914 $templateCache.put('components/views/applications-integrations-view/applications-integrations-view.html',
3914 $templateCache.put('components/views/applications-integrations-view/applications-integrations-view.html',
3915 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application && $state.is('applications.integrations')\"></ng-include>\n" +
3915 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application && $state.is('applications.integrations')\"></ng-include>\n" +
3916 "\n" +
3916 "\n" +
3917 "<ui-view>\n" +
3917 "<ui-view>\n" +
3918 " <div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application\">\n" +
3918 " <div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application\">\n" +
3919 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3919 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3920 " <div class=\"panel-body\">\n" +
3920 " <div class=\"panel-body\">\n" +
3921 "\n" +
3921 "\n" +
3922 " <a class=\"btn btn-default integration\"\n" +
3922 " <a class=\"btn btn-default integration\"\n" +
3923 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'bitbucket'})\">\n" +
3923 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'bitbucket'})\">\n" +
3924 " <span class=\"fa fa-fw fa-bitbucket fa-3x pull-left\"></span>\n" +
3924 " <span class=\"fa fa-fw fa-bitbucket fa-3x pull-left\"></span>\n" +
3925 " <strong>Bitbucket</strong>\n" +
3925 " <strong>Bitbucket</strong>\n" +
3926 "\n" +
3926 "\n" +
3927 " <p>Send issues and reports to Bitbucket</p>\n" +
3927 " <p>Send issues and reports to Bitbucket</p>\n" +
3928 " </a>\n" +
3928 " </a>\n" +
3929 "\n" +
3929 "\n" +
3930 " <a class=\"btn btn-default integration\"\n" +
3930 " <a class=\"btn btn-default integration\"\n" +
3931 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'campfire'})\">\n" +
3931 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'campfire'})\">\n" +
3932 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3932 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3933 " <strong>Campfire</strong>\n" +
3933 " <strong>Campfire</strong>\n" +
3934 "\n" +
3934 "\n" +
3935 " <p>Receive reports and alerts in your Campfire rooms</p>\n" +
3935 " <p>Receive reports and alerts in your Campfire rooms</p>\n" +
3936 " </a>\n" +
3936 " </a>\n" +
3937 "\n" +
3937 "\n" +
3938 " <a class=\"btn btn-default integration\"\n" +
3938 " <a class=\"btn btn-default integration\"\n" +
3939 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'flowdock'})\">\n" +
3939 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'flowdock'})\">\n" +
3940 " <span class=\"fa fa-fw fa-envelope fa-3x pull-left\"></span>\n" +
3940 " <span class=\"fa fa-fw fa-envelope fa-3x pull-left\"></span>\n" +
3941 " <strong>Flowdock</strong>\n" +
3941 " <strong>Flowdock</strong>\n" +
3942 "\n" +
3942 "\n" +
3943 " <p>Receive reports and alerts on your Flowdock team\n" +
3943 " <p>Receive reports and alerts on your Flowdock team\n" +
3944 " inbox</p>\n" +
3944 " inbox</p>\n" +
3945 " </a>\n" +
3945 " </a>\n" +
3946 "\n" +
3946 "\n" +
3947 " <a class=\"btn btn-default integration\"\n" +
3947 " <a class=\"btn btn-default integration\"\n" +
3948 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'github'})\">\n" +
3948 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'github'})\">\n" +
3949 " <span class=\"fa fa-fw fa-github fa-3x pull-left\"></span>\n" +
3949 " <span class=\"fa fa-fw fa-github fa-3x pull-left\"></span>\n" +
3950 " <strong>Github</strong>\n" +
3950 " <strong>Github</strong>\n" +
3951 "\n" +
3951 "\n" +
3952 " <p>Send issues and reports to Github</p>\n" +
3952 " <p>Send issues and reports to Github</p>\n" +
3953 " </a>\n" +
3953 " </a>\n" +
3954 "\n" +
3954 "\n" +
3955 " <a class=\"btn btn-default integration\"\n" +
3955 " <a class=\"btn btn-default integration\"\n" +
3956 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'hipchat'})\">\n" +
3956 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'hipchat'})\">\n" +
3957 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3957 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3958 " <strong>HipChat</strong>\n" +
3958 " <strong>HipChat</strong>\n" +
3959 "\n" +
3959 "\n" +
3960 " <p>Receive reports and alerts in your Hipchat chanels</p>\n" +
3960 " <p>Receive reports and alerts in your Hipchat chanels</p>\n" +
3961 " </a>\n" +
3961 " </a>\n" +
3962 "\n" +
3962 "\n" +
3963 " <a class=\"btn btn-default integration\"\n" +
3963 " <a class=\"btn btn-default integration\"\n" +
3964 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'jira'})\">\n" +
3964 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'jira'})\">\n" +
3965 " <span class=\"fa fa-fw fa-ticket fa-3x pull-left\"></span>\n" +
3965 " <span class=\"fa fa-fw fa-ticket fa-3x pull-left\"></span>\n" +
3966 " <strong>Jira</strong>\n" +
3966 " <strong>Jira</strong>\n" +
3967 "\n" +
3967 "\n" +
3968 " <p>Send issues and reports to Jira</p>\n" +
3968 " <p>Send issues and reports to Jira</p>\n" +
3969 " </a>\n" +
3969 " </a>\n" +
3970 "\n" +
3970 "\n" +
3971 " <a class=\"btn btn-default integration\"\n" +
3971 " <a class=\"btn btn-default integration\"\n" +
3972 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'slack'})\">\n" +
3972 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'slack'})\">\n" +
3973 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3973 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3974 " <strong>Slack</strong>\n" +
3974 " <strong>Slack</strong>\n" +
3975 "\n" +
3975 "\n" +
3976 " <p>Receive reports and alerts in your Slack chanels</p>\n" +
3976 " <p>Receive reports and alerts in your Slack chanels</p>\n" +
3977 " </a>\n" +
3977 " </a>\n" +
3978 "\n" +
3978 "\n" +
3979 " <a class=\"btn btn-default integration\"\n" +
3979 " <a class=\"btn btn-default integration\"\n" +
3980 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'webhooks'})\">\n" +
3980 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'webhooks'})\">\n" +
3981 " <span class=\"fa fa-fw fa-cloud-upload fa-3x pull-left\"></span>\n" +
3981 " <span class=\"fa fa-fw fa-cloud-upload fa-3x pull-left\"></span>\n" +
3982 " <strong>Webhooks</strong>\n" +
3982 " <strong>Webhooks</strong>\n" +
3983 "\n" +
3983 "\n" +
3984 " <p>Notify third party API's of your reports and alerts</p>\n" +
3984 " <p>Notify third party API's of your reports and alerts</p>\n" +
3985 " </a>\n" +
3985 " </a>\n" +
3986 " </div>\n" +
3986 " </div>\n" +
3987 " </div>\n" +
3987 " </div>\n" +
3988 "</ui-view>\n"
3988 "</ui-view>\n"
3989 );
3989 );
3990
3990
3991
3991
3992 $templateCache.put('components/views/applications-list-view/applications-list-view.html',
3992 $templateCache.put('components/views/applications-list-view/applications-list-view.html',
3993 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3993 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3994 "\n" +
3994 "\n" +
3995 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.applications\">\n" +
3995 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.applications\">\n" +
3996 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3996 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3997 " <div class=\"panel-body\" ng-if=\"$ctrl.applications.length === 0 \">\n" +
3997 " <div class=\"panel-body\" ng-if=\"$ctrl.applications.length === 0 \">\n" +
3998 "\n" +
3998 "\n" +
3999 " <p>You have to create a new application first.</p>\n" +
3999 " <p>You have to create a new application first.</p>\n" +
4000 "\n" +
4000 "\n" +
4001 " </div>\n" +
4001 " </div>\n" +
4002 "\n" +
4002 "\n" +
4003 " <table class=\"table table-striped\" ng-if=\"$ctrl.applications.length > 0\">\n" +
4003 " <table class=\"table table-striped\" ng-if=\"$ctrl.applications.length > 0\">\n" +
4004 " <thead>\n" +
4004 " <thead>\n" +
4005 " <tr>\n" +
4005 " <tr>\n" +
4006 " <th class=\"resource_name\">Resource Name</th>\n" +
4006 " <th class=\"resource_name\">Resource Name</th>\n" +
4007 " <th class=\"domains\">Domains</th>\n" +
4007 " <th class=\"domains\">Domains</th>\n" +
4008 " <th class=\"options\">Options</th>\n" +
4008 " <th class=\"options\">Options</th>\n" +
4009 " </tr>\n" +
4009 " </tr>\n" +
4010 " </thead>\n" +
4010 " </thead>\n" +
4011 " <tbody>\n" +
4011 " <tbody>\n" +
4012 " <tr class=\"r{{$index+1}}\" ng-repeat=\"application in $ctrl.applications\">\n" +
4012 " <tr class=\"r{{$index+1}}\" ng-repeat=\"application in $ctrl.applications\">\n" +
4013 " <td>{{application.resource_name}}</td>\n" +
4013 " <td>{{application.resource_name}}</td>\n" +
4014 " <td>{{application.domains}}</td>\n" +
4014 " <td>{{application.domains}}</td>\n" +
4015 " <td class=\"options\">\n" +
4015 " <td class=\"options\">\n" +
4016 " <a class=\"btn btn-default\" data-ui-sref=\"applications.update({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span> Update</a>\n" +
4016 " <a class=\"btn btn-default\" data-ui-sref=\"applications.update({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span> Update</a>\n" +
4017 " <a class=\"btn btn-default\" data-ui-sref=\"applications.integrations({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Manage Integrations\"><span class=\"fa fa-wrench\"></span> Integrations</a>\n" +
4017 " <a class=\"btn btn-default\" data-ui-sref=\"applications.integrations({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Manage Integrations\"><span class=\"fa fa-wrench\"></span> Integrations</a>\n" +
4018 " </td>\n" +
4018 " </td>\n" +
4019 " </tr>\n" +
4019 " </tr>\n" +
4020 " </tbody>\n" +
4020 " </tbody>\n" +
4021 " </table>\n" +
4021 " </table>\n" +
4022 "\n" +
4022 "\n" +
4023 "</div>\n"
4023 "</div>\n"
4024 );
4024 );
4025
4025
4026
4026
4027 $templateCache.put('components/views/applications-purge-logs-view/applications-purge-logs-view.html',
4027 $templateCache.put('components/views/applications-purge-logs-view/applications-purge-logs-view.html',
4028 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
4028 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
4029 "\n" +
4029 "\n" +
4030 "<div ng-show=\"!$ctrl.loading.applications\">\n" +
4030 "<div ng-show=\"!$ctrl.loading.applications\">\n" +
4031 " <div class=\"panel panel-default\">\n" +
4031 " <div class=\"panel panel-default\">\n" +
4032 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4032 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4033 " <div class=\"panel-body\">\n" +
4033 " <div class=\"panel-body\">\n" +
4034 "\n" +
4034 "\n" +
4035 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.form\" ng-submit=\"$ctrl.purgeLogs()\">\n" +
4035 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.form\" ng-submit=\"$ctrl.purgeLogs()\">\n" +
4036 " <div class=\"form-group\">\n" +
4036 " <div class=\"form-group\">\n" +
4037 " <label class=\"control-label col-sm-3 col-lg-2\">Application:</label>\n" +
4037 " <label class=\"control-label col-sm-3 col-lg-2\">Application:</label>\n" +
4038 "\n" +
4038 "\n" +
4039 " <div class=\"col-sm-9 col-lg-10 form-inline\">\n" +
4039 " <div class=\"col-sm-9 col-lg-10 form-inline\">\n" +
4040 " <select ng-model=\"$ctrl.selectedResource\" ng-change=\"$ctrl.getCommonKeys()\"\n" +
4040 " <select ng-model=\"$ctrl.selectedResource\" ng-change=\"$ctrl.getCommonKeys()\"\n" +
4041 " ng-options=\"r.resource_id as r.resource_name for r in $ctrl.applications\" class=\"form-control\"></select>\n" +
4041 " ng-options=\"r.resource_id as r.resource_name for r in $ctrl.applications\" class=\"form-control\"></select>\n" +
4042 " </div>\n" +
4042 " </div>\n" +
4043 " </div>\n" +
4043 " </div>\n" +
4044 "\n" +
4044 "\n" +
4045 " <div class=\"form-group\">\n" +
4045 " <div class=\"form-group\">\n" +
4046 " <label class=\"control-label col-sm-3 col-lg-2\">Namespace:</label>\n" +
4046 " <label class=\"control-label col-sm-3 col-lg-2\">Namespace:</label>\n" +
4047 "\n" +
4047 "\n" +
4048 " <div class=\"col-sm-9 col-lg-10\">\n" +
4048 " <div class=\"col-sm-9 col-lg-10\">\n" +
4049 " <input type=\"text\" name=\"namespace\" ng-model=\"$ctrl.namespace\"\n" +
4049 " <input type=\"text\" name=\"namespace\" ng-model=\"$ctrl.namespace\"\n" +
4050 " placeholder=\"Namespace to filter on\" uib-typeahead=\"ns for ns in $ctrl.commonNamespaces\"\n" +
4050 " placeholder=\"Namespace to filter on\" uib-typeahead=\"ns for ns in $ctrl.commonNamespaces\"\n" +
4051 " class=\"form-control\">\n" +
4051 " class=\"form-control\">\n" +
4052 " </div>\n" +
4052 " </div>\n" +
4053 " </div>\n" +
4053 " </div>\n" +
4054 "\n" +
4054 "\n" +
4055 " <div class=\"form-group\">\n" +
4055 " <div class=\"form-group\">\n" +
4056 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4056 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4057 "\n" +
4057 "\n" +
4058 " <div class=\"col-sm-8 col-lg-9 \">\n" +
4058 " <div class=\"col-sm-8 col-lg-9 \">\n" +
4059 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Purge logs meeting the criteria\">\n" +
4059 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Purge logs meeting the criteria\">\n" +
4060 " </div>\n" +
4060 " </div>\n" +
4061 " </div>\n" +
4061 " </div>\n" +
4062 "\n" +
4062 "\n" +
4063 " </form>\n" +
4063 " </form>\n" +
4064 " </div>\n" +
4064 " </div>\n" +
4065 " </div>\n" +
4065 " </div>\n" +
4066 "</div>\n"
4066 "</div>\n"
4067 );
4067 );
4068
4068
4069
4069
4070 $templateCache.put('components/views/applications-update-view/applications-update-view.html',
4070 $templateCache.put('components/views/applications-update-view/applications-update-view.html',
4071 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application\"></ng-include>\n" +
4071 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application\"></ng-include>\n" +
4072 "\n" +
4072 "\n" +
4073 "<div ng-show=\"!$ctrl.loading.application\">\n" +
4073 "<div ng-show=\"!$ctrl.loading.application\">\n" +
4074 "\n" +
4074 "\n" +
4075 " <div class=\"panel panel-default\">\n" +
4075 " <div class=\"panel panel-default\">\n" +
4076 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4076 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4077 " <div class=\"panel-body\">\n" +
4077 " <div class=\"panel-body\">\n" +
4078 "\n" +
4078 "\n" +
4079 " <div class=\"row\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4079 " <div class=\"row\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4080 " <div class=\"col-sm-6\">\n" +
4080 " <div class=\"col-sm-6\">\n" +
4081 "\n" +
4081 "\n" +
4082 " <uib-tabset>\n" +
4082 " <uib-tabset>\n" +
4083 " <uib-tab>\n" +
4083 " <uib-tab>\n" +
4084 " <uib-tab-heading>\n" +
4084 " <uib-tab-heading>\n" +
4085 " API keys\n" +
4085 " API keys\n" +
4086 " </uib-tab-heading>\n" +
4086 " </uib-tab-heading>\n" +
4087 "\n" +
4087 "\n" +
4088 " <p><strong>PRIVATE API KEY:</strong></p>\n" +
4088 " <p><strong>PRIVATE API KEY:</strong></p>\n" +
4089 " <p>\n" +
4089 " <p>\n" +
4090 " <div class=\"well well-sm\">{{ $ctrl.resource.api_key }}</div>\n" +
4090 " <div class=\"well well-sm\">{{ $ctrl.resource.api_key }}</div>\n" +
4091 " </p>\n" +
4091 " </p>\n" +
4092 " <p><strong>PUBLIC API KEY</strong> (for javascript clients):</p>\n" +
4092 " <p><strong>PUBLIC API KEY</strong> (for javascript clients):</p>\n" +
4093 " <p>\n" +
4093 " <p>\n" +
4094 " <div class=\"well well-sm\">{{ $ctrl.resource.public_key }}</div>\n" +
4094 " <div class=\"well well-sm\">{{ $ctrl.resource.public_key }}</div>\n" +
4095 " </p>\n" +
4095 " </p>\n" +
4096 " <p><small>Your key will be used to identify to which application your data\n" +
4096 " <p><small>Your key will be used to identify to which application your data\n" +
4097 " belongs to please keep them private at all times.</small></p>\n" +
4097 " belongs to please keep them private at all times.</small></p>\n" +
4098 "\n" +
4098 "\n" +
4099 " </uib-tab>\n" +
4099 " </uib-tab>\n" +
4100 "\n" +
4100 "\n" +
4101 " <uib-tab>\n" +
4101 " <uib-tab>\n" +
4102 " <uib-tab-heading>\n" +
4102 " <uib-tab-heading>\n" +
4103 " <span class=\"btn btn-danger btn-xs\"><span class=\"fa fa-exclamation-triangle\"></span></span> Regenerate API keys\n" +
4103 " <span class=\"btn btn-danger btn-xs\"><span class=\"fa fa-exclamation-triangle\"></span></span> Regenerate API keys\n" +
4104 " </uib-tab-heading>\n" +
4104 " </uib-tab-heading>\n" +
4105 " <p>Are you sure you want to regenerate API KEY for this application?</p>\n" +
4105 " <p>Are you sure you want to regenerate API KEY for this application?</p>\n" +
4106 " <p>All client application keys will need to be updated.</p>\n" +
4106 " <p>All client application keys will need to be updated.</p>\n" +
4107 " <form ng-submit=\"$ctrl.regenerateAPIKeys()\" name=\"$ctrl.regenerateAPIKeysForm\" class=\"form-inline\">\n" +
4107 " <form ng-submit=\"$ctrl.regenerateAPIKeys()\" name=\"$ctrl.regenerateAPIKeysForm\" class=\"form-inline\">\n" +
4108 " <data-form-errors errors=\"$ctrl.regenerateAPIKeysForm.ae_validation.password\"></data-form-errors>\n" +
4108 " <data-form-errors errors=\"$ctrl.regenerateAPIKeysForm.ae_validation.password\"></data-form-errors>\n" +
4109 " <div class=\"form-group\">\n" +
4109 " <div class=\"form-group\">\n" +
4110 " <input type=\"password\" name=\"confirm\"\n" +
4110 " <input type=\"password\" name=\"confirm\"\n" +
4111 " placeholder=\"Enter your password to proceed\" class=\"form-control\" ng-model=\"$ctrl.regenerateAPIKeysPassword\">\n" +
4111 " placeholder=\"Enter your password to proceed\" class=\"form-control\" ng-model=\"$ctrl.regenerateAPIKeysPassword\">\n" +
4112 " <input type=\"submit\" class=\"btn btn-danger\" value=\"Confirm\">\n" +
4112 " <input type=\"submit\" class=\"btn btn-danger\" value=\"Confirm\">\n" +
4113 " </div>\n" +
4113 " </div>\n" +
4114 " </form>\n" +
4114 " </form>\n" +
4115 " </uib-tab>\n" +
4115 " </uib-tab>\n" +
4116 " </uib-tabset>\n" +
4116 " </uib-tabset>\n" +
4117 " </div>\n" +
4117 " </div>\n" +
4118 " <div class=\"col-sm-6 text-center\">\n" +
4118 " <div class=\"col-sm-6 text-center\">\n" +
4119 " <h2 class=\"m-t-0\">How to connect your application?</h2>\n" +
4119 " <h2 class=\"m-t-0\">How to connect your application?</h2>\n" +
4120 " <p>Visit our <a href=\"{{AeConfig.urls.docs}}\"><strong>developer documentation</strong></a> for step-by-step integration instructions.</p>\n" +
4120 " <p>Visit our <a href=\"{{AeConfig.urls.docs}}\"><strong>developer documentation</strong></a> for step-by-step integration instructions.</p>\n" +
4121 " <div class=\"clearfix\"></div>\n" +
4121 " <div class=\"clearfix\"></div>\n" +
4122 " <p class=\"text-center\">\n" +
4122 " <p class=\"text-center\">\n" +
4123 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/django_small.png\" alt=\"Django Logo\">\n" +
4123 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/django_small.png\" alt=\"Django Logo\">\n" +
4124 " <img src=\"/static/appenlight/images/logos/pyramid_small.png\" alt=\"Pyramid Logo\">\n" +
4124 " <img src=\"/static/appenlight/images/logos/pyramid_small.png\" alt=\"Pyramid Logo\">\n" +
4125 " <img src=\"/static/appenlight/images/logos/flask_small.png\" alt=\"Flask Logo\"></a>\n" +
4125 " <img src=\"/static/appenlight/images/logos/flask_small.png\" alt=\"Flask Logo\"></a>\n" +
4126 "\n" +
4126 "\n" +
4127 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/js_small.png\" alt=\"Javascript Logo\">\n" +
4127 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/js_small.png\" alt=\"Javascript Logo\">\n" +
4128 " <img src=\"/static/appenlight/images/logos/nodejs.png\" alt=\"Node.js\"></a>\n" +
4128 " <img src=\"/static/appenlight/images/logos/nodejs.png\" alt=\"Node.js\"></a>\n" +
4129 " <img src=\"/static/appenlight/images/logos/ruby_small.png\" alt=\"Ruby Logo\">\n" +
4129 " <img src=\"/static/appenlight/images/logos/ruby_small.png\" alt=\"Ruby Logo\">\n" +
4130 " <img src=\"/static/appenlight/images/logos/php_small.png\" alt=\"PHP Logo\">\n" +
4130 " <img src=\"/static/appenlight/images/logos/php_small.png\" alt=\"PHP Logo\">\n" +
4131 " </a>\n" +
4131 " </a>\n" +
4132 "\n" +
4132 "\n" +
4133 " </p>\n" +
4133 " </p>\n" +
4134 " </div>\n" +
4134 " </div>\n" +
4135 " </div>\n" +
4135 " </div>\n" +
4136 "\n" +
4136 "\n" +
4137 " <hr ng-show=\"$ctrl.resource.resource_id\">\n" +
4137 " <hr ng-show=\"$ctrl.resource.resource_id\">\n" +
4138 "\n" +
4138 "\n" +
4139 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.BasicForm\" ng-submit=\"$ctrl.updateBasicForm()\" novalidate>\n" +
4139 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.BasicForm\" ng-submit=\"$ctrl.updateBasicForm()\" novalidate>\n" +
4140 " <div class=\"form-group\">\n" +
4140 " <div class=\"form-group\">\n" +
4141 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.resource_name\"></data-form-errors>\n" +
4141 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.resource_name\"></data-form-errors>\n" +
4142 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4142 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4143 " Application name\n" +
4143 " Application name\n" +
4144 " <span class=\"required\">*</span>\n" +
4144 " <span class=\"required\">*</span>\n" +
4145 " </label>\n" +
4145 " </label>\n" +
4146 "\n" +
4146 "\n" +
4147 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4147 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4148 " <input class=\"form-control\" name=\"resource_name\" placeholder=\"Application Name\" type=\"text\" ng-model=\"$ctrl.resource.resource_name\">\n" +
4148 " <input class=\"form-control\" name=\"resource_name\" placeholder=\"Application Name\" type=\"text\" ng-model=\"$ctrl.resource.resource_name\">\n" +
4149 " </div>\n" +
4149 " </div>\n" +
4150 "\n" +
4150 "\n" +
4151 "\n" +
4151 "\n" +
4152 " </div>\n" +
4152 " </div>\n" +
4153 "\n" +
4153 "\n" +
4154 " <div class=\"form-group\">\n" +
4154 " <div class=\"form-group\">\n" +
4155 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.domains\"></data-form-errors>\n" +
4155 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.domains\"></data-form-errors>\n" +
4156 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4156 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4157 " Domain names for CORS headers\n" +
4157 " Domain names for CORS headers\n" +
4158 " </label>\n" +
4158 " </label>\n" +
4159 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4159 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4160 " <textarea class=\"form-control\" name=\"domains\" ng-model=\"$ctrl.resource.domains\"></textarea>\n" +
4160 " <textarea class=\"form-control\" name=\"domains\" ng-model=\"$ctrl.resource.domains\"></textarea>\n" +
4161 " <p class=\"description\">Required for Javascript error tracking (one line one domain, skip http:// part)</p>\n" +
4161 " <p class=\"description\">Required for Javascript error tracking (one line one domain, skip http:// part)</p>\n" +
4162 " </div>\n" +
4162 " </div>\n" +
4163 "\n" +
4163 "\n" +
4164 "\n" +
4164 "\n" +
4165 " </div>\n" +
4165 " </div>\n" +
4166 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4166 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4167 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.default_grouping\"></data-form-errors>\n" +
4167 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.default_grouping\"></data-form-errors>\n" +
4168 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4168 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4169 " Default grouping for errors\n" +
4169 " Default grouping for errors\n" +
4170 " </label>\n" +
4170 " </label>\n" +
4171 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4171 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4172 " <select class=\"form-control\" name=\"default_grouping\" ng-model=\"$ctrl.resource.default_grouping\" ng-options=\"i[0] as i[1] for i in $ctrl.groupingOptions\"></select>\n" +
4172 " <select class=\"form-control\" name=\"default_grouping\" ng-model=\"$ctrl.resource.default_grouping\" ng-options=\"i[0] as i[1] for i in $ctrl.groupingOptions\"></select>\n" +
4173 " </div>\n" +
4173 " </div>\n" +
4174 "\n" +
4174 "\n" +
4175 " </div>\n" +
4175 " </div>\n" +
4176 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4176 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4177 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.error_report_threshold\"></data-form-errors>\n" +
4177 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.error_report_threshold\"></data-form-errors>\n" +
4178 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4178 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4179 " Alert on error reports\n" +
4179 " Alert on error reports\n" +
4180 " <span class=\"required\">*</span>\n" +
4180 " <span class=\"required\">*</span>\n" +
4181 " </label>\n" +
4181 " </label>\n" +
4182 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4182 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4183 " <input class=\"form-control\" name=\"error_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.error_report_threshold\">\n" +
4183 " <input class=\"form-control\" name=\"error_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.error_report_threshold\">\n" +
4184 " <p class=\"description\">Application requires to send at least this amount of error reports per minute to open alert</p>\n" +
4184 " <p class=\"description\">Application requires to send at least this amount of error reports per minute to open alert</p>\n" +
4185 " </div>\n" +
4185 " </div>\n" +
4186 " </div>\n" +
4186 " </div>\n" +
4187 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4187 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4188 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.slow_report_threshold\"></data-form-errors>\n" +
4188 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.slow_report_threshold\"></data-form-errors>\n" +
4189 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4189 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4190 " Alert on slow reports\n" +
4190 " Alert on slow reports\n" +
4191 " <span class=\"required\">*</span>\n" +
4191 " <span class=\"required\">*</span>\n" +
4192 " </label>\n" +
4192 " </label>\n" +
4193 "\n" +
4193 "\n" +
4194 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4194 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4195 " <input class=\"form-control\" name=\"slow_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.slow_report_threshold\">\n" +
4195 " <input class=\"form-control\" name=\"slow_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.slow_report_threshold\">\n" +
4196 " <p class=\"description\">Application requires to send at least this amount of slow reports per minute to open alert</p>\n" +
4196 " <p class=\"description\">Application requires to send at least this amount of slow reports per minute to open alert</p>\n" +
4197 " </div>\n" +
4197 " </div>\n" +
4198 " </div>\n" +
4198 " </div>\n" +
4199 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4199 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4200 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.allow_permanent_storage\"></data-form-errors>\n" +
4200 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.allow_permanent_storage\"></data-form-errors>\n" +
4201 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4201 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4202 " Permanent logs\n" +
4202 " Permanent logs\n" +
4203 " </label>\n" +
4203 " </label>\n" +
4204 " <div class=\" col-sm-8 col-lg-9\">\n" +
4204 " <div class=\" col-sm-8 col-lg-9\">\n" +
4205 " <input class=\"form-control\" name=\"allow_permanent_storage\" type=\"checkbox\" ng-model=\"$ctrl.resource.allow_permanent_storage\">\n" +
4205 " <input class=\"form-control\" name=\"allow_permanent_storage\" type=\"checkbox\" ng-model=\"$ctrl.resource.allow_permanent_storage\">\n" +
4206 " <p class=\"description\">Allow permanent storage of logs in separate DB partitions (only administrator can enable this feature)</p>\n" +
4206 " <p class=\"description\">Allow permanent storage of logs in separate DB partitions (only administrator can enable this feature)</p>\n" +
4207 " </div>\n" +
4207 " </div>\n" +
4208 " </div>\n" +
4208 " </div>\n" +
4209 " <div class=\"form-group\">\n" +
4209 " <div class=\"form-group\">\n" +
4210 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4210 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4211 "\n" +
4211 "\n" +
4212 " </label>\n" +
4212 " </label>\n" +
4213 "\n" +
4213 "\n" +
4214 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4214 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4215 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.resource.resource_id? 'Update' : 'Create'}} Application\">\n" +
4215 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.resource.resource_id? 'Update' : 'Create'}} Application\">\n" +
4216 " </div>\n" +
4216 " </div>\n" +
4217 " </div>\n" +
4217 " </div>\n" +
4218 " </form>\n" +
4218 " </form>\n" +
4219 " </div>\n" +
4219 " </div>\n" +
4220 " </div>\n" +
4220 " </div>\n" +
4221 "\n" +
4221 "\n" +
4222 " <div class=\"panel panel-default\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4222 " <div class=\"panel panel-default\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4223 " <div class=\"panel-heading\">\n" +
4223 " <div class=\"panel-heading\">\n" +
4224 " <h3 class=\"panel-title\">Plugins</h3>\n" +
4224 " <h3 class=\"panel-title\">Plugins</h3>\n" +
4225 " </div>\n" +
4225 " </div>\n" +
4226 " <div class=\"panel-body\">\n" +
4226 " <div class=\"panel-body\">\n" +
4227 "\n" +
4227 "\n" +
4228 " <plugin-config resource=\"$ctrl.resource\"\n" +
4228 " <plugin-config resource=\"$ctrl.resource\"\n" +
4229 " section=\"'application.update'\"\n" +
4229 " section=\"'application.update'\"\n" +
4230 " ng-if=\"$ctrl.resource.resource_id\">\n" +
4230 " ng-if=\"$ctrl.resource.resource_id\">\n" +
4231 " </plugin-config>\n" +
4231 " </plugin-config>\n" +
4232 "\n" +
4232 "\n" +
4233 " </div>\n" +
4233 " </div>\n" +
4234 " </div>\n" +
4234 " </div>\n" +
4235 "\n" +
4235 "\n" +
4236 " <div class=\"panel panel-default m-t-1\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4236 " <div class=\"panel panel-default m-t-1\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4237 " <div class=\"panel-heading\">\n" +
4237 " <div class=\"panel-heading\">\n" +
4238 " <h3 class=\"panel-title\">API Testing</h3>\n" +
4238 " <h3 class=\"panel-title\">API Testing</h3>\n" +
4239 " </div>\n" +
4239 " </div>\n" +
4240 " <div class=\"panel-body\">\n" +
4240 " <div class=\"panel-body\">\n" +
4241 " <p>Please be sure to add at least one <a data-ui-sref=\"user.alert_channels.email\"><strong>email alert channel</strong></a> for your account.</p>\n" +
4241 " <p>Please be sure to add at least one <a data-ui-sref=\"user.alert_channels.email\"><strong>email alert channel</strong></a> for your account.</p>\n" +
4242 " <p>This will enable AppEnlight to send you notification emails about errors inside your $ctrl.</p>\n" +
4242 " <p>This will enable AppEnlight to send you notification emails about errors inside your $ctrl.</p>\n" +
4243 " <p><strong>After this is done you can use this CURL commands to test APIs:</strong></p>\n" +
4243 " <p><strong>After this is done you can use this CURL commands to test APIs:</strong></p>\n" +
4244 " <p>(Please note that the data like execution times is semi randomly generated)</p>\n" +
4244 " <p>(Please note that the data like execution times is semi randomly generated)</p>\n" +
4245 " <uib-tabset>\n" +
4245 " <uib-tabset>\n" +
4246 " <uib-tab>\n" +
4246 " <uib-tab>\n" +
4247 " <uib-tab-heading>\n" +
4247 " <uib-tab-heading>\n" +
4248 " Log API\n" +
4248 " Log API\n" +
4249 " </uib-tab-heading>\n" +
4249 " </uib-tab-heading>\n" +
4250 "\n" +
4250 "\n" +
4251 " <div class=\"codehilite\">\n" +
4251 " <div class=\"codehilite\">\n" +
4252 " <pre class=\"m-a-0\">\n" +
4252 " <pre class=\"m-a-0\">\n" +
4253 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/logs?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4253 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/logs?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4254 " [\n" +
4254 " [\n" +
4255 " {\n" +
4255 " {\n" +
4256 " \"log_level\": \"WARNING\",\n" +
4256 " \"log_level\": \"WARNING\",\n" +
4257 " \"message\": \"OMG ValueError happened\",\n" +
4257 " \"message\": \"OMG ValueError happened\",\n" +
4258 " \"namespace\": \"some.namespace.indicator\",\n" +
4258 " \"namespace\": \"some.namespace.indicator\",\n" +
4259 " \"request_id\": \"SOME_UUID\",\n" +
4259 " \"request_id\": \"SOME_UUID\",\n" +
4260 " \"permanent\": false,\n" +
4260 " \"permanent\": false,\n" +
4261 " \"primary_key\": \"random_key\",\n" +
4261 " \"primary_key\": \"random_key\",\n" +
4262 " \"server\": \"some.server.hostname\",\n" +
4262 " \"server\": \"some.server.hostname\",\n" +
4263 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4263 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4264 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]]\n" +
4264 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]]\n" +
4265 " },\n" +
4265 " },\n" +
4266 " {\n" +
4266 " {\n" +
4267 " \"log_level\": \"ERROR\",\n" +
4267 " \"log_level\": \"ERROR\",\n" +
4268 " \"message\": \"OMG ValueError happened2\",\n" +
4268 " \"message\": \"OMG ValueError happened2\",\n" +
4269 " \"namespace\": \"some.namespace.indicator\",\n" +
4269 " \"namespace\": \"some.namespace.indicator\",\n" +
4270 " \"request_id\": \"SOME_UUID\",\n" +
4270 " \"request_id\": \"SOME_UUID\",\n" +
4271 " \"permanent\": false,\n" +
4271 " \"permanent\": false,\n" +
4272 " \"server\": \"some.server.hostname\",\n" +
4272 " \"server\": \"some.server.hostname\",\n" +
4273 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\"\n" +
4273 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\"\n" +
4274 " }\n" +
4274 " }\n" +
4275 " ]'\n" +
4275 " ]'\n" +
4276 " </pre>\n" +
4276 " </pre>\n" +
4277 " </div>\n" +
4277 " </div>\n" +
4278 "\n" +
4278 "\n" +
4279 " </uib-tab>\n" +
4279 " </uib-tab>\n" +
4280 "\n" +
4280 "\n" +
4281 " <uib-tab>\n" +
4281 " <uib-tab>\n" +
4282 " <uib-tab-heading>\n" +
4282 " <uib-tab-heading>\n" +
4283 " Report API\n" +
4283 " Report API\n" +
4284 " </uib-tab-heading>\n" +
4284 " </uib-tab-heading>\n" +
4285 "\n" +
4285 "\n" +
4286 " <div class=\"codehilite\">\n" +
4286 " <div class=\"codehilite\">\n" +
4287 " <pre class=\"m-a-0\">\n" +
4287 " <pre class=\"m-a-0\">\n" +
4288 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/reports?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4288 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/reports?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4289 " [{\n" +
4289 " [{\n" +
4290 " \"client\": \"your-client-name-python\",\n" +
4290 " \"client\": \"your-client-name-python\",\n" +
4291 " \"language\": \"python\",\n" +
4291 " \"language\": \"python\",\n" +
4292 " \"view_name\": \"views/foo:bar\",\n" +
4292 " \"view_name\": \"views/foo:bar\",\n" +
4293 " \"server\": \"SERVERNAME/INSTANCENAME\",\n" +
4293 " \"server\": \"SERVERNAME/INSTANCENAME\",\n" +
4294 " \"priority\": 5,\n" +
4294 " \"priority\": 5,\n" +
4295 " \"error\": \"OMG ValueError happened\",\n" +
4295 " \"error\": \"OMG ValueError happened\",\n" +
4296 " \"occurences\":1,\n" +
4296 " \"occurences\":1,\n" +
4297 " \"http_status\": 500,\n" +
4297 " \"http_status\": 500,\n" +
4298 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]],\n" +
4298 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]],\n" +
4299 " \"username\": \"USER\",\n" +
4299 " \"username\": \"USER\",\n" +
4300 " \"url\": \"HTTP://SOMEURL\",\n" +
4300 " \"url\": \"HTTP://SOMEURL\",\n" +
4301 " \"ip\": \"127.0.0.1\",\n" +
4301 " \"ip\": \"127.0.0.1\",\n" +
4302 " \"start_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4302 " \"start_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4303 " \"end_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(2, 'seconds').toISOString()}}\",\n" +
4303 " \"end_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(2, 'seconds').toISOString()}}\",\n" +
4304 " \"user_agent\": \"BROWSER_AGENT\",\n" +
4304 " \"user_agent\": \"BROWSER_AGENT\",\n" +
4305 " \"extra\": [[\"message\",\"CUSTOM MESSAGE\"], [\"custom_value\", \"some payload\"]],\n" +
4305 " \"extra\": [[\"message\",\"CUSTOM MESSAGE\"], [\"custom_value\", \"some payload\"]],\n" +
4306 " \"request_id\": \"SOME_UUID\",\n" +
4306 " \"request_id\": \"SOME_UUID\",\n" +
4307 " \"request\": {\"REQUEST_METHOD\": \"GET\",\n" +
4307 " \"request\": {\"REQUEST_METHOD\": \"GET\",\n" +
4308 " \"PATH_INFO\": \"/FOO/BAR\",\n" +
4308 " \"PATH_INFO\": \"/FOO/BAR\",\n" +
4309 " \"POST\": {\"FOO\":\"BAZ\",\"XXX\":\"YYY\"}\n" +
4309 " \"POST\": {\"FOO\":\"BAZ\",\"XXX\":\"YYY\"}\n" +
4310 " },\n" +
4310 " },\n" +
4311 " \"slow_calls\":[{\n" +
4311 " \"slow_calls\":[{\n" +
4312 " \"start\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4312 " \"start\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4313 " \"end\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(1, 'seconds').toISOString()}}\",\n" +
4313 " \"end\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(1, 'seconds').toISOString()}}\",\n" +
4314 " \"type\": \"sql\",\n" +
4314 " \"type\": \"sql\",\n" +
4315 " \"subtype\": \"postgresql\",\n" +
4315 " \"subtype\": \"postgresql\",\n" +
4316 " \"parameters\": [\"QPARAM1\",\"QPARAM2\",\"QPARAMX\"],\n" +
4316 " \"parameters\": [\"QPARAM1\",\"QPARAM2\",\"QPARAMX\"],\n" +
4317 " \"statement\": \"QUERY\"\n" +
4317 " \"statement\": \"QUERY\"\n" +
4318 " }],\n" +
4318 " }],\n" +
4319 " \"request_stats\": {\n" +
4319 " \"request_stats\": {\n" +
4320 " \"main\": 2.50779,\n" +
4320 " \"main\": 2.50779,\n" +
4321 " \"nosql\": 0.01008,\n" +
4321 " \"nosql\": 0.01008,\n" +
4322 " \"nosql_calls\": 17.0,\n" +
4322 " \"nosql_calls\": 17.0,\n" +
4323 " \"remote\": 0.0,\n" +
4323 " \"remote\": 0.0,\n" +
4324 " \"remote_calls\": 0.0,\n" +
4324 " \"remote_calls\": 0.0,\n" +
4325 " \"sql\": 1,\n" +
4325 " \"sql\": 1,\n" +
4326 " \"sql_calls\": 1.0,\n" +
4326 " \"sql_calls\": 1.0,\n" +
4327 " \"tmpl\": 0.0,\n" +
4327 " \"tmpl\": 0.0,\n" +
4328 " \"tmpl_calls\": 0.0,\n" +
4328 " \"tmpl_calls\": 0.0,\n" +
4329 " \"custom\": 0.0,\n" +
4329 " \"custom\": 0.0,\n" +
4330 " \"custom_calls\": 0.0\n" +
4330 " \"custom_calls\": 0.0\n" +
4331 " },\n" +
4331 " },\n" +
4332 " \"traceback\": [\n" +
4332 " \"traceback\": [\n" +
4333 " {\"cline\": \"return foo_bar_baz(1,2,3)\",\n" +
4333 " {\"cline\": \"return foo_bar_baz(1,2,3)\",\n" +
4334 " \"file\": \"somedir/somefile.py\",\n" +
4334 " \"file\": \"somedir/somefile.py\",\n" +
4335 " \"fn\": \"somefunction\",\n" +
4335 " \"fn\": \"somefunction\",\n" +
4336 " \"line\": 454,\n" +
4336 " \"line\": 454,\n" +
4337 " \"vars\": [[\"a_list\",\n" +
4337 " \"vars\": [[\"a_list\",\n" +
4338 " [\"1\",2,\"4\",\"5\",6]],\n" +
4338 " [\"1\",2,\"4\",\"5\",6]],\n" +
4339 " [\"b\", {\"1\": \"2\", \"ccc\": \"ddd\", \"1\": \"a\"}],\n" +
4339 " [\"b\", {\"1\": \"2\", \"ccc\": \"ddd\", \"1\": \"a\"}],\n" +
4340 " [\"obj\", \"object object at 0x7f0030853dc0\"]]\n" +
4340 " [\"obj\", \"object object at 0x7f0030853dc0\"]]\n" +
4341 " },\n" +
4341 " },\n" +
4342 " {\"cline\": \"OMG ValueError happened\",\n" +
4342 " {\"cline\": \"OMG ValueError happened\",\n" +
4343 " \"file\": \"\",\n" +
4343 " \"file\": \"\",\n" +
4344 " \"fn\": \"\",\n" +
4344 " \"fn\": \"\",\n" +
4345 " \"line\": \"\",\n" +
4345 " \"line\": \"\",\n" +
4346 " \"vars\": []}\n" +
4346 " \"vars\": []}\n" +
4347 " ]\n" +
4347 " ]\n" +
4348 " }]'\n" +
4348 " }]'\n" +
4349 " </pre>\n" +
4349 " </pre>\n" +
4350 " </div>\n" +
4350 " </div>\n" +
4351 "\n" +
4351 "\n" +
4352 " </uib-tab>\n" +
4352 " </uib-tab>\n" +
4353 "\n" +
4353 "\n" +
4354 " <uib-tab>\n" +
4354 " <uib-tab>\n" +
4355 "\n" +
4355 "\n" +
4356 " <uib-tab-heading>\n" +
4356 " <uib-tab-heading>\n" +
4357 " Metrics API\n" +
4357 " Metrics API\n" +
4358 " </uib-tab-heading>\n" +
4358 " </uib-tab-heading>\n" +
4359 "\n" +
4359 "\n" +
4360 " <div class=\"codehilite\">\n" +
4360 " <div class=\"codehilite\">\n" +
4361 " <pre class=\"m-a-0\">\n" +
4361 " <pre class=\"m-a-0\">\n" +
4362 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/general_metrics?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4362 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/general_metrics?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4363 " [{\n" +
4363 " [{\n" +
4364 " \"namespace\": \"some.monitor\",\n" +
4364 " \"namespace\": \"some.monitor\",\n" +
4365 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4365 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4366 " \"server_name\": \"server.name\",\n" +
4366 " \"server_name\": \"server.name\",\n" +
4367 " \"tags\": [[\"value1\", 15.7], [\"value2\", 26]]}]'\n" +
4367 " \"tags\": [[\"value1\", 15.7], [\"value2\", 26]]}]'\n" +
4368 " </pre>\n" +
4368 " </pre>\n" +
4369 " </div>\n" +
4369 " </div>\n" +
4370 "\n" +
4370 "\n" +
4371 " </uib-tab>\n" +
4371 " </uib-tab>\n" +
4372 "\n" +
4372 "\n" +
4373 " <uib-tab>\n" +
4373 " <uib-tab>\n" +
4374 "\n" +
4374 "\n" +
4375 " <uib-tab-heading>\n" +
4375 " <uib-tab-heading>\n" +
4376 " Request Stats API\n" +
4376 " Request Stats API\n" +
4377 " </uib-tab-heading>\n" +
4377 " </uib-tab-heading>\n" +
4378 "\n" +
4378 "\n" +
4379 " <div class=\"codehilite\">\n" +
4379 " <div class=\"codehilite\">\n" +
4380 " <pre class=\"m-a-0\">\n" +
4380 " <pre class=\"m-a-0\">\n" +
4381 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/request_stats?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4381 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/request_stats?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4382 " [{\"server\": \"some.server.hostname\",\n" +
4382 " [{\"server\": \"some.server.hostname\",\n" +
4383 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4383 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4384 " \"metrics\": [[\"dir/module:func\",\n" +
4384 " \"metrics\": [[\"dir/module:func\",\n" +
4385 " {\"custom\": 0.0,\n" +
4385 " {\"custom\": 0.0,\n" +
4386 " \"custom_calls\": 0,\n" +
4386 " \"custom_calls\": 0,\n" +
4387 " \"main\": 0.01664,\n" +
4387 " \"main\": 0.01664,\n" +
4388 " \"nosql\": 0.00061,\n" +
4388 " \"nosql\": 0.00061,\n" +
4389 " \"nosql_calls\": 23,\n" +
4389 " \"nosql_calls\": 23,\n" +
4390 " \"remote\": 0.0,\n" +
4390 " \"remote\": 0.0,\n" +
4391 " \"remote_calls\": 0,\n" +
4391 " \"remote_calls\": 0,\n" +
4392 " \"requests\": 1,\n" +
4392 " \"requests\": 1,\n" +
4393 " \"sql\": 0.00105,\n" +
4393 " \"sql\": 0.00105,\n" +
4394 " \"sql_calls\": 2,\n" +
4394 " \"sql_calls\": 2,\n" +
4395 " \"tmpl\": 0.0,\n" +
4395 " \"tmpl\": 0.0,\n" +
4396 " \"tmpl_calls\": 0}],\n" +
4396 " \"tmpl_calls\": 0}],\n" +
4397 " [\"SomeView.function\",\n" +
4397 " [\"SomeView.function\",\n" +
4398 " {\"custom\": 0.0,\n" +
4398 " {\"custom\": 0.0,\n" +
4399 " \"custom_calls\": 0,\n" +
4399 " \"custom_calls\": 0,\n" +
4400 " \"main\": 0.647261,\n" +
4400 " \"main\": 0.647261,\n" +
4401 " \"nosql\": 0.306554,\n" +
4401 " \"nosql\": 0.306554,\n" +
4402 " \"nosql_calls\": 140,\n" +
4402 " \"nosql_calls\": 140,\n" +
4403 " \"remote\": 0.0,\n" +
4403 " \"remote\": 0.0,\n" +
4404 " \"remote_calls\": 0,\n" +
4404 " \"remote_calls\": 0,\n" +
4405 " \"requests\": 28,\n" +
4405 " \"requests\": 28,\n" +
4406 " \"sql\": 0.0,\n" +
4406 " \"sql\": 0.0,\n" +
4407 " \"sql_calls\": 0,\n" +
4407 " \"sql_calls\": 0,\n" +
4408 " \"tmpl\": 0.0,\n" +
4408 " \"tmpl\": 0.0,\n" +
4409 " \"tmpl_calls\": 0}]]\n" +
4409 " \"tmpl_calls\": 0}]]\n" +
4410 " }]'\n" +
4410 " }]'\n" +
4411 " </pre>\n" +
4411 " </pre>\n" +
4412 " </div>\n" +
4412 " </div>\n" +
4413 "\n" +
4413 "\n" +
4414 " </uib-tab>\n" +
4414 " </uib-tab>\n" +
4415 "\n" +
4415 "\n" +
4416 " </uib-tabset>\n" +
4416 " </uib-tabset>\n" +
4417 "\n" +
4417 "\n" +
4418 " </div>\n" +
4418 " </div>\n" +
4419 " </div>\n" +
4419 " </div>\n" +
4420 "\n" +
4420 "\n" +
4421 " <permissions-form resource=\"$ctrl.resource\" current-permissions=\"$ctrl.resource.current_permissions\"\n" +
4421 " <permissions-form resource=\"$ctrl.resource\" current-permissions=\"$ctrl.resource.current_permissions\"\n" +
4422 " possible-permissions=\"$ctrl.resource.possible_permissions\" ng-if=\"$ctrl.resource.resource_id\"></permissions-form>\n" +
4422 " possible-permissions=\"$ctrl.resource.possible_permissions\" ng-if=\"$ctrl.resource.resource_id\"></permissions-form>\n" +
4423 "\n" +
4423 "\n" +
4424 " <div class=\"panel panel-info\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4424 " <div class=\"panel panel-info\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4425 " <div class=\"panel-heading\">\n" +
4425 " <div class=\"panel-heading\">\n" +
4426 " <h3 class=\"panel-title\">Postprocessing</h3>\n" +
4426 " <h3 class=\"panel-title\">Postprocessing</h3>\n" +
4427 " </div>\n" +
4427 " </div>\n" +
4428 " <div class=\"panel-body\">\n" +
4428 " <div class=\"panel-body\">\n" +
4429 " <p>This section allows you influence the rating of report groups - if rule is matched once its not executed anymore</p>\n" +
4429 " <p>This section allows you influence the rating of report groups - if rule is matched once its not executed anymore</p>\n" +
4430 "\n" +
4430 "\n" +
4431 " <p>\n" +
4431 " <p>\n" +
4432 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addRule()\"><span class=\"fa fa-plus-circle\"></span> Add rule</a>\n" +
4432 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addRule()\"><span class=\"fa fa-plus-circle\"></span> Add rule</a>\n" +
4433 " </p>\n" +
4433 " </p>\n" +
4434 "\n" +
4434 "\n" +
4435 " <post-process-action action=\"action\" resource=\"$ctrl.resource\" ng-repeat=\"action in $ctrl.resource.postprocessing_rules\"></post-process-action>\n" +
4435 " <post-process-action action=\"action\" resource=\"$ctrl.resource\" ng-repeat=\"action in $ctrl.resource.postprocessing_rules\"></post-process-action>\n" +
4436 " </div>\n" +
4436 " </div>\n" +
4437 " </div>\n" +
4437 " </div>\n" +
4438 "\n" +
4438 "\n" +
4439 " <div class=\"panel panel-danger\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4439 " <div class=\"panel panel-danger\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4440 " <div class=\"panel-heading\">\n" +
4440 " <div class=\"panel-heading\">\n" +
4441 " <h3 class=\"panel-title\">Administration</h3>\n" +
4441 " <h3 class=\"panel-title\">Administration</h3>\n" +
4442 " </div>\n" +
4442 " </div>\n" +
4443 " <div class=\"panel-body\">\n" +
4443 " <div class=\"panel-body\">\n" +
4444 " <h2>Transfer ownership</h2>\n" +
4444 " <h2>Transfer ownership</h2>\n" +
4445 " <p>Please note that by transfering ownership you WILL lose access to the application data and new owner needs to give you access permission</p>\n" +
4445 " <p>Please note that by transfering ownership you WILL lose access to the application data and new owner needs to give you access permission</p>\n" +
4446 " <div class=\"confirmation_form\" ng-submit=\"$ctrl.transferApplication()\">\n" +
4446 " <div class=\"confirmation_form\" ng-submit=\"$ctrl.transferApplication()\">\n" +
4447 " <form class=\"form-horizontal\" name=\"$ctrl.formTransfer\">\n" +
4447 " <form class=\"form-horizontal\" name=\"$ctrl.formTransfer\">\n" +
4448 " <div class=\"form-group\">\n" +
4448 " <div class=\"form-group\">\n" +
4449 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.password\"></data-form-errors>\n" +
4449 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.password\"></data-form-errors>\n" +
4450 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4450 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4451 " Password\n" +
4451 " Password\n" +
4452 " </label>\n" +
4452 " </label>\n" +
4453 " <div class=\"col-sm-8 col-lg-9\">\n" +
4453 " <div class=\"col-sm-8 col-lg-9\">\n" +
4454 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formTransferModel.password\">\n" +
4454 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formTransferModel.password\">\n" +
4455 " </div>\n" +
4455 " </div>\n" +
4456 " </div>\n" +
4456 " </div>\n" +
4457 " <div class=\"form-group\">\n" +
4457 " <div class=\"form-group\">\n" +
4458 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.user_name\"></data-form-errors>\n" +
4458 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.user_name\"></data-form-errors>\n" +
4459 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4459 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4460 " New owners username\n" +
4460 " New owners username\n" +
4461 " </label>\n" +
4461 " </label>\n" +
4462 " <div class=\"col-sm-8 col-lg-9\">\n" +
4462 " <div class=\"col-sm-8 col-lg-9\">\n" +
4463 " <input class=\"form-control\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.formTransferModel.user_name\">\n" +
4463 " <input class=\"form-control\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.formTransferModel.user_name\">\n" +
4464 " </div>\n" +
4464 " </div>\n" +
4465 " </div>\n" +
4465 " </div>\n" +
4466 " <div class=\"form-group\">\n" +
4466 " <div class=\"form-group\">\n" +
4467 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4467 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4468 " </label>\n" +
4468 " </label>\n" +
4469 " <div class=\"col-sm-8 col-lg-9\">\n" +
4469 " <div class=\"col-sm-8 col-lg-9\">\n" +
4470 " <button class=\"btn btn-danger\">\n" +
4470 " <button class=\"btn btn-danger\">\n" +
4471 " <span class=\"fa fa-user-plus\"></span>\n" +
4471 " <span class=\"fa fa-user-plus\"></span>\n" +
4472 " Transfer ownership of application\n" +
4472 " Transfer ownership of application\n" +
4473 " </button>\n" +
4473 " </button>\n" +
4474 " </div>\n" +
4474 " </div>\n" +
4475 " </div>\n" +
4475 " </div>\n" +
4476 " </form>\n" +
4476 " </form>\n" +
4477 " </div>\n" +
4477 " </div>\n" +
4478 "\n" +
4478 "\n" +
4479 " <hr/>\n" +
4479 " <hr/>\n" +
4480 "\n" +
4480 "\n" +
4481 " <h2>Remove application</h2>\n" +
4481 " <h2>Remove application</h2>\n" +
4482 " <p><strong>This operation will wipe out all data from database - there is no undo.</strong></p>\n" +
4482 " <p><strong>This operation will wipe out all data from database - there is no undo.</strong></p>\n" +
4483 "\n" +
4483 "\n" +
4484 " <div class=\"confirmation_form\">\n" +
4484 " <div class=\"confirmation_form\">\n" +
4485 " <form class=\"form-horizontal\" name=\"$ctrl.formDelete\" ng-submit=\"$ctrl.deleteApplication()\">\n" +
4485 " <form class=\"form-horizontal\" name=\"$ctrl.formDelete\" ng-submit=\"$ctrl.deleteApplication()\">\n" +
4486 " <div class=\"form-group\">\n" +
4486 " <div class=\"form-group\">\n" +
4487 " <data-form-errors errors=\"$ctrl.formDelete.ae_validation.password\"></data-form-errors>\n" +
4487 " <data-form-errors errors=\"$ctrl.formDelete.ae_validation.password\"></data-form-errors>\n" +
4488 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4488 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4489 " Password\n" +
4489 " Password\n" +
4490 " </label>\n" +
4490 " </label>\n" +
4491 " <div class=\"col-sm-8 col-lg-9\">\n" +
4491 " <div class=\"col-sm-8 col-lg-9\">\n" +
4492 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formDeleteModel.password\">\n" +
4492 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formDeleteModel.password\">\n" +
4493 " </div>\n" +
4493 " </div>\n" +
4494 " </div>\n" +
4494 " </div>\n" +
4495 " <div class=\"form-group\">\n" +
4495 " <div class=\"form-group\">\n" +
4496 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4496 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4497 "\n" +
4497 "\n" +
4498 " </label>\n" +
4498 " </label>\n" +
4499 " <div class=\"col-sm-8 col-lg-9\">\n" +
4499 " <div class=\"col-sm-8 col-lg-9\">\n" +
4500 " <button class=\"btn btn-danger\">\n" +
4500 " <button class=\"btn btn-danger\">\n" +
4501 " <span class=\"fa fa-trash-o\"></span>\n" +
4501 " <span class=\"fa fa-trash-o\"></span>\n" +
4502 " Delete my application\n" +
4502 " Delete my application\n" +
4503 " </button>\n" +
4503 " </button>\n" +
4504 " </div>\n" +
4504 " </div>\n" +
4505 " </div>\n" +
4505 " </div>\n" +
4506 " </form>\n" +
4506 " </form>\n" +
4507 " </div>\n" +
4507 " </div>\n" +
4508 " </div>\n" +
4508 " </div>\n" +
4509 " </div>\n" +
4509 " </div>\n" +
4510 "</div>\n"
4510 "</div>\n"
4511 );
4511 );
4512
4512
4513
4513
4514 $templateCache.put('components/views/event-browser/event-browser.html',
4514 $templateCache.put('components/views/event-browser/event-browser.html',
4515 "<div class=\"panel panel-default\">\n" +
4515 "<div class=\"panel panel-default\">\n" +
4516 " <div class=\"panel-body\">\n" +
4516 " <div class=\"panel-body\">\n" +
4517 "\n" +
4517 "\n" +
4518 " <h1>Event history</h1>\n" +
4518 " <h1>Event history</h1>\n" +
4519 "\n" +
4519 "\n" +
4520 " <table class=\"table table-striped event-table\">\n" +
4520 " <table class=\"table table-striped event-table\">\n" +
4521 " <tr ng-repeat=\"event in $ctrl.events track by event.id\">\n" +
4521 " <tr ng-repeat=\"event in $ctrl.events track by event.id\">\n" +
4522 " <td class=\"text-center icons\">\n" +
4522 " <td class=\"text-center icons\">\n" +
4523 " <span ng-if=\"event.event_type === 1\" class=\"fa fa-exclamation-triangle fa-2x\" style=\"color:orangered\"></span>\n" +
4523 " <span ng-if=\"event.event_type === 1\" class=\"fa fa-exclamation-triangle fa-2x\" style=\"color:orangered\"></span>\n" +
4524 " <span ng-if=\"event.event_type === 3\" class=\"fa fa-clock-o fa-2x\" style=\"color:darkorange\"></span>\n" +
4524 " <span ng-if=\"event.event_type === 3\" class=\"fa fa-clock-o fa-2x\" style=\"color:darkorange\"></span>\n" +
4525 " <span ng-if=\"event.event_type === 7\" class=\"fa fa-question-circle fa-2x\" style=\"color:dimgrey\"></span>\n" +
4525 " <span ng-if=\"event.event_type === 7\" class=\"fa fa-question-circle fa-2x\" style=\"color:dimgrey\"></span>\n" +
4526 " <span ng-if=\"event.event_type === 9\" class=\"fa fa-line-chart fa-2x\" style=\"color:green\"></span>\n" +
4526 " <span ng-if=\"event.event_type === 9\" class=\"fa fa-line-chart fa-2x\" style=\"color:green\"></span>\n" +
4527 " </td>\n" +
4527 " </td>\n" +
4528 " <td>\n" +
4528 " <td>\n" +
4529 " <p>For <strong>{{ event.resource_name }}</strong></p>\n" +
4529 " <p>For <strong>{{ event.resource_name }}</strong></p>\n" +
4530 "\n" +
4530 "\n" +
4531 " <p>{{ event.text }}</p>\n" +
4531 " <p>{{ event.text }}</p>\n" +
4532 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\"> created:\n" +
4532 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\"> created:\n" +
4533 " <iso-to-relative-time time=\"{{event.start_date}}\"/>\n" +
4533 " <iso-to-relative-time time=\"{{event.start_date}}\"/>\n" +
4534 " </small>\n" +
4534 " </small>\n" +
4535 " <small class=\"date\" ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\"> | closed:\n" +
4535 " <small class=\"date\" ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\"> | closed:\n" +
4536 " <iso-to-relative-time time=\"{{event.end_date}}\"/>\n" +
4536 " <iso-to-relative-time time=\"{{event.end_date}}\"/>\n" +
4537 " </small>\n" +
4537 " </small>\n" +
4538 " </td>\n" +
4538 " </td>\n" +
4539 " <td class=\"options\">\n" +
4539 " <td class=\"options\">\n" +
4540 "\n" +
4540 "\n" +
4541 " <span class=\"dropdown pull-right\" ng-if=\"event.status === 1\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4541 " <span class=\"dropdown pull-right\" ng-if=\"event.status === 1\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4542 " <a class=\"dropdown-toggle btn btn-danger\" data-uib-dropdown-toggle>\n" +
4542 " <a class=\"dropdown-toggle btn btn-danger\" data-uib-dropdown-toggle>\n" +
4543 " <span class=\"fa fa-exclamation-circle\"></span>\n" +
4543 " <span class=\"fa fa-exclamation-circle\"></span>\n" +
4544 " </a>\n" +
4544 " </a>\n" +
4545 " <ul class=\"dropdown-menu\">\n" +
4545 " <ul class=\"dropdown-menu\">\n" +
4546 " <li>\n" +
4546 " <li>\n" +
4547 " <a ng-click=\"$ctrl.closeEvent(event)\">Close event</a>\n" +
4547 " <a ng-click=\"$ctrl.closeEvent(event)\">Close event</a>\n" +
4548 " <a>Do nothing</a>\n" +
4548 " <a>Do nothing</a>\n" +
4549 " </li>\n" +
4549 " </li>\n" +
4550 " </ul>\n" +
4550 " </ul>\n" +
4551 " </span>\n" +
4551 " </span>\n" +
4552 "\n" +
4552 "\n" +
4553 " </td>\n" +
4553 " </td>\n" +
4554 " </tr>\n" +
4554 " </tr>\n" +
4555 " </table>\n" +
4555 " </table>\n" +
4556 " </div>\n" +
4556 " </div>\n" +
4557 "</div>\n"
4557 "</div>\n"
4558 );
4558 );
4559
4559
4560
4560
4561 $templateCache.put('components/views/index-dashboard/index-dashboard.html',
4561 $templateCache.put('components/views/index-dashboard/index-dashboard.html',
4562 "<style type=\"text/css\">\n" +
4562 "<style type=\"text/css\">\n" +
4563 " #metrics_chart .c3-line {\n" +
4563 " #metrics_chart .c3-line {\n" +
4564 " stroke-width: 0px;\n" +
4564 " stroke-width: 0px;\n" +
4565 " }\n" +
4565 " }\n" +
4566 "\n" +
4566 "\n" +
4567 " #metrics_chart .c3-area {\n" +
4567 " #metrics_chart .c3-area {\n" +
4568 " stroke-width: 0;\n" +
4568 " stroke-width: 0;\n" +
4569 " opacity: 0.75;\n" +
4569 " opacity: 0.75;\n" +
4570 " }\n" +
4570 " }\n" +
4571 "</style>\n" +
4571 "</style>\n" +
4572 "\n" +
4572 "\n" +
4573 "<div class=\"row\">\n" +
4573 "<div class=\"row\">\n" +
4574 " <div class=\"col-sm-12 dashboard\" id=\"content\">\n" +
4574 " <div class=\"col-sm-12 dashboard\" id=\"content\">\n" +
4575 " <div ng-if=\"!$ctrl.stateHolder.AeUser.applications.length\">\n" +
4575 " <div ng-if=\"!$ctrl.stateHolder.AeUser.applications.length\">\n" +
4576 "\n" +
4576 "\n" +
4577 " <div ng-include=\"'templates/quickstart.html'\"></div>\n" +
4577 " <div ng-include=\"'templates/quickstart.html'\"></div>\n" +
4578 "\n" +
4578 "\n" +
4579 " </div>\n" +
4579 " </div>\n" +
4580 "\n" +
4580 "\n" +
4581 " <div ng-if=\"$ctrl.stateHolder.AeUser.applications.length\">\n" +
4581 " <div ng-if=\"$ctrl.stateHolder.AeUser.applications.length\">\n" +
4582 "\n" +
4582 "\n" +
4583 " <div class=\"row\">\n" +
4583 " <div class=\"row\">\n" +
4584 " <div class=\"col-sm-6\">\n" +
4584 " <div class=\"col-sm-6\">\n" +
4585 " <div class=\"panel panel-default\">\n" +
4585 " <div class=\"panel panel-default\">\n" +
4586 " <div class=\"panel-body\">\n" +
4586 " <div class=\"panel-body\">\n" +
4587 " <form class=\"graph-type form-inline\">\n" +
4587 " <form class=\"graph-type form-inline\">\n" +
4588 " <select ng-model=\"$ctrl.resource\" ng-options=\"r.resource_id as r.resource_name for r in $ctrl.stateHolder.AeUser.applications\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4588 " <select ng-model=\"$ctrl.resource\" ng-options=\"r.resource_id as r.resource_name for r in $ctrl.stateHolder.AeUser.applications\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4589 " class=\"SelectField form-control input-sm slim-input\"></select>\n" +
4589 " class=\"SelectField form-control input-sm slim-input\"></select>\n" +
4590 "\n" +
4590 "\n" +
4591 " <select class=\"SelectField form-control input-sm slim-input\" ng-model=\"$ctrl.timeSpan\"\n" +
4591 " <select class=\"SelectField form-control input-sm slim-input\" ng-model=\"$ctrl.timeSpan\"\n" +
4592 " ng-options=\"i as i.label for i in $ctrl.timeOptions | objectToOrderedArray:'minutes'\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4592 " ng-options=\"i as i.label for i in $ctrl.timeOptions | objectToOrderedArray:'minutes'\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4593 " class=\"SelectField\"></select>\n" +
4593 " class=\"SelectField\"></select>\n" +
4594 "\n" +
4594 "\n" +
4595 "\n" +
4595 "\n" +
4596 " <div class=\"btn-group\">\n" +
4596 " <div class=\"btn-group\">\n" +
4597 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4597 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4598 " uib-btn-radio=\"'requests_graphs'\" data-uib-tooltip=\"Requests per second\">\n" +
4598 " uib-btn-radio=\"'requests_graphs'\" data-uib-tooltip=\"Requests per second\">\n" +
4599 " <span class=\"fa fa-line-chart\"></span>\n" +
4599 " <span class=\"fa fa-line-chart\"></span>\n" +
4600 " </button>\n" +
4600 " </button>\n" +
4601 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4601 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4602 " uib-btn-radio=\"'response_graphs'\" data-uib-tooltip=\"Average response time\">\n" +
4602 " uib-btn-radio=\"'response_graphs'\" data-uib-tooltip=\"Average response time\">\n" +
4603 " <span class=\"fa fa-random\"></span>\n" +
4603 " <span class=\"fa fa-random\"></span>\n" +
4604 " </button>\n" +
4604 " </button>\n" +
4605 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4605 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4606 " uib-btn-radio=\"'metrics_graphs'\" data-uib-tooltip=\"Time spent per request\">\n" +
4606 " uib-btn-radio=\"'metrics_graphs'\" data-uib-tooltip=\"Time spent per request\">\n" +
4607 " <span class=\"fa fa-bar-chart-o\"></span>\n" +
4607 " <span class=\"fa fa-bar-chart-o\"></span>\n" +
4608 " </button>\n" +
4608 " </button>\n" +
4609 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4609 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4610 " uib-btn-radio=\"'report_graphs'\" data-uib-tooltip=\"Errors\">\n" +
4610 " uib-btn-radio=\"'report_graphs'\" data-uib-tooltip=\"Errors\">\n" +
4611 " <span class=\"fa fa-exclamation-triangle\"></span>\n" +
4611 " <span class=\"fa fa-exclamation-triangle\"></span>\n" +
4612 " </button>\n" +
4612 " </button>\n" +
4613 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4613 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4614 " uib-btn-radio=\"'slow_report_graphs'\" data-uib-tooltip=\"Slow reports\">\n" +
4614 " uib-btn-radio=\"'slow_report_graphs'\" data-uib-tooltip=\"Slow reports\">\n" +
4615 " <span class=\"fa fa-clock-o\"></span>\n" +
4615 " <span class=\"fa fa-clock-o\"></span>\n" +
4616 " </button>\n" +
4616 " </button>\n" +
4617 " </div>\n" +
4617 " </div>\n" +
4618 " </form>\n" +
4618 " </form>\n" +
4619 " <div class=\"clearfix\"></div>\n" +
4619 " <div class=\"clearfix\"></div>\n" +
4620 "\n" +
4620 "\n" +
4621 " <p ng-if=\"$ctrl.loading.series != false\" class=\"text-center\">\n" +
4621 " <p ng-if=\"$ctrl.loading.series != false\" class=\"text-center\">\n" +
4622 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4622 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4623 " </p>\n" +
4623 " </p>\n" +
4624 "\n" +
4624 "\n" +
4625 " <div ng-if=\"$ctrl.loading.series == false\">\n" +
4625 " <div ng-if=\"$ctrl.loading.series == false\">\n" +
4626 " <div ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\">\n" +
4626 " <div ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\">\n" +
4627 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.requestsChartData\" data-config=\"$ctrl.requestsChartConfig\" update=\"true\">\n" +
4627 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.requestsChartData\" data-config=\"$ctrl.requestsChartConfig\" update=\"true\">\n" +
4628 " </c3chart>\n" +
4628 " </c3chart>\n" +
4629 " </div>\n" +
4629 " </div>\n" +
4630 "\n" +
4630 "\n" +
4631 " <div ng-if=\"$ctrl.graphType.selected == 'response_graphs'\">\n" +
4631 " <div ng-if=\"$ctrl.graphType.selected == 'response_graphs'\">\n" +
4632 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.responseChartData\" data-config=\"$ctrl.responseChartConfig\" update=\"true\">\n" +
4632 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.responseChartData\" data-config=\"$ctrl.responseChartConfig\" update=\"true\">\n" +
4633 " </c3chart>\n" +
4633 " </c3chart>\n" +
4634 " </div>\n" +
4634 " </div>\n" +
4635 "\n" +
4635 "\n" +
4636 " <div ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\">\n" +
4636 " <div ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\">\n" +
4637 " <c3chart data-domid=\"metrics_chart\" data-data=\"$ctrl.metricsChartData\" data-config=\"$ctrl.metricsChartConfig\" update=\"true\">\n" +
4637 " <c3chart data-domid=\"metrics_chart\" data-data=\"$ctrl.metricsChartData\" data-config=\"$ctrl.metricsChartConfig\" update=\"true\">\n" +
4638 " </c3chart>\n" +
4638 " </c3chart>\n" +
4639 " </div>\n" +
4639 " </div>\n" +
4640 " <div ng-if=\"$ctrl.graphType.selected == 'report_graphs'\">\n" +
4640 " <div ng-if=\"$ctrl.graphType.selected == 'report_graphs'\">\n" +
4641 " <c3chart data-domid=\"reports_chart\" data-data=\"$ctrl.reportChartData\" data-config=\"$ctrl.reportChartConfig\" update=\"true\">\n" +
4641 " <c3chart data-domid=\"reports_chart\" data-data=\"$ctrl.reportChartData\" data-config=\"$ctrl.reportChartConfig\" update=\"true\">\n" +
4642 " </c3chart>\n" +
4642 " </c3chart>\n" +
4643 " </div>\n" +
4643 " </div>\n" +
4644 "\n" +
4644 "\n" +
4645 " <div ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\">\n" +
4645 " <div ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\">\n" +
4646 " <c3chart data-domid=\"slow_reports_chart\" data-data=\"$ctrl.reportSlowChartData\" data-config=\"$ctrl.reportSlowChartConfig\" update=\"true\">\n" +
4646 " <c3chart data-domid=\"slow_reports_chart\" data-data=\"$ctrl.reportSlowChartData\" data-config=\"$ctrl.reportSlowChartConfig\" update=\"true\">\n" +
4647 " </c3chart>\n" +
4647 " </c3chart>\n" +
4648 " </div>\n" +
4648 " </div>\n" +
4649 "\n" +
4649 "\n" +
4650 " <p ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\" class=\"text-center\">\n" +
4650 " <p ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\" class=\"text-center\">\n" +
4651 " <small>Average requests per second from all servers</small>\n" +
4651 " <small>Average requests per second from all servers</small>\n" +
4652 " </p>\n" +
4652 " </p>\n" +
4653 "\n" +
4653 "\n" +
4654 " <p ng-if=\"$ctrl.graphType.selected == 'response_graphs'\" class=\"text-center\">\n" +
4654 " <p ng-if=\"$ctrl.graphType.selected == 'response_graphs'\" class=\"text-center\">\n" +
4655 " <small>Average response time from all servers</small>\n" +
4655 " <small>Average response time from all servers</small>\n" +
4656 " </p>\n" +
4656 " </p>\n" +
4657 "\n" +
4657 "\n" +
4658 " <p ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\" class=\"text-center\">\n" +
4658 " <p ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\" class=\"text-center\">\n" +
4659 " <small>Aggregated average time spent per request - broken to layers</small>\n" +
4659 " <small>Aggregated average time spent per request - broken to layers</small>\n" +
4660 " </p>\n" +
4660 " </p>\n" +
4661 "\n" +
4661 "\n" +
4662 " <p ng-if=\"$ctrl.graphType.selected == 'report_graphs'\" class=\"text-center\">\n" +
4662 " <p ng-if=\"$ctrl.graphType.selected == 'report_graphs'\" class=\"text-center\">\n" +
4663 " <small>Aggregated reports sent by your application</small>\n" +
4663 " <small>Aggregated reports sent by your application</small>\n" +
4664 " </p>\n" +
4664 " </p>\n" +
4665 "\n" +
4665 "\n" +
4666 " <p ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\" class=\"text-center\">\n" +
4666 " <p ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\" class=\"text-center\">\n" +
4667 " <small>Aggregated slow reports sent by your application</small>\n" +
4667 " <small>Aggregated slow reports sent by your application</small>\n" +
4668 " </p>\n" +
4668 " </p>\n" +
4669 " </div>\n" +
4669 " </div>\n" +
4670 " </div>\n" +
4670 " </div>\n" +
4671 " </div>\n" +
4671 " </div>\n" +
4672 " </div>\n" +
4672 " </div>\n" +
4673 "\n" +
4673 "\n" +
4674 "\n" +
4674 "\n" +
4675 " <div class=\"col-sm-6\">\n" +
4675 " <div class=\"col-sm-6\">\n" +
4676 "\n" +
4676 "\n" +
4677 " <div id=\"server-container\">\n" +
4677 " <div id=\"server-container\">\n" +
4678 "\n" +
4678 "\n" +
4679 " <div ng-if=\"$ctrl.loading.apdex==false\" class=\"text-center m-b-1\">\n" +
4679 " <div ng-if=\"$ctrl.loading.apdex==false\" class=\"text-center m-b-1\">\n" +
4680 "\n" +
4680 "\n" +
4681 " <a data-ui-sref=\"report.list({resource:$ctrl.resource, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"error-rate\">\n" +
4681 " <a data-ui-sref=\"report.list({resource:$ctrl.resource, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"error-rate\">\n" +
4682 " <small>Exceptions</small>\n" +
4682 " <small>Exceptions</small>\n" +
4683 " <br/>\n" +
4683 " <br/>\n" +
4684 " <strong>{{ $ctrl.exceptions|numberToThousands}}</strong>\n" +
4684 " <strong>{{ $ctrl.exceptions|numberToThousands}}</strong>\n" +
4685 " <span class=\"fa fa-chevron-right\"></span>\n" +
4685 " <span class=\"fa fa-chevron-right\"></span>\n" +
4686 " </a><!--\n" +
4686 " </a><!--\n" +
4687 "\n" +
4687 "\n" +
4688 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"frustrating-requests\" data-uib-tooltip=\"Requests over 4s\">\n" +
4688 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"frustrating-requests\" data-uib-tooltip=\"Requests over 4s\">\n" +
4689 " <small>Frustrating req.</small>\n" +
4689 " <small>Frustrating req.</small>\n" +
4690 " <br/>\n" +
4690 " <br/>\n" +
4691 " <strong>{{$ctrl.frustratingRequests|numberToThousands}}</strong>\n" +
4691 " <strong>{{$ctrl.frustratingRequests|numberToThousands}}</strong>\n" +
4692 " <span class=\"fa fa-chevron-right\"></span>\n" +
4692 " <span class=\"fa fa-chevron-right\"></span>\n" +
4693 " </a><!--\n" +
4693 " </a><!--\n" +
4694 "\n" +
4694 "\n" +
4695 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:1, max_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"tolerated-requests\"\n" +
4695 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:1, max_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"tolerated-requests\"\n" +
4696 " data-uib-tooltip=\"Requests under 4s\">\n" +
4696 " data-uib-tooltip=\"Requests under 4s\">\n" +
4697 " <small>Tolerated req.</small>\n" +
4697 " <small>Tolerated req.</small>\n" +
4698 " <br/>\n" +
4698 " <br/>\n" +
4699 " <strong>{{$ctrl.toleratedRequests|numberToThousands}}</strong>\n" +
4699 " <strong>{{$ctrl.toleratedRequests|numberToThousands}}</strong>\n" +
4700 " <span class=\"fa fa-chevron-right\"></span>\n" +
4700 " <span class=\"fa fa-chevron-right\"></span>\n" +
4701 " </a><!--\n" +
4701 " </a><!--\n" +
4702 " \n" +
4702 " \n" +
4703 " --><a class=\"combined-stat text-center\" id=\"satisfying-requests\" data-uib-tooltip=\"Requests under 1s\">\n" +
4703 " --><a class=\"combined-stat text-center\" id=\"satisfying-requests\" data-uib-tooltip=\"Requests under 1s\">\n" +
4704 " <small>Satisfying req.</small>\n" +
4704 " <small>Satisfying req.</small>\n" +
4705 " <br/>\n" +
4705 " <br/>\n" +
4706 " <strong>{{$ctrl.satisfyingRequests|numberToThousands}}</strong>\n" +
4706 " <strong>{{$ctrl.satisfyingRequests|numberToThousands}}</strong>\n" +
4707 " </a><!--\n" +
4707 " </a><!--\n" +
4708 "\n" +
4708 "\n" +
4709 " --><a data-ui-sref=\"uptime({resource:$ctrl.resource})\" class=\"combined-stat text-center\" id=\"uptime-stats\" data-uib-tooltip=\"Uptime\">\n" +
4709 " --><a data-ui-sref=\"uptime({resource:$ctrl.resource})\" class=\"combined-stat text-center\" id=\"uptime-stats\" data-uib-tooltip=\"Uptime\">\n" +
4710 " <small>Uptime</small>\n" +
4710 " <small>Uptime</small>\n" +
4711 " <br/>\n" +
4711 " <br/>\n" +
4712 " <strong>{{$ctrl.uptimeStats}}%</strong>\n" +
4712 " <strong>{{$ctrl.uptimeStats}}%</strong>\n" +
4713 " <span class=\"fa fa-chevron-right\"></span>\n" +
4713 " <span class=\"fa fa-chevron-right\"></span>\n" +
4714 " </a>\n" +
4714 " </a>\n" +
4715 "\n" +
4715 "\n" +
4716 " <div class=\"clearfix\"></div>\n" +
4716 " <div class=\"clearfix\"></div>\n" +
4717 " </div>\n" +
4717 " </div>\n" +
4718 "\n" +
4718 "\n" +
4719 " <div id=\"apdex-rate\" class=\"m-b-1 panel panel-default\">\n" +
4719 " <div id=\"apdex-rate\" class=\"m-b-1 panel panel-default\">\n" +
4720 " <table class=\"servers table table-striped\">\n" +
4720 " <table class=\"servers table table-striped\">\n" +
4721 " <thead>\n" +
4721 " <thead>\n" +
4722 " <tr>\n" +
4722 " <tr>\n" +
4723 " <th></th>\n" +
4723 " <th></th>\n" +
4724 " <th>Server</th>\n" +
4724 " <th>Server</th>\n" +
4725 " <th>Apdex\n" +
4725 " <th>Apdex\n" +
4726 " <span class=\"fa fa-question-circle\"\n" +
4726 " <span class=\"fa fa-question-circle\"\n" +
4727 " data-uib-tooltip=\"Application Performance Index - measures viewer satisfaction based on response times and error rates\"></span>\n" +
4727 " data-uib-tooltip=\"Application Performance Index - measures viewer satisfaction based on response times and error rates\"></span>\n" +
4728 " </th>\n" +
4728 " </th>\n" +
4729 " <th>rpm</th>\n" +
4729 " <th>rpm</th>\n" +
4730 " <th>avg. response</th>\n" +
4730 " <th>avg. response</th>\n" +
4731 " </tr>\n" +
4731 " </tr>\n" +
4732 " </thead>\n" +
4732 " </thead>\n" +
4733 " <tbody>\n" +
4733 " <tbody>\n" +
4734 " <tr ng-if=\"$ctrl.loading.apdex!=false\" class=\"text-center\">\n" +
4734 " <tr ng-if=\"$ctrl.loading.apdex!=false\" class=\"text-center\">\n" +
4735 " <td colspan=\"5\"><span class=\"fa fa-cog fa-spin fa-5x loader\"></span></td>\n" +
4735 " <td colspan=\"5\"><span class=\"fa fa-cog fa-spin fa-5x loader\"></span></td>\n" +
4736 " </tr>\n" +
4736 " </tr>\n" +
4737 " <tr ng-repeat=\"server in $ctrl.apdexStats\" class=\"{{ server | apdexValue }}\"\n" +
4737 " <tr ng-repeat=\"server in $ctrl.apdexStats\" class=\"{{ server | apdexValue }}\"\n" +
4738 " ng-if=\"$ctrl.loading.apdex==false\">\n" +
4738 " ng-if=\"$ctrl.loading.apdex==false\">\n" +
4739 " <td><span class=\"fa fa-hdd-o\"></span></td>\n" +
4739 " <td><span class=\"fa fa-hdd-o\"></span></td>\n" +
4740 " <td>\n" +
4740 " <td>\n" +
4741 " <small><strong>{{ server.name }}</strong></small>\n" +
4741 " <small><strong>{{ server.name }}</strong></small>\n" +
4742 " </td>\n" +
4742 " </td>\n" +
4743 " <td class=\"apdex\">\n" +
4743 " <td class=\"apdex\">\n" +
4744 " <small><strong>{{ server.apdex }} %</strong></small>\n" +
4744 " <small><strong>{{ server.apdex }} %</strong></small>\n" +
4745 " </td>\n" +
4745 " </td>\n" +
4746 " <td>\n" +
4746 " <td>\n" +
4747 " <small><strong>{{ server.rpm }}rpm</strong></small>\n" +
4747 " <small><strong>{{ server.rpm }}rpm</strong></small>\n" +
4748 " </td>\n" +
4748 " </td>\n" +
4749 " <td>\n" +
4749 " <td>\n" +
4750 " <small><strong>{{ server.avg_response_time }}s</strong></small>\n" +
4750 " <small><strong>{{ server.avg_response_time }}s</strong></small>\n" +
4751 " </td>\n" +
4751 " </td>\n" +
4752 " </tr>\n" +
4752 " </tr>\n" +
4753 " </tbody>\n" +
4753 " </tbody>\n" +
4754 " </table>\n" +
4754 " </table>\n" +
4755 "\n" +
4755 "\n" +
4756 " </div>\n" +
4756 " </div>\n" +
4757 " </div>\n" +
4757 " </div>\n" +
4758 "\n" +
4758 "\n" +
4759 " </div>\n" +
4759 " </div>\n" +
4760 "\n" +
4760 "\n" +
4761 "\n" +
4761 "\n" +
4762 " </div>\n" +
4762 " </div>\n" +
4763 "\n" +
4763 "\n" +
4764 " <div class=\"row\">\n" +
4764 " <div class=\"row\">\n" +
4765 " <div class=\"col-sm-6\">\n" +
4765 " <div class=\"col-sm-6\">\n" +
4766 "\n" +
4766 "\n" +
4767 " <div class=\"panel panel-default\">\n" +
4767 " <div class=\"panel panel-default\">\n" +
4768 " <div class=\"panel-heading position-relative\">\n" +
4768 " <div class=\"panel-heading position-relative\">\n" +
4769 " <h3 class=\"panel-title\"><span class=\"fa fa-exclamation-triangle\"></span> Newest errors (real-time)\n" +
4769 " <h3 class=\"panel-title\"><span class=\"fa fa-exclamation-triangle\"></span> Newest errors (real-time)\n" +
4770 " </h3>\n" +
4770 " </h3>\n" +
4771 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Play/Pause stream\" class=\"btn btn-primary btn-sm pause_stream\" ng-model=\"$ctrl.stream.paused\" uib-btn-checkbox>\n" +
4771 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Play/Pause stream\" class=\"btn btn-primary btn-sm pause_stream\" ng-model=\"$ctrl.stream.paused\" uib-btn-checkbox>\n" +
4772 " <span class=\"fa {{stream.paused ? 'fa-play' : 'fa-pause'}}\"></span>\n" +
4772 " <span class=\"fa {{stream.paused ? 'fa-play' : 'fa-pause'}}\"></span>\n" +
4773 " </a>\n" +
4773 " </a>\n" +
4774 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Limit reports to current application\" class=\"btn btn-primary btn-sm limit_stream\" ng-model=\"$ctrl.stream.filtered\" uib-btn-checkbox>\n" +
4774 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Limit reports to current application\" class=\"btn btn-primary btn-sm limit_stream\" ng-model=\"$ctrl.stream.filtered\" uib-btn-checkbox>\n" +
4775 " <span class=\"fa fa-lock\"></span>\n" +
4775 " <span class=\"fa fa-lock\"></span>\n" +
4776 " </a>\n" +
4776 " </a>\n" +
4777 "\n" +
4777 "\n" +
4778 "\n" +
4778 "\n" +
4779 " </div>\n" +
4779 " </div>\n" +
4780 " <div class=\"panel-body\">\n" +
4780 " <div class=\"panel-body\">\n" +
4781 "\n" +
4781 "\n" +
4782 " <p ng-if=\"$ctrl.stream.reports.length === 0\">No new reports</p>\n" +
4782 " <p ng-if=\"$ctrl.stream.reports.length === 0\">No new reports</p>\n" +
4783 "\n" +
4783 "\n" +
4784 " <div small-report-list reports=\"$ctrl.stream.reports\" applications=\"$ctrl.applications\"></div>\n" +
4784 " <div small-report-list reports=\"$ctrl.stream.reports\" applications=\"$ctrl.applications\"></div>\n" +
4785 " </div>\n" +
4785 " </div>\n" +
4786 " </div>\n" +
4786 " </div>\n" +
4787 " </div>\n" +
4787 " </div>\n" +
4788 "\n" +
4788 "\n" +
4789 " <div class=\"col-sm-6\">\n" +
4789 " <div class=\"col-sm-6\">\n" +
4790 "\n" +
4790 "\n" +
4791 " <div class=\"panel panel-default\">\n" +
4791 " <div class=\"panel panel-default\">\n" +
4792 " <div class=\"panel-heading\">\n" +
4792 " <div class=\"panel-heading\">\n" +
4793 " <h3 class=\"panel-title\"><span class=\"fa fa-sort-amount-desc\"></span> Request breakdown over {{ $ctrl.timeSpan.label }}</h3>\n" +
4793 " <h3 class=\"panel-title\"><span class=\"fa fa-sort-amount-desc\"></span> Request breakdown over {{ $ctrl.timeSpan.label }}</h3>\n" +
4794 " </div>\n" +
4794 " </div>\n" +
4795 " <div class=\"panel-body\" id=\"view-breakdown-container\">\n" +
4795 " <div class=\"panel-body\" id=\"view-breakdown-container\">\n" +
4796 " <p ng-if=\"$ctrl.loading.requestsBreakdown!=false\" class=\"text-center\">\n" +
4796 " <p ng-if=\"$ctrl.loading.requestsBreakdown!=false\" class=\"text-center\">\n" +
4797 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4797 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4798 " </p>\n" +
4798 " </p>\n" +
4799 "\n" +
4799 "\n" +
4800 " <div class=\"report-list\">\n" +
4800 " <div class=\"report-list\">\n" +
4801 " <div ng-if=\"$ctrl.loading.requestsBreakdown==false\" ng-repeat=\"view in $ctrl.requestsBreakdown\">\n" +
4801 " <div ng-if=\"$ctrl.loading.requestsBreakdown==false\" ng-repeat=\"view in $ctrl.requestsBreakdown\">\n" +
4802 " <div class=\"view-info\">\n" +
4802 " <div class=\"view-info\">\n" +
4803 " <div class=\"view-name\">\n" +
4803 " <div class=\"view-name\">\n" +
4804 " <div class=\"bar\" style=\"width: {{view.percentage}}%\">\n" +
4804 " <div class=\"bar\" style=\"width: {{view.percentage}}%\">\n" +
4805 " </div>\n" +
4805 " </div>\n" +
4806 " </div>\n" +
4806 " </div>\n" +
4807 " <strong ng-if=\"view.latest_details.length\">\n" +
4807 " <strong ng-if=\"view.latest_details.length\">\n" +
4808 " <a data-ui-sref=\"report.list_slow({view_name:view.view_name})\">{{view.view_name}}</a></strong>\n" +
4808 " <a data-ui-sref=\"report.list_slow({view_name:view.view_name})\">{{view.view_name}}</a></strong>\n" +
4809 " <strong ng-if=\"!view.latest_details.length\">{{view.view_name}}</strong>\n" +
4809 " <strong ng-if=\"!view.latest_details.length\">{{view.view_name}}</strong>\n" +
4810 "\n" +
4810 "\n" +
4811 " <div class=\"stats\">\n" +
4811 " <div class=\"stats\">\n" +
4812 " <small>\n" +
4812 " <small>\n" +
4813 " avg. response <strong>{{view.avg_response}}s</strong> in\n" +
4813 " avg. response <strong>{{view.avg_response}}s</strong> in\n" +
4814 " <span class=\"requests\"\n" +
4814 " <span class=\"requests\"\n" +
4815 " data-uib-tooltip=\"Requests\"><strong>{{view.requests|numberToThousands}}</strong> requests</span>\n" +
4815 " data-uib-tooltip=\"Requests\"><strong>{{view.requests|numberToThousands}}</strong> requests</span>\n" +
4816 "\n" +
4816 "\n" +
4817 " <span ng-if=\"view.latest_details\">\n" +
4817 " <span ng-if=\"view.latest_details\">\n" +
4818 " &nbsp;&nbsp; Latest reports:\n" +
4818 " &nbsp;&nbsp; Latest reports:\n" +
4819 " <a ng-repeat=\"d in view.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong></a>\n" +
4819 " <a ng-repeat=\"d in view.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong></a>\n" +
4820 " </span>\n" +
4820 " </span>\n" +
4821 " </small>\n" +
4821 " </small>\n" +
4822 " </div>\n" +
4822 " </div>\n" +
4823 "\n" +
4823 "\n" +
4824 " </div>\n" +
4824 " </div>\n" +
4825 "\n" +
4825 "\n" +
4826 " </div>\n" +
4826 " </div>\n" +
4827 " </div>\n" +
4827 " </div>\n" +
4828 "\n" +
4828 "\n" +
4829 "\n" +
4829 "\n" +
4830 " </div>\n" +
4830 " </div>\n" +
4831 " </div>\n" +
4831 " </div>\n" +
4832 "\n" +
4832 "\n" +
4833 " </div>\n" +
4833 " </div>\n" +
4834 "\n" +
4834 "\n" +
4835 " </div>\n" +
4835 " </div>\n" +
4836 "\n" +
4836 "\n" +
4837 " <div class=\"row\">\n" +
4837 " <div class=\"row\">\n" +
4838 " <div class=\"col-sm-6\">\n" +
4838 " <div class=\"col-sm-6\">\n" +
4839 "\n" +
4839 "\n" +
4840 " <div class=\"panel panel-default\">\n" +
4840 " <div class=\"panel panel-default\">\n" +
4841 " <div class=\"panel-heading\">\n" +
4841 " <div class=\"panel-heading\">\n" +
4842 " <h3 class=\"panel-title\">\n" +
4842 " <h3 class=\"panel-title\">\n" +
4843 " <span class=\"fa fa-exclamation-triangle\"></span> Report groups trending over {{ $ctrl.timeSpan.label }}\n" +
4843 " <span class=\"fa fa-exclamation-triangle\"></span> Report groups trending over {{ $ctrl.timeSpan.label }}\n" +
4844 " </h3>\n" +
4844 " </h3>\n" +
4845 " </div>\n" +
4845 " </div>\n" +
4846 " <div class=\"panel-body\">\n" +
4846 " <div class=\"panel-body\">\n" +
4847 " <p ng-if=\"$ctrl.loading.reports != false\" class=\"text-center\">\n" +
4847 " <p ng-if=\"$ctrl.loading.reports != false\" class=\"text-center\">\n" +
4848 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4848 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4849 " </p>\n" +
4849 " </p>\n" +
4850 "\n" +
4850 "\n" +
4851 " <p ng-if=\"$ctrl.trendingReports.length == 0 && $ctrl.loading.reports == false\">\n" +
4851 " <p ng-if=\"$ctrl.trendingReports.length == 0 && $ctrl.loading.reports == false\">\n" +
4852 " No reports found\n" +
4852 " No reports found\n" +
4853 " </p>\n" +
4853 " </p>\n" +
4854 "\n" +
4854 "\n" +
4855 " <div small-report-group-list groups=\"$ctrl.trendingReports\" applications=\"$ctrl.applications\" ng-if=\"$ctrl.loading.reports==false\"></div>\n" +
4855 " <div small-report-group-list groups=\"$ctrl.trendingReports\" applications=\"$ctrl.applications\" ng-if=\"$ctrl.loading.reports==false\"></div>\n" +
4856 " </div>\n" +
4856 " </div>\n" +
4857 " </div>\n" +
4857 " </div>\n" +
4858 "\n" +
4858 "\n" +
4859 " </div>\n" +
4859 " </div>\n" +
4860 "\n" +
4860 "\n" +
4861 " <div class=\"col-sm-6\">\n" +
4861 " <div class=\"col-sm-6\">\n" +
4862 "\n" +
4862 "\n" +
4863 "\n" +
4863 "\n" +
4864 " <div class=\"panel panel-default\">\n" +
4864 " <div class=\"panel panel-default\">\n" +
4865 " <div class=\"panel-heading\">\n" +
4865 " <div class=\"panel-heading\">\n" +
4866 " <h3 class=\"panel-title\">\n" +
4866 " <h3 class=\"panel-title\">\n" +
4867 " Most common slow calls over {{ $ctrl.timeSpan.label }}\n" +
4867 " Most common slow calls over {{ $ctrl.timeSpan.label }}\n" +
4868 " </h3>\n" +
4868 " </h3>\n" +
4869 " </div>\n" +
4869 " </div>\n" +
4870 " <div class=\"panel-body\">\n" +
4870 " <div class=\"panel-body\">\n" +
4871 "\n" +
4871 "\n" +
4872 " <div ng-if=\"$ctrl.loading.slowCalls!=false\" class=\"text-center\">\n" +
4872 " <div ng-if=\"$ctrl.loading.slowCalls!=false\" class=\"text-center\">\n" +
4873 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4873 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4874 " </div>\n" +
4874 " </div>\n" +
4875 "\n" +
4875 "\n" +
4876 " <table id=\"slow-statements\" ng-if=\"$ctrl.loading.slowCalls==false\">\n" +
4876 " <table id=\"slow-statements\" ng-if=\"$ctrl.loading.slowCalls==false\">\n" +
4877 " <tbody>\n" +
4877 " <tbody>\n" +
4878 " <tr ng-repeat=\"call in $ctrl.slowCalls\">\n" +
4878 " <tr ng-repeat=\"call in $ctrl.slowCalls\">\n" +
4879 " <td class=\"occurences\">\n" +
4879 " <td class=\"occurences\">\n" +
4880 " <span class=\"occurences\" data-uib-tooltip=\"Occurences\">{{call.occurences|numberToThousands}}</span>\n" +
4880 " <span class=\"occurences\" data-uib-tooltip=\"Occurences\">{{call.occurences|numberToThousands}}</span>\n" +
4881 " </td>\n" +
4881 " </td>\n" +
4882 " <td class=\"ellipsis\">\n" +
4882 " <td class=\"ellipsis\">\n" +
4883 " <small title=\"{{call.statement}}\" class=\"statement\">{{call.statement}}</small>\n" +
4883 " <small title=\"{{call.statement}}\" class=\"statement\">{{call.statement}}</small>\n" +
4884 " <br/>\n" +
4884 " <br/>\n" +
4885 " <span class=\"type\">{{call.statement_type}}</span>\n" +
4885 " <span class=\"type\">{{call.statement_type}}</span>\n" +
4886 " <span class=\"subtype\">{{call.statement_subtype}}</span>\n" +
4886 " <span class=\"subtype\">{{call.statement_subtype}}</span>\n" +
4887 " <span class=\"duration\" data-uib-tooltip=\"Average duration\">{{call.total_duration/call.occurences|round:2}}s</span>\n" +
4887 " <span class=\"duration\" data-uib-tooltip=\"Average duration\">{{call.total_duration/call.occurences|round:2}}s</span>\n" +
4888 " <span class=\"report-list\">\n" +
4888 " <span class=\"report-list\">\n" +
4889 " Latest reports:\n" +
4889 " Latest reports:\n" +
4890 " <a ng-repeat=\"d in call.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong> </a>\n" +
4890 " <a ng-repeat=\"d in call.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong> </a>\n" +
4891 " </span>\n" +
4891 " </span>\n" +
4892 " </td>\n" +
4892 " </td>\n" +
4893 " </tr>\n" +
4893 " </tr>\n" +
4894 " </tbody>\n" +
4894 " </tbody>\n" +
4895 " </table>\n" +
4895 " </table>\n" +
4896 "\n" +
4896 "\n" +
4897 "\n" +
4897 "\n" +
4898 " </div>\n" +
4898 " </div>\n" +
4899 " </div>\n" +
4899 " </div>\n" +
4900 "\n" +
4900 "\n" +
4901 "\n" +
4901 "\n" +
4902 " </div>\n" +
4902 " </div>\n" +
4903 "\n" +
4903 "\n" +
4904 " </div>\n" +
4904 " </div>\n" +
4905 " </div>\n" +
4905 " </div>\n" +
4906 " </div>\n" +
4906 " </div>\n" +
4907 "</div>\n"
4907 "</div>\n"
4908 );
4908 );
4909
4909
4910
4910
4911 $templateCache.put('components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
4911 $templateCache.put('components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
4912 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4912 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4913 "\n" +
4913 "\n" +
4914 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4914 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4915 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4915 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4916 " <div class=\"panel-body\">\n" +
4916 " <div class=\"panel-body\">\n" +
4917 "\n" +
4917 "\n" +
4918 " <h1>Bitbucket Integration</h1>\n" +
4918 " <h1>Bitbucket Integration</h1>\n" +
4919 "\n" +
4919 "\n" +
4920 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4920 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4921 " <div class=\"form-group\">\n" +
4921 " <div class=\"form-group\">\n" +
4922 "\n" +
4922 "\n" +
4923 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
4923 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
4924 "\n" +
4924 "\n" +
4925 " <div class=\"col-sm-8 col-lg-9\">\n" +
4925 " <div class=\"col-sm-8 col-lg-9\">\n" +
4926 "\n" +
4926 "\n" +
4927 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4927 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4928 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
4928 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
4929 "\n" +
4929 "\n" +
4930 " <div class=\"input-group\">\n" +
4930 " <div class=\"input-group\">\n" +
4931 " <div class=\"input-group-addon\">https://bitbucket.org/</div>\n" +
4931 " <div class=\"input-group-addon\">https://bitbucket.org/</div>\n" +
4932 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
4932 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
4933 " <div class=\"input-group-addon\">/</div>\n" +
4933 " <div class=\"input-group-addon\">/</div>\n" +
4934 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
4934 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
4935 " </div>\n" +
4935 " </div>\n" +
4936 "\n" +
4936 "\n" +
4937 " </div>\n" +
4937 " </div>\n" +
4938 " </div>\n" +
4938 " </div>\n" +
4939 " <div class=\"form-group\">\n" +
4939 " <div class=\"form-group\">\n" +
4940 "\n" +
4940 "\n" +
4941 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4941 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4942 "\n" +
4942 "\n" +
4943 " <div class=\"col-sm-8 col-lg-9\">\n" +
4943 " <div class=\"col-sm-8 col-lg-9\">\n" +
4944 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
4944 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
4945 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4945 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4946 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4946 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4947 " <ul class=\"dropdown-menu\">\n" +
4947 " <ul class=\"dropdown-menu\">\n" +
4948 " <li><a>No</a></li>\n" +
4948 " <li><a>No</a></li>\n" +
4949 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4949 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4950 " </ul>\n" +
4950 " </ul>\n" +
4951 " </span>\n" +
4951 " </span>\n" +
4952 " </div>\n" +
4952 " </div>\n" +
4953 " </div>\n" +
4953 " </div>\n" +
4954 " </form>\n" +
4954 " </form>\n" +
4955 "\n" +
4955 "\n" +
4956 " <p class=\"m-t-1\">Remember you first need to\n" +
4956 " <p class=\"m-t-1\">Remember you first need to\n" +
4957 " <strong>\n" +
4957 " <strong>\n" +
4958 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
4958 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
4959 " with Bitbucket before we can send issues on your behalf.</p>\n" +
4959 " with Bitbucket before we can send issues on your behalf.</p>\n" +
4960 "\n" +
4960 "\n" +
4961 " <p>Every user will have to authorize AppEnlight to access Bitbucket to be able to post issues.</p>\n" +
4961 " <p>Every user will have to authorize AppEnlight to access Bitbucket to be able to post issues.</p>\n" +
4962 "\n" +
4962 "\n" +
4963 " </div>\n" +
4963 " </div>\n" +
4964 "</div>\n"
4964 "</div>\n"
4965 );
4965 );
4966
4966
4967
4967
4968 $templateCache.put('components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
4968 $templateCache.put('components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
4969 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4969 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4970 "\n" +
4970 "\n" +
4971 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4971 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4972 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4972 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4973 " <div class=\"panel-body\">\n" +
4973 " <div class=\"panel-body\">\n" +
4974 " <h1>Campfire Integration</h1>\n" +
4974 " <h1>Campfire Integration</h1>\n" +
4975 "\n" +
4975 "\n" +
4976 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4976 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4977 "\n" +
4977 "\n" +
4978 " <div class=\"form-group\">\n" +
4978 " <div class=\"form-group\">\n" +
4979 "\n" +
4979 "\n" +
4980 " <label class=\"control-label col-sm-3 col-lg-2\">Account name</label>\n" +
4980 " <label class=\"control-label col-sm-3 col-lg-2\">Account name</label>\n" +
4981 " <div class=\"col-sm-8 col-lg-9\">\n" +
4981 " <div class=\"col-sm-8 col-lg-9\">\n" +
4982 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4982 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4983 "\n" +
4983 "\n" +
4984 " <div class=\"input-group\">\n" +
4984 " <div class=\"input-group\">\n" +
4985 " <div class=\"input-group-addon\">http://</div>\n" +
4985 " <div class=\"input-group-addon\">http://</div>\n" +
4986 " <input class=\"form-control\" ng-model=\"$ctrl.config.account\" placeholder=\"account\">\n" +
4986 " <input class=\"form-control\" ng-model=\"$ctrl.config.account\" placeholder=\"account\">\n" +
4987 " <div class=\"input-group-addon\">.campfirenow.com</div>\n" +
4987 " <div class=\"input-group-addon\">.campfirenow.com</div>\n" +
4988 " </div>\n" +
4988 " </div>\n" +
4989 " </div>\n" +
4989 " </div>\n" +
4990 " </div>\n" +
4990 " </div>\n" +
4991 "\n" +
4991 "\n" +
4992 " <div class=\"form-group\">\n" +
4992 " <div class=\"form-group\">\n" +
4993 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
4993 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
4994 " <div class=\"col-sm-8 col-lg-9\">\n" +
4994 " <div class=\"col-sm-8 col-lg-9\">\n" +
4995 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
4995 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
4996 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\">\n" +
4996 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\">\n" +
4997 " </div>\n" +
4997 " </div>\n" +
4998 " </div>\n" +
4998 " </div>\n" +
4999 "\n" +
4999 "\n" +
5000 " <div class=\"form-group\">\n" +
5000 " <div class=\"form-group\">\n" +
5001 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5001 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5002 " <div class=\"col-sm-8 col-lg-9\">\n" +
5002 " <div class=\"col-sm-8 col-lg-9\">\n" +
5003 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5003 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5004 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\">\n" +
5004 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\">\n" +
5005 " <p>\n" +
5005 " <p>\n" +
5006 " <small>Room ID list separated by comma</small>\n" +
5006 " <small>Room ID list separated by comma</small>\n" +
5007 " </p>\n" +
5007 " </p>\n" +
5008 " </div>\n" +
5008 " </div>\n" +
5009 " </div>\n" +
5009 " </div>\n" +
5010 " <div class=\"form-group\">\n" +
5010 " <div class=\"form-group\">\n" +
5011 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Campfire\">\n" +
5011 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Campfire\">\n" +
5012 "\n" +
5012 "\n" +
5013 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5013 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5014 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5014 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5015 " <ul class=\"dropdown-menu\">\n" +
5015 " <ul class=\"dropdown-menu\">\n" +
5016 " <li><a>No</a></li>\n" +
5016 " <li><a>No</a></li>\n" +
5017 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5017 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5018 " </ul>\n" +
5018 " </ul>\n" +
5019 " </span>\n" +
5019 " </span>\n" +
5020 "\n" +
5020 "\n" +
5021 " <div class=\"btn-group\" uib-dropdown>\n" +
5021 " <div class=\"btn-group\" uib-dropdown>\n" +
5022 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5022 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5023 " Test integration <span class=\"caret\"></span>\n" +
5023 " Test integration <span class=\"caret\"></span>\n" +
5024 " </button>\n" +
5024 " </button>\n" +
5025 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5025 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5026 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5026 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5027 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5027 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5028 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5028 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5029 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5029 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5030 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5030 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5031 " </ul>\n" +
5031 " </ul>\n" +
5032 " </div>\n" +
5032 " </div>\n" +
5033 "\n" +
5033 "\n" +
5034 " </div>\n" +
5034 " </div>\n" +
5035 "\n" +
5035 "\n" +
5036 " </form>\n" +
5036 " </form>\n" +
5037 "\n" +
5037 "\n" +
5038 " </div>\n" +
5038 " </div>\n" +
5039 "</div>\n"
5039 "</div>\n"
5040 );
5040 );
5041
5041
5042
5042
5043 $templateCache.put('components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
5043 $templateCache.put('components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
5044 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5044 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5045 "\n" +
5045 "\n" +
5046 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5046 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5047 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5047 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5048 " <div class=\"panel-body\">\n" +
5048 " <div class=\"panel-body\">\n" +
5049 "\n" +
5049 "\n" +
5050 " <h1>Flowdock Integration</h1>\n" +
5050 " <h1>Flowdock Integration</h1>\n" +
5051 "\n" +
5051 "\n" +
5052 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5052 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5053 "\n" +
5053 "\n" +
5054 " <div class=\"form-group\">\n" +
5054 " <div class=\"form-group\">\n" +
5055 "\n" +
5055 "\n" +
5056 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5056 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5057 "\n" +
5057 "\n" +
5058 " <div class=\"col-sm-8 col-lg-9\">\n" +
5058 " <div class=\"col-sm-8 col-lg-9\">\n" +
5059 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5059 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5060 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5060 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5061 " </div>\n" +
5061 " </div>\n" +
5062 "\n" +
5062 "\n" +
5063 "\n" +
5063 "\n" +
5064 " </div>\n" +
5064 " </div>\n" +
5065 "\n" +
5065 "\n" +
5066 " <div class=\"form-group\">\n" +
5066 " <div class=\"form-group\">\n" +
5067 "\n" +
5067 "\n" +
5068 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5068 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5069 "\n" +
5069 "\n" +
5070 " <div class=\"col-sm-8 col-lg-9\">\n" +
5070 " <div class=\"col-sm-8 col-lg-9\">\n" +
5071 "\n" +
5071 "\n" +
5072 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Flowdock\">\n" +
5072 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Flowdock\">\n" +
5073 "\n" +
5073 "\n" +
5074 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5074 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5075 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5075 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5076 " <ul class=\"dropdown-menu\">\n" +
5076 " <ul class=\"dropdown-menu\">\n" +
5077 " <li><a>No</a></li>\n" +
5077 " <li><a>No</a></li>\n" +
5078 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5078 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5079 " </ul>\n" +
5079 " </ul>\n" +
5080 " </span>\n" +
5080 " </span>\n" +
5081 " <div class=\"btn-group\" uib-dropdown>\n" +
5081 " <div class=\"btn-group\" uib-dropdown>\n" +
5082 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5082 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5083 " Test integration <span class=\"caret\"></span>\n" +
5083 " Test integration <span class=\"caret\"></span>\n" +
5084 " </button>\n" +
5084 " </button>\n" +
5085 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5085 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5086 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5086 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5087 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5087 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5088 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5088 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5089 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5089 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5090 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5090 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5091 " </ul>\n" +
5091 " </ul>\n" +
5092 " </div>\n" +
5092 " </div>\n" +
5093 " </div>\n" +
5093 " </div>\n" +
5094 " </div>\n" +
5094 " </div>\n" +
5095 "\n" +
5095 "\n" +
5096 "\n" +
5096 "\n" +
5097 " </form>\n" +
5097 " </form>\n" +
5098 "\n" +
5098 "\n" +
5099 " </div>\n" +
5099 " </div>\n" +
5100 "</div>\n"
5100 "</div>\n"
5101 );
5101 );
5102
5102
5103
5103
5104 $templateCache.put('components/views/integrations/github-integration-config-view/github-integration-config-view.html',
5104 $templateCache.put('components/views/integrations/github-integration-config-view/github-integration-config-view.html',
5105 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5105 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5106 "\n" +
5106 "\n" +
5107 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application && !$ctrl.loading.integration\">\n" +
5107 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application && !$ctrl.loading.integration\">\n" +
5108 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5108 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5109 " <div class=\"panel-body\">\n" +
5109 " <div class=\"panel-body\">\n" +
5110 "\n" +
5110 "\n" +
5111 " <h1>Github Integration</h1>\n" +
5111 " <h1>Github Integration</h1>\n" +
5112 "\n" +
5112 "\n" +
5113 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5113 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5114 "\n" +
5114 "\n" +
5115 "\n" +
5115 "\n" +
5116 " <div class=\"form-group\">\n" +
5116 " <div class=\"form-group\">\n" +
5117 "\n" +
5117 "\n" +
5118 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
5118 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
5119 "\n" +
5119 "\n" +
5120 " <div class=\"col-sm-8 col-lg-9\">\n" +
5120 " <div class=\"col-sm-8 col-lg-9\">\n" +
5121 "\n" +
5121 "\n" +
5122 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5122 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5123 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
5123 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
5124 "\n" +
5124 "\n" +
5125 " <div class=\"input-group\">\n" +
5125 " <div class=\"input-group\">\n" +
5126 " <div class=\"input-group-addon\">https://api.github.com/</div>\n" +
5126 " <div class=\"input-group-addon\">https://api.github.com/</div>\n" +
5127 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
5127 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
5128 " <div class=\"input-group-addon\">/</div>\n" +
5128 " <div class=\"input-group-addon\">/</div>\n" +
5129 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
5129 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
5130 " </div>\n" +
5130 " </div>\n" +
5131 "\n" +
5131 "\n" +
5132 " </div>\n" +
5132 " </div>\n" +
5133 " </div>\n" +
5133 " </div>\n" +
5134 "\n" +
5134 "\n" +
5135 " <div class=\"form-group\">\n" +
5135 " <div class=\"form-group\">\n" +
5136 "\n" +
5136 "\n" +
5137 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5137 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5138 "\n" +
5138 "\n" +
5139 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
5139 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
5140 "\n" +
5140 "\n" +
5141 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5141 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5142 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5142 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5143 " <ul class=\"dropdown-menu\">\n" +
5143 " <ul class=\"dropdown-menu\">\n" +
5144 " <li><a>No</a></li>\n" +
5144 " <li><a>No</a></li>\n" +
5145 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5145 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5146 " </ul>\n" +
5146 " </ul>\n" +
5147 " </span>\n" +
5147 " </span>\n" +
5148 "\n" +
5148 "\n" +
5149 " </div>\n" +
5149 " </div>\n" +
5150 " </form>\n" +
5150 " </form>\n" +
5151 "\n" +
5151 "\n" +
5152 " <p class=\"m-t-1\">Remember you first need to\n" +
5152 " <p class=\"m-t-1\">Remember you first need to\n" +
5153 " <strong>\n" +
5153 " <strong>\n" +
5154 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
5154 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
5155 " with Github before we can send issues on your behalf.</p>\n" +
5155 " with Github before we can send issues on your behalf.</p>\n" +
5156 "\n" +
5156 "\n" +
5157 " <p>Every user will have to authorize AppEnlight to access Github to be able to post issues.</p>\n" +
5157 " <p>Every user will have to authorize AppEnlight to access Github to be able to post issues.</p>\n" +
5158 "\n" +
5158 "\n" +
5159 " <div class=\"panel panel-warning\">\n" +
5159 " <div class=\"panel panel-warning\">\n" +
5160 " <div class=\"panel-heading\">Private repository access</div>\n" +
5160 " <div class=\"panel-heading\">Private repository access</div>\n" +
5161 " <div class=\"panel-body\">\n" +
5161 " <div class=\"panel-body\">\n" +
5162 " <p>If you need access to private repositories <a data-ui-sref=\"user.profile.identities\">profile page</a> allows you to require token including private repository permissions.</p>\n" +
5162 " <p>If you need access to private repositories <a data-ui-sref=\"user.profile.identities\">profile page</a> allows you to require token including private repository permissions.</p>\n" +
5163 "\n" +
5163 "\n" +
5164 " <p>Registration page OAuth does NOT give you token with private repository access permissions.</p>\n" +
5164 " <p>Registration page OAuth does NOT give you token with private repository access permissions.</p>\n" +
5165 " </div>\n" +
5165 " </div>\n" +
5166 " </div>\n" +
5166 " </div>\n" +
5167 "\n" +
5167 "\n" +
5168 " </div>\n" +
5168 " </div>\n" +
5169 "</div>\n"
5169 "</div>\n"
5170 );
5170 );
5171
5171
5172
5172
5173 $templateCache.put('components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
5173 $templateCache.put('components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
5174 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5174 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5175 "\n" +
5175 "\n" +
5176 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5176 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5177 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5177 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5178 " <div class=\"panel-body\">\n" +
5178 " <div class=\"panel-body\">\n" +
5179 "\n" +
5179 "\n" +
5180 " <h1>Hipchat Integration</h1>\n" +
5180 " <h1>Hipchat Integration</h1>\n" +
5181 "\n" +
5181 "\n" +
5182 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5182 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5183 "\n" +
5183 "\n" +
5184 " <div class=\"form-group\">\n" +
5184 " <div class=\"form-group\">\n" +
5185 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5185 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5186 "\n" +
5186 "\n" +
5187 " <div class=\"col-sm-8 col-lg-9\">\n" +
5187 " <div class=\"col-sm-8 col-lg-9\">\n" +
5188 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5188 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5189 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5189 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5190 " </div>\n" +
5190 " </div>\n" +
5191 " </div>\n" +
5191 " </div>\n" +
5192 "\n" +
5192 "\n" +
5193 " <div class=\"form-group\">\n" +
5193 " <div class=\"form-group\">\n" +
5194 "\n" +
5194 "\n" +
5195 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5195 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5196 "\n" +
5196 "\n" +
5197 " <div class=\"col-sm-8 col-lg-9\">\n" +
5197 " <div class=\"col-sm-8 col-lg-9\">\n" +
5198 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5198 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5199 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\" type=\"text\">\n" +
5199 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\" type=\"text\">\n" +
5200 "\n" +
5200 "\n" +
5201 " <p>\n" +
5201 " <p>\n" +
5202 " <small>Room ID list separated by comma</small>\n" +
5202 " <small>Room ID list separated by comma</small>\n" +
5203 " </p>\n" +
5203 " </p>\n" +
5204 " </div>\n" +
5204 " </div>\n" +
5205 "\n" +
5205 "\n" +
5206 " </div>\n" +
5206 " </div>\n" +
5207 "\n" +
5207 "\n" +
5208 " <div class=\"form-group\">\n" +
5208 " <div class=\"form-group\">\n" +
5209 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5209 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5210 " <div class=\"col-sm-8 col-lg-9\">\n" +
5210 " <div class=\"col-sm-8 col-lg-9\">\n" +
5211 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Hipchat\">\n" +
5211 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Hipchat\">\n" +
5212 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5212 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5213 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5213 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5214 " <ul class=\"dropdown-menu\">\n" +
5214 " <ul class=\"dropdown-menu\">\n" +
5215 " <li><a>No</a></li>\n" +
5215 " <li><a>No</a></li>\n" +
5216 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5216 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5217 " </ul>\n" +
5217 " </ul>\n" +
5218 " </span>\n" +
5218 " </span>\n" +
5219 "\n" +
5219 "\n" +
5220 " <div class=\"btn-group\" uib-dropdown>\n" +
5220 " <div class=\"btn-group\" uib-dropdown>\n" +
5221 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5221 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5222 " Test integration <span class=\"caret\"></span>\n" +
5222 " Test integration <span class=\"caret\"></span>\n" +
5223 " </button>\n" +
5223 " </button>\n" +
5224 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5224 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5225 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5225 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5226 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5226 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5227 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5227 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5228 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5228 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5229 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5229 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5230 " </ul>\n" +
5230 " </ul>\n" +
5231 " </div>\n" +
5231 " </div>\n" +
5232 "\n" +
5232 "\n" +
5233 " </div>\n" +
5233 " </div>\n" +
5234 " </div>\n" +
5234 " </div>\n" +
5235 "\n" +
5235 "\n" +
5236 " </form>\n" +
5236 " </form>\n" +
5237 "\n" +
5237 "\n" +
5238 " </div>\n" +
5238 " </div>\n" +
5239 "</div>\n"
5239 "</div>\n"
5240 );
5240 );
5241
5241
5242
5242
5243 $templateCache.put('components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
5243 $templateCache.put('components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
5244 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5244 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5245 "\n" +
5245 "\n" +
5246 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5246 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5247 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5247 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5248 " <div class=\"panel-body\">\n" +
5248 " <div class=\"panel-body\">\n" +
5249 "\n" +
5249 "\n" +
5250 " <h1>Jira Integration</h1>\n" +
5250 " <h1>Jira Integration</h1>\n" +
5251 "\n" +
5251 "\n" +
5252 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5252 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5253 "\n" +
5253 "\n" +
5254 " <div class=\"form-group\" id=\"row-host_name\">\n" +
5254 " <div class=\"form-group\" id=\"row-host_name\">\n" +
5255 "\n" +
5255 "\n" +
5256 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5256 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5257 " Server URL <span class=\"required\">*</span>\n" +
5257 " Server URL <span class=\"required\">*</span>\n" +
5258 " </label>\n" +
5258 " </label>\n" +
5259 " <div class=\"col-sm-8 col-lg-9\">\n" +
5259 " <div class=\"col-sm-8 col-lg-9\">\n" +
5260 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.host_name\"></data-form-errors>\n" +
5260 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.host_name\"></data-form-errors>\n" +
5261 " <input class=\"form-control\" id=\"host_name\" name=\"host_name\" type=\"text\" ng-model=\"$ctrl.config.host_name\">\n" +
5261 " <input class=\"form-control\" id=\"host_name\" name=\"host_name\" type=\"text\" ng-model=\"$ctrl.config.host_name\">\n" +
5262 "\n" +
5262 "\n" +
5263 " <p>\n" +
5263 " <p>\n" +
5264 " <small>https://servername.atlassian.net</small>\n" +
5264 " <small>https://servername.atlassian.net</small>\n" +
5265 " </p>\n" +
5265 " </p>\n" +
5266 "\n" +
5266 "\n" +
5267 " </div>\n" +
5267 " </div>\n" +
5268 " </div>\n" +
5268 " </div>\n" +
5269 " <div class=\"form-group\" id=\"row-user_name\">\n" +
5269 " <div class=\"form-group\" id=\"row-user_name\">\n" +
5270 "\n" +
5270 "\n" +
5271 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5271 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5272 " Username <span class=\"required\">*</span>\n" +
5272 " Username <span class=\"required\">*</span>\n" +
5273 " </label>\n" +
5273 " </label>\n" +
5274 " <div class=\"col-sm-8 col-lg-9\">\n" +
5274 " <div class=\"col-sm-8 col-lg-9\">\n" +
5275 "\n" +
5275 "\n" +
5276 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5276 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5277 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.config.user_name\">\n" +
5277 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.config.user_name\">\n" +
5278 "\n" +
5278 "\n" +
5279 " <p>\n" +
5279 " <p>\n" +
5280 " <small>user@email.com</small>\n" +
5280 " <small>user@email.com</small>\n" +
5281 " </p>\n" +
5281 " </p>\n" +
5282 "\n" +
5282 "\n" +
5283 " </div>\n" +
5283 " </div>\n" +
5284 " </div>\n" +
5284 " </div>\n" +
5285 " <div class=\"form-group\" id=\"row-password\">\n" +
5285 " <div class=\"form-group\" id=\"row-password\">\n" +
5286 "\n" +
5286 "\n" +
5287 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5287 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5288 " Password <span class=\"required\">*</span>\n" +
5288 " Password <span class=\"required\">*</span>\n" +
5289 " </label>\n" +
5289 " </label>\n" +
5290 " <div class=\"col-sm-8 col-lg-9\">\n" +
5290 " <div class=\"col-sm-8 col-lg-9\">\n" +
5291 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.password\"></data-form-errors>\n" +
5291 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.password\"></data-form-errors>\n" +
5292 " <input class=\"form-control\" id=\"password\" name=\"password\" type=\"password\" ng-model=\"$ctrl.config.password\">\n" +
5292 " <input class=\"form-control\" id=\"password\" name=\"password\" type=\"password\" ng-model=\"$ctrl.config.password\">\n" +
5293 " </div>\n" +
5293 " </div>\n" +
5294 " </div>\n" +
5294 " </div>\n" +
5295 " <div class=\"form-group\" id=\"row-project\">\n" +
5295 " <div class=\"form-group\" id=\"row-project\">\n" +
5296 "\n" +
5296 "\n" +
5297 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5297 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5298 " Project key <span class=\"required\">*</span>\n" +
5298 " Project key <span class=\"required\">*</span>\n" +
5299 " </label>\n" +
5299 " </label>\n" +
5300 " <div class=\"col-sm-8 col-lg-9\">\n" +
5300 " <div class=\"col-sm-8 col-lg-9\">\n" +
5301 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.project\"></data-form-errors>\n" +
5301 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.project\"></data-form-errors>\n" +
5302 " <input class=\"form-control\" id=\"project\" name=\"project\" type=\"text\" ng-model=\"$ctrl.config.project\">\n" +
5302 " <input class=\"form-control\" id=\"project\" name=\"project\" type=\"text\" ng-model=\"$ctrl.config.project\">\n" +
5303 " </div>\n" +
5303 " </div>\n" +
5304 " </div>\n" +
5304 " </div>\n" +
5305 " <div class=\"form-group\" id=\"row-submit\">\n" +
5305 " <div class=\"form-group\" id=\"row-submit\">\n" +
5306 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5306 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5307 " <div class=\"col-sm-8 col-lg-9\">\n" +
5307 " <div class=\"col-sm-8 col-lg-9\">\n" +
5308 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup Jira\">\n" +
5308 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup Jira\">\n" +
5309 "\n" +
5309 "\n" +
5310 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5310 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5311 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5311 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5312 " <ul class=\"dropdown-menu\">\n" +
5312 " <ul class=\"dropdown-menu\">\n" +
5313 " <li><a>No</a></li>\n" +
5313 " <li><a>No</a></li>\n" +
5314 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5314 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5315 " </ul>\n" +
5315 " </ul>\n" +
5316 " </span>\n" +
5316 " </span>\n" +
5317 " </div>\n" +
5317 " </div>\n" +
5318 " </div>\n" +
5318 " </div>\n" +
5319 "\n" +
5319 "\n" +
5320 " </form>\n" +
5320 " </form>\n" +
5321 "\n" +
5321 "\n" +
5322 "\n" +
5322 "\n" +
5323 " </div>\n" +
5323 " </div>\n" +
5324 "</div>\n"
5324 "</div>\n"
5325 );
5325 );
5326
5326
5327
5327
5328 $templateCache.put('components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
5328 $templateCache.put('components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
5329 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5329 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5330 "\n" +
5330 "\n" +
5331 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5331 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5332 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5332 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5333 " <div class=\"panel-body\">\n" +
5333 " <div class=\"panel-body\">\n" +
5334 "\n" +
5334 "\n" +
5335 " <h1>Slack Integration</h1>\n" +
5335 " <h1>Slack Integration</h1>\n" +
5336 "\n" +
5336 "\n" +
5337 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5337 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5338 "\n" +
5338 "\n" +
5339 " <div class=\"form-group\">\n" +
5339 " <div class=\"form-group\">\n" +
5340 "\n" +
5340 "\n" +
5341 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5341 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5342 " API Token <span class=\"required\">*</span>\n" +
5342 " API Token <span class=\"required\">*</span>\n" +
5343 " </label>\n" +
5343 " </label>\n" +
5344 " <div class=\"col-sm-8 col-lg-9\">\n" +
5344 " <div class=\"col-sm-8 col-lg-9\">\n" +
5345 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.webhook_url\"></data-form-errors>\n" +
5345 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.webhook_url\"></data-form-errors>\n" +
5346 " <input class=\"form-control\" ng-model=\"$ctrl.config.webhook_url\" placeholder=\"Webhook URL\" type=\"webhook_url\">\n" +
5346 " <input class=\"form-control\" ng-model=\"$ctrl.config.webhook_url\" placeholder=\"Webhook URL\" type=\"webhook_url\">\n" +
5347 " </div>\n" +
5347 " </div>\n" +
5348 " </div>\n" +
5348 " </div>\n" +
5349 "\n" +
5349 "\n" +
5350 " <div class=\"form-group\">\n" +
5350 " <div class=\"form-group\">\n" +
5351 "\n" +
5351 "\n" +
5352 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5352 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5353 " <div class=\"col-sm-8 col-lg-9\">\n" +
5353 " <div class=\"col-sm-8 col-lg-9\">\n" +
5354 " <input type=\"submit\" class=\"btn btn-primary\"\n" +
5354 " <input type=\"submit\" class=\"btn btn-primary\"\n" +
5355 " value=\"Connect to Slack\">\n" +
5355 " value=\"Connect to Slack\">\n" +
5356 "\n" +
5356 "\n" +
5357 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5357 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5358 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5358 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5359 " <ul class=\"dropdown-menu\">\n" +
5359 " <ul class=\"dropdown-menu\">\n" +
5360 " <li><a>No</a></li>\n" +
5360 " <li><a>No</a></li>\n" +
5361 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5361 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5362 " </ul>\n" +
5362 " </ul>\n" +
5363 " </span>\n" +
5363 " </span>\n" +
5364 "\n" +
5364 "\n" +
5365 " <div class=\"btn-group\" uib-dropdown>\n" +
5365 " <div class=\"btn-group\" uib-dropdown>\n" +
5366 " <button type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5366 " <button type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5367 " Test integration <span class=\"caret\"></span>\n" +
5367 " Test integration <span class=\"caret\"></span>\n" +
5368 " </button>\n" +
5368 " </button>\n" +
5369 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5369 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5370 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5370 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5371 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5371 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5372 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5372 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5373 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5373 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5374 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5374 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5375 " </ul>\n" +
5375 " </ul>\n" +
5376 " </div>\n" +
5376 " </div>\n" +
5377 " </div>\n" +
5377 " </div>\n" +
5378 " </div>\n" +
5378 " </div>\n" +
5379 " </form>\n" +
5379 " </form>\n" +
5380 "\n" +
5380 "\n" +
5381 " </div>\n" +
5381 " </div>\n" +
5382 "</div>\n"
5382 "</div>\n"
5383 );
5383 );
5384
5384
5385
5385
5386 $templateCache.put('components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
5386 $templateCache.put('components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
5387 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5387 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5388 "\n" +
5388 "\n" +
5389 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5389 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5390 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5390 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5391 " <div class=\"panel-body\">\n" +
5391 " <div class=\"panel-body\">\n" +
5392 "\n" +
5392 "\n" +
5393 " <h1>Webhooks Integration</h1>\n" +
5393 " <h1>Webhooks Integration</h1>\n" +
5394 "\n" +
5394 "\n" +
5395 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5395 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5396 " <div class=\"form-group\" id=\"row-reports_webhook\">\n" +
5396 " <div class=\"form-group\" id=\"row-reports_webhook\">\n" +
5397 "\n" +
5397 "\n" +
5398 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5398 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5399 " Reports webhook <span class=\"required\">*</span>\n" +
5399 " Reports webhook <span class=\"required\">*</span>\n" +
5400 " </label>\n" +
5400 " </label>\n" +
5401 " <div class=\"col-sm-8 col-lg-9\">\n" +
5401 " <div class=\"col-sm-8 col-lg-9\">\n" +
5402 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.reports_webhook\"></data-form-errors>\n" +
5402 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.reports_webhook\"></data-form-errors>\n" +
5403 " <input class=\"form-control\" id=\"reports_webhook\" name=\"reports_webhook\" type=\"text\" ng-model=\"$ctrl.config.reports_webhook\">\n" +
5403 " <input class=\"form-control\" id=\"reports_webhook\" name=\"reports_webhook\" type=\"text\" ng-model=\"$ctrl.config.reports_webhook\">\n" +
5404 " </div>\n" +
5404 " </div>\n" +
5405 " </div>\n" +
5405 " </div>\n" +
5406 " <div class=\"form-group\" id=\"row-alerts_webhook\">\n" +
5406 " <div class=\"form-group\" id=\"row-alerts_webhook\">\n" +
5407 "\n" +
5407 "\n" +
5408 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5408 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5409 " Alerts webhook <span class=\"required\">*</span>\n" +
5409 " Alerts webhook <span class=\"required\">*</span>\n" +
5410 " </label>\n" +
5410 " </label>\n" +
5411 " <div class=\"col-sm-8 col-lg-9\">\n" +
5411 " <div class=\"col-sm-8 col-lg-9\">\n" +
5412 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.alerts_webhook\"></data-form-errors>\n" +
5412 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.alerts_webhook\"></data-form-errors>\n" +
5413 " <input class=\"form-control StringField None\" id=\"alerts_webhook\" name=\"alerts_webhook\" type=\"text\" ng-model=\"$ctrl.config.alerts_webhook\">\n" +
5413 " <input class=\"form-control StringField None\" id=\"alerts_webhook\" name=\"alerts_webhook\" type=\"text\" ng-model=\"$ctrl.config.alerts_webhook\">\n" +
5414 " </div>\n" +
5414 " </div>\n" +
5415 "\n" +
5415 "\n" +
5416 "\n" +
5416 "\n" +
5417 " </div>\n" +
5417 " </div>\n" +
5418 " <div class=\"form-group\" id=\"row-submit\">\n" +
5418 " <div class=\"form-group\" id=\"row-submit\">\n" +
5419 "\n" +
5419 "\n" +
5420 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5420 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5421 " <div class=\"col-sm-8 col-lg-9\">\n" +
5421 " <div class=\"col-sm-8 col-lg-9\">\n" +
5422 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup webhooks\">\n" +
5422 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup webhooks\">\n" +
5423 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5423 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5424 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5424 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5425 " <ul class=\"dropdown-menu\">\n" +
5425 " <ul class=\"dropdown-menu\">\n" +
5426 " <li><a>No</a></li>\n" +
5426 " <li><a>No</a></li>\n" +
5427 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5427 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5428 " </ul>\n" +
5428 " </ul>\n" +
5429 " </span>\n" +
5429 " </span>\n" +
5430 " </div>\n" +
5430 " </div>\n" +
5431 " </div>\n" +
5431 " </div>\n" +
5432 " </form>\n" +
5432 " </form>\n" +
5433 " </div>\n" +
5433 " </div>\n" +
5434 "</div>\n"
5434 "</div>\n"
5435 );
5435 );
5436
5436
5437
5437
5438 $templateCache.put('components/views/logs-browser/logs-browser.html',
5438 $templateCache.put('components/views/logs-browser/logs-browser.html',
5439 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.isLoading.logs\"></ng-include>\n" +
5439 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.isLoading.logs\"></ng-include>\n" +
5440 "\n" +
5440 "\n" +
5441 "<div ng-if=\"$ctrl.isLoading.logs === false\">\n" +
5441 "<div ng-if=\"$ctrl.isLoading.logs === false\">\n" +
5442 "\n" +
5442 "\n" +
5443 " <p class=\"search-params\">\n" +
5443 " <p class=\"search-params\">\n" +
5444 " <strong>Search params:</strong>\n" +
5444 " <strong>Search params:</strong>\n" +
5445 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
5445 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
5446 " <strong>{{tag.type}}</strong>\n" +
5446 " <strong>{{tag.type}}</strong>\n" +
5447 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
5447 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
5448 "\n" +
5448 "\n" +
5449 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5449 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5450 " </span>\n" +
5450 " </span>\n" +
5451 " </p>\n" +
5451 " </p>\n" +
5452 "\n" +
5452 "\n" +
5453 " <p>\n" +
5453 " <p>\n" +
5454 "\n" +
5454 "\n" +
5455 " <script type=\"text/ng-template\" id=\"SearchTypeAheadUrl.html\">\n" +
5455 " <script type=\"text/ng-template\" id=\"SearchTypeAheadUrl.html\">\n" +
5456 "\n" +
5456 "\n" +
5457 " </script>\n" +
5457 " </script>\n" +
5458 "\n" +
5458 "\n" +
5459 " <form class=\"form\">\n" +
5459 " <form class=\"form\">\n" +
5460 " <div class=\"typeahead-tags\">\n" +
5460 " <div class=\"typeahead-tags\">\n" +
5461 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter logs for events, filter by servers, namespaces, levels.\"\n" +
5461 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter logs for events, filter by servers, namespaces, levels.\"\n" +
5462 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5462 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5463 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:$ctrl.aheadFilter\"\n" +
5463 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:$ctrl.aheadFilter\"\n" +
5464 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5464 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5465 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
5465 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
5466 " </div>\n" +
5466 " </div>\n" +
5467 " </form>\n" +
5467 " </form>\n" +
5468 "\n" +
5468 "\n" +
5469 " <div class=\"well animate-show position-absolute increse-zindex\" ng-if=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\">\n" +
5469 " <div class=\"well animate-show position-absolute increse-zindex\" ng-if=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\">\n" +
5470 " <uib-datepicker></uib-datepicker>\n" +
5470 " <uib-datepicker></uib-datepicker>\n" +
5471 " </div>\n" +
5471 " </div>\n" +
5472 "\n" +
5472 "\n" +
5473 " </p>\n" +
5473 " </p>\n" +
5474 "\n" +
5474 "\n" +
5475 " <div class=\"panel\">\n" +
5475 " <div class=\"panel\">\n" +
5476 "\n" +
5476 "\n" +
5477 " <div class=\"panel-body\">\n" +
5477 " <div class=\"panel-body\">\n" +
5478 " <c3chart data-domid=\"log_events_chart\" data-data=\"$ctrl.logEventsChartData\" data-config=\"$ctrl.logEventsChartConfig\">\n" +
5478 " <c3chart data-domid=\"log_events_chart\" data-data=\"$ctrl.logEventsChartData\" data-config=\"$ctrl.logEventsChartConfig\">\n" +
5479 " </c3chart>\n" +
5479 " </c3chart>\n" +
5480 " </div>\n" +
5480 " </div>\n" +
5481 " </div>\n" +
5481 " </div>\n" +
5482 "\n" +
5482 "\n" +
5483 "\n" +
5483 "\n" +
5484 " <div class=\"text-center\">\n" +
5484 " <div class=\"text-center\">\n" +
5485 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5485 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5486 " ng-change=\"$ctrl.paginationChange()\"\n" +
5486 " ng-change=\"$ctrl.paginationChange()\"\n" +
5487 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5487 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5488 " </div>\n" +
5488 " </div>\n" +
5489 "\n" +
5489 "\n" +
5490 " <div class=\"panel panel-default\">\n" +
5490 " <div class=\"panel panel-default\">\n" +
5491 "\n" +
5491 "\n" +
5492 " <table class=\"table table-striped log-list\">\n" +
5492 " <table class=\"table table-striped log-list\">\n" +
5493 " <caption>Logs</caption>\n" +
5493 " <caption>Logs</caption>\n" +
5494 " <thead>\n" +
5494 " <thead>\n" +
5495 " <tr>\n" +
5495 " <tr>\n" +
5496 " <th class=\"c1 resource\">Application</th>\n" +
5496 " <th class=\"c1 resource\">Application</th>\n" +
5497 " <th class=\"c2 message\">Message</th>\n" +
5497 " <th class=\"c2 message\">Message</th>\n" +
5498 " <th class=\"c3 when\">When</th>\n" +
5498 " <th class=\"c3 when\">When</th>\n" +
5499 " </tr>\n" +
5499 " </tr>\n" +
5500 " </thead>\n" +
5500 " </thead>\n" +
5501 " <tbody>\n" +
5501 " <tbody>\n" +
5502 " <tr ng-repeat=\"log in $ctrl.logsPage track by log.log_id\" class=\"{{$odd ? 'odd' : 'even'}}\">\n" +
5502 " <tr ng-repeat=\"log in $ctrl.logsPage track by log.log_id\" class=\"{{$odd ? 'odd' : 'even'}}\">\n" +
5503 " <td class=\"c1\">\n" +
5503 " <td class=\"c1\">\n" +
5504 " <a class=\"tag application\" ng-click=\"$ctrl.addSearchTag({type:'resource', value:log.resource_id})\">\n" +
5504 " <a class=\"tag application\" ng-click=\"$ctrl.addSearchTag({type:'resource', value:log.resource_id})\">\n" +
5505 " <span class=\"name\">{{log.resource_name}}</span></a>\n" +
5505 " <span class=\"name\">{{log.resource_name}}</span></a>\n" +
5506 " </td>\n" +
5506 " </td>\n" +
5507 " <td class=\"c2\">\n" +
5507 " <td class=\"c2\">\n" +
5508 " <a class=\"tag {{log.log_level|lowercase}}\" ng-click=\"$ctrl.addSearchTag({type:'level', value:log.log_level})\">\n" +
5508 " <a class=\"tag {{log.log_level|lowercase}}\" ng-click=\"$ctrl.addSearchTag({type:'level', value:log.log_level})\">\n" +
5509 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5509 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5510 " <a class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:'namespace', value:log.namespace})\">\n" +
5510 " <a class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:'namespace', value:log.namespace})\">\n" +
5511 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5511 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5512 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:tag, value:value})\">\n" +
5512 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:tag, value:value})\">\n" +
5513 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5513 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5514 " <div class=\"log\">{{log.message}}</div>\n" +
5514 " <div class=\"log\">{{log.message}}</div>\n" +
5515 " </td>\n" +
5515 " </td>\n" +
5516 " <td class=\"c3 when\">\n" +
5516 " <td class=\"c3 when\">\n" +
5517 " <a ng-click=\"$ctrl.filterId(log)\" data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5517 " <a ng-click=\"$ctrl.filterId(log)\" data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5518 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5518 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5519 " </a>\n" +
5519 " </a>\n" +
5520 " </td>\n" +
5520 " </td>\n" +
5521 " </tr>\n" +
5521 " </tr>\n" +
5522 "\n" +
5522 "\n" +
5523 " </tbody>\n" +
5523 " </tbody>\n" +
5524 " </table>\n" +
5524 " </table>\n" +
5525 "\n" +
5525 "\n" +
5526 " </div>\n" +
5526 " </div>\n" +
5527 "\n" +
5527 "\n" +
5528 " <div class=\"text-center\">\n" +
5528 " <div class=\"text-center\">\n" +
5529 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5529 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5530 " ng-change=\"$ctrl.paginationChange()\"\n" +
5530 " ng-change=\"$ctrl.paginationChange()\"\n" +
5531 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5531 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5532 " </div>\n" +
5532 " </div>\n" +
5533 "\n" +
5533 "\n" +
5534 "</div>\n"
5534 "</div>\n"
5535 );
5535 );
5536
5536
5537
5537
5538 $templateCache.put('components/views/report-view/report-view.html',
5538 $templateCache.put('components/views/report-view/report-view.html',
5539 "<script type=\"text/ng-template\" id=\"slow_call.html\">\n" +
5539 "<script type=\"text/ng-template\" id=\"slow_call.html\">\n" +
5540 " <table class=\"report-table\">\n" +
5540 " <table class=\"report-table\">\n" +
5541 " <tr>\n" +
5541 " <tr>\n" +
5542 " <td class=\"table-label\">Type</td>\n" +
5542 " <td class=\"table-label\">Type</td>\n" +
5543 " <td class=\"data\"><strong>{{call.type}}\n" +
5543 " <td class=\"data\"><strong>{{call.type}}\n" +
5544 " ({{call.subtype}})\n" +
5544 " ({{call.subtype}})\n" +
5545 " </strong></td>\n" +
5545 " </strong></td>\n" +
5546 " </tr>\n" +
5546 " </tr>\n" +
5547 " <tr>\n" +
5547 " <tr>\n" +
5548 " <td class=\"table-label\">Duration</td>\n" +
5548 " <td class=\"table-label\">Duration</td>\n" +
5549 " <td class=\"data\"><strong class=\"textColor_1\">{{call.duration}}</strong></td>\n" +
5549 " <td class=\"data\"><strong class=\"textColor_1\">{{call.duration}}</strong></td>\n" +
5550 " </tr>\n" +
5550 " </tr>\n" +
5551 " <tr>\n" +
5551 " <tr>\n" +
5552 " <td class=\"table-label\">Start Time</td>\n" +
5552 " <td class=\"table-label\">Start Time</td>\n" +
5553 " <td class=\"data\">{{call.timestamp}}</td>\n" +
5553 " <td class=\"data\">{{call.timestamp}}</td>\n" +
5554 " </tr>\n" +
5554 " </tr>\n" +
5555 " <tr>\n" +
5555 " <tr>\n" +
5556 " <td class=\"table-label\">Statement</td>\n" +
5556 " <td class=\"table-label\">Statement</td>\n" +
5557 " <td class=\"data\">\n" +
5557 " <td class=\"data\">\n" +
5558 " <pre class=\"word-wrap\">{{call.statement}}</pre>\n" +
5558 " <pre class=\"word-wrap\">{{call.statement}}</pre>\n" +
5559 " </td>\n" +
5559 " </td>\n" +
5560 " </tr>\n" +
5560 " </tr>\n" +
5561 " <tr ng-if=\"call.location\">\n" +
5561 " <tr ng-if=\"call.location\">\n" +
5562 " <td class=\"table-label\">Location</td>\n" +
5562 " <td class=\"table-label\">Location</td>\n" +
5563 " <td class=\"data\">{{call.location}}</td>\n" +
5563 " <td class=\"data\">{{call.location}}</td>\n" +
5564 " </tr>\n" +
5564 " </tr>\n" +
5565 " <tr>\n" +
5565 " <tr>\n" +
5566 " <td class=\"table-label\">Parameters</td>\n" +
5566 " <td class=\"table-label\">Parameters</td>\n" +
5567 " <td class=\"\">\n" +
5567 " <td class=\"\">\n" +
5568 " <div class=\"var-listing\" human-format vars=\"call.parameters\"></div>\n" +
5568 " <div class=\"var-listing\" human-format vars=\"call.parameters\"></div>\n" +
5569 " </td>\n" +
5569 " </td>\n" +
5570 " </tr>\n" +
5570 " </tr>\n" +
5571 " </table>\n" +
5571 " </table>\n" +
5572 "\n" +
5572 "\n" +
5573 " <div ng-if=\"call.children.length > 0\" class=\"subcalls p-l-8\">\n" +
5573 " <div ng-if=\"call.children.length > 0\" class=\"subcalls p-l-8\">\n" +
5574 "\n" +
5574 "\n" +
5575 " <p><strong>\n" +
5575 " <p><strong>\n" +
5576 " <small>Sub-calls</small>\n" +
5576 " <small>Sub-calls</small>\n" +
5577 " </strong></p>\n" +
5577 " </strong></p>\n" +
5578 "\n" +
5578 "\n" +
5579 " <div class=\"panel panel-default\">\n" +
5579 " <div class=\"panel panel-default\">\n" +
5580 " <div ng-repeat=\"call in call.children\" ng-include=\"'slow_call.html'\" class=\"panel-body\"/>\n" +
5580 " <div ng-repeat=\"call in call.children\" ng-include=\"'slow_call.html'\" class=\"panel-body\"/>\n" +
5581 " </div>\n" +
5581 " </div>\n" +
5582 " </div>\n" +
5582 " </div>\n" +
5583 " </div>\n" +
5583 " </div>\n" +
5584 "\n" +
5584 "\n" +
5585 "</script>\n" +
5585 "</script>\n" +
5586 "\n" +
5586 "\n" +
5587 "<script type=\"text/ng-template\" id=\"AssignReportCtrl.html\">\n" +
5587 "<script type=\"text/ng-template\" id=\"AssignReportCtrl.html\">\n" +
5588 "\n" +
5588 "\n" +
5589 " <div class=\"modal-header\">\n" +
5589 " <div class=\"modal-header\">\n" +
5590 " <h3>Assign users to report</h3>\n" +
5590 " <h3>Assign users to report</h3>\n" +
5591 " </div>\n" +
5591 " </div>\n" +
5592 " <div class=\"modal-body\">\n" +
5592 " <div class=\"modal-body\">\n" +
5593 "\n" +
5593 "\n" +
5594 " <ng-include src=\"'templates/loader.html'\" ng-if=\"ctrl.loading\"></ng-include>\n" +
5594 " <ng-include src=\"'templates/loader.html'\" ng-if=\"ctrl.loading\"></ng-include>\n" +
5595 "\n" +
5595 "\n" +
5596 " <div class=\"row\" ng-if=\"!ctrl.loading\">\n" +
5596 " <div class=\"row\" ng-if=\"!ctrl.loading\">\n" +
5597 " <div class=\"col-sm-6\">\n" +
5597 " <div class=\"col-sm-6\">\n" +
5598 " <strong>Unassigned</strong>\n" +
5598 " <strong>Unassigned</strong>\n" +
5599 "\n" +
5599 "\n" +
5600 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.unAssignedUsers\"\n" +
5600 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.unAssignedUsers\"\n" +
5601 " ng-click=\"ctrl.reassignUser(user)\">\n" +
5601 " ng-click=\"ctrl.reassignUser(user)\">\n" +
5602 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5602 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5603 " <strong>{{user.user_name}}</strong><br/>\n" +
5603 " <strong>{{user.user_name}}</strong><br/>\n" +
5604 " {{user.name}}\n" +
5604 " {{user.name}}\n" +
5605 " <div class=\"clear\"></div>\n" +
5605 " <div class=\"clear\"></div>\n" +
5606 " </div>\n" +
5606 " </div>\n" +
5607 " </div>\n" +
5607 " </div>\n" +
5608 "\n" +
5608 "\n" +
5609 " <div class=\"col-sm-6\">\n" +
5609 " <div class=\"col-sm-6\">\n" +
5610 " <strong>Assigned</strong>\n" +
5610 " <strong>Assigned</strong>\n" +
5611 "\n" +
5611 "\n" +
5612 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.assignedUsers\" ng-click=\"ctrl.reassignUser(user)\">\n" +
5612 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.assignedUsers\" ng-click=\"ctrl.reassignUser(user)\">\n" +
5613 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5613 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5614 " {{user.user_name}}<br/>\n" +
5614 " {{user.user_name}}<br/>\n" +
5615 " {{user.name}}\n" +
5615 " {{user.name}}\n" +
5616 " <div class=\"clear\"></div>\n" +
5616 " <div class=\"clear\"></div>\n" +
5617 " </div>\n" +
5617 " </div>\n" +
5618 " </div>\n" +
5618 " </div>\n" +
5619 " </div>\n" +
5619 " </div>\n" +
5620 " </div>\n" +
5620 " </div>\n" +
5621 " <div class=\"modal-footer\">\n" +
5621 " <div class=\"modal-footer\">\n" +
5622 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">OK</button>\n" +
5622 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">OK</button>\n" +
5623 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
5623 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
5624 " </div>\n" +
5624 " </div>\n" +
5625 "</script>\n" +
5625 "</script>\n" +
5626 "\n" +
5626 "\n" +
5627 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading.report\"></ng-include>\n" +
5627 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading.report\"></ng-include>\n" +
5628 "\n" +
5628 "\n" +
5629 "<div ng-if=\"!$ctrl.is_loading.report && $ctrl.report === null\">\n" +
5629 "<div ng-if=\"!$ctrl.is_loading.report && $ctrl.report === null\">\n" +
5630 " <strong>OOPS something went wrong :(</strong>\n" +
5630 " <strong>OOPS something went wrong :(</strong>\n" +
5631 "</div>\n" +
5631 "</div>\n" +
5632 "\n" +
5632 "\n" +
5633 "<div ng-if=\"$ctrl.report !== null && !$ctrl.is_loading.report\">\n" +
5633 "<div ng-if=\"$ctrl.report !== null && !$ctrl.is_loading.report\">\n" +
5634 "\n" +
5634 "\n" +
5635 " <div ng-if=\"$ctrl.stateHolder.AeUser.id\" class=\"row\">\n" +
5635 " <div ng-if=\"$ctrl.stateHolder.AeUser.id\" class=\"row\">\n" +
5636 " <div class=\"col-lg-12\">\n" +
5636 " <div class=\"col-lg-12\">\n" +
5637 " <a onclick=\"window.history.back()\" class=\"btn btn-default\" ng-if=\"$ctrl.window.history.length > 2\"><span class=\"fa fa-arrow-circle-o-left\"></span>\n" +
5637 " <a onclick=\"window.history.back()\" class=\"btn btn-default\" ng-if=\"$ctrl.window.history.length > 2\"><span class=\"fa fa-arrow-circle-o-left\"></span>\n" +
5638 " Go back</a>\n" +
5638 " Go back</a>\n" +
5639 " <a class=\"btn btn-default\" ng-click=\"$ctrl.assignUsersModal()\" ng-if=\"$ctrl.reportType == 'report'\"><span\n" +
5639 " <a class=\"btn btn-default\" ng-click=\"$ctrl.assignUsersModal()\" ng-if=\"$ctrl.reportType == 'report'\"><span\n" +
5640 " class=\"fa fa-flag\"></span> Assign report\n" +
5640 " class=\"fa fa-flag\"></span> Assign report\n" +
5641 " to user</a>\n" +
5641 " to user</a>\n" +
5642 "\n" +
5642 "\n" +
5643 " <a class=\"btn {{ $ctrl.report.group.fixed ? 'btn-success' : 'btn-default'}}\" ng-click=\"$ctrl.markFixed()\"\n" +
5643 " <a class=\"btn {{ $ctrl.report.group.fixed ? 'btn-success' : 'btn-default'}}\" ng-click=\"$ctrl.markFixed()\"\n" +
5644 " ng-if=\"$ctrl.reportType == 'report'\">\n" +
5644 " ng-if=\"$ctrl.reportType == 'report'\">\n" +
5645 " <span class=\"fa fa-check\"></span> Mark fixed</a>\n" +
5645 " <span class=\"fa fa-check\"></span> Mark fixed</a>\n" +
5646 "\n" +
5646 "\n" +
5647 " <span class=\"dropdown\" ng-if=\"$ctrl.report.application.integrations.length\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5647 " <span class=\"dropdown\" ng-if=\"$ctrl.report.application.integrations.length\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5648 " <a class=\"dropdown-toggle btn btn-default\" data-uib-dropdown-toggle>\n" +
5648 " <a class=\"dropdown-toggle btn btn-default\" data-uib-dropdown-toggle>\n" +
5649 " <span class=\"fa fa-send\"></span> Integrations\n" +
5649 " <span class=\"fa fa-send\"></span> Integrations\n" +
5650 " </a>\n" +
5650 " </a>\n" +
5651 " <ul class=\"dropdown-menu\">\n" +
5651 " <ul class=\"dropdown-menu\">\n" +
5652 " <li ng-repeat=\"choice in $ctrl.report.application.integrations\">\n" +
5652 " <li ng-repeat=\"choice in $ctrl.report.application.integrations\">\n" +
5653 " <a ng-click=\"$ctrl.runIntegration(choice.name)\">{{choice.action}}</a>\n" +
5653 " <a ng-click=\"$ctrl.runIntegration(choice.name)\">{{choice.action}}</a>\n" +
5654 " </li>\n" +
5654 " </li>\n" +
5655 " </ul>\n" +
5655 " </ul>\n" +
5656 " </span>\n" +
5656 " </span>\n" +
5657 "\n" +
5657 "\n" +
5658 " <a class=\"btn btn-default\" ng-click=\"$ctrl.markPublic()\">Make {{$ctrl.group.public ? 'private' : 'public'}}</a>\n" +
5658 " <a class=\"btn btn-default\" ng-click=\"$ctrl.markPublic()\">Make {{$ctrl.group.public ? 'private' : 'public'}}</a>\n" +
5659 "\n" +
5659 "\n" +
5660 "<span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5660 "<span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5661 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Delete</a>\n" +
5661 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Delete</a>\n" +
5662 " <ul class=\"dropdown-menu\">\n" +
5662 " <ul class=\"dropdown-menu\">\n" +
5663 " <li><a>No</a></li>\n" +
5663 " <li><a>No</a></li>\n" +
5664 " <li><a ng-click=\"$ctrl.delete()\">Yes</a></li>\n" +
5664 " <li><a ng-click=\"$ctrl.delete()\">Yes</a></li>\n" +
5665 " </ul>\n" +
5665 " </ul>\n" +
5666 "</span>\n" +
5666 "</span>\n" +
5667 " </div>\n" +
5667 " </div>\n" +
5668 " </div>\n" +
5668 " </div>\n" +
5669 "\n" +
5669 "\n" +
5670 " <div class=\"row\">\n" +
5670 " <div class=\"row\">\n" +
5671 " <div class=\"col-lg-4\">\n" +
5671 " <div class=\"col-lg-4\">\n" +
5672 "\n" +
5672 "\n" +
5673 " <div class=\"panel panel-default m-t-1\">\n" +
5673 " <div class=\"panel panel-default m-t-1\">\n" +
5674 " <div class=\"panel-body\">\n" +
5674 " <div class=\"panel-body\">\n" +
5675 "\n" +
5675 "\n" +
5676 " <h3 class=\"m-t-0\">Report Information</h3>\n" +
5676 " <h3 class=\"m-t-0\">Report Information</h3>\n" +
5677 "\n" +
5677 "\n" +
5678 " <table class=\"report-table with-ellipsis\">\n" +
5678 " <table class=\"report-table with-ellipsis\">\n" +
5679 " <tr>\n" +
5679 " <tr>\n" +
5680 " <td class=\"table-label\">Occurences</td>\n" +
5680 " <td class=\"table-label\">Occurences</td>\n" +
5681 " <td class=\"data\">{{$ctrl.report.group.occurences}}</td>\n" +
5681 " <td class=\"data\">{{$ctrl.report.group.occurences}}</td>\n" +
5682 " </tr>\n" +
5682 " </tr>\n" +
5683 " <tr ng-if=\"$ctrl.report.http_status\">\n" +
5683 " <tr ng-if=\"$ctrl.report.http_status\">\n" +
5684 " <td class=\"table-label\">HTTP status</td>\n" +
5684 " <td class=\"table-label\">HTTP status</td>\n" +
5685 " <td class=\"data\">{{$ctrl.report.http_status}}</td>\n" +
5685 " <td class=\"data\">{{$ctrl.report.http_status}}</td>\n" +
5686 " </tr>\n" +
5686 " </tr>\n" +
5687 " <tr ng-if=\"$ctrl.report.group.priority\">\n" +
5687 " <tr ng-if=\"$ctrl.report.group.priority\">\n" +
5688 " <td class=\"table-label\">Priority</td>\n" +
5688 " <td class=\"table-label\">Priority</td>\n" +
5689 " <td class=\"data\">{{$ctrl.report.group.priority}}</td>\n" +
5689 " <td class=\"data\">{{$ctrl.report.group.priority}}</td>\n" +
5690 " </tr>\n" +
5690 " </tr>\n" +
5691 " <tr ng-if=\"$ctrl.report.group.public\">\n" +
5691 " <tr ng-if=\"$ctrl.report.group.public\">\n" +
5692 " <td class=\"table-label\">Public URL</td>\n" +
5692 " <td class=\"table-label\">Public URL</td>\n" +
5693 " <td class=\"data\">\n" +
5693 " <td class=\"data\">\n" +
5694 " <form>\n" +
5694 " <form>\n" +
5695 " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{$ctrl.$state.href($ctrl.$state.current.name, $ctrl.$state.params, {absolute: true})}}</textarea>\n" +
5695 " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{$ctrl.$state.href($ctrl.$state.current.name, $ctrl.$state.params, {absolute: true})}}</textarea>\n" +
5696 " </form>\n" +
5696 " </form>\n" +
5697 " </td>\n" +
5697 " </td>\n" +
5698 " </tr>\n" +
5698 " </tr>\n" +
5699 " <tr data-uib-tooltip=\"{{$ctrl.report.url}}\">\n" +
5699 " <tr data-uib-tooltip=\"{{$ctrl.report.url}}\">\n" +
5700 " <td class=\"table-label\">URL</td>\n" +
5700 " <td class=\"table-label\">URL</td>\n" +
5701 " <td class=\"data ellipsis\"><a href=\"{{$ctrl.report.url}}\">{{$ctrl.report.url}}</a></td>\n" +
5701 " <td class=\"data ellipsis\"><a href=\"{{$ctrl.report.url}}\">{{$ctrl.report.url}}</a></td>\n" +
5702 " </tr>\n" +
5702 " </tr>\n" +
5703 "\n" +
5703 "\n" +
5704 " <tr ng-if=\"$ctrl.report.ip\">\n" +
5704 " <tr ng-if=\"$ctrl.report.ip\">\n" +
5705 " <td class=\"table-label\">Remote IP</td>\n" +
5705 " <td class=\"table-label\">Remote IP</td>\n" +
5706 " <td class=\"data\">{{$ctrl.report.ip}}</td>\n" +
5706 " <td class=\"data\">{{$ctrl.report.ip}}</td>\n" +
5707 " </tr>\n" +
5707 " </tr>\n" +
5708 " <tr ng-if=\"$ctrl.report.user_agent\" data-uib-tooltip=\"{{$ctrl.report.user_agent}}\">\n" +
5708 " <tr ng-if=\"$ctrl.report.user_agent\" data-uib-tooltip=\"{{$ctrl.report.user_agent}}\">\n" +
5709 " <td class=\"table-label\">User Agent</td>\n" +
5709 " <td class=\"table-label\">User Agent</td>\n" +
5710 " <td class=\"data ellipsis\">{{$ctrl.report.user_agent}}</td>\n" +
5710 " <td class=\"data ellipsis\">{{$ctrl.report.user_agent}}</td>\n" +
5711 " </tr>\n" +
5711 " </tr>\n" +
5712 " <tr ng-if=\"$ctrl.report.message\">\n" +
5712 " <tr ng-if=\"$ctrl.report.message\">\n" +
5713 " <td class=\"table-label\">Message</td>\n" +
5713 " <td class=\"table-label\">Message</td>\n" +
5714 " <td class=\"data\">{{$ctrl.report.message}}</td>\n" +
5714 " <td class=\"data\">{{$ctrl.report.message}}</td>\n" +
5715 " </tr>\n" +
5715 " </tr>\n" +
5716 " <tr ng-if=\"$ctrl.report.duration > 0\">\n" +
5716 " <tr ng-if=\"$ctrl.report.duration > 0\">\n" +
5717 " <td class=\"table-label\">Duration</td>\n" +
5717 " <td class=\"table-label\">Duration</td>\n" +
5718 " <td class=\"data\">\n" +
5718 " <td class=\"data\">\n" +
5719 " <span>{{$ctrl.report.duration}}s</span>\n" +
5719 " <span>{{$ctrl.report.duration}}s</span>\n" +
5720 " </td>\n" +
5720 " </td>\n" +
5721 " </tr>\n" +
5721 " </tr>\n" +
5722 " <tr>\n" +
5722 " <tr>\n" +
5723 " <td class=\"table-label\">First occured</td>\n" +
5723 " <td class=\"table-label\">First occured</td>\n" +
5724 " <td class=\"data\">\n" +
5724 " <td class=\"data\">\n" +
5725 " <span uib-tooltip=\"{{$ctrl.report.group.first_timestamp}}\"><iso-to-relative-time\n" +
5725 " <span uib-tooltip=\"{{$ctrl.report.group.first_timestamp}}\"><iso-to-relative-time\n" +
5726 " time=\"{{$ctrl.report.group.first_timestamp}}\"/></span>\n" +
5726 " time=\"{{$ctrl.report.group.first_timestamp}}\"/></span>\n" +
5727 " </td>\n" +
5727 " </td>\n" +
5728 " </tr>\n" +
5728 " </tr>\n" +
5729 " <tr>\n" +
5729 " <tr>\n" +
5730 " <td class=\"table-label\">Last occured</td>\n" +
5730 " <td class=\"table-label\">Last occured</td>\n" +
5731 " <td class=\"data\">\n" +
5731 " <td class=\"data\">\n" +
5732 " <span uib-tooltip=\"{{$ctrl.report.group.last_timestamp}}\"><iso-to-relative-time\n" +
5732 " <span uib-tooltip=\"{{$ctrl.report.group.last_timestamp}}\"><iso-to-relative-time\n" +
5733 " time=\"{{$ctrl.report.group.last_timestamp}}\"/></span>\n" +
5733 " time=\"{{$ctrl.report.group.last_timestamp}}\"/></span>\n" +
5734 " </td>\n" +
5734 " </td>\n" +
5735 " </tr>\n" +
5735 " </tr>\n" +
5736 " </table>\n" +
5736 " </table>\n" +
5737 "\n" +
5737 "\n" +
5738 " <div ng-if=\"$ctrl.requestStats\">\n" +
5738 " <div ng-if=\"$ctrl.requestStats\">\n" +
5739 " <h3>Performance stats</h3>\n" +
5739 " <h3>Performance stats</h3>\n" +
5740 "\n" +
5740 "\n" +
5741 " <div class=\"perf_stats\">\n" +
5741 " <div class=\"perf_stats\">\n" +
5742 " <span class=\"stat\" ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5742 " <span class=\"stat\" ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5743 " ng-if=\"stat.calls > 0 || stat.value > 0\"><strong>\n" +
5743 " ng-if=\"stat.calls > 0 || stat.value > 0\"><strong>\n" +
5744 " <span class=\"{{stat.name}} bar\" style=\"width:10px\"></span> {{stat.calls}}\n" +
5744 " <span class=\"{{stat.name}} bar\" style=\"width:10px\"></span> {{stat.calls}}\n" +
5745 " <span ng-if=\"stat.name!='main'\"><small>{{stat.name}} calls</small></span>\n" +
5745 " <span ng-if=\"stat.name!='main'\"><small>{{stat.name}} calls</small></span>\n" +
5746 " <span ng-if=\"stat.name=='main'\">\n" +
5746 " <span ng-if=\"stat.name=='main'\">\n" +
5747 " <span class=\"fa fa-question-circle\"\n" +
5747 " <span class=\"fa fa-question-circle\"\n" +
5748 " data-uib-tooltip=\"Execution time that didnt get assigned to other layers\"></span> Other</span>\n" +
5748 " data-uib-tooltip=\"Execution time that didnt get assigned to other layers\"></span> Other</span>\n" +
5749 " </strong>\n" +
5749 " </strong>\n" +
5750 " </span>\n" +
5750 " </span>\n" +
5751 "\n" +
5751 "\n" +
5752 " <div style=\"width: 100%; overflow:hidden\">\n" +
5752 " <div style=\"width: 100%; overflow:hidden\">\n" +
5753 " <div class=\"{{stat.name}} bar\" style=\"width:{{stat.percent}}%; height: 25px\"\n" +
5753 " <div class=\"{{stat.name}} bar\" style=\"width:{{stat.percent}}%; height: 25px\"\n" +
5754 " ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5754 " ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5755 " data-uib-tooltip=\"{{stat.value}}s - Cumulative time spent in this request on all {{ stat.name }} calls\"></div>\n" +
5755 " data-uib-tooltip=\"{{stat.value}}s - Cumulative time spent in this request on all {{ stat.name }} calls\"></div>\n" +
5756 " <div class=\"row\">\n" +
5756 " <div class=\"row\">\n" +
5757 " <div class=\"col-xs-6 text-left\">\n" +
5757 " <div class=\"col-xs-6 text-left\">\n" +
5758 " <small>0s</small>\n" +
5758 " <small>0s</small>\n" +
5759 " </div>\n" +
5759 " </div>\n" +
5760 " <div class=\"col-xs-6 text-right\">\n" +
5760 " <div class=\"col-xs-6 text-right\">\n" +
5761 " <small>{{$ctrl.report.duration.toFixed(3)}}s</small>\n" +
5761 " <small>{{$ctrl.report.duration.toFixed(3)}}s</small>\n" +
5762 " </div>\n" +
5762 " </div>\n" +
5763 " </div>\n" +
5763 " </div>\n" +
5764 " </div>\n" +
5764 " </div>\n" +
5765 " </div>\n" +
5765 " </div>\n" +
5766 " </div>\n" +
5766 " </div>\n" +
5767 "\n" +
5767 "\n" +
5768 " <h3>Tags</h3>\n" +
5768 " <h3>Tags</h3>\n" +
5769 "\n" +
5769 "\n" +
5770 " <table class=\"report-table with-tags\">\n" +
5770 " <table class=\"report-table with-tags\">\n" +
5771 " <tr ng-repeat=\"(tag, value) in $ctrl.report.tags\">\n" +
5771 " <tr ng-repeat=\"(tag, value) in $ctrl.report.tags\">\n" +
5772 " <td class=\"table-label\" ng-switch=\"tag\"><!--\n" +
5772 " <td class=\"table-label\" ng-switch=\"tag\"><!--\n" +
5773 " --><span ng-switch-when=\"user_name\">Username/UID</span><!--\n" +
5773 " --><span ng-switch-when=\"user_name\">Username/UID</span><!--\n" +
5774 " --><span ng-switch-when=\"view_name\">View Name</span><!--\n" +
5774 " --><span ng-switch-when=\"view_name\">View Name</span><!--\n" +
5775 " --><span ng-switch-when=\"server_name\">Server Name</span><!--\n" +
5775 " --><span ng-switch-when=\"server_name\">Server Name</span><!--\n" +
5776 " --><span ng-switch-default>{{ tag }}</span>\n" +
5776 " --><span ng-switch-default>{{ tag }}</span>\n" +
5777 " </td>\n" +
5777 " </td>\n" +
5778 " <td class=\"data\"><a ng-click=\"$ctrl.searchTag(tag, value)\">{{ value }}</td>\n" +
5778 " <td class=\"data\"><a ng-click=\"$ctrl.searchTag(tag, value)\">{{ value }}</td>\n" +
5779 " </tr>\n" +
5779 " </tr>\n" +
5780 " </table>\n" +
5780 " </table>\n" +
5781 "\n" +
5781 "\n" +
5782 " </div>\n" +
5782 " </div>\n" +
5783 " </div>\n" +
5783 " </div>\n" +
5784 "\n" +
5784 "\n" +
5785 "\n" +
5785 "\n" +
5786 " </div>\n" +
5786 " </div>\n" +
5787 " <div class=\"col-lg-8\">\n" +
5787 " <div class=\"col-lg-8\">\n" +
5788 " <div class=\"frames\">\n" +
5788 " <div class=\"frames\">\n" +
5789 " <p class=\"text-center\">Report history</p>\n" +
5789 " <p class=\"text-center\">Report history</p>\n" +
5790 "\n" +
5790 "\n" +
5791 " <div class=\"panel\" ng-if=\"!$ctrl.is_loading.history\">\n" +
5791 " <div class=\"panel\" ng-if=\"!$ctrl.is_loading.history\">\n" +
5792 " <div class=\"panel-body\">\n" +
5792 " <div class=\"panel-body\">\n" +
5793 " <c3chart data-domid=\"report_history_chart\" data-data=\"$ctrl.reportHistoryData\" data-config=\"$ctrl.reportHistoryConfig\">\n" +
5793 " <c3chart data-domid=\"report_history_chart\" data-data=\"$ctrl.reportHistoryData\" data-config=\"$ctrl.reportHistoryConfig\">\n" +
5794 " </c3chart>\n" +
5794 " </c3chart>\n" +
5795 " </div>\n" +
5795 " </div>\n" +
5796 " </div>\n" +
5796 " </div>\n" +
5797 "\n" +
5797 "\n" +
5798 " <div class=\"row m-b-1\">\n" +
5798 " <div class=\"row m-b-1\">\n" +
5799 " <div class=\"col-sm-2 text-left\">\n" +
5799 " <div class=\"col-sm-2 text-left\">\n" +
5800 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.previous_report ? '' : 'disabled'}}\"\n" +
5800 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.previous_report ? '' : 'disabled'}}\"\n" +
5801 " ng-click=\"$ctrl.previousDetail()\">\n" +
5801 " ng-click=\"$ctrl.previousDetail()\">\n" +
5802 " <span class=\"fa fa-arrow-left\"></span>\n" +
5802 " <span class=\"fa fa-arrow-left\"></span>\n" +
5803 " Prev. detail</a>\n" +
5803 " Prev. detail</a>\n" +
5804 "\n" +
5804 "\n" +
5805 " </div>\n" +
5805 " </div>\n" +
5806 " <div class=\"col-sm-8 text-center\">\n" +
5806 " <div class=\"col-sm-8 text-center\">\n" +
5807 " <small>\n" +
5807 " <small>\n" +
5808 " <span uib-tooltip=\"{{$ctrl.report.start_time|isoToRelativeTime}}\" class=\"m-r-1\">\n" +
5808 " <span uib-tooltip=\"{{$ctrl.report.start_time|isoToRelativeTime}}\" class=\"m-r-1\">\n" +
5809 " {{$ctrl.report.start_time.replace('T', ' ')}} UTC</span>\n" +
5809 " {{$ctrl.report.start_time.replace('T', ' ')}} UTC</span>\n" +
5810 " <span class=\"text-muted\">ID: {{$ctrl.report.request_id}}</span>\n" +
5810 " <span class=\"text-muted\">ID: {{$ctrl.report.request_id}}</span>\n" +
5811 " </small>\n" +
5811 " </small>\n" +
5812 " </div>\n" +
5812 " </div>\n" +
5813 " <div class=\"col-sm-2 text-right\">\n" +
5813 " <div class=\"col-sm-2 text-right\">\n" +
5814 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.next_report ? '' : 'disabled'}}\"\n" +
5814 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.next_report ? '' : 'disabled'}}\"\n" +
5815 " ng-click=\"$ctrl.nextDetail()\">\n" +
5815 " ng-click=\"$ctrl.nextDetail()\">\n" +
5816 " Next detail <span class=\"fa fa-arrow-right\"></span></a>\n" +
5816 " Next detail <span class=\"fa fa-arrow-right\"></span></a>\n" +
5817 " </div>\n" +
5817 " </div>\n" +
5818 " </div>\n" +
5818 " </div>\n" +
5819 "\n" +
5819 "\n" +
5820 " <h3 class=\"word-wrap\">{{$ctrl.report.error}}</h3>\n" +
5820 " <h3 class=\"word-wrap\">{{$ctrl.report.error}}</h3>\n" +
5821 "\n" +
5821 "\n" +
5822 " <div ng-if=\"$ctrl.report.traceback\">\n" +
5822 " <div ng-if=\"$ctrl.report.traceback\">\n" +
5823 "\n" +
5823 "\n" +
5824 " <h3><strong>Traceback</strong></h3>\n" +
5824 " <h3><strong>Traceback</strong></h3>\n" +
5825 "\n" +
5825 "\n" +
5826 " <div class=\"btn-group\">\n" +
5826 " <div class=\"btn-group\">\n" +
5827 " <a ng-if=\"$ctrl.traceback.length-10 > 0 \" ng-click=\"$ctrl.showLong = !$ctrl.showLong\"\n" +
5827 " <a ng-if=\"$ctrl.traceback.length-10 > 0 \" ng-click=\"$ctrl.showLong = !$ctrl.showLong\"\n" +
5828 " class=\"btn btn-default {{$ctrl.showLong ? 'active' : ''}}\">\n" +
5828 " class=\"btn btn-default {{$ctrl.showLong ? 'active' : ''}}\">\n" +
5829 " <span class=\"fa fa-align-left\"></span>\n" +
5829 " <span class=\"fa fa-align-left\"></span>\n" +
5830 " <small>Show {{$ctrl.traceback.length-10}} remaining frames</small>\n" +
5830 " <small>Show {{$ctrl.traceback.length-10}} remaining frames</small>\n" +
5831 " </a>\n" +
5831 " </a>\n" +
5832 "\n" +
5832 "\n" +
5833 " <a class=\"btn btn-default {{$ctrl.showRaw ? 'active' : ''}}\" ng-click=\"$ctrl.showRaw = !$ctrl.showRaw\">\n" +
5833 " <a class=\"btn btn-default {{$ctrl.showRaw ? 'active' : ''}}\" ng-click=\"$ctrl.showRaw = !$ctrl.showRaw\">\n" +
5834 " <span class=\"fa fa-list\"></span>\n" +
5834 " <span class=\"fa fa-list\"></span>\n" +
5835 " <small>Raw version</small>\n" +
5835 " <small>Raw version</small>\n" +
5836 " </a>\n" +
5836 " </a>\n" +
5837 " </div>\n" +
5837 " </div>\n" +
5838 "\n" +
5838 "\n" +
5839 " <div ng-if=\"$ctrl.showRaw\" class=\"m-t-1\">\n" +
5839 " <div ng-if=\"$ctrl.showRaw\" class=\"m-t-1\">\n" +
5840 " <pre>{{$ctrl.rawTraceback}}</pre>\n" +
5840 " <pre>{{$ctrl.rawTraceback}}</pre>\n" +
5841 " </div>\n" +
5841 " </div>\n" +
5842 " <div ng-if=\"!$ctrl.showRaw\" class=\"m-t-1\">\n" +
5842 " <div ng-if=\"!$ctrl.showRaw\" class=\"m-t-1\">\n" +
5843 "\n" +
5843 "\n" +
5844 " <div ng-repeat=\"frame in $ctrl.traceback\" class=\"frame {{$odd ? 'odd' : 'even'}}\"\n" +
5844 " <div ng-repeat=\"frame in $ctrl.traceback\" class=\"frame {{$odd ? 'odd' : 'even'}}\"\n" +
5845 " ng-if=\"$index >= $ctrl.traceback.length-10 || $ctrl.traceback.length <= 10 || $ctrl.showLong\">\n" +
5845 " ng-if=\"$index >= $ctrl.traceback.length-10 || $ctrl.traceback.length <= 10 || $ctrl.showLong\">\n" +
5846 " <div class=\"frameline\" ng-if=\"frame.line\">\n" +
5846 " <div class=\"frameline\" ng-if=\"frame.line\">\n" +
5847 " <a class=\"inspect_vars\" ng-click=\"frame.showVars = !frame.showVars\" ng-if=\"frame.vars\">\n" +
5847 " <a class=\"inspect_vars\" ng-click=\"frame.showVars = !frame.showVars\" ng-if=\"frame.vars\">\n" +
5848 " <span class=\"fa fa-search dim btn btn-default\"\n" +
5848 " <span class=\"fa fa-search dim btn btn-default\"\n" +
5849 " uib-tooltip=\"Show local vars\"> </span>\n" +
5849 " uib-tooltip=\"Show local vars\"> </span>\n" +
5850 " </a>\n" +
5850 " </a>\n" +
5851 "\n" +
5851 "\n" +
5852 " <span class=\"no-vars\" ng-if=\"frame.vars.length == 0\"></span>\n" +
5852 " <span class=\"no-vars\" ng-if=\"frame.vars.length == 0\"></span>\n" +
5853 "\n" +
5853 "\n" +
5854 " <span ng-if=\"frame.file\">\n" +
5854 " <span ng-if=\"frame.file\">\n" +
5855 " <span class=\"mono\">File</span> <span class=\"file mono\">{{frame.file || 'Unknown file'}}</span>,\n" +
5855 " <span class=\"mono\">File</span> <span class=\"file mono\">{{frame.file || 'Unknown file'}}</span>,\n" +
5856 " </span>\n" +
5856 " </span>\n" +
5857 " <span ng-if=\"frame.module && !frame.file\">\n" +
5857 " <span ng-if=\"frame.module && !frame.file\">\n" +
5858 " <span class=\"mono\">Module</span> <span class=\"file mono\">{{frame.module || 'Unknown module'}}</span>,\n" +
5858 " <span class=\"mono\">Module</span> <span class=\"file mono\">{{frame.module || 'Unknown module'}}</span>,\n" +
5859 " </span>\n" +
5859 " </span>\n" +
5860 " <span class=\"mono\">line</span> <span class=\"line mono\">{{frame.line || 'Unknown line'}}</span>\n" +
5860 " <span class=\"mono\">line</span> <span class=\"line mono\">{{frame.line || 'Unknown line'}}</span>\n" +
5861 "\n" +
5861 "\n" +
5862 " <span ng-if=\"frame.fn\"><span class=\"mono\">in</span> <strong\n" +
5862 " <span ng-if=\"frame.fn\"><span class=\"mono\">in</span> <strong\n" +
5863 " class=\"fn mono\">{{frame.fn || 'Unknown function'}}</strong></span>\n" +
5863 " class=\"fn mono\">{{frame.fn || 'Unknown function'}}</strong></span>\n" +
5864 "\n" +
5864 "\n" +
5865 " </div>\n" +
5865 " </div>\n" +
5866 " <div class=\"cline mono\" ng-if=\"frame.cline\">{{frame.cline || 'Unknown context'}}</div>\n" +
5866 " <div class=\"cline mono\" ng-if=\"frame.cline\">{{frame.cline || 'Unknown context'}}</div>\n" +
5867 "\n" +
5867 "\n" +
5868 " <div class=\"vars\" ng-if=\"frame.showVars\">\n" +
5868 " <div class=\"vars\" ng-if=\"frame.showVars\">\n" +
5869 " <table class=\"var-listing small\">\n" +
5869 " <table class=\"var-listing small\">\n" +
5870 " <tr ng-repeat=\"fvar in frame.vars track by $index\" class=\"frame {{$odd ? 'odd' : 'even'}}\">\n" +
5870 " <tr ng-repeat=\"fvar in frame.vars track by $index\" class=\"frame {{$odd ? 'odd' : 'even'}}\">\n" +
5871 " <td class=\"var-label\">{{ fvar[0] }}</td>\n" +
5871 " <td class=\"var-label\">{{ fvar[0] }}</td>\n" +
5872 " <td>\n" +
5872 " <td>\n" +
5873 " <span human-format vars=\"fvar[1]\"></span>\n" +
5873 " <span human-format vars=\"fvar[1]\"></span>\n" +
5874 " </td>\n" +
5874 " </td>\n" +
5875 " </tr>\n" +
5875 " </tr>\n" +
5876 " </table>\n" +
5876 " </table>\n" +
5877 "\n" +
5877 "\n" +
5878 " </div>\n" +
5878 " </div>\n" +
5879 " </div>\n" +
5879 " </div>\n" +
5880 " </div>\n" +
5880 " </div>\n" +
5881 "\n" +
5881 "\n" +
5882 "\n" +
5882 "\n" +
5883 " </div>\n" +
5883 " </div>\n" +
5884 "\n" +
5884 "\n" +
5885 "\n" +
5885 "\n" +
5886 " <uib-tabset>\n" +
5886 " <uib-tabset>\n" +
5887 " <uib-tab select=\"$ctrl.selectedTab('slow_calls')\" active=\"$ctrl.tabs.slow_calls\">\n" +
5887 " <uib-tab select=\"$ctrl.selectedTab('slow_calls')\" active=\"$ctrl.tabs.slow_calls\">\n" +
5888 " <uib-tab-heading>\n" +
5888 " <uib-tab-heading>\n" +
5889 " Slow Calls\n" +
5889 " Slow Calls\n" +
5890 " </uib-tab-heading>\n" +
5890 " </uib-tab-heading>\n" +
5891 "\n" +
5891 "\n" +
5892 " <h3><strong>Slow Calls</strong></h3>\n" +
5892 " <h3><strong>Slow Calls</strong></h3>\n" +
5893 "\n" +
5893 "\n" +
5894 " <div ng-if=\"$ctrl.report.slow_calls.length > 0\">\n" +
5894 " <div ng-if=\"$ctrl.report.slow_calls.length > 0\">\n" +
5895 " <div ng-repeat=\"call in $ctrl.report.slow_calls\" ng-include=\"'slow_call.html'\"></div>\n" +
5895 " <div ng-repeat=\"call in $ctrl.report.slow_calls\" ng-include=\"'slow_call.html'\"></div>\n" +
5896 " </div>\n" +
5896 " </div>\n" +
5897 "\n" +
5897 "\n" +
5898 " <div ng-if=\"$ctrl.report.slow_calls.length == 0\">\n" +
5898 " <div ng-if=\"$ctrl.report.slow_calls.length == 0\">\n" +
5899 " No slow calls reported\n" +
5899 " No slow calls reported\n" +
5900 " </div>\n" +
5900 " </div>\n" +
5901 "\n" +
5901 "\n" +
5902 " </uib-tab>\n" +
5902 " </uib-tab>\n" +
5903 "\n" +
5903 "\n" +
5904 "\n" +
5904 "\n" +
5905 " <uib-tab select=\"$ctrl.selectedTab('request_details')\" active=\"$ctrl.tabs.request_details\">\n" +
5905 " <uib-tab select=\"$ctrl.selectedTab('request_details')\" active=\"$ctrl.tabs.request_details\">\n" +
5906 " <uib-tab-heading>\n" +
5906 " <uib-tab-heading>\n" +
5907 " Request details\n" +
5907 " Request details\n" +
5908 " </uib-tab-heading>\n" +
5908 " </uib-tab-heading>\n" +
5909 "\n" +
5909 "\n" +
5910 " <h3><strong>Extra</strong></h3>\n" +
5910 " <h3><strong>Extra</strong></h3>\n" +
5911 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.extra\"></div>\n" +
5911 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.extra\"></div>\n" +
5912 " <h3><strong>Request details</strong></h3>\n" +
5912 " <h3><strong>Request details</strong></h3>\n" +
5913 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.request\"></div>\n" +
5913 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.request\"></div>\n" +
5914 "\n" +
5914 "\n" +
5915 " </uib-tab>\n" +
5915 " </uib-tab>\n" +
5916 "\n" +
5916 "\n" +
5917 " <uib-tab select=\"$ctrl.selectedTab('logs')\" active=\"$ctrl.tabs.logs\">\n" +
5917 " <uib-tab select=\"$ctrl.selectedTab('logs')\" active=\"$ctrl.tabs.logs\">\n" +
5918 " <uib-tab-heading>\n" +
5918 " <uib-tab-heading>\n" +
5919 " Logs\n" +
5919 " Logs\n" +
5920 " </uib-tab-heading>\n" +
5920 " </uib-tab-heading>\n" +
5921 "\n" +
5921 "\n" +
5922 " <div ng-if=\"$ctrl.is_loading.logs!=false\" class=\"text-center\">\n" +
5922 " <div ng-if=\"$ctrl.is_loading.logs!=false\" class=\"text-center\">\n" +
5923 " <span class=\"fa fa-cog fa-spin fa-3x loader\"></span>\n" +
5923 " <span class=\"fa fa-cog fa-spin fa-3x loader\"></span>\n" +
5924 " </div>\n" +
5924 " </div>\n" +
5925 " <p ng-if=\"$ctrl.reportLogs.length == 0\"> No logs found</p>\n" +
5925 " <p ng-if=\"$ctrl.reportLogs.length == 0\"> No logs found</p>\n" +
5926 "\n" +
5926 "\n" +
5927 " <table class=\"table table-striped log-list\" ng-if=\"$ctrl.reportLogs.length > 0\">\n" +
5927 " <table class=\"table table-striped log-list\" ng-if=\"$ctrl.reportLogs.length > 0\">\n" +
5928 "\n" +
5928 "\n" +
5929 " <caption>Logs</caption>\n" +
5929 " <caption>Logs</caption>\n" +
5930 " <thead>\n" +
5930 " <thead>\n" +
5931 " <tr>\n" +
5931 " <tr>\n" +
5932 " <th class=\"message\">Message</th>\n" +
5932 " <th class=\"message\">Message</th>\n" +
5933 " <th class=\"when\">When</th>\n" +
5933 " <th class=\"when\">When</th>\n" +
5934 " </tr>\n" +
5934 " </tr>\n" +
5935 " </thead>\n" +
5935 " </thead>\n" +
5936 " <tbody>\n" +
5936 " <tbody>\n" +
5937 " <tr ng-repeat=\"log in $ctrl.reportLogs track by log.log_id\">\n" +
5937 " <tr ng-repeat=\"log in $ctrl.reportLogs track by log.log_id\">\n" +
5938 " <td>\n" +
5938 " <td>\n" +
5939 " <a class=\"tag {{log.log_level|lowercase}}\">\n" +
5939 " <a class=\"tag {{log.log_level|lowercase}}\">\n" +
5940 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5940 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5941 " <a class=\"tag\">\n" +
5941 " <a class=\"tag\">\n" +
5942 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5942 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5943 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\">\n" +
5943 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\">\n" +
5944 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5944 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5945 " <div class=\"log\">\n" +
5945 " <div class=\"log\">\n" +
5946 " {{log.message}}\n" +
5946 " {{log.message}}\n" +
5947 " </div>\n" +
5947 " </div>\n" +
5948 " </td>\n" +
5948 " </td>\n" +
5949 " <td class=\"when\">\n" +
5949 " <td class=\"when\">\n" +
5950 " <a data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5950 " <a data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5951 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5951 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5952 " </a>\n" +
5952 " </a>\n" +
5953 " </td>\n" +
5953 " </td>\n" +
5954 " </tr>\n" +
5954 " </tr>\n" +
5955 "\n" +
5955 "\n" +
5956 " </tbody>\n" +
5956 " </tbody>\n" +
5957 " </table>\n" +
5957 " </table>\n" +
5958 "\n" +
5958 "\n" +
5959 " </uib-tab>\n" +
5959 " </uib-tab>\n" +
5960 "\n" +
5960 "\n" +
5961 "\n" +
5961 "\n" +
5962 " <uib-tab select=\"$ctrl.selectedTab('comments')\" active=\"$ctrl.tabs.comments\">\n" +
5962 " <uib-tab select=\"$ctrl.selectedTab('comments')\" active=\"$ctrl.tabs.comments\">\n" +
5963 " <uib-tab-heading>\n" +
5963 " <uib-tab-heading>\n" +
5964 " Comments\n" +
5964 " Comments\n" +
5965 " <span class=\"label label-info\">{{$ctrl.report.comments.length}}</span>\n" +
5965 " <span class=\"label label-info\">{{$ctrl.report.comments.length}}</span>\n" +
5966 "\n" +
5966 "\n" +
5967 " </uib-tab-heading>\n" +
5967 " </uib-tab-heading>\n" +
5968 "\n" +
5968 "\n" +
5969 " <h3><strong>Comments</strong></h3>\n" +
5969 " <h3><strong>Comments</strong></h3>\n" +
5970 "\n" +
5970 "\n" +
5971 " <p ng-if=\"$ctrl.report.comments.length == 0\">No comments yet - be first to add one!</p>\n" +
5971 " <p ng-if=\"$ctrl.report.comments.length == 0\">No comments yet - be first to add one!</p>\n" +
5972 "\n" +
5972 "\n" +
5973 " <div class=\"comment\" ng-repeat=\"comment in $ctrl.report.comments\">\n" +
5973 " <div class=\"comment\" ng-repeat=\"comment in $ctrl.report.comments\">\n" +
5974 " <p name=\"comment-{{comment.comment_id}}\"><span class=\"fa fa-comment\"></span>\n" +
5974 " <p name=\"comment-{{comment.comment_id}}\"><span class=\"fa fa-comment\"></span>\n" +
5975 " <strong>{{comment.user_name}}</strong>\n" +
5975 " <strong>{{comment.user_name}}</strong>\n" +
5976 " <iso-to-relative-time time=\"{{comment.created_timestamp}}\"/>\n" +
5976 " <iso-to-relative-time time=\"{{comment.created_timestamp}}\"/>\n" +
5977 " </p>\n" +
5977 " </p>\n" +
5978 " <p class=\"well\">{{comment.body}}</p>\n" +
5978 " <p class=\"well\">{{comment.body}}</p>\n" +
5979 " </div>\n" +
5979 " </div>\n" +
5980 "\n" +
5980 "\n" +
5981 " <form name=\"commentForm\" ng-submit=\"$ctrl.addComment()\">\n" +
5981 " <form name=\"commentForm\" ng-submit=\"$ctrl.addComment()\">\n" +
5982 " <div class=\"form-group\">\n" +
5982 " <div class=\"form-group\">\n" +
5983 " <textarea type=\"text\" class=\"form-control\" id=\"$ctrl.commentForm\" ng-model=\"$ctrl.comment\" required\n" +
5983 " <textarea type=\"text\" class=\"form-control\" id=\"$ctrl.commentForm\" ng-model=\"$ctrl.comment\" required\n" +
5984 " mentio mentio-search=\"$ctrl.searchMentionedPeople(term)\" mentio-items=\"$ctrl.mentionedPeople| filter:label:typedTerm\" class=\"form-control\"></textarea>\n" +
5984 " mentio mentio-search=\"$ctrl.searchMentionedPeople(term)\" mentio-items=\"$ctrl.mentionedPeople| filter:label:typedTerm\" class=\"form-control\"></textarea>\n" +
5985 "\n" +
5985 "\n" +
5986 " </div>\n" +
5986 " </div>\n" +
5987 " <div class=\"form-group\">\n" +
5987 " <div class=\"form-group\">\n" +
5988 " <button class=\"btn btn-info\" ng-disabled=\"$ctrl.commentForm.$invalid\">Comment</button>\n" +
5988 " <button class=\"btn btn-info\" ng-disabled=\"$ctrl.commentForm.$invalid\">Comment</button>\n" +
5989 " </div>\n" +
5989 " </div>\n" +
5990 " </form>\n" +
5990 " </form>\n" +
5991 "\n" +
5991 "\n" +
5992 " <div ng-repeat=\"comment in $ctrl.report.comments\" class=\"{{$odd ? 'odd' : 'even'}}\" class=\"repeat-animate\">\n" +
5992 " <div ng-repeat=\"comment in $ctrl.report.comments\" class=\"{{$odd ? 'odd' : 'even'}}\" class=\"repeat-animate\">\n" +
5993 " </div>\n" +
5993 " </div>\n" +
5994 "\n" +
5994 "\n" +
5995 " </uib-tab>\n" +
5995 " </uib-tab>\n" +
5996 "\n" +
5996 "\n" +
5997 " <uib-tab select=\"$ctrl.selectedTab('affected_users')\" active=\"$ctrl.tabs.affected_users\">\n" +
5997 " <uib-tab select=\"$ctrl.selectedTab('affected_users')\" active=\"$ctrl.tabs.affected_users\">\n" +
5998 " <uib-tab-heading>\n" +
5998 " <uib-tab-heading>\n" +
5999 " Affected users\n" +
5999 " Affected users\n" +
6000 " <span class=\"label label-warning\">{{$ctrl.report.affected_users_count}}</span>\n" +
6000 " <span class=\"label label-warning\">{{$ctrl.report.affected_users_count}}</span>\n" +
6001 "\n" +
6001 "\n" +
6002 " </uib-tab-heading>\n" +
6002 " </uib-tab-heading>\n" +
6003 "\n" +
6003 "\n" +
6004 " <h3><strong>50 most affected users ID's by this issue:</strong></h3>\n" +
6004 " <h3><strong>50 most affected users ID's by this issue:</strong></h3>\n" +
6005 " <ul class=\"affected-user-list\">\n" +
6005 " <ul class=\"affected-user-list\">\n" +
6006 " <li ng-repeat=\"user in $ctrl.report.top_affected_users\">\n" +
6006 " <li ng-repeat=\"user in $ctrl.report.top_affected_users\">\n" +
6007 " <strong>{{user.username}}</strong> <span class=\"badge\" uib-tooltip=\"occurences\">{{user.count}}</span>\n" +
6007 " <strong>{{user.username}}</strong> <span class=\"badge\" uib-tooltip=\"occurences\">{{user.count}}</span>\n" +
6008 " </li>\n" +
6008 " </li>\n" +
6009 " </ul>\n" +
6009 " </ul>\n" +
6010 "\n" +
6010 "\n" +
6011 " </uib-tab>\n" +
6011 " </uib-tab>\n" +
6012 "\n" +
6012 "\n" +
6013 " </uib-tabset>\n" +
6013 " </uib-tabset>\n" +
6014 "\n" +
6014 "\n" +
6015 "\n" +
6015 "\n" +
6016 " </div>\n" +
6016 " </div>\n" +
6017 "\n" +
6017 "\n" +
6018 " </div>\n" +
6018 " </div>\n" +
6019 " </div>\n" +
6019 " </div>\n" +
6020 "</div>\n"
6020 "</div>\n"
6021 );
6021 );
6022
6022
6023
6023
6024 $templateCache.put('components/views/reports-browser-view/reports-browser-view.html',
6024 $templateCache.put('components/views/reports-browser-view/reports-browser-view.html',
6025 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6025 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6026 "\n" +
6026 "\n" +
6027 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6027 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6028 "\n" +
6028 "\n" +
6029 " <p class=\"search-params\">\n" +
6029 " <p class=\"search-params\">\n" +
6030 " <strong>Search params:</strong>\n" +
6030 " <strong>Search params:</strong>\n" +
6031 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6031 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6032 " <strong>{{tag.type}}</strong>\n" +
6032 " <strong>{{tag.type}}</strong>\n" +
6033 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6033 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6034 "\n" +
6034 "\n" +
6035 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6035 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6036 " </span>\n" +
6036 " </span>\n" +
6037 " </p>\n" +
6037 " </p>\n" +
6038 "\n" +
6038 "\n" +
6039 " <form class=\"form\">\n" +
6039 " <form class=\"form\">\n" +
6040 " <div class=\"typeahead-tags\">\n" +
6040 " <div class=\"typeahead-tags\">\n" +
6041 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter reports - filter by tags, exception, priority or other properties.\"\n" +
6041 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter reports - filter by tags, exception, priority or other properties.\"\n" +
6042 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6042 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6043 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6043 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6044 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6044 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6045 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6045 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6046 " </div>\n" +
6046 " </div>\n" +
6047 " </form>\n" +
6047 " </form>\n" +
6048 "\n" +
6048 "\n" +
6049 "\n" +
6049 "\n" +
6050 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6050 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6051 " class=\"animate-show\">\n" +
6051 " class=\"animate-show\">\n" +
6052 " <uib-datepicker></uib-datepicker>\n" +
6052 " <uib-datepicker></uib-datepicker>\n" +
6053 " </div>\n" +
6053 " </div>\n" +
6054 "\n" +
6054 "\n" +
6055 " </p>\n" +
6055 " </p>\n" +
6056 "\n" +
6056 "\n" +
6057 "\n" +
6057 "\n" +
6058 " <div class=\"text-center\">\n" +
6058 " <div class=\"text-center\">\n" +
6059 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6059 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6060 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6060 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6061 " ng-change=\"$ctrl.paginationChange()\"\n" +
6061 " ng-change=\"$ctrl.paginationChange()\"\n" +
6062 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6062 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6063 " </div>\n" +
6063 " </div>\n" +
6064 "\n" +
6064 "\n" +
6065 " <div class=\"panel panel-default\">\n" +
6065 " <div class=\"panel panel-default\">\n" +
6066 " <!-- Default panel contents -->\n" +
6066 " <!-- Default panel contents -->\n" +
6067 "\n" +
6067 "\n" +
6068 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6068 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6069 " <caption>Reports</caption>\n" +
6069 " <caption>Reports</caption>\n" +
6070 " <thead>\n" +
6070 " <thead>\n" +
6071 " <tr>\n" +
6071 " <tr>\n" +
6072 " <th class=\"c1 ordering occurences\">#</th>\n" +
6072 " <th class=\"c1 ordering occurences\">#</th>\n" +
6073 " <th class=\"c2 application\">Application</th>\n" +
6073 " <th class=\"c2 application\">Application</th>\n" +
6074 " <th class=\"c4 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6074 " <th class=\"c4 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6075 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6075 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6076 " title=\"Tick to see UTC time instead relative\"></th>\n" +
6076 " title=\"Tick to see UTC time instead relative\"></th>\n" +
6077 " <th class=\"c5 error_type\">Error</th>\n" +
6077 " <th class=\"c5 error_type\">Error</th>\n" +
6078 " </tr>\n" +
6078 " </tr>\n" +
6079 " </thead>\n" +
6079 " </thead>\n" +
6080 " <tbody>\n" +
6080 " <tbody>\n" +
6081 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6081 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6082 " <td class=\"c1 occurences\">\n" +
6082 " <td class=\"c1 occurences\">\n" +
6083 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6083 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6084 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6084 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6085 " {{report.group.occurences|numberToThousands}}\n" +
6085 " {{report.group.occurences|numberToThousands}}\n" +
6086 " </span>\n" +
6086 " </span>\n" +
6087 " </td>\n" +
6087 " </td>\n" +
6088 " <td class=\"c2 application\">\n" +
6088 " <td class=\"c2 application\">\n" +
6089 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6089 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6090 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6090 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6091 " <td class=\"c3 when\">\n" +
6091 " <td class=\"c3 when\">\n" +
6092 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6092 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6093 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6093 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6094 " </span>\n" +
6094 " </span>\n" +
6095 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6095 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6096 " </td>\n" +
6096 " </td>\n" +
6097 " <td class=\"c4 report ellipsis\"><a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\" title=\"{{report.error}}\">{{report.error || 'Unknown Exception'}}</a> <br/>\n" +
6097 " <td class=\"c4 report ellipsis\"><a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\" title=\"{{report.error}}\">{{report.error || 'Unknown Exception'}}</a> <br/>\n" +
6098 " <span class=\"url\">{{ report.tags.view_name || report.url_path}}</td>\n" +
6098 " <span class=\"url\">{{ report.tags.view_name || report.url_path}}</td>\n" +
6099 " </tr>\n" +
6099 " </tr>\n" +
6100 "\n" +
6100 "\n" +
6101 " </tbody>\n" +
6101 " </tbody>\n" +
6102 " </table>\n" +
6102 " </table>\n" +
6103 " </div>\n" +
6103 " </div>\n" +
6104 "\n" +
6104 "\n" +
6105 "\n" +
6105 "\n" +
6106 " <div class=\"text-center\">\n" +
6106 " <div class=\"text-center\">\n" +
6107 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6107 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6108 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6108 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6109 " ng-change=\"$ctrl.paginationChange()\"\n" +
6109 " ng-change=\"$ctrl.paginationChange()\"\n" +
6110 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6110 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6111 " </div>\n" +
6111 " </div>\n" +
6112 "\n" +
6112 "\n" +
6113 "</div>\n"
6113 "</div>\n"
6114 );
6114 );
6115
6115
6116
6116
6117 $templateCache.put('components/views/reports-slow-browser-view/reports-slow-browser-view.html',
6117 $templateCache.put('components/views/reports-slow-browser-view/reports-slow-browser-view.html',
6118 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6118 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6119 "\n" +
6119 "\n" +
6120 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6120 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6121 "\n" +
6121 "\n" +
6122 " <p class=\"search-params\">\n" +
6122 " <p class=\"search-params\">\n" +
6123 " <strong>Search params:</strong>\n" +
6123 " <strong>Search params:</strong>\n" +
6124 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6124 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6125 " <strong>{{tag.type}}</strong>\n" +
6125 " <strong>{{tag.type}}</strong>\n" +
6126 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6126 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6127 "\n" +
6127 "\n" +
6128 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6128 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6129 " </span>\n" +
6129 " </span>\n" +
6130 " </p>\n" +
6130 " </p>\n" +
6131 "\n" +
6131 "\n" +
6132 " <p>\n" +
6132 " <p>\n" +
6133 "\n" +
6133 "\n" +
6134 " <form class=\"form\">\n" +
6134 " <form class=\"form\">\n" +
6135 " <div class=\"typeahead-tags\">\n" +
6135 " <div class=\"typeahead-tags\">\n" +
6136 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter slowness reports - filter by tags, average response time, priority or other properties.\"\n" +
6136 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter slowness reports - filter by tags, average response time, priority or other properties.\"\n" +
6137 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6137 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6138 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6138 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6139 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6139 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6140 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6140 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6141 " </div>\n" +
6141 " </div>\n" +
6142 " </form>\n" +
6142 " </form>\n" +
6143 "\n" +
6143 "\n" +
6144 "\n" +
6144 "\n" +
6145 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6145 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6146 " class=\"animate-show\">\n" +
6146 " class=\"animate-show\">\n" +
6147 " <uib-datepicker></uib-datepicker>\n" +
6147 " <uib-datepicker></uib-datepicker>\n" +
6148 " </div>\n" +
6148 " </div>\n" +
6149 "\n" +
6149 "\n" +
6150 " </p>\n" +
6150 " </p>\n" +
6151 "\n" +
6151 "\n" +
6152 "\n" +
6152 "\n" +
6153 " <div class=\"text-center\">\n" +
6153 " <div class=\"text-center\">\n" +
6154 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6154 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6155 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6155 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6156 " ng-change=\"$ctrl.paginationChange()\"\n" +
6156 " ng-change=\"$ctrl.paginationChange()\"\n" +
6157 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6157 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6158 " </div>\n" +
6158 " </div>\n" +
6159 "\n" +
6159 "\n" +
6160 "\n" +
6160 "\n" +
6161 " <div class=\"panel panel-default\">\n" +
6161 " <div class=\"panel panel-default\">\n" +
6162 " <!-- Default panel contents -->\n" +
6162 " <!-- Default panel contents -->\n" +
6163 "\n" +
6163 "\n" +
6164 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6164 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6165 " <caption>Slow Request Reports</caption>\n" +
6165 " <caption>Slow Request Reports</caption>\n" +
6166 " <thead>\n" +
6166 " <thead>\n" +
6167 " <tr>\n" +
6167 " <tr>\n" +
6168 " <td class=\"c1 ordering occurences\">#</td>\n" +
6168 " <td class=\"c1 ordering occurences\">#</td>\n" +
6169 " <td class=\"c2 average_duration\">Avg. duration</td>\n" +
6169 " <td class=\"c2 average_duration\">Avg. duration</td>\n" +
6170 " <td class=\"c3 application\">Application</td>\n" +
6170 " <td class=\"c3 application\">Application</td>\n" +
6171 " <td class=\"c5 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6171 " <td class=\"c5 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6172 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6172 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6173 " title=\"Tick to see UTC time instead relative\"></td>\n" +
6173 " title=\"Tick to see UTC time instead relative\"></td>\n" +
6174 " <td class=\"c6 error_type\">Location</td>\n" +
6174 " <td class=\"c6 error_type\">Location</td>\n" +
6175 " </tr>\n" +
6175 " </tr>\n" +
6176 " </thead>\n" +
6176 " </thead>\n" +
6177 " <tbody>\n" +
6177 " <tbody>\n" +
6178 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6178 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6179 " <td class=\"c1 occurences\">\n" +
6179 " <td class=\"c1 occurences\">\n" +
6180 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6180 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6181 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6181 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6182 " {{report.group.occurences|numberToThousands}}\n" +
6182 " {{report.group.occurences|numberToThousands}}\n" +
6183 " </span>\n" +
6183 " </span>\n" +
6184 " </td>\n" +
6184 " </td>\n" +
6185 " <td class=\"c2 average_duration\">{{report.group.average_duration.toFixed(3)}}s</td>\n" +
6185 " <td class=\"c2 average_duration\">{{report.group.average_duration.toFixed(3)}}s</td>\n" +
6186 " <td class=\"c3 application\">\n" +
6186 " <td class=\"c3 application\">\n" +
6187 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6187 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6188 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6188 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6189 " <td class=\"c4 when\">\n" +
6189 " <td class=\"c4 when\">\n" +
6190 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6190 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6191 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6191 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6192 " </span>\n" +
6192 " </span>\n" +
6193 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6193 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6194 " </td>\n" +
6194 " </td>\n" +
6195 " <td class=\"c5 report ellipsis\">\n" +
6195 " <td class=\"c5 report ellipsis\">\n" +
6196 " <a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\">{{ report.tags.view_name || report.url_path}} </span></a></td>\n" +
6196 " <a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\">{{ report.tags.view_name || report.url_path}} </span></a></td>\n" +
6197 " </td>\n" +
6197 " </td>\n" +
6198 " </tr>\n" +
6198 " </tr>\n" +
6199 "\n" +
6199 "\n" +
6200 " </tbody>\n" +
6200 " </tbody>\n" +
6201 " </table>\n" +
6201 " </table>\n" +
6202 "\n" +
6202 "\n" +
6203 " </div>\n" +
6203 " </div>\n" +
6204 "\n" +
6204 "\n" +
6205 " <div class=\"text-center\">\n" +
6205 " <div class=\"text-center\">\n" +
6206 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6206 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6207 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6207 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6208 " ng-change=\"$ctrl.paginationChange()\"\n" +
6208 " ng-change=\"$ctrl.paginationChange()\"\n" +
6209 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6209 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6210 " </div>\n" +
6210 " </div>\n" +
6211 "\n" +
6211 "\n" +
6212 "</div>\n"
6212 "</div>\n"
6213 );
6213 );
6214
6214
6215
6215
6216 $templateCache.put('components/views/settings-view/settings-view.html',
6216 $templateCache.put('components/views/settings-view/settings-view.html',
6217 "<div class=\"row\">\n" +
6217 "<div class=\"row\">\n" +
6218 " <div class=\"col-sm-3\" id=\"menu\">\n" +
6218 " <div class=\"col-sm-3\" id=\"menu\">\n" +
6219 " <div class=\"panel panel-default\">\n" +
6219 " <div class=\"panel panel-default\">\n" +
6220 " <div class=\"panel-heading\">Applications</div>\n" +
6220 " <div class=\"panel-heading\">Applications</div>\n" +
6221 " <ul class=\"list-group\">\n" +
6221 " <ul class=\"list-group\">\n" +
6222 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.list\"><span class=\"fa fa-cog\"></span> List applications</a></li>\n" +
6222 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.list\"><span class=\"fa fa-cog\"></span> List applications</a></li>\n" +
6223 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.update({resourceId:'new'})\"><span class=\"fa fa-plus-circle\"></span> Create application</a></li>\n" +
6223 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.update({resourceId:'new'})\"><span class=\"fa fa-plus-circle\"></span> Create application</a></li>\n" +
6224 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.purge_logs\"><span class=\"fa fa-trash-o\"></span> Purge logs</a></li>\n" +
6224 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.purge_logs\"><span class=\"fa fa-trash-o\"></span> Purge logs</a></li>\n" +
6225 " </ul>\n" +
6225 " </ul>\n" +
6226 "\n" +
6226 "\n" +
6227 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuApplicationsItems.length\">\n" +
6227 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuApplicationsItems.length\">\n" +
6228 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuApplicationsItems\">\n" +
6228 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuApplicationsItems\">\n" +
6229 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6229 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6230 " </li>\n" +
6230 " </li>\n" +
6231 " </ul>\n" +
6231 " </ul>\n" +
6232 "\n" +
6232 "\n" +
6233 " </div>\n" +
6233 " </div>\n" +
6234 "\n" +
6234 "\n" +
6235 "\n" +
6235 "\n" +
6236 " <div class=\"panel panel-default\">\n" +
6236 " <div class=\"panel panel-default\">\n" +
6237 " <div class=\"panel-heading\">Settings</div>\n" +
6237 " <div class=\"panel-heading\">Settings</div>\n" +
6238 " <ul class=\"list-group\">\n" +
6238 " <ul class=\"list-group\">\n" +
6239 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.edit\"><span class=\"fa fa-user\"></span> Profile details</a></li>\n" +
6239 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.edit\"><span class=\"fa fa-user\"></span> Profile details</a></li>\n" +
6240 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.password\"><span class=\"fa fa-lock\"></span> Change Password</a></li>\n" +
6240 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.password\"><span class=\"fa fa-lock\"></span> Change Password</a></li>\n" +
6241 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.identities\"><span class=\"fa fa-link\"></span> External Identities</a></li>\n" +
6241 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.identities\"><span class=\"fa fa-link\"></span> External Identities</a></li>\n" +
6242 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.auth_tokens\"><span class=\"fa fa-unlock\"></span> Auth Tokens</a></li>\n" +
6242 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.auth_tokens\"><span class=\"fa fa-unlock\"></span> Auth Tokens</a></li>\n" +
6243 " </ul>\n" +
6243 " </ul>\n" +
6244 "\n" +
6244 "\n" +
6245 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuUserSettingsItems.length\">\n" +
6245 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuUserSettingsItems.length\">\n" +
6246 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuUserSettingsItems\">\n" +
6246 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuUserSettingsItems\">\n" +
6247 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6247 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6248 " </li>\n" +
6248 " </li>\n" +
6249 " </ul>\n" +
6249 " </ul>\n" +
6250 "\n" +
6250 "\n" +
6251 " </div>\n" +
6251 " </div>\n" +
6252 "\n" +
6252 "\n" +
6253 " <div class=\"panel panel-default\">\n" +
6253 " <div class=\"panel panel-default\">\n" +
6254 " <div class=\"panel-heading\">Notifications</div>\n" +
6254 " <div class=\"panel-heading\">Notifications</div>\n" +
6255 " <ul class=\"list-group\">\n" +
6255 " <ul class=\"list-group\">\n" +
6256 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.list\"><span class=\"fa fa-bullhorn\"></span> Alert channels</a></li>\n" +
6256 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.list\"><span class=\"fa fa-bullhorn\"></span> Alert channels</a></li>\n" +
6257 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.email\"><span class=\"fa fa-envelope\"></span> Add email channel</a></li>\n" +
6257 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.email\"><span class=\"fa fa-envelope\"></span> Add email channel</a></li>\n" +
6258 " </ul>\n" +
6258 " </ul>\n" +
6259 "\n" +
6259 "\n" +
6260 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuNotificationsItems.length\">\n" +
6260 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuNotificationsItems.length\">\n" +
6261 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuNotificationsItems\">\n" +
6261 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuNotificationsItems\">\n" +
6262 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6262 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6263 " </li>\n" +
6263 " </li>\n" +
6264 " </ul>\n" +
6264 " </ul>\n" +
6265 "\n" +
6265 "\n" +
6266 " </div>\n" +
6266 " </div>\n" +
6267 "\n" +
6267 "\n" +
6268 " </div>\n" +
6268 " </div>\n" +
6269 "\n" +
6269 "\n" +
6270 " <div class=\"col-sm-9\" ui-view></div>\n" +
6270 " <div class=\"col-sm-9\" ui-view></div>\n" +
6271 "</div>\n"
6271 "</div>\n"
6272 );
6272 );
6273
6273
6274
6274
6275 $templateCache.put('components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
6275 $templateCache.put('components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
6276 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.email\"></ng-include>\n" +
6276 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.email\"></ng-include>\n" +
6277 "\n" +
6277 "\n" +
6278 "<div ng-show=\"!$ctrl.loading.email\">\n" +
6278 "<div ng-show=\"!$ctrl.loading.email\">\n" +
6279 "\n" +
6279 "\n" +
6280 " <div class=\"panel panel-default\">\n" +
6280 " <div class=\"panel panel-default\">\n" +
6281 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6281 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6282 " <div class=\"panel-body\">\n" +
6282 " <div class=\"panel-body\">\n" +
6283 " <p>Adding email alert channel - after you authorize your email in the system we can send alerts directly to this mailbox.</p>\n" +
6283 " <p>Adding email alert channel - after you authorize your email in the system we can send alerts directly to this mailbox.</p>\n" +
6284 " <form class=\"form-horizontal\" name=\"$ctrl.channelForm\" ng-submit=\"$ctrl.createChannel()\">\n" +
6284 " <form class=\"form-horizontal\" name=\"$ctrl.channelForm\" ng-submit=\"$ctrl.createChannel()\">\n" +
6285 " <div class=\"form-group\" id=\"row-email\">\n" +
6285 " <div class=\"form-group\" id=\"row-email\">\n" +
6286 " <data-form-errors errors=\"$ctrl.channelForm.ae_validation.email\"></data-form-errors>\n" +
6286 " <data-form-errors errors=\"$ctrl.channelForm.ae_validation.email\"></data-form-errors>\n" +
6287 " <label id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6287 " <label id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6288 " Email Address\n" +
6288 " Email Address\n" +
6289 " <span class=\"required\">*</span>\n" +
6289 " <span class=\"required\">*</span>\n" +
6290 " </label>\n" +
6290 " </label>\n" +
6291 " <div class=\"col-sm-8 col-lg-9\">\n" +
6291 " <div class=\"col-sm-8 col-lg-9\">\n" +
6292 " <input class=\"form-control\" type=\"text\" ng-model=\"$ctrl.form.email\">\n" +
6292 " <input class=\"form-control\" type=\"text\" ng-model=\"$ctrl.form.email\">\n" +
6293 " </div>\n" +
6293 " </div>\n" +
6294 " </div>\n" +
6294 " </div>\n" +
6295 " <div class=\"form-group\">\n" +
6295 " <div class=\"form-group\">\n" +
6296 " <label for=\"submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6296 " <label for=\"submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6297 " </label>\n" +
6297 " </label>\n" +
6298 " <div class=\"col-sm-8 col-lg-9\">\n" +
6298 " <div class=\"col-sm-8 col-lg-9\">\n" +
6299 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Add email channel\">\n" +
6299 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Add email channel\">\n" +
6300 " </div>\n" +
6300 " </div>\n" +
6301 " </div>\n" +
6301 " </div>\n" +
6302 " </form>\n" +
6302 " </form>\n" +
6303 " </div>\n" +
6303 " </div>\n" +
6304 " </div>\n" +
6304 " </div>\n" +
6305 "</div>\n"
6305 "</div>\n"
6306 );
6306 );
6307
6307
6308
6308
6309 $templateCache.put('components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
6309 $templateCache.put('components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
6310 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.channels || $ctrl.loading.applications\"></ng-include>\n" +
6310 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.channels || $ctrl.loading.applications\"></ng-include>\n" +
6311 "\n" +
6311 "\n" +
6312 "<div ng-if=\"!$ctrl.loading.channels && !$ctrl.loading.applications && !$ctrl.loading.actions\">\n" +
6312 "<div ng-if=\"!$ctrl.loading.channels && !$ctrl.loading.applications && !$ctrl.loading.actions\">\n" +
6313 "\n" +
6313 "\n" +
6314 " <div class=\"panel panel-default\">\n" +
6314 " <div class=\"panel panel-default\">\n" +
6315 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6315 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6316 " <div class=\"panel-body\">\n" +
6316 " <div class=\"panel-body\">\n" +
6317 " <h1>Report alert rules</h1>\n" +
6317 " <h1>Report alert rules</h1>\n" +
6318 " <p>\n" +
6318 " <p>\n" +
6319 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addAction()\"><span class=\"fa fa-plus-circle\"></span> Add top-level rule</a>\n" +
6319 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addAction()\"><span class=\"fa fa-plus-circle\"></span> Add top-level rule</a>\n" +
6320 " </p>\n" +
6320 " </p>\n" +
6321 "\n" +
6321 "\n" +
6322 " <report-alert-action action=\"action\" rule-definitions=\"$ctrl.ruleDefinitions\"\n" +
6322 " <report-alert-action action=\"action\" rule-definitions=\"$ctrl.ruleDefinitions\"\n" +
6323 " possible-channels=\"$ctrl.alertChannels\"\n" +
6323 " possible-channels=\"$ctrl.alertChannels\"\n" +
6324 " actions=\"$ctrl.alertActions\" applications=\"$ctrl.applications\"\n" +
6324 " actions=\"$ctrl.alertActions\" applications=\"$ctrl.applications\"\n" +
6325 " ng-repeat=\"action in $ctrl.alertActions | filter: {type:'report'}\"></report-alert-action>\n" +
6325 " ng-repeat=\"action in $ctrl.alertActions | filter: {type:'report'}\"></report-alert-action>\n" +
6326 "\n" +
6326 "\n" +
6327 " </div>\n" +
6327 " </div>\n" +
6328 " </div>\n" +
6328 " </div>\n" +
6329 "\n" +
6329 "\n" +
6330 " <div class=\"panel panel-default\">\n" +
6330 " <div class=\"panel panel-default\">\n" +
6331 " <div class=\"panel-body\">\n" +
6331 " <div class=\"panel-body\">\n" +
6332 " <h1>Alert channels</h1>\n" +
6332 " <h1>Alert channels</h1>\n" +
6333 "\n" +
6333 "\n" +
6334 " <p>Here you can configure your <em>alert channels</em>.</p>\n" +
6334 " <p>Here you can configure your <em>alert channels</em>.</p>\n" +
6335 "\n" +
6335 "\n" +
6336 " <p>An alert channel serves as means of delivery of notifications about important events that happen in your applications.</p>\n" +
6336 " <p>An alert channel serves as means of delivery of notifications about important events that happen in your applications.</p>\n" +
6337 "\n" +
6337 "\n" +
6338 " <div class=\"alert alert-success\">You can add more integrations that support different alert channels via application management panel.</div>\n" +
6338 " <div class=\"alert alert-success\">You can add more integrations that support different alert channels via application management panel.</div>\n" +
6339 "\n" +
6339 "\n" +
6340 " <table class=\"table table-striped\">\n" +
6340 " <table class=\"table table-striped\">\n" +
6341 " <tr ng-repeat=\"channel in $ctrl.alertChannels\" class=\"animate-repeat\">\n" +
6341 " <tr ng-repeat=\"channel in $ctrl.alertChannels\" class=\"animate-repeat\">\n" +
6342 " <td><strong>{{ channel.channel_visible_value }}</strong></td>\n" +
6342 " <td><strong>{{ channel.channel_visible_value }}</strong></td>\n" +
6343 " <td class=\"text-right\">\n" +
6343 " <td class=\"text-right\">\n" +
6344 " <span class=\"btn btn-default\" data-uib-tooltip=\"Channel is {{ channel.channel_validated? '' :'NOT' }} validated\" tooltip-append-to-body=\"true\"\n" +
6344 " <span class=\"btn btn-default\" data-uib-tooltip=\"Channel is {{ channel.channel_validated? '' :'NOT' }} validated\" tooltip-append-to-body=\"true\"\n" +
6345 " ng-class=\"{dim:!channel.channel_validated}\">\n" +
6345 " ng-class=\"{dim:!channel.channel_validated}\">\n" +
6346 " <span class=\"fa\" ng-class=\"{'fa-check-circle':channel.channel_validated, 'fa-times-circle':!channel.channel_validated}\"></span>\n" +
6346 " <span class=\"fa\" ng-class=\"{'fa-check-circle':channel.channel_validated, 'fa-times-circle':!channel.channel_validated}\"></span>\n" +
6347 " </span>\n" +
6347 " </span>\n" +
6348 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.send_alerts ? 'OFF' : 'ON' }} alerting on this chanel\"\n" +
6348 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.send_alerts ? 'OFF' : 'ON' }} alerting on this chanel\"\n" +
6349 " ng-click=\"$ctrl.updateChannel(channel,'send_alerts')\" ng-class=\"{dim:!channel.send_alerts}\" tooltip-append-to-body=\"true\">\n" +
6349 " ng-click=\"$ctrl.updateChannel(channel,'send_alerts')\" ng-class=\"{dim:!channel.send_alerts}\" tooltip-append-to-body=\"true\">\n" +
6350 " <span class=\"fa fa-rss\"></span> Alerts\n" +
6350 " <span class=\"fa fa-rss\"></span> Alerts\n" +
6351 " </a>\n" +
6351 " </a>\n" +
6352 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.daily_digest ? 'OFF' : 'ON' }} daily digests on this channel\"\n" +
6352 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.daily_digest ? 'OFF' : 'ON' }} daily digests on this channel\"\n" +
6353 " ng-click=\"$ctrl.updateChannel(channel,'daily_digest')\" ng-class=\"{dim:!channel.daily_digest}\" tooltip-append-to-body=\"true\">\n" +
6353 " ng-click=\"$ctrl.updateChannel(channel,'daily_digest')\" ng-class=\"{dim:!channel.daily_digest}\" tooltip-append-to-body=\"true\">\n" +
6354 " <span class=\"fa fa-envelope\"></span> Daily digests\n" +
6354 " <span class=\"fa fa-envelope\"></span> Daily digests\n" +
6355 " </a>\n" +
6355 " </a>\n" +
6356 "\n" +
6356 "\n" +
6357 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6357 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6358 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove</a>\n" +
6358 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove</a>\n" +
6359 " <ul class=\"dropdown-menu\">\n" +
6359 " <ul class=\"dropdown-menu\">\n" +
6360 " <li><a>No</a></li>\n" +
6360 " <li><a>No</a></li>\n" +
6361 " <li><a ng-click=\"$ctrl.removeChannel(channel)\">Yes</a></li>\n" +
6361 " <li><a ng-click=\"$ctrl.removeChannel(channel)\">Yes</a></li>\n" +
6362 " </ul>\n" +
6362 " </ul>\n" +
6363 " </span>\n" +
6363 " </span>\n" +
6364 "\n" +
6364 "\n" +
6365 " </td>\n" +
6365 " </td>\n" +
6366 " </tr>\n" +
6366 " </tr>\n" +
6367 " </table>\n" +
6367 " </table>\n" +
6368 "\n" +
6368 "\n" +
6369 " </div>\n" +
6369 " </div>\n" +
6370 " </div>\n" +
6370 " </div>\n" +
6371 "\n" +
6371 "\n" +
6372 "</div>\n"
6372 "</div>\n"
6373 );
6373 );
6374
6374
6375
6375
6376 $templateCache.put('components/views/user-auth-tokens-view/user-auth-tokens-view.html',
6376 $templateCache.put('components/views/user-auth-tokens-view/user-auth-tokens-view.html',
6377 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.tokens\"></ng-include>\n" +
6377 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.tokens\"></ng-include>\n" +
6378 "\n" +
6378 "\n" +
6379 "<div ng-show=\"!$ctrl.loading.tokens\">\n" +
6379 "<div ng-show=\"!$ctrl.loading.tokens\">\n" +
6380 "\n" +
6380 "\n" +
6381 " <div class=\"panel panel-default\">\n" +
6381 " <div class=\"panel panel-default\">\n" +
6382 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6382 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6383 "\n" +
6383 "\n" +
6384 " <div class=\"panel-body\">\n" +
6384 " <div class=\"panel-body\">\n" +
6385 "\n" +
6385 "\n" +
6386 " <div class=\"alert alert-success\">You can use those tokens to authenticate yourself when performing various API calls</div>\n" +
6386 " <div class=\"alert alert-success\">You can use those tokens to authenticate yourself when performing various API calls</div>\n" +
6387 "\n" +
6387 "\n" +
6388 " <hr/>\n" +
6388 " <hr/>\n" +
6389 "\n" +
6389 "\n" +
6390 " <form method=\"post\" class=\"form-inline\" name=\"$ctrl.TokenForm\" ng-submit=\"$ctrl.addToken()\" novalidate>\n" +
6390 " <form method=\"post\" class=\"form-inline\" name=\"$ctrl.TokenForm\" ng-submit=\"$ctrl.addToken()\" novalidate>\n" +
6391 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.description\"></data-form-errors>\n" +
6391 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.description\"></data-form-errors>\n" +
6392 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.expires\"></data-form-errors>\n" +
6392 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.expires\"></data-form-errors>\n" +
6393 " <div class=\"form-group\">\n" +
6393 " <div class=\"form-group\">\n" +
6394 " <label>\n" +
6394 " <label>\n" +
6395 " Description\n" +
6395 " Description\n" +
6396 " </label>\n" +
6396 " </label>\n" +
6397 " <input class=\"form-control\" name=\"description\" placeholder=\"Token description\" type=\"text\" ng-model=\"$ctrl.form.description\">\n" +
6397 " <input class=\"form-control\" name=\"description\" placeholder=\"Token description\" type=\"text\" ng-model=\"$ctrl.form.description\">\n" +
6398 " </div>\n" +
6398 " </div>\n" +
6399 " <div class=\"form-group\">\n" +
6399 " <div class=\"form-group\">\n" +
6400 " <label>\n" +
6400 " <label>\n" +
6401 " Expires\n" +
6401 " Expires\n" +
6402 " </label>\n" +
6402 " </label>\n" +
6403 " <select class=\"form-control\" ng-model=\"$ctrl.form.expires\" ng-options=\"i.key as i.label for i in $ctrl.expireOptions | objectToOrderedArray:'minutes'\">\n" +
6403 " <select class=\"form-control\" ng-model=\"$ctrl.form.expires\" ng-options=\"i.key as i.label for i in $ctrl.expireOptions | objectToOrderedArray:'minutes'\">\n" +
6404 " <option value=\"\">Never</option>\n" +
6404 " <option value=\"\">Never</option>\n" +
6405 " </select>\n" +
6405 " </select>\n" +
6406 " </div>\n" +
6406 " </div>\n" +
6407 " <div class=\"form-group\">\n" +
6407 " <div class=\"form-group\">\n" +
6408 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6408 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6409 " </label>\n" +
6409 " </label>\n" +
6410 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Create Token\">\n" +
6410 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Create Token\">\n" +
6411 " </div>\n" +
6411 " </div>\n" +
6412 " </form>\n" +
6412 " </form>\n" +
6413 "\n" +
6413 "\n" +
6414 " </div>\n" +
6414 " </div>\n" +
6415 "\n" +
6415 "\n" +
6416 "\n" +
6416 "\n" +
6417 " </div>\n" +
6417 " </div>\n" +
6418 "\n" +
6418 "\n" +
6419 " <div class=\"panel panel-default\">\n" +
6419 " <div class=\"panel panel-default\">\n" +
6420 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.tokens\" class=\"table table-striped\">\n" +
6420 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.tokens\" class=\"table table-striped\">\n" +
6421 " <caption>Your current tokens</caption>\n" +
6421 " <caption>Your current tokens</caption>\n" +
6422 " <thead>\n" +
6422 " <thead>\n" +
6423 " <tr>\n" +
6423 " <tr>\n" +
6424 " <th st-sort=\"description\"><a>Description</a></th>\n" +
6424 " <th st-sort=\"description\"><a>Description</a></th>\n" +
6425 " <th class=\"created\"><a>Created</a></th>\n" +
6425 " <th class=\"created\"><a>Created</a></th>\n" +
6426 " <th class=\"expires\"><a>Expires</a></th>\n" +
6426 " <th class=\"expires\"><a>Expires</a></th>\n" +
6427 " <th class=\"options\"></th>\n" +
6427 " <th class=\"options\"></th>\n" +
6428 " </tr>\n" +
6428 " </tr>\n" +
6429 " <tr>\n" +
6429 " <tr>\n" +
6430 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6430 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6431 " <th></th>\n" +
6431 " <th></th>\n" +
6432 " <th></th>\n" +
6432 " <th></th>\n" +
6433 " <th></th>\n" +
6433 " <th></th>\n" +
6434 " </tr>\n" +
6434 " </tr>\n" +
6435 " </thead>\n" +
6435 " </thead>\n" +
6436 " <tbody>\n" +
6436 " <tbody>\n" +
6437 "\n" +
6437 "\n" +
6438 " <tr ng-repeat=\"token in displayedCollection\">\n" +
6438 " <tr ng-repeat=\"token in displayedCollection\">\n" +
6439 " <td><p>{{token.description}}</p>\n" +
6439 " <td><p>{{token.description}}</p>\n" +
6440 " <pre ng-init=\"token.limit = 8\" ng-mouseover=\"token.limit = 99\" ng-mouseleave=\"token.limit = 8\">{{token.token| limitTo:token.limit}}...</pre>\n" +
6440 " <pre ng-init=\"token.limit = 8\" ng-mouseover=\"token.limit = 99\" ng-mouseleave=\"token.limit = 8\">{{token.token| limitTo:token.limit}}...</pre>\n" +
6441 " </td>\n" +
6441 " </td>\n" +
6442 " <td><span data-uib-tooltip=\"{{token.creation_date}}\">{{token.creation_date | isoToRelativeTime}}</span></td>\n" +
6442 " <td><span data-uib-tooltip=\"{{token.creation_date}}\">{{token.creation_date | isoToRelativeTime}}</span></td>\n" +
6443 " <td><span ng-if=\"token.expires\" data-uib-tooltip=\"{{token.expires}}\">{{token.expires | isoToRelativeTime}}</span>\n" +
6443 " <td><span ng-if=\"token.expires\" data-uib-tooltip=\"{{token.expires}}\">{{token.expires | isoToRelativeTime}}</span>\n" +
6444 " <span ng-if=\"!token.expires\">Never</span></td>\n" +
6444 " <span ng-if=\"!token.expires\">Never</span></td>\n" +
6445 " <td>\n" +
6445 " <td>\n" +
6446 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6446 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6447 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6447 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6448 " <ul class=\"dropdown-menu\">\n" +
6448 " <ul class=\"dropdown-menu\">\n" +
6449 " <li><a>No</a></li>\n" +
6449 " <li><a>No</a></li>\n" +
6450 " <li><a ng-click=\"$ctrl.removeToken(token)\">Yes</a></li>\n" +
6450 " <li><a ng-click=\"$ctrl.removeToken(token)\">Yes</a></li>\n" +
6451 " </ul>\n" +
6451 " </ul>\n" +
6452 " </span>\n" +
6452 " </span>\n" +
6453 " </td>\n" +
6453 " </td>\n" +
6454 " </tr>\n" +
6454 " </tr>\n" +
6455 " </tbody>\n" +
6455 " </tbody>\n" +
6456 " </table>\n" +
6456 " </table>\n" +
6457 " </div>\n" +
6457 " </div>\n" +
6458 "\n" +
6458 "\n" +
6459 "</div>\n"
6459 "</div>\n"
6460 );
6460 );
6461
6461
6462
6462
6463 $templateCache.put('components/views/user-identities-view/user-identities-view.html',
6463 $templateCache.put('components/views/user-identities-view/user-identities-view.html',
6464 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.identities\"></ng-include>\n" +
6464 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.identities\"></ng-include>\n" +
6465 "\n" +
6465 "\n" +
6466 "<div ng-show=\"!$ctrl.loading.identities\">\n" +
6466 "<div ng-show=\"!$ctrl.loading.identities\">\n" +
6467 "\n" +
6467 "\n" +
6468 " <div class=\"panel panel-default\">\n" +
6468 " <div class=\"panel panel-default\">\n" +
6469 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6469 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6470 " <div class=\"panel-body\">\n" +
6470 " <div class=\"panel-body\">\n" +
6471 "\n" +
6471 "\n" +
6472 " <div class=\"col-sm-6\">\n" +
6472 " <div class=\"col-sm-6\">\n" +
6473 " <p ng-show=\"$ctrl.identities.length === 0\">No external providers linked yet</p>\n" +
6473 " <p ng-show=\"$ctrl.identities.length === 0\">No external providers linked yet</p>\n" +
6474 " <ul class=\"list-group\">\n" +
6474 " <ul class=\"list-group\">\n" +
6475 " <li ng-repeat=\"provider in $ctrl.identities\" class=\"animate-repeat list-group-item\">\n" +
6475 " <li ng-repeat=\"provider in $ctrl.identities\" class=\"animate-repeat list-group-item\">\n" +
6476 " <div class=\"pull-right\">\n" +
6476 " <div class=\"pull-right\">\n" +
6477 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6477 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6478 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6478 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6479 " <ul class=\"dropdown-menu\">\n" +
6479 " <ul class=\"dropdown-menu\">\n" +
6480 " <li><a>No</a></li>\n" +
6480 " <li><a>No</a></li>\n" +
6481 " <li><a ng-click=\"$ctrl.removeProvider(provider)\">Yes</a></li>\n" +
6481 " <li><a ng-click=\"$ctrl.removeProvider(provider)\">Yes</a></li>\n" +
6482 " </ul>\n" +
6482 " </ul>\n" +
6483 " </span>\n" +
6483 " </span>\n" +
6484 " </div>\n" +
6484 " </div>\n" +
6485 " <em>@{{ provider.provider }}</em>: <strong>{{ provider.id }}</strong>\n" +
6485 " <em>@{{ provider.provider }}</em>: <strong>{{ provider.id }}</strong>\n" +
6486 " </li>\n" +
6486 " </li>\n" +
6487 " </ul>\n" +
6487 " </ul>\n" +
6488 " </div>\n" +
6488 " </div>\n" +
6489 " <div class=\"col-sm-6\">\n" +
6489 " <div class=\"col-sm-6\">\n" +
6490 " <ul class=\"list-group\">\n" +
6490 " <ul class=\"list-group\">\n" +
6491 " <li class=\"list-group-item\">\n" +
6491 " <li class=\"list-group-item\">\n" +
6492 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.google}}\" target=\"_self\">\n" +
6492 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.google}}\" target=\"_self\">\n" +
6493 " <span class=\"fa fa-google-plus-square fa-2x\"></span> Connect with Google</a>\n" +
6493 " <span class=\"fa fa-google-plus-square fa-2x\"></span> Connect with Google</a>\n" +
6494 " </li>\n" +
6494 " </li>\n" +
6495 " <li class=\"list-group-item\">\n" +
6495 " <li class=\"list-group-item\">\n" +
6496 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.twitter}}\" target=\"_self\">\n" +
6496 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.twitter}}\" target=\"_self\">\n" +
6497 " <span class=\"fa fa-twitter fa-2x\"></span> Connect with Twitter</a>\n" +
6497 " <span class=\"fa fa-twitter fa-2x\"></span> Connect with Twitter</a>\n" +
6498 " </li>\n" +
6498 " </li>\n" +
6499 " <li class=\"list-group-item\">\n" +
6499 " <li class=\"list-group-item\">\n" +
6500 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.bitbucket}}\" target=\"_self\">\n" +
6500 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.bitbucket}}\" target=\"_self\">\n" +
6501 " <span class=\"fa fa-bitbucket fa-2x\"></span> Connect with Bitbucket</a>\n" +
6501 " <span class=\"fa fa-bitbucket fa-2x\"></span> Connect with Bitbucket</a>\n" +
6502 " </li>\n" +
6502 " </li>\n" +
6503 " <li class=\"list-group-item\">\n" +
6503 " <li class=\"list-group-item\">\n" +
6504 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.github}}\" target=\"_self\">\n" +
6504 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.github}}\" target=\"_self\">\n" +
6505 " <span class=\"fa fa-github fa-2x\"></span> Connect with Github including private repo access</a>\n" +
6505 " <span class=\"fa fa-github fa-2x\"></span> Connect with Github including private repo access</a>\n" +
6506 " </li>\n" +
6506 " </li>\n" +
6507 " </ul>\n" +
6507 " </ul>\n" +
6508 " </div>\n" +
6508 " </div>\n" +
6509 " </div>\n" +
6509 " </div>\n" +
6510 " </div>\n" +
6510 " </div>\n" +
6511 "</div>\n"
6511 "</div>\n"
6512 );
6512 );
6513
6513
6514
6514
6515 $templateCache.put('components/views/user-password-view/user-password-view.html',
6515 $templateCache.put('components/views/user-password-view/user-password-view.html',
6516 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.password\"></ng-include>\n" +
6516 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.password\"></ng-include>\n" +
6517 "\n" +
6517 "\n" +
6518 "<div ng-show=\"!$ctrl.loading.password\">\n" +
6518 "<div ng-show=\"!$ctrl.loading.password\">\n" +
6519 "\n" +
6519 "\n" +
6520 " <div class=\"panel panel-default\">\n" +
6520 " <div class=\"panel panel-default\">\n" +
6521 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6521 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6522 " <div class=\"panel-body\">\n" +
6522 " <div class=\"panel-body\">\n" +
6523 "\n" +
6523 "\n" +
6524 " <form class=\"form-horizontal\" name=\"$ctrl.passwordForm\" ng-submit=\"$ctrl.updatePassword()\">\n" +
6524 " <form class=\"form-horizontal\" name=\"$ctrl.passwordForm\" ng-submit=\"$ctrl.updatePassword()\">\n" +
6525 " <div class=\"form-group\" id=\"row-old_password\">\n" +
6525 " <div class=\"form-group\" id=\"row-old_password\">\n" +
6526 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.old_password\"></data-form-errors>\n" +
6526 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.old_password\"></data-form-errors>\n" +
6527 " <label for=\"old_password\" id=\"label-old_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6527 " <label for=\"old_password\" id=\"label-old_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6528 " Old Password\n" +
6528 " Old Password\n" +
6529 " <span class=\"required\">*</span>\n" +
6529 " <span class=\"required\">*</span>\n" +
6530 " </label>\n" +
6530 " </label>\n" +
6531 " <div class=\"col-sm-8 col-lg-9\">\n" +
6531 " <div class=\"col-sm-8 col-lg-9\">\n" +
6532 " <input class=\"form-control\" id=\"old_password\" name=\"old_password\" type=\"password\" ng-model=\"$ctrl.form.old_password\">\n" +
6532 " <input class=\"form-control\" id=\"old_password\" name=\"old_password\" type=\"password\" ng-model=\"$ctrl.form.old_password\">\n" +
6533 " </div>\n" +
6533 " </div>\n" +
6534 " </div>\n" +
6534 " </div>\n" +
6535 " <div class=\"form-group\" id=\"row-new_password\">\n" +
6535 " <div class=\"form-group\" id=\"row-new_password\">\n" +
6536 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password\"></data-form-errors>\n" +
6536 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password\"></data-form-errors>\n" +
6537 " <label for=\"new_password\" id=\"label-new_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6537 " <label for=\"new_password\" id=\"label-new_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6538 " New Password\n" +
6538 " New Password\n" +
6539 " <span class=\"required\">*</span>\n" +
6539 " <span class=\"required\">*</span>\n" +
6540 " </label>\n" +
6540 " </label>\n" +
6541 " <div class=\"col-sm-8 col-lg-9\">\n" +
6541 " <div class=\"col-sm-8 col-lg-9\">\n" +
6542 " <input class=\"form-control\" id=\"new_password\" name=\"new_password\" type=\"password\" ng-model=\"$ctrl.form.new_password\">\n" +
6542 " <input class=\"form-control\" id=\"new_password\" name=\"new_password\" type=\"password\" ng-model=\"$ctrl.form.new_password\">\n" +
6543 " </div>\n" +
6543 " </div>\n" +
6544 " </div>\n" +
6544 " </div>\n" +
6545 " <div class=\"form-group\" id=\"row-new_password_confirm\">\n" +
6545 " <div class=\"form-group\" id=\"row-new_password_confirm\">\n" +
6546 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password_confirm\"></data-form-errors>\n" +
6546 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password_confirm\"></data-form-errors>\n" +
6547 " <label for=\"new_password_confirm\" id=\"label-new_password_confirm\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6547 " <label for=\"new_password_confirm\" id=\"label-new_password_confirm\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6548 " Confirm Password\n" +
6548 " Confirm Password\n" +
6549 " <span class=\"required\">*</span>\n" +
6549 " <span class=\"required\">*</span>\n" +
6550 " </label>\n" +
6550 " </label>\n" +
6551 " <div class=\"col-sm-8 col-lg-9\">\n" +
6551 " <div class=\"col-sm-8 col-lg-9\">\n" +
6552 " <input class=\"form-control\" id=\"new_password_confirm\" name=\"new_password_confirm\" type=\"password\" ng-model=\"$ctrl.form.new_password_confirm\">\n" +
6552 " <input class=\"form-control\" id=\"new_password_confirm\" name=\"new_password_confirm\" type=\"password\" ng-model=\"$ctrl.form.new_password_confirm\">\n" +
6553 " </div>\n" +
6553 " </div>\n" +
6554 " </div>\n" +
6554 " </div>\n" +
6555 " <div class=\"form-group\" id=\"row-submit\">\n" +
6555 " <div class=\"form-group\" id=\"row-submit\">\n" +
6556 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\"></label>\n" +
6556 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\"></label>\n" +
6557 " <div class=\"col-sm-8 col-lg-9\">\n" +
6557 " <div class=\"col-sm-8 col-lg-9\">\n" +
6558 " <input class=\"form-control SubmitField btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Change Password\">\n" +
6558 " <input class=\"form-control SubmitField btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Change Password\">\n" +
6559 " </div>\n" +
6559 " </div>\n" +
6560 " </div>\n" +
6560 " </div>\n" +
6561 " </form>\n" +
6561 " </form>\n" +
6562 "\n" +
6562 "\n" +
6563 " </div>\n" +
6563 " </div>\n" +
6564 " </div>\n" +
6564 " </div>\n" +
6565 "</div>\n"
6565 "</div>\n"
6566 );
6566 );
6567
6567
6568
6568
6569 $templateCache.put('components/views/user-profile-view/user-profile-view.html',
6569 $templateCache.put('components/views/user-profile-view/user-profile-view.html',
6570 "<ui-view></ui-view><ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.profile\"></ng-include>\n" +
6570 "<ui-view></ui-view><ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.profile\"></ng-include>\n" +
6571 "\n" +
6571 "\n" +
6572 "<div ng-show=\"!$ctrl.loading.profile\">\n" +
6572 "<div ng-show=\"!$ctrl.loading.profile\">\n" +
6573 " <div class=\"panel panel-default\">\n" +
6573 " <div class=\"panel panel-default\">\n" +
6574 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6574 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6575 " <div class=\"panel-body\">\n" +
6575 " <div class=\"panel-body\">\n" +
6576 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.updateProfile()\">\n" +
6576 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.updateProfile()\">\n" +
6577 " <div class=\"form-group\" id=\"row-email\">\n" +
6577 " <div class=\"form-group\" id=\"row-email\">\n" +
6578 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
6578 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
6579 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6579 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6580 " Email Address\n" +
6580 " Email Address\n" +
6581 " <span class=\"required\">*</span>\n" +
6581 " <span class=\"required\">*</span>\n" +
6582 " </label>\n" +
6582 " </label>\n" +
6583 " <div class=\"col-sm-8 col-lg-9\">\n" +
6583 " <div class=\"col-sm-8 col-lg-9\">\n" +
6584 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
6584 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
6585 " </div>\n" +
6585 " </div>\n" +
6586 " </div>\n" +
6586 " </div>\n" +
6587 "\n" +
6587 "\n" +
6588 " <div class=\"form-group\" id=\"row-first_name\">\n" +
6588 " <div class=\"form-group\" id=\"row-first_name\">\n" +
6589 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
6589 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
6590 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6590 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6591 " First Name\n" +
6591 " First Name\n" +
6592 " </label>\n" +
6592 " </label>\n" +
6593 " <div class=\"col-sm-8 col-lg-9\">\n" +
6593 " <div class=\"col-sm-8 col-lg-9\">\n" +
6594 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
6594 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
6595 " </div>\n" +
6595 " </div>\n" +
6596 " </div>\n" +
6596 " </div>\n" +
6597 " <div class=\"form-group\" id=\"row-last_name\">\n" +
6597 " <div class=\"form-group\" id=\"row-last_name\">\n" +
6598 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
6598 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
6599 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6599 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6600 " Last Name\n" +
6600 " Last Name\n" +
6601 " </label>\n" +
6601 " </label>\n" +
6602 " <div class=\"col-sm-8 col-lg-9\">\n" +
6602 " <div class=\"col-sm-8 col-lg-9\">\n" +
6603 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
6603 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
6604 " </div>\n" +
6604 " </div>\n" +
6605 " </div>\n" +
6605 " </div>\n" +
6606 " <div class=\"form-group\" id=\"row-company_name\">\n" +
6606 " <div class=\"form-group\" id=\"row-company_name\">\n" +
6607 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_name\"></data-form-errors>\n" +
6607 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_name\"></data-form-errors>\n" +
6608 " <label for=\"company_name\" id=\"label-company_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6608 " <label for=\"company_name\" id=\"label-company_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6609 " Company Name\n" +
6609 " Company Name\n" +
6610 " </label>\n" +
6610 " </label>\n" +
6611 " <div class=\"col-sm-8 col-lg-9\">\n" +
6611 " <div class=\"col-sm-8 col-lg-9\">\n" +
6612 " <input class=\"form-control\" id=\"company_name\" name=\"company_name\" type=\"text\" ng-model=\"$ctrl.user.company_name\">\n" +
6612 " <input class=\"form-control\" id=\"company_name\" name=\"company_name\" type=\"text\" ng-model=\"$ctrl.user.company_name\">\n" +
6613 " </div>\n" +
6613 " </div>\n" +
6614 " </div>\n" +
6614 " </div>\n" +
6615 " <div class=\"form-group\" id=\"row-company_address\">\n" +
6615 " <div class=\"form-group\" id=\"row-company_address\">\n" +
6616 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_address\"></data-form-errors>\n" +
6616 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_address\"></data-form-errors>\n" +
6617 " <label for=\"company_address\" id=\"label-company_address\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6617 " <label for=\"company_address\" id=\"label-company_address\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6618 " Company Address\n" +
6618 " Company Address\n" +
6619 " </label>\n" +
6619 " </label>\n" +
6620 " <div class=\"col-sm-8 col-lg-9\">\n" +
6620 " <div class=\"col-sm-8 col-lg-9\">\n" +
6621 " <textarea class=\"form-control\" id=\"company_address\" name=\"company_address\" ng-model=\"$ctrl.user.company_address\"></textarea>\n" +
6621 " <textarea class=\"form-control\" id=\"company_address\" name=\"company_address\" ng-model=\"$ctrl.user.company_address\"></textarea>\n" +
6622 " </div>\n" +
6622 " </div>\n" +
6623 " </div>\n" +
6623 " </div>\n" +
6624 " <div class=\"form-group\" id=\"row-zip_code\">\n" +
6624 " <div class=\"form-group\" id=\"row-zip_code\">\n" +
6625 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.zip_code\"></data-form-errors>\n" +
6625 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.zip_code\"></data-form-errors>\n" +
6626 " <label for=\"zip_code\" id=\"label-zip_code\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6626 " <label for=\"zip_code\" id=\"label-zip_code\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6627 " ZIP code\n" +
6627 " ZIP code\n" +
6628 " </label>\n" +
6628 " </label>\n" +
6629 " <div class=\"col-sm-8 col-lg-9\">\n" +
6629 " <div class=\"col-sm-8 col-lg-9\">\n" +
6630 " <input class=\"form-control\" id=\"zip_code\" name=\"zip_code\" type=\"text\" ng-model=\"$ctrl.user.zip_code\">\n" +
6630 " <input class=\"form-control\" id=\"zip_code\" name=\"zip_code\" type=\"text\" ng-model=\"$ctrl.user.zip_code\">\n" +
6631 " </div>\n" +
6631 " </div>\n" +
6632 " </div>\n" +
6632 " </div>\n" +
6633 " <div class=\"form-group\" id=\"row-city\">\n" +
6633 " <div class=\"form-group\" id=\"row-city\">\n" +
6634 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.city\"></data-form-errors>\n" +
6634 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.city\"></data-form-errors>\n" +
6635 " <label for=\"city\" id=\"label-city\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6635 " <label for=\"city\" id=\"label-city\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6636 " City\n" +
6636 " City\n" +
6637 " </label>\n" +
6637 " </label>\n" +
6638 " <div class=\"col-sm-8 col-lg-9\">\n" +
6638 " <div class=\"col-sm-8 col-lg-9\">\n" +
6639 " <input class=\"form-control\" id=\"city\" name=\"city\" type=\"text\" ng-model=\"$ctrl.user.city\">\n" +
6639 " <input class=\"form-control\" id=\"city\" name=\"city\" type=\"text\" ng-model=\"$ctrl.user.city\">\n" +
6640 " </div>\n" +
6640 " </div>\n" +
6641 " </div>\n" +
6641 " </div>\n" +
6642 " <div class=\"form-group\" id=\"row-notifications\">\n" +
6642 " <div class=\"form-group\" id=\"row-notifications\">\n" +
6643 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.notifications\"></data-form-errors>\n" +
6643 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.notifications\"></data-form-errors>\n" +
6644 " <label for=\"notifications\" id=\"label-notifications\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6644 " <label for=\"notifications\" id=\"label-notifications\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6645 " Account notifications\n" +
6645 " Account notifications\n" +
6646 " </label>\n" +
6646 " </label>\n" +
6647 " <div class=\"col-sm-8 col-lg-9\">\n" +
6647 " <div class=\"col-sm-8 col-lg-9\">\n" +
6648 " <input checked class=\"form-control\" id=\"notifications\" name=\"notifications\" type=\"checkbox\" ng-model=\"$ctrl.user.notifications\">\n" +
6648 " <input checked class=\"form-control\" id=\"notifications\" name=\"notifications\" type=\"checkbox\" ng-model=\"$ctrl.user.notifications\">\n" +
6649 " </div>\n" +
6649 " </div>\n" +
6650 " </div>\n" +
6650 " </div>\n" +
6651 " <div class=\"form-group\" id=\"row-submit\">\n" +
6651 " <div class=\"form-group\" id=\"row-submit\">\n" +
6652 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6652 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6653 " </label>\n" +
6653 " </label>\n" +
6654 " <div class=\"col-sm-8 col-lg-9\">\n" +
6654 " <div class=\"col-sm-8 col-lg-9\">\n" +
6655 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Update Account\">\n" +
6655 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Update Account\">\n" +
6656 " </div>\n" +
6656 " </div>\n" +
6657 " </div>\n" +
6657 " </div>\n" +
6658 " </form>\n" +
6658 " </form>\n" +
6659 " </div>\n" +
6659 " </div>\n" +
6660 " </div>\n" +
6660 " </div>\n" +
6661 "</div>\n"
6661 "</div>\n"
6662 );
6662 );
6663
6663
6664
6664
6665 $templateCache.put('directives/permissions/permissions.html',
6665 $templateCache.put('directives/permissions/permissions.html',
6666 "<div class=\"panel panel-default\">\n" +
6666 "<div class=\"panel panel-default\">\n" +
6667 " <div class=\"panel-heading\">\n" +
6667 " <div class=\"panel-heading\">\n" +
6668 " <h3 class=\"panel-title\">Permissions</h3>\n" +
6668 " <h3 class=\"panel-title\">Permissions</h3>\n" +
6669 " </div>\n" +
6669 " </div>\n" +
6670 " <div class=\"panel-body\">\n" +
6670 " <div class=\"panel-body\">\n" +
6671 " <p>Here you can <strong>set permissions</strong> for others to access your app data.</p>\n" +
6671 " <p>Here you can <strong>set permissions</strong> for others to access your app data.</p>\n" +
6672 "\n" +
6672 "\n" +
6673 " <p>For example you can let other staff member view or alter error reports.</p>\n" +
6673 " <p>For example you can let other staff member view or alter error reports.</p>\n" +
6674 "\n" +
6674 "\n" +
6675 " <div ng-if=\"permissions.possibleGroups.length > 0\">\n" +
6675 " <div ng-if=\"permissions.possibleGroups.length > 0\">\n" +
6676 " <h3>Group permissions</h3>\n" +
6676 " <h3>Group permissions</h3>\n" +
6677 "\n" +
6677 "\n" +
6678 " <ul class=\"list-group\">\n" +
6678 " <ul class=\"list-group\">\n" +
6679 " <li ng-repeat=\"perm in permissions.currentPermissions.group\" class=\"animate-repeat list-group-item\">\n" +
6679 " <li ng-repeat=\"perm in permissions.currentPermissions.group\" class=\"animate-repeat list-group-item\">\n" +
6680 " <strong>{{ perm.self.group_name }}</strong>\n" +
6680 " <strong>{{ perm.self.group_name }}</strong>\n" +
6681 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6681 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6682 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6682 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6683 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6683 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6684 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6684 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6685 " <ul class=\"dropdown-menu\">\n" +
6685 " <ul class=\"dropdown-menu\">\n" +
6686 " <li><a>No</a></li>\n" +
6686 " <li><a>No</a></li>\n" +
6687 " <li><a ng-click=\"permissions.removeGroupPermission(perm_name, perm)\">Yes</a></li>\n" +
6687 " <li><a ng-click=\"permissions.removeGroupPermission(perm_name, perm)\">Yes</a></li>\n" +
6688 " </ul>\n" +
6688 " </ul>\n" +
6689 " </span>\n" +
6689 " </span>\n" +
6690 " </div>\n" +
6690 " </div>\n" +
6691 " </li>\n" +
6691 " </li>\n" +
6692 " </ul>\n" +
6692 " </ul>\n" +
6693 "\n" +
6693 "\n" +
6694 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setGroupPermission()\">\n" +
6694 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setGroupPermission()\">\n" +
6695 " <div class=\"form-group\">\n" +
6695 " <div class=\"form-group\">\n" +
6696 " <select class=\"form-control\" ng-model=\"permissions.form.selectedGroup\" ng-options=\"g.id as g.group_name for g in permissions.possibleGroups\"></select>\n" +
6696 " <select class=\"form-control\" ng-model=\"permissions.form.selectedGroup\" ng-options=\"g.id as g.group_name for g in permissions.possibleGroups\"></select>\n" +
6697 " </div>\n" +
6697 " </div>\n" +
6698 " <div class=\"form-group\">\n" +
6698 " <div class=\"form-group\">\n" +
6699 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6699 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6700 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedGroupPermissions[permission]\"> {{ permission }}\n" +
6700 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedGroupPermissions[permission]\"> {{ permission }}\n" +
6701 " </span>\n" +
6701 " </span>\n" +
6702 " </div>\n" +
6702 " </div>\n" +
6703 " <div class=\"form-group\">\n" +
6703 " <div class=\"form-group\">\n" +
6704 " <button class=\"btn btn-info\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6704 " <button class=\"btn btn-info\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6705 " </div>\n" +
6705 " </div>\n" +
6706 " </form>\n" +
6706 " </form>\n" +
6707 "\n" +
6707 "\n" +
6708 " </div>\n" +
6708 " </div>\n" +
6709 "\n" +
6709 "\n" +
6710 " <h3>User permissions</h3>\n" +
6710 " <h3>User permissions</h3>\n" +
6711 " <div>\n" +
6711 " <div>\n" +
6712 " <ul class=\"list-group\">\n" +
6712 " <ul class=\"list-group\">\n" +
6713 " <li ng-repeat=\"perm in permissions.currentPermissions.user\" class=\"animate-repeat list-group-item\">\n" +
6713 " <li ng-repeat=\"perm in permissions.currentPermissions.user\" class=\"animate-repeat list-group-item\">\n" +
6714 " <strong>{{ perm.self.user_name }}</strong>\n" +
6714 " <strong>{{ perm.self.user_name }}</strong>\n" +
6715 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6715 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6716 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6716 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6717 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6717 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6718 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6718 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6719 " <ul class=\"dropdown-menu\">\n" +
6719 " <ul class=\"dropdown-menu\">\n" +
6720 " <li><a>No</a></li>\n" +
6720 " <li><a>No</a></li>\n" +
6721 " <li><a ng-click=\"permissions.removeUserPermission(perm_name,perm)\">Yes</a></li>\n" +
6721 " <li><a ng-click=\"permissions.removeUserPermission(perm_name,perm)\">Yes</a></li>\n" +
6722 " </ul>\n" +
6722 " </ul>\n" +
6723 " </span>\n" +
6723 " </span>\n" +
6724 " </div>\n" +
6724 " </div>\n" +
6725 " </li>\n" +
6725 " </li>\n" +
6726 " </ul>\n" +
6726 " </ul>\n" +
6727 " </div>\n" +
6727 " </div>\n" +
6728 " <div>\n" +
6728 " <div>\n" +
6729 " <p>First enter username or full email of person you want to give access to (the person needs to be <strong>already registered in AppEnlight</strong>)</p>\n" +
6729 " <p>First enter username or full email of person you want to give access to (the person needs to be <strong>already registered in AppEnlight</strong>)</p>\n" +
6730 "\n" +
6730 "\n" +
6731 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setUserPermission()\">\n" +
6731 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setUserPermission()\">\n" +
6732 " <div class=\"form-group\">\n" +
6732 " <div class=\"form-group\">\n" +
6733 " <input type=\"text\" class=\"autocomplete form-control\" placeholder=\"Search for user/email\" ng-model=\"permissions.form.autocompleteUser\"\n" +
6733 " <input type=\"text\" class=\"autocomplete form-control\" placeholder=\"Search for user/email\" ng-model=\"permissions.form.autocompleteUser\"\n" +
6734 " uib-typeahead=\"u.user for u in permissions.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"permissions.searchingUsers\" typeahead-wait-ms=\"250\"\n" +
6734 " uib-typeahead=\"u.user for u in permissions.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"permissions.searchingUsers\" typeahead-wait-ms=\"250\"\n" +
6735 " typeahead-template-url=\"templates/directives/user_search_type_ahead.html\"\n" +
6735 " typeahead-template-url=\"templates/directives/user_search_type_ahead.html\"\n" +
6736 " />\n" +
6736 " />\n" +
6737 " </div>\n" +
6737 " </div>\n" +
6738 " <div class=\"form-group\">\n" +
6738 " <div class=\"form-group\">\n" +
6739 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6739 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6740 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedUserPermissions[permission]\"> {{ permission }}\n" +
6740 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedUserPermissions[permission]\"> {{ permission }}\n" +
6741 " </span>\n" +
6741 " </span>\n" +
6742 " </div>\n" +
6742 " </div>\n" +
6743 " <div class=\"form-group\">\n" +
6743 " <div class=\"form-group\">\n" +
6744 " <button class=\"btn btn-info\" ng-disabled=\"!permissions.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6744 " <button class=\"btn btn-info\" ng-disabled=\"!permissions.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6745 " </div>\n" +
6745 " </div>\n" +
6746 " </form>\n" +
6746 " </form>\n" +
6747 " </div>\n" +
6747 " </div>\n" +
6748 " </div>\n" +
6748 " </div>\n" +
6749 "</div>\n"
6749 "</div>\n"
6750 );
6750 );
6751
6751
6752
6752
6753 $templateCache.put('directives/plugin_config/plugin_config.html',
6753 $templateCache.put('directives/plugin_config/plugin_config.html',
6754 "<div ng-repeat=\"tmpl in plugin_ctrlr.inclusions track by $index\">\n" +
6754 "<div ng-repeat=\"tmpl in plugin_ctrlr.inclusions track by $index\">\n" +
6755 " <div><strong>Plugin: {{tmpl.name}}</strong></div>\n" +
6755 " <div><strong>Plugin: {{tmpl.name}}</strong></div>\n" +
6756 " <ng-include src=\"tmpl.template\"></ng-include>\n" +
6756 " <ng-include src=\"tmpl.template\"></ng-include>\n" +
6757 " <hr/>\n" +
6757 " <hr/>\n" +
6758 "</div>\n"
6758 "</div>\n"
6759 );
6759 );
6760
6760
6761
6761
6762 $templateCache.put('directives/postprocess_action/postprocess_action.html',
6762 $templateCache.put('directives/postprocess_action/postprocess_action.html',
6763 "<div class=\"panel panel-default action\">\n" +
6763 "<div class=\"panel panel-default action\">\n" +
6764 " <div class=\"panel-body form-inline\">\n" +
6764 " <div class=\"panel-body form-inline\">\n" +
6765 " <div class=\"pull-right\">\n" +
6765 " <div class=\"pull-right\">\n" +
6766 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6766 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6767 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6767 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6768 " <ul class=\"dropdown-menu\">\n" +
6768 " <ul class=\"dropdown-menu\">\n" +
6769 " <li><a>No</a></li>\n" +
6769 " <li><a>No</a></li>\n" +
6770 " <li><a ng-click=\"ctrl.deleteAction(ctrl.action)\">Yes</a></li>\n" +
6770 " <li><a ng-click=\"ctrl.deleteAction(ctrl.action)\">Yes</a></li>\n" +
6771 " </ul>\n" +
6771 " </ul>\n" +
6772 " </span>\n" +
6772 " </span>\n" +
6773 " </div>\n" +
6773 " </div>\n" +
6774 "\n" +
6774 "\n" +
6775 " <div class=\"form-group\">\n" +
6775 " <div class=\"form-group\">\n" +
6776 " <label>Action</label>\n" +
6776 " <label>Action</label>\n" +
6777 "\n" +
6777 "\n" +
6778 " <div class=\"form-group\">\n" +
6778 " <div class=\"form-group\">\n" +
6779 " <select class=\"form-control\" ng-model=\"ctrl.action.new_value\" ng-options=\"f[0] as f[1] for f in ctrl.possibleActions\" ng-change=\"ctrl.setDirty()\"></select>\n" +
6779 " <select class=\"form-control\" ng-model=\"ctrl.action.new_value\" ng-options=\"f[0] as f[1] for f in ctrl.possibleActions\" ng-change=\"ctrl.setDirty()\"></select>\n" +
6780 " </div>\n" +
6780 " </div>\n" +
6781 "\n" +
6781 "\n" +
6782 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6782 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6783 "\n" +
6783 "\n" +
6784 " </div>\n" +
6784 " </div>\n" +
6785 " <hr/>\n" +
6785 " <hr/>\n" +
6786 " <p>Meeting following criteria:</p>\n" +
6786 " <p>Meeting following criteria:</p>\n" +
6787 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6787 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6788 " {{ctrl.rule}}\n" +
6788 " {{ctrl.rule}}\n" +
6789 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6789 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6790 " </div>\n" +
6790 " </div>\n" +
6791 "</div>\n"
6791 "</div>\n"
6792 );
6792 );
6793
6793
6794
6794
6795 $templateCache.put('directives/report_alert_action/report_alert_action.html',
6795 $templateCache.put('directives/report_alert_action/report_alert_action.html',
6796 "<div class=\"panel panel-default action\">\n" +
6796 "<div class=\"panel panel-default action\">\n" +
6797 " <div class=\"panel-body form-inline\">\n" +
6797 " <div class=\"panel-body form-inline\">\n" +
6798 " <div class=\"pull-right\">\n" +
6798 " <div class=\"pull-right\">\n" +
6799 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6799 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6800 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6800 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6801 " <ul class=\"dropdown-menu\">\n" +
6801 " <ul class=\"dropdown-menu\">\n" +
6802 " <li><a>No</a></li>\n" +
6802 " <li><a>No</a></li>\n" +
6803 " <li><a ng-click=\"ctrl.deleteAction(ctrl.actions, ctrl.action)\">Yes</a></li>\n" +
6803 " <li><a ng-click=\"ctrl.deleteAction(ctrl.actions, ctrl.action)\">Yes</a></li>\n" +
6804 " </ul>\n" +
6804 " </ul>\n" +
6805 " </span>\n" +
6805 " </span>\n" +
6806 " </div>\n" +
6806 " </div>\n" +
6807 "\n" +
6807 "\n" +
6808 " <div class=\"form-group\">\n" +
6808 " <div class=\"form-group\">\n" +
6809 " <label>Applies to</label>\n" +
6809 " <label>Applies to</label>\n" +
6810 " <select class=\"form-control\" ng-model=\"ctrl.action.resource_id\" ng-options=\"f.resource_id as f.resource_name for f in ctrl.applications\" ng-change=\"ctrl.setDirty()\">\n" +
6810 " <select class=\"form-control\" ng-model=\"ctrl.action.resource_id\" ng-options=\"f.resource_id as f.resource_name for f in ctrl.applications\" ng-change=\"ctrl.setDirty()\">\n" +
6811 " <option value=\"\">All Resources</option>\n" +
6811 " <option value=\"\">All Resources</option>\n" +
6812 " </select>\n" +
6812 " </select>\n" +
6813 " </div>\n" +
6813 " </div>\n" +
6814 " <div class=\"form-group\">\n" +
6814 " <div class=\"form-group\">\n" +
6815 " <label>Notify</label>\n" +
6815 " <label>Notify</label>\n" +
6816 " <select class=\"form-control\" ng-model=\"ctrl.action.action\" ng-change=\"ctrl.setDirty()\" ng-options=\"f[0] as f[1] for f in ctrl.possibleNotifications\"></select>\n" +
6816 " <select class=\"form-control\" ng-model=\"ctrl.action.action\" ng-change=\"ctrl.setDirty()\" ng-options=\"f[0] as f[1] for f in ctrl.possibleNotifications\"></select>\n" +
6817 "\n" +
6817 "\n" +
6818 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6818 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6819 "\n" +
6819 "\n" +
6820 " </div>\n" +
6820 " </div>\n" +
6821 " <div>\n" +
6821 " <div>\n" +
6822 " <p><strong>Channels:</strong></p>\n" +
6822 " <p><strong>Channels:</strong></p>\n" +
6823 " <ul class=\"list-group\">\n" +
6823 " <ul class=\"list-group\">\n" +
6824 " <li class=\"list-group-item\" ng-repeat=\"channel in ctrl.action.channels\">\n" +
6824 " <li class=\"list-group-item\" ng-repeat=\"channel in ctrl.action.channels\">\n" +
6825 " <strong>{{channel.channel_visible_value}}</strong>\n" +
6825 " <strong>{{channel.channel_visible_value}}</strong>\n" +
6826 " <div class=\"pull-right\">\n" +
6826 " <div class=\"pull-right\">\n" +
6827 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6827 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6828 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6828 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6829 " <ul class=\"dropdown-menu\">\n" +
6829 " <ul class=\"dropdown-menu\">\n" +
6830 " <li><a>No</a></li>\n" +
6830 " <li><a>No</a></li>\n" +
6831 " <li><a ng-click=\"ctrl.unBindChannel(channel)\">Yes</a></li>\n" +
6831 " <li><a ng-click=\"ctrl.unBindChannel(channel)\">Yes</a></li>\n" +
6832 " </ul>\n" +
6832 " </ul>\n" +
6833 " </span>\n" +
6833 " </span>\n" +
6834 " </div>\n" +
6834 " </div>\n" +
6835 " </li>\n" +
6835 " </li>\n" +
6836 " </ul>\n" +
6836 " </ul>\n" +
6837 " <div class=\"form-group\" ng-if=\"ctrl.possibleChannels.length\">\n" +
6837 " <div class=\"form-group\" ng-if=\"ctrl.possibleChannels.length\">\n" +
6838 " <select class=\"form-control\" ng-model=\"ctrl.channelToBind\" ng-options=\"c as c.channel_visible_value for c in ctrl.possibleChannels |filter: c.supports_report_alerting\"></select>\n" +
6838 " <select class=\"form-control\" ng-model=\"ctrl.channelToBind\" ng-options=\"c as c.channel_visible_value for c in ctrl.possibleChannels |filter: c.supports_report_alerting\"></select>\n" +
6839 " <a class=\"btn btn-info\" ng-click=\"ctrl.bindChannel(channel, ctrl.action)\"><span class=\"fa fa-plus-circle\"></span> Add Channel</a>\n" +
6839 " <a class=\"btn btn-info\" ng-click=\"ctrl.bindChannel(channel, ctrl.action)\"><span class=\"fa fa-plus-circle\"></span> Add Channel</a>\n" +
6840 " </div>\n" +
6840 " </div>\n" +
6841 " <div class=\"alert alert-danger\" ng-if=\"!ctrl.possibleChannels.length\">\n" +
6841 " <div class=\"alert alert-danger\" ng-if=\"!ctrl.possibleChannels.length\">\n" +
6842 " <span class=\"fa fa-exclamation-triangle \"></span>You need to create an alert channel before you can assign it to your rule.\n" +
6842 " <span class=\"fa fa-exclamation-triangle \"></span>You need to create an alert channel before you can assign it to your rule.\n" +
6843 " </div>\n" +
6843 " </div>\n" +
6844 "\n" +
6844 "\n" +
6845 " </div>\n" +
6845 " </div>\n" +
6846 " <hr/>\n" +
6846 " <hr/>\n" +
6847 " <p>Meeting following criteria:</p>\n" +
6847 " <p>Meeting following criteria:</p>\n" +
6848 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6848 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6849 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6849 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6850 " </div>\n" +
6850 " </div>\n" +
6851 "</div>\n"
6851 "</div>\n"
6852 );
6852 );
6853
6853
6854
6854
6855 $templateCache.put('directives/rule_read_only/rule_read_only.html',
6855 $templateCache.put('directives/rule_read_only/rule_read_only.html',
6856 "<div class=\"rule-read-only\">\n" +
6856 "<div class=\"rule-read-only\">\n" +
6857 "\n" +
6857 "\n" +
6858 " <span class=\"form-group\">\n" +
6858 " <span class=\"form-group\">\n" +
6859 " {{rule_ctrlr.readOnlyPossibleFields[rule_ctrlr.rule.field]}}\n" +
6859 " {{rule_ctrlr.readOnlyPossibleFields[rule_ctrlr.rule.field]}}\n" +
6860 " </span>\n" +
6860 " </span>\n" +
6861 "\n" +
6861 "\n" +
6862 " <span ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\">\n" +
6862 " <span ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\">\n" +
6863 " is {{rule_ctrlr.ruleDefinitions.allOps[rule_ctrlr.rule.op]}} {{rule_ctrlr.rule.value}}\n" +
6863 " is {{rule_ctrlr.ruleDefinitions.allOps[rule_ctrlr.rule.op]}} {{rule_ctrlr.rule.value}}\n" +
6864 " </span>\n" +
6864 " </span>\n" +
6865 "\n" +
6865 "\n" +
6866 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6866 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6867 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6867 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6868 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6868 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6869 "\n" +
6869 "\n" +
6870 " <div class=\"panel panel-default\">\n" +
6870 " <div class=\"panel panel-default\">\n" +
6871 " <div class=\"panel-body form-inline\">\n" +
6871 " <div class=\"panel-body form-inline\">\n" +
6872 " <recursive>\n" +
6872 " <recursive>\n" +
6873 " <rule-read-only rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"rule_ctrlr.parentObj\"></rule-read-only>\n" +
6873 " <rule-read-only rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"rule_ctrlr.parentObj\"></rule-read-only>\n" +
6874 " </recursive>\n" +
6874 " </recursive>\n" +
6875 " </div>\n" +
6875 " </div>\n" +
6876 " </div>\n" +
6876 " </div>\n" +
6877 " </div>\n" +
6877 " </div>\n" +
6878 "\n" +
6878 "\n" +
6879 " </span>\n" +
6879 " </span>\n" +
6880 "</div>\n"
6880 "</div>\n"
6881 );
6881 );
6882
6882
6883
6883
6884 $templateCache.put('directives/rule/rule.html',
6884 $templateCache.put('directives/rule/rule.html',
6885 "<div class=\"rule form-inline\">\n" +
6885 "<div class=\"rule form-inline\">\n" +
6886 "\n" +
6886 "\n" +
6887 " <div class=\"form-group\">\n" +
6887 " <div class=\"form-group\">\n" +
6888 " <select class=\"form-control\"\n" +
6888 " <select class=\"form-control\"\n" +
6889 " ng-model=\"rule_ctrlr.rule.field\"\n" +
6889 " ng-model=\"rule_ctrlr.rule.field\"\n" +
6890 " ng-change=\"rule_ctrlr.fieldChange()\"\n" +
6890 " ng-change=\"rule_ctrlr.fieldChange()\"\n" +
6891 " ng-options=\"key as label for (key, label) in rule_ctrlr.ruleDefinitions.possibleFields\"></select>\n" +
6891 " ng-options=\"key as label for (key, label) in rule_ctrlr.ruleDefinitions.possibleFields\"></select>\n" +
6892 " </div>\n" +
6892 " </div>\n" +
6893 "\n" +
6893 "\n" +
6894 " <div ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\" class=\"form-group\">\n" +
6894 " <div ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\" class=\"form-group\">\n" +
6895 "\n" +
6895 "\n" +
6896 " <select ng-model=\"rule_ctrlr.rule.op\" class=\"form-control\"\n" +
6896 " <select ng-model=\"rule_ctrlr.rule.op\" class=\"form-control\"\n" +
6897 " ng-change=\"rule_ctrlr.setDirty()\"\n" +
6897 " ng-change=\"rule_ctrlr.setDirty()\"\n" +
6898 " ng-options=\"op as rule_ctrlr.ruleDefinitions.allOps[op] for op in rule_ctrlr.ruleDefinitions.fieldOps[rule_ctrlr.rule.field]\">\n" +
6898 " ng-options=\"op as rule_ctrlr.ruleDefinitions.allOps[op] for op in rule_ctrlr.ruleDefinitions.fieldOps[rule_ctrlr.rule.field]\">\n" +
6899 " </select>\n" +
6899 " </select>\n" +
6900 "\n" +
6900 "\n" +
6901 " <input type=\"text\" placeholder=\"Value\" ng-model=\"rule_ctrlr.rule.value\" ng-change=\"rule_ctrlr.setDirty()\" class=\"form-control\">\n" +
6901 " <input type=\"text\" placeholder=\"Value\" ng-model=\"rule_ctrlr.rule.value\" ng-change=\"rule_ctrlr.setDirty()\" class=\"form-control\">\n" +
6902 "\n" +
6902 "\n" +
6903 " </div>\n" +
6903 " </div>\n" +
6904 "\n" +
6904 "\n" +
6905 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6905 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6906 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6906 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6907 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6907 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6908 " <div class=\"panel panel-default\">\n" +
6908 " <div class=\"panel panel-default\">\n" +
6909 " <div class=\"panel-body form-inline\">\n" +
6909 " <div class=\"panel-body form-inline\">\n" +
6910 " <recursive>\n" +
6910 " <recursive>\n" +
6911 " <rule rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"rule_ctrlr.rule\" parent-obj=\"rule_ctrlr.parentObj\"></rule>\n" +
6911 " <rule rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"rule_ctrlr.rule\" parent-obj=\"rule_ctrlr.parentObj\"></rule>\n" +
6912 " </recursive>\n" +
6912 " </recursive>\n" +
6913 " </div>\n" +
6913 " </div>\n" +
6914 " </div>\n" +
6914 " </div>\n" +
6915 " </div>\n" +
6915 " </div>\n" +
6916 "\n" +
6916 "\n" +
6917 " <span ng-if=\"(rule_ctrlr.config.disable_subrules == false) == false\" class=\"btn btn-info\" ng-click=\"rule_ctrlr.add()\"><span class=\"fa fa-plus-circle\"></span> Add rule</span>\n" +
6917 " <span ng-if=\"(rule_ctrlr.config.disable_subrules == false) == false\" class=\"btn btn-info\" ng-click=\"rule_ctrlr.add()\"><span class=\"fa fa-plus-circle\"></span> Add rule</span>\n" +
6918 "\n" +
6918 "\n" +
6919 " </span>\n" +
6919 " </span>\n" +
6920 " <div class=\"pull-right\" ng-if=\"rule_ctrlr.parentRule\">\n" +
6920 " <div class=\"pull-right\" ng-if=\"rule_ctrlr.parentRule\">\n" +
6921 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6921 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6922 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6922 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6923 " <ul class=\"dropdown-menu\">\n" +
6923 " <ul class=\"dropdown-menu\">\n" +
6924 " <li><a>No</a></li>\n" +
6924 " <li><a>No</a></li>\n" +
6925 " <li><a ng-click=\"rule_ctrlr.deleteRule(rule_ctrlr.parentRule, rule_ctrlr.rule)\">Yes</a></li>\n" +
6925 " <li><a ng-click=\"rule_ctrlr.deleteRule(rule_ctrlr.parentRule, rule_ctrlr.rule)\">Yes</a></li>\n" +
6926 " </ul>\n" +
6926 " </ul>\n" +
6927 " </span>\n" +
6927 " </span>\n" +
6928 " </div>\n" +
6928 " </div>\n" +
6929 "</div>\n"
6929 "</div>\n"
6930 );
6930 );
6931
6931
6932
6932
6933 $templateCache.put('templates/admin/groups/parent_view.html',
6933 $templateCache.put('templates/admin/groups/parent_view.html',
6934 "<div ui-view></div>"
6934 "<div ui-view></div>"
6935 );
6935 );
6936
6936
6937
6937
6938 $templateCache.put('templates/directives/search_type_ahead.html',
6938 $templateCache.put('templates/directives/search_type_ahead.html',
6939 "<a>\n" +
6939 "<a>\n" +
6940 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
6940 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
6941 " <span class=\"tag\" ng-show=\"!match.model.tag\">{{match.label}}</span>\n" +
6941 " <span class=\"tag\" ng-show=\"!match.model.tag\">{{match.label}}</span>\n" +
6942 " <span ng-show=\"match.model.example\">-</span> <span class=\"example\">{{match.model.example}}</span>\n" +
6942 " <span ng-show=\"match.model.example\">-</span> <span class=\"example\">{{match.model.example}}</span>\n" +
6943 " <div class=\"description\">{{match.model.description}}</div>\n" +
6943 " <div class=\"description\">{{match.model.description}}</div>\n" +
6944 "\n" +
6944 "\n" +
6945 "</a>\n"
6945 "</a>\n"
6946 );
6946 );
6947
6947
6948
6948
6949 $templateCache.put('templates/directives/user_search_type_ahead.html',
6949 $templateCache.put('templates/directives/user_search_type_ahead.html',
6950 "<a>\n" +
6950 "<a>\n" +
6951 " <span>{{match.label}}</span> -\n" +
6951 " <span>{{match.label}}</span> -\n" +
6952 " <span class=\"color-secondary\">{{match.model.name}}</span>\n" +
6952 " <span class=\"color-secondary\">{{match.model.name}}</span>\n" +
6953 "</a>\n"
6953 "</a>\n"
6954 );
6954 );
6955
6955
6956
6956
6957 $templateCache.put('templates/integrations/bitbucket.html',
6957 $templateCache.put('templates/integrations/bitbucket.html',
6958 " <div class=\"modal-header\">\n" +
6958 " <div class=\"modal-header\">\n" +
6959 " <h3 class=\"m-t-0\">Add issue to Bitbucket</h3>\n" +
6959 " <h3 class=\"m-t-0\">Add issue to Bitbucket</h3>\n" +
6960 " </div>\n" +
6960 " </div>\n" +
6961 " <div class=\"modal-body\">\n" +
6961 " <div class=\"modal-body\">\n" +
6962 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
6962 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
6963 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
6963 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
6964 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
6964 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
6965 " </div>\n" +
6965 " </div>\n" +
6966 "\n" +
6966 "\n" +
6967 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
6967 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
6968 " <div class=\"form-group\">\n" +
6968 " <div class=\"form-group\">\n" +
6969 " <label for=\"issue_title\">Issue Title</label>\n" +
6969 " <label for=\"issue_title\">Issue Title</label>\n" +
6970 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
6970 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
6971 " </div>\n" +
6971 " </div>\n" +
6972 " <div class=\"form-group row\">\n" +
6972 " <div class=\"form-group row\">\n" +
6973 " <div class=\"col-sm-6\">\n" +
6973 " <div class=\"col-sm-6\">\n" +
6974 " <label for=\"issue_priority\">Priority</label>\n" +
6974 " <label for=\"issue_priority\">Priority</label>\n" +
6975 " <select class=\"form-control\" id=\"issue_priority\" ng-options=\"s for s in ctrl.priorities\" ng-model=\"ctrl.form.priority\"></select>\n" +
6975 " <select class=\"form-control\" id=\"issue_priority\" ng-options=\"s for s in ctrl.priorities\" ng-model=\"ctrl.form.priority\"></select>\n" +
6976 " </div>\n" +
6976 " </div>\n" +
6977 "\n" +
6977 "\n" +
6978 " <div class=\"col-sm-6\">\n" +
6978 " <div class=\"col-sm-6\">\n" +
6979 " <label for=\"issue_responsible\">Assignee</label>\n" +
6979 " <label for=\"issue_responsible\">Assignee</label>\n" +
6980 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.user for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
6980 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.user for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
6981 " </div>\n" +
6981 " </div>\n" +
6982 " </div>\n" +
6982 " </div>\n" +
6983 " <div class=\"form-group\">\n" +
6983 " <div class=\"form-group\">\n" +
6984 " <label for=\"issue_content\">Description</label>\n" +
6984 " <label for=\"issue_content\">Description</label>\n" +
6985 " <textarea id=\"issue_content\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
6985 " <textarea id=\"issue_content\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
6986 " </div>\n" +
6986 " </div>\n" +
6987 " </form>\n" +
6987 " </form>\n" +
6988 "\n" +
6988 "\n" +
6989 " </div>\n" +
6989 " </div>\n" +
6990 " <div class=\"modal-footer\">\n" +
6990 " <div class=\"modal-footer\">\n" +
6991 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
6991 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
6992 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
6992 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
6993 " </div>\n"
6993 " </div>\n"
6994 );
6994 );
6995
6995
6996
6996
6997 $templateCache.put('templates/integrations/github.html',
6997 $templateCache.put('templates/integrations/github.html',
6998 " <div class=\"modal-header\">\n" +
6998 " <div class=\"modal-header\">\n" +
6999 " <h3 class=\"m-t-0\">Add issue to Github</h3>\n" +
6999 " <h3 class=\"m-t-0\">Add issue to Github</h3>\n" +
7000 " </div>\n" +
7000 " </div>\n" +
7001 " <div class=\"modal-body\">\n" +
7001 " <div class=\"modal-body\">\n" +
7002 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
7002 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
7003 "\n" +
7003 "\n" +
7004 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
7004 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
7005 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
7005 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
7006 " </div>\n" +
7006 " </div>\n" +
7007 "\n" +
7007 "\n" +
7008 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
7008 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
7009 " <div class=\"form-group\">\n" +
7009 " <div class=\"form-group\">\n" +
7010 " <label for=\"issue_title\">Issue Title</label>\n" +
7010 " <label for=\"issue_title\">Issue Title</label>\n" +
7011 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
7011 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
7012 " </div>\n" +
7012 " </div>\n" +
7013 " <div class=\"form-group row\">\n" +
7013 " <div class=\"form-group row\">\n" +
7014 " <div class=\"col-sm-6\">\n" +
7014 " <div class=\"col-sm-6\">\n" +
7015 " <label for=\"issue_status\">Tag</label>\n" +
7015 " <label for=\"issue_status\">Tag</label>\n" +
7016 " <select class=\"form-control\" id=\"issue_status\" ng-options=\"s for s in ctrl.statuses\" ng-model=\"ctrl.form.status\"></select>\n" +
7016 " <select class=\"form-control\" id=\"issue_status\" ng-options=\"s for s in ctrl.statuses\" ng-model=\"ctrl.form.status\"></select>\n" +
7017 " </div>\n" +
7017 " </div>\n" +
7018 "\n" +
7018 "\n" +
7019 " <div class=\"col-sm-6\">\n" +
7019 " <div class=\"col-sm-6\">\n" +
7020 " <label for=\"issue_responsible\">Assignee</label>\n" +
7020 " <label for=\"issue_responsible\">Assignee</label>\n" +
7021 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.user for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
7021 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.user for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
7022 " </div>\n" +
7022 " </div>\n" +
7023 " </div>\n" +
7023 " </div>\n" +
7024 " <div class=\"form-group\">\n" +
7024 " <div class=\"form-group\">\n" +
7025 " <label for=\"issue_description\">Description</label>\n" +
7025 " <label for=\"issue_description\">Description</label>\n" +
7026 " <textarea id=\"issue_description\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
7026 " <textarea id=\"issue_description\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
7027 " </div>\n" +
7027 " </div>\n" +
7028 " </form>\n" +
7028 " </form>\n" +
7029 "\n" +
7029 "\n" +
7030 " </div>\n" +
7030 " </div>\n" +
7031 " <div class=\"modal-footer\">\n" +
7031 " <div class=\"modal-footer\">\n" +
7032 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
7032 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
7033 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
7033 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
7034 " </div>\n"
7034 " </div>\n"
7035 );
7035 );
7036
7036
7037
7037
7038 $templateCache.put('templates/integrations/jira.html',
7038 $templateCache.put('templates/integrations/jira.html',
7039 " <div class=\"modal-header\">\n" +
7039 " <div class=\"modal-header\">\n" +
7040 " <h3 class=\"m-t-0\">Add issue to Jira</h3>\n" +
7040 " <h3 class=\"m-t-0\">Add issue to Jira</h3>\n" +
7041 " </div>\n" +
7041 " </div>\n" +
7042 " <div class=\"modal-body\">\n" +
7042 " <div class=\"modal-body\">\n" +
7043 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
7043 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
7044 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
7044 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
7045 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
7045 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
7046 " </div>\n" +
7046 " </div>\n" +
7047 "\n" +
7047 "\n" +
7048 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
7048 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
7049 " <div class=\"form-group\">\n" +
7049 " <div class=\"form-group\">\n" +
7050 " <label for=\"issue_title\">Issue Title</label>\n" +
7050 " <label for=\"issue_title\">Issue Title</label>\n" +
7051 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
7051 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
7052 " </div>\n" +
7052 " </div>\n" +
7053 "\n" +
7053 "\n" +
7054 " <div class=\"form-group\">\n" +
7054 " <div class=\"form-group\">\n" +
7055 " <label for=\"issue_type\">Issue Type</label>\n" +
7055 " <label for=\"issue_type\">Issue Type</label>\n" +
7056 " <select class=\"form-control\" id=\"issue_type\" ng-options=\"i.name for i in ctrl.issue_types\" ng-model=\"ctrl.form.issue_type\"></select>\n" +
7056 " <select class=\"form-control\" id=\"issue_type\" ng-options=\"i.name for i in ctrl.issue_types\" ng-model=\"ctrl.form.issue_type\"></select>\n" +
7057 " </div>\n" +
7057 " </div>\n" +
7058 " <div class=\"form-group row\">\n" +
7058 " <div class=\"form-group row\">\n" +
7059 " <div class=\"col-sm-6\">\n" +
7059 " <div class=\"col-sm-6\">\n" +
7060 " <label for=\"issue_priority\">Priority</label>\n" +
7060 " <label for=\"issue_priority\">Priority</label>\n" +
7061 " <select class=\"form-control\" id=\"issue_priority\" ng-options=\"s.name for s in ctrl.priorities\" ng-model=\"ctrl.form.priority\"></select>\n" +
7061 " <select class=\"form-control\" id=\"issue_priority\" ng-options=\"s.name for s in ctrl.priorities\" ng-model=\"ctrl.form.priority\"></select>\n" +
7062 " </div>\n" +
7062 " </div>\n" +
7063 "\n" +
7063 "\n" +
7064 " <div class=\"col-sm-6\">\n" +
7064 " <div class=\"col-sm-6\">\n" +
7065 " <label for=\"issue_responsible\">Assignee</label>\n" +
7065 " <label for=\"issue_responsible\">Assignee</label>\n" +
7066 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.name for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
7066 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.name for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
7067 " </div>\n" +
7067 " </div>\n" +
7068 " </div>\n" +
7068 " </div>\n" +
7069 " <div class=\"form-group\">\n" +
7069 " <div class=\"form-group\">\n" +
7070 " <label for=\"issue_content\">Description</label>\n" +
7070 " <label for=\"issue_content\">Description</label>\n" +
7071 " <textarea id=\"issue_content\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
7071 " <textarea id=\"issue_content\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
7072 " </div>\n" +
7072 " </div>\n" +
7073 " </form>\n" +
7073 " </form>\n" +
7074 "\n" +
7074 "\n" +
7075 " </div>\n" +
7075 " </div>\n" +
7076 " <div class=\"modal-footer\">\n" +
7076 " <div class=\"modal-footer\">\n" +
7077 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
7077 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
7078 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
7078 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
7079 " </div>\n"
7079 " </div>\n"
7080 );
7080 );
7081
7081
7082
7082
7083 $templateCache.put('templates/loader.html',
7083 $templateCache.put('templates/loader.html',
7084 "<div class=\"text-center\">\n" +
7084 "<div class=\"text-center\">\n" +
7085 " <span class=\"fa fa-cog fa-spin fa-5x m-a-4\"></span>\n" +
7085 " <span class=\"fa fa-cog fa-spin fa-5x m-a-4\"></span>\n" +
7086 "</div>\n"
7086 "</div>\n"
7087 );
7087 );
7088
7088
7089
7089
7090 $templateCache.put('templates/quickstart.html',
7090 $templateCache.put('templates/quickstart.html',
7091 "<h2>AppEnlight quickstart</h2>\n" +
7091 "<h2>AppEnlight quickstart</h2>\n" +
7092 "\n" +
7092 "\n" +
7093 "<p>\n" +
7093 "<p>\n" +
7094 " <span class=\"point\">1</span>\n" +
7094 " <span class=\"point\">1</span>\n" +
7095 " For AppEnlight to operate, you need to\n" +
7095 " For AppEnlight to operate, you need to\n" +
7096 " <a data-ui-sref=\"applications.update({resourceId:'new'})\" target=\"_blank\"><strong>create an app profile</strong></a> that allows\n" +
7096 " <a data-ui-sref=\"applications.update({resourceId:'new'})\" target=\"_blank\"><strong>create an app profile</strong></a> that allows\n" +
7097 " you to\n" +
7097 " you to\n" +
7098 " obtain an <strong>API key</strong> that one of the clients can use.\n" +
7098 " obtain an <strong>API key</strong> that one of the clients can use.\n" +
7099 "</p>\n" +
7099 "</p>\n" +
7100 "\n" +
7100 "\n" +
7101 "<div class=\"clear\"></div>\n" +
7101 "<div class=\"clear\"></div>\n" +
7102 "<hr/>\n" +
7102 "<hr/>\n" +
7103 "\n" +
7103 "\n" +
7104 "<p>\n" +
7104 "<p>\n" +
7105 " <span class=\"point\">2</span>\n" +
7105 " <span class=\"point\">2</span>\n" +
7106 " It is a good idea to configure an\n" +
7106 " It is a good idea to configure an\n" +
7107 " <a data-ui-sref=\"user.alert_channels.email\" target=\"_blank\">\n" +
7107 " <a data-ui-sref=\"user.alert_channels.email\" target=\"_blank\">\n" +
7108 " <strong>email alert channel</strong></a> that you can use to receive\n" +
7108 " <strong>email alert channel</strong></a> that you can use to receive\n" +
7109 " notifications about events that happen in your application.\n" +
7109 " notifications about events that happen in your application.\n" +
7110 "</p>\n" +
7110 "</p>\n" +
7111 "\n" +
7111 "\n" +
7112 "<p>\n" +
7112 "<p>\n" +
7113 " It can be the same email account you used to register withing AppEnlight -\n" +
7113 " It can be the same email account you used to register withing AppEnlight -\n" +
7114 " although we often recommend using a separate <em>errors@...</em> account\n" +
7114 " although we often recommend using a separate <em>errors@...</em> account\n" +
7115 " designated for alert notifications.\n" +
7115 " designated for alert notifications.\n" +
7116 "</p>\n" +
7116 "</p>\n" +
7117 "\n" +
7117 "\n" +
7118 "<div class=\"clear\"></div>\n" +
7118 "<div class=\"clear\"></div>\n" +
7119 "<hr/>\n" +
7119 "<hr/>\n" +
7120 "\n" +
7120 "\n" +
7121 "<p>\n" +
7121 "<p>\n" +
7122 " <span class=\"point\">3</span>\n" +
7122 " <span class=\"point\">3</span>\n" +
7123 " In order for your application to stream meaningful information, you will need to\n" +
7123 " In order for your application to stream meaningful information, you will need to\n" +
7124 " integrate a compatible client for your language of choice.\n" +
7124 " integrate a compatible client for your language of choice.\n" +
7125 "</p>\n" +
7125 "</p>\n" +
7126 "\n" +
7126 "\n" +
7127 "<p>Head over to the <a href=\"{{AeConfig.urls.docs}}\" target=\"_blank\">\n" +
7127 "<p>Head over to the <a href=\"{{AeConfig.urls.docs}}\" target=\"_blank\">\n" +
7128 " <strong>developers section</strong></a> for information on currently available\n" +
7128 " <strong>developers section</strong></a> for information on currently available\n" +
7129 " clients that you can plug into your software</p>\n"
7129 " clients that you can plug into your software</p>\n"
7130 );
7130 );
7131
7131
7132
7132
7133 $templateCache.put('templates/register.html',
7133 $templateCache.put('templates/register.html',
7134 ""
7134 ""
7135 );
7135 );
7136
7136
7137
7137
7138 $templateCache.put('templates/reports/small_report_group_list.html',
7138 $templateCache.put('templates/reports/small_report_group_list.html',
7139 "<table class=\"errors-small-list\">\n" +
7139 "<table class=\"errors-small-list\">\n" +
7140 " <tr ng-repeat=\"report_group in groups track by report_group.id\" class=\"animate-repeat\">\n" +
7140 " <tr ng-repeat=\"report_group in groups track by report_group.id\" class=\"animate-repeat\">\n" +
7141 " <td class=\"c1 occurences\"><span class=\"occurences\" data-uib-tooltip=\"occurences\">{{ report_group.occurences|numberToThousands }}</span></td>\n" +
7141 " <td class=\"c1 occurences\"><span class=\"occurences\" data-uib-tooltip=\"occurences\">{{ report_group.occurences|numberToThousands }}</span></td>\n" +
7142 " <td class=\"ellipsis c2 report_group\">\n" +
7142 " <td class=\"ellipsis c2 report_group\">\n" +
7143 " <a ui-sref=\"report.view_detail({groupId:report_group.id, reportId:report_group.last_report})\" title=\"{{report_group.error}}\" class=\"error-type\">\n" +
7143 " <a ui-sref=\"report.view_detail({groupId:report_group.id, reportId:report_group.last_report})\" title=\"{{report_group.error}}\" class=\"error-type\">\n" +
7144 " {{ report_group.error || \"Slow Report\"}}</a>\n" +
7144 " {{ report_group.error || \"Slow Report\"}}</a>\n" +
7145 " <br/>\n" +
7145 " <br/>\n" +
7146 " <span ng-show=\"report_group.summed_duration\" class=\"duration\" data-uib-tooltip=\"Average duration\">{{report_group.summed_duration/report_group.occurences|round:2}}s</span>\n" +
7146 " <span ng-show=\"report_group.summed_duration\" class=\"duration\" data-uib-tooltip=\"Average duration\">{{report_group.summed_duration/report_group.occurences|round:2}}s</span>\n" +
7147 " <span class=\"url\">{{ report_group.view_name || report_group.url_path}}</span>\n" +
7147 " <span class=\"url\">{{ report_group.view_name || report_group.url_path}}</span>\n" +
7148 " </td>\n" +
7148 " </td>\n" +
7149 " <td class=\"info\">\n" +
7149 " <td class=\"info\">\n" +
7150 " <strong ng-show=\"report_group.resource_id\">@{{applications[report_group.resource_id].resource_name}}</strong><br/>\n" +
7150 " <strong ng-show=\"report_group.resource_id\">@{{applications[report_group.resource_id].resource_name}}</strong><br/>\n" +
7151 " <span class=\"date\">{{report_group.last_timestamp | isoToRelativeTime}}</span>\n" +
7151 " <span class=\"date\">{{report_group.last_timestamp | isoToRelativeTime}}</span>\n" +
7152 " </td>\n" +
7152 " </td>\n" +
7153 " </tr>\n" +
7153 " </tr>\n" +
7154 "</table>\n"
7154 "</table>\n"
7155 );
7155 );
7156
7156
7157
7157
7158 $templateCache.put('templates/reports/small_report_list.html',
7158 $templateCache.put('templates/reports/small_report_list.html',
7159 "<table class=\"errors-small-list\">\n" +
7159 "<table class=\"errors-small-list\">\n" +
7160 " <tr ng-repeat=\"report in reports track by $index\" ng-show=\"reports.length > 0\" class=\"animate-repeat\">\n" +
7160 " <tr ng-repeat=\"report in reports track by $index\" ng-show=\"reports.length > 0\" class=\"animate-repeat\">\n" +
7161 " <td class=\"c1 occurences\"><span class=\"occurences\" data-uib-tooltip=\"occurences\">{{ report.group.occurences|numberToThousands }}</span></td>\n" +
7161 " <td class=\"c1 occurences\"><span class=\"occurences\" data-uib-tooltip=\"occurences\">{{ report.group.occurences|numberToThousands }}</span></td>\n" +
7162 " <td class=\"ellipsis c2 report\">\n" +
7162 " <td class=\"ellipsis c2 report\">\n" +
7163 " <a ui-sref=\"report.view_detail({groupId:report.group_id, reportId:report.report_id})\" title=\"{{report.error}}\" class=\"error-type\">\n" +
7163 " <a ui-sref=\"report.view_detail({groupId:report.group_id, reportId:report.report_id})\" title=\"{{report.error}}\" class=\"error-type\">\n" +
7164 " {{ report.error || \"Slow Report\"}}</a>\n" +
7164 " {{ report.error || \"Slow Report\"}}</a>\n" +
7165 " <br/>\n" +
7165 " <br/>\n" +
7166 " <span ng-show=\"report.group.summed_duration\" class=\"duration\" data-uib-tooltip=\"Average duration\">{{report.group.summed_duration/report.group.occurences|round:2}}s</span>\n" +
7166 " <span ng-show=\"report.group.summed_duration\" class=\"duration\" data-uib-tooltip=\"Average duration\">{{report.group.summed_duration/report.group.occurences|round:2}}s</span>\n" +
7167 " <span class=\"url\">{{ report.view_name || report.url_path}}</span>\n" +
7167 " <span class=\"url\">{{ report.view_name || report.url_path}}</span>\n" +
7168 " </td>\n" +
7168 " </td>\n" +
7169 " <td class=\"info\">\n" +
7169 " <td class=\"info\">\n" +
7170 " <strong ng-show=\"report.resource_id\">@{{applications[report.resource_id].resource_name}}</strong><br/>\n" +
7170 " <strong ng-show=\"report.resource_id\">@{{applications[report.resource_id].resource_name}}</strong><br/>\n" +
7171 " <span class=\"date\">{{report.last_timestamp | isoToRelativeTime}}</span>\n" +
7171 " <span class=\"date\">{{report.last_timestamp | isoToRelativeTime}}</span>\n" +
7172 " </td>\n" +
7172 " </td>\n" +
7173 " </tr>\n" +
7173 " </tr>\n" +
7174 "</table>\n"
7174 "</table>\n"
7175 );
7175 );
7176
7176
7177
7177
7178 $templateCache.put('templates/settings_breadcrumbs.html',
7178 $templateCache.put('templates/settings_breadcrumbs.html',
7179 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('applications')\">\n" +
7179 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('applications')\">\n" +
7180 " <li>Applications</li>\n" +
7180 " <li>Applications</li>\n" +
7181 " <li ng-show=\"$ctrl.$state.includes('applications.list')\" ng-class=\"{bold:$ctrl.$state.is('applications.list')}\">Owned applications</li>\n" +
7181 " <li ng-show=\"$ctrl.$state.includes('applications.list')\" ng-class=\"{bold:$ctrl.$state.is('applications.list')}\">Owned applications</li>\n" +
7182 " <li ng-show=\"$ctrl.$state.includes('applications.update')\" ng-class=\"{bold:$ctrl.$state.is('applications.update')}\">Modify application</li>\n" +
7182 " <li ng-show=\"$ctrl.$state.includes('applications.update')\" ng-class=\"{bold:$ctrl.$state.is('applications.update')}\">Modify application</li>\n" +
7183 " <li ng-show=\"$ctrl.$state.includes('applications.integrations')\" ng-class=\"{bold:$ctrl.$state.includes('applications.integrations')}\">Integrations</li>\n" +
7183 " <li ng-show=\"$ctrl.$state.includes('applications.integrations')\" ng-class=\"{bold:$ctrl.$state.includes('applications.integrations')}\">Integrations</li>\n" +
7184 " <li ng-show=\"$ctrl.$state.includes('applications.purge_logs')\" ng-class=\"{bold:$ctrl.$state.includes('applications.purge_logs')}\">Log Purging</li>\n" +
7184 " <li ng-show=\"$ctrl.$state.includes('applications.purge_logs')\" ng-class=\"{bold:$ctrl.$state.includes('applications.purge_logs')}\">Log Purging</li>\n" +
7185 "</ol>\n" +
7185 "</ol>\n" +
7186 "\n" +
7186 "\n" +
7187 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('user.profile')\">\n" +
7187 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('user.profile')\">\n" +
7188 " <li>Settings</li>\n" +
7188 " <li>Settings</li>\n" +
7189 " <li ng-show=\"$ctrl.$state.includes('user.profile.edit')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.edit')}\">User Profile</li>\n" +
7189 " <li ng-show=\"$ctrl.$state.includes('user.profile.edit')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.edit')}\">User Profile</li>\n" +
7190 " <li ng-show=\"$ctrl.$state.includes('user.profile.password')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.password')}\">Password</li>\n" +
7190 " <li ng-show=\"$ctrl.$state.includes('user.profile.password')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.password')}\">Password</li>\n" +
7191 " <li ng-show=\"$ctrl.$state.includes('user.profile.identities')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.identities')}\">Identities</li>\n" +
7191 " <li ng-show=\"$ctrl.$state.includes('user.profile.identities')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.identities')}\">Identities</li>\n" +
7192 " <li ng-show=\"$ctrl.$state.includes('user.profile.auth_tokens')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.auth_tokens')}\">Auth Tokens</li>\n" +
7192 " <li ng-show=\"$ctrl.$state.includes('user.profile.auth_tokens')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.auth_tokens')}\">Auth Tokens</li>\n" +
7193 "</ol>\n" +
7193 "</ol>\n" +
7194 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('user.alert_channels')\">\n" +
7194 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('user.alert_channels')\">\n" +
7195 "<li>Notifications</li>\n" +
7195 "<li>Notifications</li>\n" +
7196 "<li ng-show=\"$ctrl.$state.includes('user.alert_channels.list')\" ng-class=\"{bold:$ctrl.$state.is('user.alert_channels.list')}\">Alert Channels</li>\n" +
7196 "<li ng-show=\"$ctrl.$state.includes('user.alert_channels.list')\" ng-class=\"{bold:$ctrl.$state.is('user.alert_channels.list')}\">Alert Channels</li>\n" +
7197 "<li ng-show=\"$ctrl.$state.includes('user.alert_channels.email')\" ng-class=\"{bold:$ctrl.$state.is('user.alert_channels.email')}\">Create email channel</li>\n" +
7197 "<li ng-show=\"$ctrl.$state.includes('user.alert_channels.email')\" ng-class=\"{bold:$ctrl.$state.is('user.alert_channels.email')}\">Create email channel</li>\n" +
7198 "</ol>\n"
7198 "</ol>\n"
7199 );
7199 );
7200
7200
7201 }]);
7201 }]);
7202
7202
7203 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7203 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7204 //
7204 //
7205 // Licensed under the Apache License, Version 2.0 (the "License");
7205 // Licensed under the Apache License, Version 2.0 (the "License");
7206 // you may not use this file except in compliance with the License.
7206 // you may not use this file except in compliance with the License.
7207 // You may obtain a copy of the License at
7207 // You may obtain a copy of the License at
7208 //
7208 //
7209 // http://www.apache.org/licenses/LICENSE-2.0
7209 // http://www.apache.org/licenses/LICENSE-2.0
7210 //
7210 //
7211 // Unless required by applicable law or agreed to in writing, software
7211 // Unless required by applicable law or agreed to in writing, software
7212 // distributed under the License is distributed on an "AS IS" BASIS,
7212 // distributed under the License is distributed on an "AS IS" BASIS,
7213 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7213 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7214 // See the License for the specific language governing permissions and
7214 // See the License for the specific language governing permissions and
7215 // limitations under the License.
7215 // limitations under the License.
7216
7216
7217 angular.module('appenlight.components.appenlightApp', [])
7217 angular.module('appenlight.components.appenlightApp', [])
7218 .component('appenlightApp', {
7218 .component('appenlightApp', {
7219 templateUrl: 'components/appenlight-app/appenlight-app.html',
7219 templateUrl: 'components/appenlight-app/appenlight-app.html',
7220 controller: AppEnlightAppController
7220 controller: AppEnlightAppController
7221 });
7221 });
7222
7222
7223 AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig'];
7223 AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig'];
7224
7224
7225 function AppEnlightAppController($scope, $state, stateHolder, AeConfig){
7225 function AppEnlightAppController($scope, $state, stateHolder, AeConfig){
7226
7226
7227 // to keep bw compatibility
7227 // to keep bw compatibility
7228 $scope.$state = $state;
7228 $scope.$state = $state;
7229 $scope.stateHolder = stateHolder;
7229 $scope.stateHolder = stateHolder;
7230 $scope.flash = stateHolder.flashMessages.list;
7230 $scope.flash = stateHolder.flashMessages.list;
7231 $scope.closeAlert = stateHolder.flashMessages.closeAlert;
7231 $scope.closeAlert = stateHolder.flashMessages.closeAlert;
7232 $scope.AeConfig = AeConfig;
7232 $scope.AeConfig = AeConfig;
7233 }
7233 }
7234
7234
7235 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7235 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7236 //
7236 //
7237 // Licensed under the Apache License, Version 2.0 (the "License");
7237 // Licensed under the Apache License, Version 2.0 (the "License");
7238 // you may not use this file except in compliance with the License.
7238 // you may not use this file except in compliance with the License.
7239 // You may obtain a copy of the License at
7239 // You may obtain a copy of the License at
7240 //
7240 //
7241 // http://www.apache.org/licenses/LICENSE-2.0
7241 // http://www.apache.org/licenses/LICENSE-2.0
7242 //
7242 //
7243 // Unless required by applicable law or agreed to in writing, software
7243 // Unless required by applicable law or agreed to in writing, software
7244 // distributed under the License is distributed on an "AS IS" BASIS,
7244 // distributed under the License is distributed on an "AS IS" BASIS,
7245 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7245 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7246 // See the License for the specific language governing permissions and
7246 // See the License for the specific language governing permissions and
7247 // limitations under the License.
7247 // limitations under the License.
7248
7248
7249 angular.module('appenlight.components.appenlightHeader', [])
7249 angular.module('appenlight.components.appenlightHeader', [])
7250 .component('appenlightFooter', {
7250 .component('appenlightFooter', {
7251 templateUrl: 'templates/components/appenlight-footer.html',
7251 templateUrl: 'templates/components/appenlight-footer.html',
7252 controller: AppEnlightFooterController
7252 controller: AppEnlightFooterController
7253 });
7253 });
7254
7254
7255 ChannelstreamController.$inject = ['stateHolder', 'AeConfig'];
7255 ChannelstreamController.$inject = ['stateHolder', 'AeConfig'];
7256
7256
7257 function AppEnlightFooterController(stateHolder, AeConfig) {
7257 function AppEnlightFooterController(stateHolder, AeConfig) {
7258 var vm = this;
7258 var vm = this;
7259
7259
7260 vm.$onInit = function () {
7260 vm.$onInit = function () {
7261 vm.AeConfig = AeConfig;
7261 vm.AeConfig = AeConfig;
7262 vm.stateHolder = stateHolder;
7262 vm.stateHolder = stateHolder;
7263 }
7263 }
7264 }
7264 }
7265
7265
7266 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7266 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7267 //
7267 //
7268 // Licensed under the Apache License, Version 2.0 (the "License");
7268 // Licensed under the Apache License, Version 2.0 (the "License");
7269 // you may not use this file except in compliance with the License.
7269 // you may not use this file except in compliance with the License.
7270 // You may obtain a copy of the License at
7270 // You may obtain a copy of the License at
7271 //
7271 //
7272 // http://www.apache.org/licenses/LICENSE-2.0
7272 // http://www.apache.org/licenses/LICENSE-2.0
7273 //
7273 //
7274 // Unless required by applicable law or agreed to in writing, software
7274 // Unless required by applicable law or agreed to in writing, software
7275 // distributed under the License is distributed on an "AS IS" BASIS,
7275 // distributed under the License is distributed on an "AS IS" BASIS,
7276 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7276 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7277 // See the License for the specific language governing permissions and
7277 // See the License for the specific language governing permissions and
7278 // limitations under the License.
7278 // limitations under the License.
7279
7279
7280 angular.module('appenlight.components.appenlightHeader', [])
7280 angular.module('appenlight.components.appenlightHeader', [])
7281 .component('appenlightHeader', {
7281 .component('appenlightHeader', {
7282 templateUrl: 'components/appenlight-header/appenlight-header.html',
7282 templateUrl: 'components/appenlight-header/appenlight-header.html',
7283 controller: AppEnlightHeaderController
7283 controller: AppEnlightHeaderController
7284 });
7284 });
7285
7285
7286 ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig'];
7286 ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig'];
7287
7287
7288 function AppEnlightHeaderController($state, stateHolder, AeConfig) {
7288 function AppEnlightHeaderController($state, stateHolder, AeConfig) {
7289 var vm = this;
7289 var vm = this;
7290
7290
7291 vm.$onInit = function () {
7291 vm.$onInit = function () {
7292
7292
7293 vm.AeConfig = AeConfig;
7293 vm.AeConfig = AeConfig;
7294 vm.stateHolder = stateHolder;
7294 vm.stateHolder = stateHolder;
7295 vm.assignedReports = stateHolder.AeUser.assigned_reports;
7295 vm.assignedReports = stateHolder.AeUser.assigned_reports;
7296 vm.latestEvents = stateHolder.AeUser.latest_events;
7296 vm.latestEvents = stateHolder.AeUser.latest_events;
7297 vm.activeEvents = 0;
7297 vm.activeEvents = 0;
7298 _.each(vm.latestEvents, function (event) {
7298 _.each(vm.latestEvents, function (event) {
7299 if (event.status === 1 && event.end_date === null) {
7299 if (event.status === 1 && event.end_date === null) {
7300 vm.activeEvents += 1;
7300 vm.activeEvents += 1;
7301 }
7301 }
7302 });
7302 });
7303 }
7303 }
7304
7304
7305 vm.clickedEvent = function (event) {
7305 vm.clickedEvent = function (event) {
7306 // exception reports
7306 // exception reports
7307 if (_.contains([1, 2], event.event_type)) {
7307 if (_.contains([1, 2], event.event_type)) {
7308 $state.go('report.list', {resource: event.resource_id, start_date: event.start_date});
7308 $state.go('report.list', {resource: event.resource_id, start_date: event.start_date});
7309 }
7309 }
7310 // slowness reports
7310 // slowness reports
7311 else if (_.contains([3, 4], event.event_type)) {
7311 else if (_.contains([3, 4], event.event_type)) {
7312 $state.go('report.list_slow', {resource: event.resource_id, start_date: event.start_date});
7312 $state.go('report.list_slow', {resource: event.resource_id, start_date: event.start_date});
7313 }
7313 }
7314 // uptime reports
7314 // uptime reports
7315 else if (_.contains([7, 8], event.event_type)) {
7315 else if (_.contains([7, 8], event.event_type)) {
7316 $state.go('uptime', {resource: event.resource_id, start_date: event.start_date});
7316 $state.go('uptime', {resource: event.resource_id, start_date: event.start_date});
7317 } else {
7317 } else {
7318
7318
7319 }
7319 }
7320 }
7320 }
7321 }
7321 }
7322
7322
7323 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7323 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7324 //
7324 //
7325 // Licensed under the Apache License, Version 2.0 (the "License");
7325 // Licensed under the Apache License, Version 2.0 (the "License");
7326 // you may not use this file except in compliance with the License.
7326 // you may not use this file except in compliance with the License.
7327 // You may obtain a copy of the License at
7327 // You may obtain a copy of the License at
7328 //
7328 //
7329 // http://www.apache.org/licenses/LICENSE-2.0
7329 // http://www.apache.org/licenses/LICENSE-2.0
7330 //
7330 //
7331 // Unless required by applicable law or agreed to in writing, software
7331 // Unless required by applicable law or agreed to in writing, software
7332 // distributed under the License is distributed on an "AS IS" BASIS,
7332 // distributed under the License is distributed on an "AS IS" BASIS,
7333 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7333 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7334 // See the License for the specific language governing permissions and
7334 // See the License for the specific language governing permissions and
7335 // limitations under the License.
7335 // limitations under the License.
7336
7336
7337 angular.module('appenlight.components.channelstream', [])
7337 angular.module('appenlight.components.channelstream', [])
7338 .component('channelstream', {
7338 .component('channelstream', {
7339 controller: ChannelstreamController,
7339 controller: ChannelstreamController,
7340 bindings: {
7340 bindings: {
7341 config: '='
7341 config: '='
7342 }
7342 }
7343 });
7343 });
7344
7344
7345 ChannelstreamController.$inject = ['$rootScope', 'stateHolder', 'userSelfPropertyResource'];
7345 ChannelstreamController.$inject = ['$rootScope', 'stateHolder', 'userSelfPropertyResource'];
7346
7346
7347 function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResource){
7347 function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResource){
7348 if (stateHolder.AeUser.id === null){
7348 if (stateHolder.AeUser.id === null){
7349 return
7349 return
7350 }
7350 }
7351 userSelfPropertyResource.get({key: 'websocket'}, function (data) {
7351 userSelfPropertyResource.get({key: 'websocket'}, function (data) {
7352 stateHolder.websocket = new ReconnectingWebSocket(this.config.ws_url + '/ws?conn_id=' + data.conn_id);
7352 stateHolder.websocket = new ReconnectingWebSocket(this.config.ws_url + '/ws?conn_id=' + data.conn_id);
7353 stateHolder.websocket.onopen = function (event) {
7353 stateHolder.websocket.onopen = function (event) {
7354
7354
7355 };
7355 };
7356 stateHolder.websocket.onmessage = function (event) {
7356 stateHolder.websocket.onmessage = function (event) {
7357 var data = JSON.parse(event.data);
7357 var data = JSON.parse(event.data);
7358 $rootScope.$apply(function (scope) {
7358 $rootScope.$apply(function (scope) {
7359 _.each(data, function (message) {
7359 _.each(data, function (message) {
7360
7360
7361 if(typeof message.message.topic !== 'undefined'){
7361 if(typeof message.message.topic !== 'undefined'){
7362 $rootScope.$emit(
7362 $rootScope.$emit(
7363 'channelstream-message.'+message.message.topic, message);
7363 'channelstream-message.'+message.message.topic, message);
7364 }
7364 }
7365 else{
7365 else{
7366 $rootScope.$emit('channelstream-message', message);
7366 $rootScope.$emit('channelstream-message', message);
7367 }
7367 }
7368 });
7368 });
7369 });
7369 });
7370 };
7370 };
7371 stateHolder.websocket.onclose = function (event) {
7371 stateHolder.websocket.onclose = function (event) {
7372
7372
7373 };
7373 };
7374
7374
7375 stateHolder.websocket.onerror = function (event) {
7375 stateHolder.websocket.onerror = function (event) {
7376
7376
7377 };
7377 };
7378 }.bind(this));
7378 }.bind(this));
7379 }
7379 }
7380
7380
7381 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7381 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7382 //
7382 //
7383 // Licensed under the Apache License, Version 2.0 (the "License");
7383 // Licensed under the Apache License, Version 2.0 (the "License");
7384 // you may not use this file except in compliance with the License.
7384 // you may not use this file except in compliance with the License.
7385 // You may obtain a copy of the License at
7385 // You may obtain a copy of the License at
7386 //
7386 //
7387 // http://www.apache.org/licenses/LICENSE-2.0
7387 // http://www.apache.org/licenses/LICENSE-2.0
7388 //
7388 //
7389 // Unless required by applicable law or agreed to in writing, software
7389 // Unless required by applicable law or agreed to in writing, software
7390 // distributed under the License is distributed on an "AS IS" BASIS,
7390 // distributed under the License is distributed on an "AS IS" BASIS,
7391 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7391 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7392 // See the License for the specific language governing permissions and
7392 // See the License for the specific language governing permissions and
7393 // limitations under the License.
7393 // limitations under the License.
7394
7394
7395 angular.module('appenlight.components.adminApplicationsListView', [])
7395 angular.module('appenlight.components.adminApplicationsListView', [])
7396 .component('adminApplicationsListView', {
7396 .component('adminApplicationsListView', {
7397 templateUrl: 'components/views/admin-applications-list-view/admin-applications-list-view.html',
7397 templateUrl: 'components/views/admin-applications-list-view/admin-applications-list-view.html',
7398 controller: AdminApplicationsListController
7398 controller: AdminApplicationsListController
7399 });
7399 });
7400
7400
7401 AdminApplicationsListController.$inject = ['applicationsResource'];
7401 AdminApplicationsListController.$inject = ['applicationsResource'];
7402
7402
7403 function AdminApplicationsListController(applicationsResource) {
7403 function AdminApplicationsListController(applicationsResource) {
7404
7404
7405 var vm = this;
7405 var vm = this;
7406 vm.$onInit = function () {
7406 vm.$onInit = function () {
7407 vm.loading = {applications: true};
7407 vm.loading = {applications: true};
7408
7408
7409 vm.applications = applicationsResource.query({
7409 vm.applications = applicationsResource.query({
7410 root_list: true,
7410 root_list: true,
7411 resource_type: 'application'
7411 resource_type: 'application'
7412 }, function (data) {
7412 }, function (data) {
7413 vm.loading = {applications: false};
7413 vm.loading = {applications: false};
7414 });
7414 });
7415 }
7415 }
7416 };
7416 };
7417
7417
7418 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7418 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7419 //
7419 //
7420 // Licensed under the Apache License, Version 2.0 (the "License");
7420 // Licensed under the Apache License, Version 2.0 (the "License");
7421 // you may not use this file except in compliance with the License.
7421 // you may not use this file except in compliance with the License.
7422 // You may obtain a copy of the License at
7422 // You may obtain a copy of the License at
7423 //
7423 //
7424 // http://www.apache.org/licenses/LICENSE-2.0
7424 // http://www.apache.org/licenses/LICENSE-2.0
7425 //
7425 //
7426 // Unless required by applicable law or agreed to in writing, software
7426 // Unless required by applicable law or agreed to in writing, software
7427 // distributed under the License is distributed on an "AS IS" BASIS,
7427 // distributed under the License is distributed on an "AS IS" BASIS,
7428 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7428 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7429 // See the License for the specific language governing permissions and
7429 // See the License for the specific language governing permissions and
7430 // limitations under the License.
7430 // limitations under the License.
7431
7431
7432 angular.module('appenlight.components.adminConfigurationView', [])
7432 angular.module('appenlight.components.adminConfigurationView', [])
7433 .component('adminConfigurationView', {
7433 .component('adminConfigurationView', {
7434 templateUrl: 'components/views/admin-configuration-view/admin-configuration-view.html',
7434 templateUrl: 'components/views/admin-configuration-view/admin-configuration-view.html',
7435 controller: AdminConfigurationViewController
7435 controller: AdminConfigurationViewController
7436 });
7436 });
7437
7437
7438 AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResource'];
7438 AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResource'];
7439
7439
7440 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
7440 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
7441 var vm = this;
7441 var vm = this;
7442 vm.$onInit = function () {
7442 vm.$onInit = function () {
7443 vm.loading = {config: true};
7443 vm.loading = {config: true};
7444
7444
7445 var filters = [
7445 var filters = [
7446 'template_footer_html:global',
7446 'template_footer_html:global',
7447 'list_groups_to_non_admins:global',
7447 'list_groups_to_non_admins:global',
7448 'per_application_reports_rate_limit:global',
7448 'per_application_reports_rate_limit:global',
7449 'per_application_logs_rate_limit:global',
7449 'per_application_logs_rate_limit:global',
7450 'per_application_metrics_rate_limit:global',
7450 'per_application_metrics_rate_limit:global',
7451 ];
7451 ];
7452
7452
7453 vm.configs = {};
7453 vm.configs = {};
7454
7454
7455 vm.configList = configsResource.query({filter: filters},
7455 vm.configList = configsResource.query({filter: filters},
7456 function (data) {
7456 function (data) {
7457 vm.loading = {config: false};
7457 vm.loading = {config: false};
7458 _.each(data, function (item) {
7458 _.each(data, function (item) {
7459 if (vm.configs[item.section] === undefined) {
7459 if (vm.configs[item.section] === undefined) {
7460 vm.configs[item.section] = {};
7460 vm.configs[item.section] = {};
7461 }
7461 }
7462 vm.configs[item.section][item.key] = item;
7462 vm.configs[item.section][item.key] = item;
7463 });
7463 });
7464 });
7464 });
7465 }
7465 }
7466 vm.save = function () {
7466 vm.save = function () {
7467 vm.loading.config = true;
7467 vm.loading.config = true;
7468 _.each(vm.configList, function (item) {
7468 _.each(vm.configList, function (item) {
7469 item.$save();
7469 item.$save();
7470 });
7470 });
7471 vm.loading.config = false;
7471 vm.loading.config = false;
7472 };
7472 };
7473
7473
7474 };
7474 };
7475
7475
7476 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7476 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7477 //
7477 //
7478 // Licensed under the Apache License, Version 2.0 (the "License");
7478 // Licensed under the Apache License, Version 2.0 (the "License");
7479 // you may not use this file except in compliance with the License.
7479 // you may not use this file except in compliance with the License.
7480 // You may obtain a copy of the License at
7480 // You may obtain a copy of the License at
7481 //
7481 //
7482 // http://www.apache.org/licenses/LICENSE-2.0
7482 // http://www.apache.org/licenses/LICENSE-2.0
7483 //
7483 //
7484 // Unless required by applicable law or agreed to in writing, software
7484 // Unless required by applicable law or agreed to in writing, software
7485 // distributed under the License is distributed on an "AS IS" BASIS,
7485 // distributed under the License is distributed on an "AS IS" BASIS,
7486 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7486 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7487 // See the License for the specific language governing permissions and
7487 // See the License for the specific language governing permissions and
7488 // limitations under the License.
7488 // limitations under the License.
7489
7489
7490 angular.module('appenlight.components.adminGroupsCreateView', [])
7490 angular.module('appenlight.components.adminGroupsCreateView', [])
7491 .component('adminGroupsCreateView', {
7491 .component('adminGroupsCreateView', {
7492 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
7492 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
7493 controller: AdminGroupsCreateViewController
7493 controller: AdminGroupsCreateViewController
7494 });
7494 });
7495
7495
7496 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
7496 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
7497
7497
7498 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
7498 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
7499
7499
7500 var vm = this;
7500 var vm = this;
7501 vm.$onInit = function () {
7501 vm.$onInit = function () {
7502 vm.$state = $state;
7502 vm.$state = $state;
7503 vm.loading = {
7503 vm.loading = {
7504 group: false,
7504 group: false,
7505 resource_permissions: false,
7505 resource_permissions: false,
7506 users: false
7506 users: false
7507 };
7507 };
7508
7508
7509 vm.form = {
7509 vm.form = {
7510 autocompleteUser: '',
7510 autocompleteUser: '',
7511 }
7511 }
7512
7512
7513
7513
7514 if (typeof $state.params.groupId !== 'undefined') {
7514 if (typeof $state.params.groupId !== 'undefined') {
7515 vm.loading.group = true;
7515 vm.loading.group = true;
7516 var groupId = $state.params.groupId;
7516 var groupId = $state.params.groupId;
7517 vm.group = groupsResource.get({groupId: groupId}, function (data) {
7517 vm.group = groupsResource.get({groupId: groupId}, function (data) {
7518 vm.loading.group = false;
7518 vm.loading.group = false;
7519 });
7519 });
7520
7520
7521 vm.resource_permissions = groupsPropertyResource.query(
7521 vm.resource_permissions = groupsPropertyResource.query(
7522 {groupId: groupId, key: 'resource_permissions'}, function (data) {
7522 {groupId: groupId, key: 'resource_permissions'}, function (data) {
7523 vm.loading.resource_permissions = false;
7523 vm.loading.resource_permissions = false;
7524 var tmpObj = {
7524 var tmpObj = {
7525 'group': {
7525 'group': {
7526 'application': {},
7526 'application': {},
7527 'dashboard': {}
7527 'dashboard': {}
7528 }
7528 }
7529 };
7529 };
7530 _.each(data, function (item) {
7530 _.each(data, function (item) {
7531
7531
7532 var section = tmpObj[item.type][item.resource_type];
7532 var section = tmpObj[item.type][item.resource_type];
7533 if (typeof section[item.resource_id] == 'undefined') {
7533 if (typeof section[item.resource_id] == 'undefined') {
7534 section[item.resource_id] = {
7534 section[item.resource_id] = {
7535 self: item,
7535 self: item,
7536 permissions: []
7536 permissions: []
7537 }
7537 }
7538 }
7538 }
7539 section[item.resource_id].permissions.push(item.perm_name);
7539 section[item.resource_id].permissions.push(item.perm_name);
7540
7540
7541 });
7541 });
7542 vm.resourcePermissions = tmpObj;
7542 vm.resourcePermissions = tmpObj;
7543 });
7543 });
7544
7544
7545 vm.users = groupsPropertyResource.query(
7545 vm.users = groupsPropertyResource.query(
7546 {groupId: groupId, key: 'users'}, function (data) {
7546 {groupId: groupId, key: 'users'}, function (data) {
7547 vm.loading.users = false;
7547 vm.loading.users = false;
7548 }, function () {
7548 }, function () {
7549 vm.loading.users = false;
7549 vm.loading.users = false;
7550 });
7550 });
7551
7551
7552 } else {
7552 } else {
7553 var groupId = null;
7553 var groupId = null;
7554 }
7554 }
7555
7555
7556 }
7556 }
7557
7557
7558 var formResponse = function (response) {
7558 var formResponse = function (response) {
7559 if (response.status === 422) {
7559 if (response.status === 422) {
7560 setServerValidation(vm.groupForm, response.data);
7560 setServerValidation(vm.groupForm, response.data);
7561 }
7561 }
7562 vm.loading.group = false;
7562 vm.loading.group = false;
7563 };
7563 };
7564
7564
7565 vm.createGroup = function () {
7565 vm.createGroup = function () {
7566 vm.loading.group = true;
7566 vm.loading.group = true;
7567 var groupId = $state.params.groupId;
7567 if (groupId) {
7568 if (groupId) {
7568 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
7569 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
7569 setServerValidation(vm.groupForm);
7570 setServerValidation(vm.groupForm);
7570 vm.loading.group = false;
7571 vm.loading.group = false;
7571 }, formResponse);
7572 }, formResponse);
7572 } else {
7573 } else {
7573 groupsResource.save(vm.group, function (data) {
7574 groupsResource.save(vm.group, function (data) {
7574 $state.go('admin.group.update', {groupId: data.id});
7575 $state.go('admin.group.update', {groupId: data.id});
7575 }, formResponse);
7576 }, formResponse);
7576 }
7577 }
7577 };
7578 };
7578
7579
7579 vm.removeUser = function (user) {
7580 vm.removeUser = function (user) {
7581 var groupId = $state.params.groupId;
7580 groupsPropertyResource.delete(
7582 groupsPropertyResource.delete(
7581 {groupId: groupId, key: 'users', user_name: user.user_name},
7583 {groupId: groupId, key: 'users', user_name: user.user_name},
7582 function (data) {
7584 function (data) {
7583 vm.loading.users = false;
7585 vm.loading.users = false;
7584 vm.users = _.filter(vm.users, function (item) {
7586 vm.users = _.filter(vm.users, function (item) {
7585 return item != user;
7587 return item != user;
7586 });
7588 });
7587 }, function () {
7589 }, function () {
7588 vm.loading.users = false;
7590 vm.loading.users = false;
7589 });
7591 });
7590 };
7592 };
7591
7593
7592 vm.addUser = function () {
7594 vm.addUser = function () {
7595 var groupId = $state.params.groupId;
7593 groupsPropertyResource.save(
7596 groupsPropertyResource.save(
7594 {groupId: groupId, key: 'users'},
7597 {groupId: groupId, key: 'users'},
7595 {user_name: vm.form.autocompleteUser},
7598 {user_name: vm.form.autocompleteUser},
7596 function (data) {
7599 function (data) {
7597 vm.loading.users = false;
7600 vm.loading.users = false;
7598 vm.users.push(data);
7601 vm.users.push(data);
7599 vm.form.autocompleteUser = '';
7602 vm.form.autocompleteUser = '';
7600 }, function () {
7603 }, function () {
7601 vm.loading.users = false;
7604 vm.loading.users = false;
7602 });
7605 });
7603 }
7606 }
7604
7607
7605 vm.searchUsers = function (searchPhrase) {
7608 vm.searchUsers = function (searchPhrase) {
7606
7609
7607 return sectionViewResource.query({
7610 return sectionViewResource.query({
7608 section: 'users_section',
7611 section: 'users_section',
7609 view: 'search_users',
7612 view: 'search_users',
7610 'user_name': searchPhrase
7613 'user_name': searchPhrase
7611 }).$promise.then(function (data) {
7614 }).$promise.then(function (data) {
7612 return _.map(data, function (item) {
7615 return _.map(data, function (item) {
7613 return item.user;
7616 return item.user;
7614 });
7617 });
7615 });
7618 });
7616 }
7619 }
7617 };
7620 };
7618
7621
7619 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7622 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7620 //
7623 //
7621 // Licensed under the Apache License, Version 2.0 (the "License");
7624 // Licensed under the Apache License, Version 2.0 (the "License");
7622 // you may not use this file except in compliance with the License.
7625 // you may not use this file except in compliance with the License.
7623 // You may obtain a copy of the License at
7626 // You may obtain a copy of the License at
7624 //
7627 //
7625 // http://www.apache.org/licenses/LICENSE-2.0
7628 // http://www.apache.org/licenses/LICENSE-2.0
7626 //
7629 //
7627 // Unless required by applicable law or agreed to in writing, software
7630 // Unless required by applicable law or agreed to in writing, software
7628 // distributed under the License is distributed on an "AS IS" BASIS,
7631 // distributed under the License is distributed on an "AS IS" BASIS,
7629 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7632 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7630 // See the License for the specific language governing permissions and
7633 // See the License for the specific language governing permissions and
7631 // limitations under the License.
7634 // limitations under the License.
7632
7635
7633 angular.module('appenlight.components.adminGroupsListView', [])
7636 angular.module('appenlight.components.adminGroupsListView', [])
7634 .component('adminGroupsListView', {
7637 .component('adminGroupsListView', {
7635 templateUrl: 'components/views/admin-groups-list-view/admin-groups-list-view.html',
7638 templateUrl: 'components/views/admin-groups-list-view/admin-groups-list-view.html',
7636 controller: AdminGroupsListViewController
7639 controller: AdminGroupsListViewController
7637 });
7640 });
7638
7641
7639 AdminGroupsListViewController.$inject = ['$state', 'groupsResource'];
7642 AdminGroupsListViewController.$inject = ['$state', 'groupsResource'];
7640
7643
7641 function AdminGroupsListViewController($state, groupsResource) {
7644 function AdminGroupsListViewController($state, groupsResource) {
7642
7645
7643 var vm = this;
7646 var vm = this;
7644 this.$onInit = function () {
7647 this.$onInit = function () {
7645 vm.$state = $state;
7648 vm.$state = $state;
7646 vm.loading = {groups: true};
7649 vm.loading = {groups: true};
7647
7650
7648 vm.groups = groupsResource.query({}, function (data) {
7651 vm.groups = groupsResource.query({}, function (data) {
7649 vm.loading = {groups: false};
7652 vm.loading = {groups: false};
7650 vm.activeUsers = _.reduce(vm.groups, function (memo, val) {
7653 vm.activeUsers = _.reduce(vm.groups, function (memo, val) {
7651 if (val.status == 1) {
7654 if (val.status == 1) {
7652 return memo + 1;
7655 return memo + 1;
7653 }
7656 }
7654 return memo;
7657 return memo;
7655 }, 0);
7658 }, 0);
7656
7659
7657 });
7660 });
7658 }
7661 }
7659
7662
7660 vm.removeGroup = function (group) {
7663 vm.removeGroup = function (group) {
7661 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
7664 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
7662
7665
7663 if (data) {
7666 if (data) {
7664 var index = vm.groups.indexOf(group);
7667 var index = vm.groups.indexOf(group);
7665 if (index !== -1) {
7668 if (index !== -1) {
7666 vm.groups.splice(index, 1);
7669 vm.groups.splice(index, 1);
7667 vm.activeGroups -= 1;
7670 vm.activeGroups -= 1;
7668 }
7671 }
7669 }
7672 }
7670 });
7673 });
7671 }
7674 }
7672 };
7675 };
7673
7676
7674 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7677 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7675 //
7678 //
7676 // Licensed under the Apache License, Version 2.0 (the "License");
7679 // Licensed under the Apache License, Version 2.0 (the "License");
7677 // you may not use this file except in compliance with the License.
7680 // you may not use this file except in compliance with the License.
7678 // You may obtain a copy of the License at
7681 // You may obtain a copy of the License at
7679 //
7682 //
7680 // http://www.apache.org/licenses/LICENSE-2.0
7683 // http://www.apache.org/licenses/LICENSE-2.0
7681 //
7684 //
7682 // Unless required by applicable law or agreed to in writing, software
7685 // Unless required by applicable law or agreed to in writing, software
7683 // distributed under the License is distributed on an "AS IS" BASIS,
7686 // distributed under the License is distributed on an "AS IS" BASIS,
7684 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7687 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7685 // See the License for the specific language governing permissions and
7688 // See the License for the specific language governing permissions and
7686 // limitations under the License.
7689 // limitations under the License.
7687
7690
7688 angular.module('appenlight.components.adminPartitionsView', [])
7691 angular.module('appenlight.components.adminPartitionsView', [])
7689 .component('adminPartitionsView', {
7692 .component('adminPartitionsView', {
7690 templateUrl: 'components/views/admin-partitions-view/admin-partitions-view.html',
7693 templateUrl: 'components/views/admin-partitions-view/admin-partitions-view.html',
7691 controller: AdminPartitionsViewController
7694 controller: AdminPartitionsViewController
7692 });
7695 });
7693
7696
7694 AdminPartitionsViewController.$inject = ['sectionViewResource'];
7697 AdminPartitionsViewController.$inject = ['sectionViewResource'];
7695
7698
7696 function AdminPartitionsViewController(sectionViewResource) {
7699 function AdminPartitionsViewController(sectionViewResource) {
7697 var vm = this;
7700 var vm = this;
7698 this.$onInit = function () {
7701 this.$onInit = function () {
7699 vm.permanentPartitions = [];
7702 vm.permanentPartitions = [];
7700 vm.dailyPartitions = [];
7703 vm.dailyPartitions = [];
7701 vm.loading = {partitions: true};
7704 vm.loading = {partitions: true};
7702 vm.dailyChecked = false;
7705 vm.dailyChecked = false;
7703 vm.permChecked = false;
7706 vm.permChecked = false;
7704 vm.dailyConfirm = '';
7707 vm.dailyConfirm = '';
7705 vm.permConfirm = '';
7708 vm.permConfirm = '';
7706
7709
7707 sectionViewResource.get({section: 'admin_section', view: 'partitions'},
7710 sectionViewResource.get({section: 'admin_section', view: 'partitions'},
7708 vm.loadPartitions);
7711 vm.loadPartitions);
7709 }
7712 }
7710
7713
7711 vm.loadPartitions = function (data) {
7714 vm.loadPartitions = function (data) {
7712 var permanentPartitions = vm.transformPartitionList(
7715 var permanentPartitions = vm.transformPartitionList(
7713 data.permanent_partitions);
7716 data.permanent_partitions);
7714 var dailyPartitions = vm.transformPartitionList(
7717 var dailyPartitions = vm.transformPartitionList(
7715 data.daily_partitions);
7718 data.daily_partitions);
7716 vm.permanentPartitions = permanentPartitions;
7719 vm.permanentPartitions = permanentPartitions;
7717 vm.dailyPartitions = dailyPartitions;
7720 vm.dailyPartitions = dailyPartitions;
7718 vm.loading = {partitions: false};
7721 vm.loading = {partitions: false};
7719 };
7722 };
7720
7723
7721 vm.setCheckedList = function (scope) {
7724 vm.setCheckedList = function (scope) {
7722 var toTest = null;
7725 var toTest = null;
7723 if (scope === 'dailyPartitions') {
7726 if (scope === 'dailyPartitions') {
7724 toTest = 'dailyChecked';
7727 toTest = 'dailyChecked';
7725 } else {
7728 } else {
7726 toTest = 'permChecked';
7729 toTest = 'permChecked';
7727 }
7730 }
7728
7731
7729 if (vm[toTest]) {
7732 if (vm[toTest]) {
7730 var val = true;
7733 var val = true;
7731 } else {
7734 } else {
7732 var val = false;
7735 var val = false;
7733 }
7736 }
7734
7737
7735 _.each(vm[scope], function (item) {
7738 _.each(vm[scope], function (item) {
7736 _.each(item[1].pg, function (index) {
7739 _.each(item[1].pg, function (index) {
7737 index.checked = val;
7740 index.checked = val;
7738 });
7741 });
7739 _.each(item[1].elasticsearch, function (index) {
7742 _.each(item[1].elasticsearch, function (index) {
7740 index.checked = val;
7743 index.checked = val;
7741 });
7744 });
7742 });
7745 });
7743 }
7746 }
7744
7747
7745
7748
7746 vm.transformPartitionList = function (inputList) {
7749 vm.transformPartitionList = function (inputList) {
7747 var outputList = [];
7750 var outputList = [];
7748
7751
7749 _.each(inputList, function (item) {
7752 _.each(inputList, function (item) {
7750 var time = [item[0], {
7753 var time = [item[0], {
7751 elasticsearch: [],
7754 elasticsearch: [],
7752 pg: []
7755 pg: []
7753 }]
7756 }]
7754 _.each(item[1].pg, function (index) {
7757 _.each(item[1].pg, function (index) {
7755 time[1].pg.push({name: index, checked: false})
7758 time[1].pg.push({name: index, checked: false})
7756 });
7759 });
7757 _.each(item[1].elasticsearch, function (index) {
7760 _.each(item[1].elasticsearch, function (index) {
7758 time[1].elasticsearch.push({
7761 time[1].elasticsearch.push({
7759 name: index,
7762 name: index,
7760 checked: false
7763 checked: false
7761 })
7764 })
7762 });
7765 });
7763 outputList.push(time);
7766 outputList.push(time);
7764 });
7767 });
7765 return outputList;
7768 return outputList;
7766 };
7769 };
7767
7770
7768 vm.partitionsDelete = function (partitionType) {
7771 vm.partitionsDelete = function (partitionType) {
7769 var es_indices = [];
7772 var es_indices = [];
7770 var pg_indices = [];
7773 var pg_indices = [];
7771 _.each(vm[partitionType], function (item) {
7774 _.each(vm[partitionType], function (item) {
7772 _.each(item[1].pg, function (index) {
7775 _.each(item[1].pg, function (index) {
7773 if (index.checked) {
7776 if (index.checked) {
7774 pg_indices.push(index.name)
7777 pg_indices.push(index.name)
7775 }
7778 }
7776 });
7779 });
7777 _.each(item[1].elasticsearch, function (index) {
7780 _.each(item[1].elasticsearch, function (index) {
7778 if (index.checked) {
7781 if (index.checked) {
7779 es_indices.push(index.name)
7782 es_indices.push(index.name)
7780 }
7783 }
7781 });
7784 });
7782 });
7785 });
7783
7786
7784
7787
7785 vm.loading = {partitions: true};
7788 vm.loading = {partitions: true};
7786 sectionViewResource.save({
7789 sectionViewResource.save({
7787 section: 'admin_section',
7790 section: 'admin_section',
7788 view: 'partitions_remove'
7791 view: 'partitions_remove'
7789 }, {
7792 }, {
7790 es_indices: es_indices,
7793 es_indices: es_indices,
7791 pg_indices: pg_indices,
7794 pg_indices: pg_indices,
7792 confirm: 'CONFIRM'
7795 confirm: 'CONFIRM'
7793 }, vm.loadPartitions);
7796 }, vm.loadPartitions);
7794
7797
7795 }
7798 }
7796
7799
7797 }
7800 }
7798
7801
7799 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7802 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7800 //
7803 //
7801 // Licensed under the Apache License, Version 2.0 (the "License");
7804 // Licensed under the Apache License, Version 2.0 (the "License");
7802 // you may not use this file except in compliance with the License.
7805 // you may not use this file except in compliance with the License.
7803 // You may obtain a copy of the License at
7806 // You may obtain a copy of the License at
7804 //
7807 //
7805 // http://www.apache.org/licenses/LICENSE-2.0
7808 // http://www.apache.org/licenses/LICENSE-2.0
7806 //
7809 //
7807 // Unless required by applicable law or agreed to in writing, software
7810 // Unless required by applicable law or agreed to in writing, software
7808 // distributed under the License is distributed on an "AS IS" BASIS,
7811 // distributed under the License is distributed on an "AS IS" BASIS,
7809 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7812 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7810 // See the License for the specific language governing permissions and
7813 // See the License for the specific language governing permissions and
7811 // limitations under the License.
7814 // limitations under the License.
7812
7815
7813 angular.module('appenlight.components.adminSystemView', [])
7816 angular.module('appenlight.components.adminSystemView', [])
7814 .component('adminSystemView', {
7817 .component('adminSystemView', {
7815 templateUrl: 'components/views/admin-system-view/admin-system-view.html',
7818 templateUrl: 'components/views/admin-system-view/admin-system-view.html',
7816 controller: AdminSystemViewController
7819 controller: AdminSystemViewController
7817 });
7820 });
7818
7821
7819 AdminSystemViewController.$inject = ['sectionViewResource'];
7822 AdminSystemViewController.$inject = ['sectionViewResource'];
7820
7823
7821 function AdminSystemViewController(sectionViewResource) {
7824 function AdminSystemViewController(sectionViewResource) {
7822 var vm = this;
7825 var vm = this;
7823 this.$onInit = function () {
7826 this.$onInit = function () {
7824 vm.tables = [];
7827 vm.tables = [];
7825 vm.loading = {system: true};
7828 vm.loading = {system: true};
7826
7829
7827 sectionViewResource.get({
7830 sectionViewResource.get({
7828 section: 'admin_section',
7831 section: 'admin_section',
7829 view: 'system'
7832 view: 'system'
7830 }, null, function (data) {
7833 }, null, function (data) {
7831 vm.DBtables = data.db_tables;
7834 vm.DBtables = data.db_tables;
7832 vm.ESIndices = data.es_indices;
7835 vm.ESIndices = data.es_indices;
7833 vm.queueStats = data.queue_stats;
7836 vm.queueStats = data.queue_stats;
7834 vm.systemLoad = data.system_load;
7837 vm.systemLoad = data.system_load;
7835 vm.packages = data.packages;
7838 vm.packages = data.packages;
7836 vm.processInfo = data.process_info;
7839 vm.processInfo = data.process_info;
7837 vm.disks = data.disks;
7840 vm.disks = data.disks;
7838 vm.memory = data.memory;
7841 vm.memory = data.memory;
7839 vm.selfInfo = data.self_info;
7842 vm.selfInfo = data.self_info;
7840 vm.loading.system = false;
7843 vm.loading.system = false;
7841 });
7844 });
7842 }
7845 }
7843 };
7846 };
7844
7847
7845 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7848 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7846 //
7849 //
7847 // Licensed under the Apache License, Version 2.0 (the "License");
7850 // Licensed under the Apache License, Version 2.0 (the "License");
7848 // you may not use this file except in compliance with the License.
7851 // you may not use this file except in compliance with the License.
7849 // You may obtain a copy of the License at
7852 // You may obtain a copy of the License at
7850 //
7853 //
7851 // http://www.apache.org/licenses/LICENSE-2.0
7854 // http://www.apache.org/licenses/LICENSE-2.0
7852 //
7855 //
7853 // Unless required by applicable law or agreed to in writing, software
7856 // Unless required by applicable law or agreed to in writing, software
7854 // distributed under the License is distributed on an "AS IS" BASIS,
7857 // distributed under the License is distributed on an "AS IS" BASIS,
7855 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7858 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7856 // See the License for the specific language governing permissions and
7859 // See the License for the specific language governing permissions and
7857 // limitations under the License.
7860 // limitations under the License.
7858
7861
7859 angular.module('appenlight.components.adminUsersCreateView', [])
7862 angular.module('appenlight.components.adminUsersCreateView', [])
7860 .component('adminUsersCreateView', {
7863 .component('adminUsersCreateView', {
7861 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
7864 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
7862 controller: AdminUsersCreateViewController
7865 controller: AdminUsersCreateViewController
7863 });
7866 });
7864
7867
7865 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
7868 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
7866
7869
7867 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
7870 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
7868
7871
7869 var vm = this;
7872 var vm = this;
7870 vm.$onInit = function () {
7873 vm.$onInit = function () {
7871 vm.$state = $state;
7874 vm.$state = $state;
7872 vm.loading = {user: false};
7875 vm.loading = {user: false};
7873
7876
7874
7877
7875 if (typeof $state.params.userId !== 'undefined') {
7878 if (typeof $state.params.userId !== 'undefined') {
7876 vm.loading.user = true;
7879 vm.loading.user = true;
7877 var userId = $state.params.userId;
7880 var userId = $state.params.userId;
7878 vm.user = usersResource.get({userId: userId}, function (data) {
7881 vm.user = usersResource.get({userId: userId}, function (data) {
7879 vm.loading.user = false;
7882 vm.loading.user = false;
7880 // cast to true for angular checkbox
7883 // cast to true for angular checkbox
7881 if (vm.user.status === 1) {
7884 if (vm.user.status === 1) {
7882 vm.user.status = true;
7885 vm.user.status = true;
7883 }
7886 }
7884 });
7887 });
7885
7888
7886 vm.resource_permissions = usersPropertyResource.query(
7889 vm.resource_permissions = usersPropertyResource.query(
7887 {userId: userId, key: 'resource_permissions'}, function (data) {
7890 {userId: userId, key: 'resource_permissions'}, function (data) {
7888 vm.loading.resource_permissions = false;
7891 vm.loading.resource_permissions = false;
7889 var tmpObj = {
7892 var tmpObj = {
7890 'user': {
7893 'user': {
7891 'application': {},
7894 'application': {},
7892 'dashboard': {}
7895 'dashboard': {}
7893 },
7896 },
7894 'group': {
7897 'group': {
7895 'application': {},
7898 'application': {},
7896 'dashboard': {}
7899 'dashboard': {}
7897 }
7900 }
7898 };
7901 };
7899 _.each(data, function (item) {
7902 _.each(data, function (item) {
7900
7903
7901 var section = tmpObj[item.type][item.resource_type];
7904 var section = tmpObj[item.type][item.resource_type];
7902 if (typeof section[item.resource_id] == 'undefined') {
7905 if (typeof section[item.resource_id] == 'undefined') {
7903 section[item.resource_id] = {
7906 section[item.resource_id] = {
7904 self: item,
7907 self: item,
7905 permissions: []
7908 permissions: []
7906 }
7909 }
7907 }
7910 }
7908 section[item.resource_id].permissions.push(item.perm_name);
7911 section[item.resource_id].permissions.push(item.perm_name);
7909
7912
7910 });
7913 });
7911 vm.resourcePermissions = tmpObj;
7914 vm.resourcePermissions = tmpObj;
7912 });
7915 });
7913
7916
7914 } else {
7917 } else {
7915 var userId = null;
7918 var userId = null;
7916 vm.user = {
7919 vm.user = {
7917 status: true
7920 status: true
7918 }
7921 }
7919 }
7922 }
7920 }
7923 }
7921
7924
7922 var formResponse = function (response) {
7925 var formResponse = function (response) {
7923 if (response.status == 422) {
7926 if (response.status == 422) {
7924 setServerValidation(vm.profileForm, response.data);
7927 setServerValidation(vm.profileForm, response.data);
7925 }
7928 }
7926 vm.loading.user = false;
7929 vm.loading.user = false;
7927 }
7930 }
7928
7931
7929 vm.createUser = function () {
7932 vm.createUser = function () {
7930 vm.loading.user = true;
7933 vm.loading.user = true;
7931
7934
7935 var userId = $state.params.userId;
7932 if (userId) {
7936 if (userId) {
7933 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
7937 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
7934 setServerValidation(vm.profileForm);
7938 setServerValidation(vm.profileForm);
7935 vm.loading.user = false;
7939 vm.loading.user = false;
7936 }, formResponse);
7940 }, formResponse);
7937 }
7941 }
7938 else {
7942 else {
7939 usersResource.save(vm.user, function (data) {
7943 usersResource.save(vm.user, function (data) {
7940 $state.go('admin.user.update', {userId: data.id});
7944 $state.go('admin.user.update', {userId: data.id});
7941 }, formResponse);
7945 }, formResponse);
7942 }
7946 }
7943 }
7947 }
7944
7948
7945 vm.generatePassword = function () {
7949 vm.generatePassword = function () {
7946 var length = 8;
7950 var length = 8;
7947 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
7951 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
7948 vm.gen_pass = "";
7952 vm.gen_pass = "";
7949 for (var i = 0, n = charset.length; i < length; ++i) {
7953 for (var i = 0, n = charset.length; i < length; ++i) {
7950 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
7954 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
7951 }
7955 }
7952 vm.user.user_password = '' + vm.gen_pass;
7956 vm.user.user_password = '' + vm.gen_pass;
7953
7957
7954 }
7958 }
7955
7959
7956 vm.reloginUser = function () {
7960 vm.reloginUser = function () {
7957 sectionViewResource.get({
7961 sectionViewResource.get({
7958 section: 'admin_section', view: 'relogin_user',
7962 section: 'admin_section', view: 'relogin_user',
7959 user_id: vm.user.id
7963 user_id: vm.user.id
7960 }, function () {
7964 }, function () {
7961 window.location = AeConfig.urls.baseUrl;
7965 window.location = AeConfig.urls.baseUrl;
7962 });
7966 });
7963
7967
7964 }
7968 }
7965 };
7969 };
7966
7970
7967 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7971 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7968 //
7972 //
7969 // Licensed under the Apache License, Version 2.0 (the "License");
7973 // Licensed under the Apache License, Version 2.0 (the "License");
7970 // you may not use this file except in compliance with the License.
7974 // you may not use this file except in compliance with the License.
7971 // You may obtain a copy of the License at
7975 // You may obtain a copy of the License at
7972 //
7976 //
7973 // http://www.apache.org/licenses/LICENSE-2.0
7977 // http://www.apache.org/licenses/LICENSE-2.0
7974 //
7978 //
7975 // Unless required by applicable law or agreed to in writing, software
7979 // Unless required by applicable law or agreed to in writing, software
7976 // distributed under the License is distributed on an "AS IS" BASIS,
7980 // distributed under the License is distributed on an "AS IS" BASIS,
7977 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7981 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7978 // See the License for the specific language governing permissions and
7982 // See the License for the specific language governing permissions and
7979 // limitations under the License.
7983 // limitations under the License.
7980
7984
7981 angular.module('appenlight.components.adminUsersListView', [])
7985 angular.module('appenlight.components.adminUsersListView', [])
7982 .component('adminUsersListView', {
7986 .component('adminUsersListView', {
7983 templateUrl: 'components/views/admin-users-list-view/admin-users-list-view.html',
7987 templateUrl: 'components/views/admin-users-list-view/admin-users-list-view.html',
7984 controller: AdminUserListViewController
7988 controller: AdminUserListViewController
7985 });
7989 });
7986
7990
7987 AdminUserListViewController.$inject = ['usersResource'];
7991 AdminUserListViewController.$inject = ['usersResource'];
7988
7992
7989 function AdminUserListViewController(usersResource) {
7993 function AdminUserListViewController(usersResource) {
7990
7994
7991 var vm = this;
7995 var vm = this;
7992 vm.$onInit = function () {
7996 vm.$onInit = function () {
7993 vm.loading = {users: true};
7997 vm.loading = {users: true};
7994
7998
7995 vm.users = usersResource.query({}, function (data) {
7999 vm.users = usersResource.query({}, function (data) {
7996 vm.loading = {users: false};
8000 vm.loading = {users: false};
7997 vm.activeUsers = _.reduce(vm.users, function (memo, val) {
8001 vm.activeUsers = _.reduce(vm.users, function (memo, val) {
7998 if (val.status == 1) {
8002 if (val.status == 1) {
7999 return memo + 1;
8003 return memo + 1;
8000 }
8004 }
8001 return memo;
8005 return memo;
8002 }, 0);
8006 }, 0);
8003
8007
8004 });
8008 });
8005 }
8009 }
8006
8010
8007 vm.removeUser = function (user) {
8011 vm.removeUser = function (user) {
8008 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
8012 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
8009
8013
8010 if (data) {
8014 if (data) {
8011 var index = vm.users.indexOf(user);
8015 var index = vm.users.indexOf(user);
8012 if (index !== -1) {
8016 if (index !== -1) {
8013 vm.users.splice(index, 1);
8017 vm.users.splice(index, 1);
8014 vm.activeUsers -= 1;
8018 vm.activeUsers -= 1;
8015 }
8019 }
8016 }
8020 }
8017 });
8021 });
8018 }
8022 }
8019 };
8023 };
8020
8024
8021 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8025 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8022 //
8026 //
8023 // Licensed under the Apache License, Version 2.0 (the "License");
8027 // Licensed under the Apache License, Version 2.0 (the "License");
8024 // you may not use this file except in compliance with the License.
8028 // you may not use this file except in compliance with the License.
8025 // You may obtain a copy of the License at
8029 // You may obtain a copy of the License at
8026 //
8030 //
8027 // http://www.apache.org/licenses/LICENSE-2.0
8031 // http://www.apache.org/licenses/LICENSE-2.0
8028 //
8032 //
8029 // Unless required by applicable law or agreed to in writing, software
8033 // Unless required by applicable law or agreed to in writing, software
8030 // distributed under the License is distributed on an "AS IS" BASIS,
8034 // distributed under the License is distributed on an "AS IS" BASIS,
8031 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8035 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8032 // See the License for the specific language governing permissions and
8036 // See the License for the specific language governing permissions and
8033 // limitations under the License.
8037 // limitations under the License.
8034
8038
8035 angular.module('appenlight.components.adminView', [])
8039 angular.module('appenlight.components.adminView', [])
8036 .component('adminView', {
8040 .component('adminView', {
8037 templateUrl: 'components/views/admin-view/admin-view.html',
8041 templateUrl: 'components/views/admin-view/admin-view.html',
8038 controller: AdminViewController
8042 controller: AdminViewController
8039 });
8043 });
8040
8044
8041 AdminViewController.$inject = ['$state', 'AeConfig'];
8045 AdminViewController.$inject = ['$state', 'AeConfig'];
8042
8046
8043 function AdminViewController($state, AeConfig) {
8047 function AdminViewController($state, AeConfig) {
8044 this.$onInit = function () {
8048 this.$onInit = function () {
8045 this.$state = $state;
8049 this.$state = $state;
8046 this.AeConfig = AeConfig;
8050 this.AeConfig = AeConfig;
8047 console.info('AdminViewController');
8051 console.info('AdminViewController');
8048 }
8052 }
8049
8053
8050 }
8054 }
8051
8055
8052 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8056 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8053 //
8057 //
8054 // Licensed under the Apache License, Version 2.0 (the "License");
8058 // Licensed under the Apache License, Version 2.0 (the "License");
8055 // you may not use this file except in compliance with the License.
8059 // you may not use this file except in compliance with the License.
8056 // You may obtain a copy of the License at
8060 // You may obtain a copy of the License at
8057 //
8061 //
8058 // http://www.apache.org/licenses/LICENSE-2.0
8062 // http://www.apache.org/licenses/LICENSE-2.0
8059 //
8063 //
8060 // Unless required by applicable law or agreed to in writing, software
8064 // Unless required by applicable law or agreed to in writing, software
8061 // distributed under the License is distributed on an "AS IS" BASIS,
8065 // distributed under the License is distributed on an "AS IS" BASIS,
8062 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8066 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8063 // See the License for the specific language governing permissions and
8067 // See the License for the specific language governing permissions and
8064 // limitations under the License.
8068 // limitations under the License.
8065
8069
8066 angular.module('appenlight.components.integrationsListView', [])
8070 angular.module('appenlight.components.integrationsListView', [])
8067 .component('integrationsListView', {
8071 .component('integrationsListView', {
8068 templateUrl: 'components/views/applications-integrations-view/applications-integrations-view.html',
8072 templateUrl: 'components/views/applications-integrations-view/applications-integrations-view.html',
8069 controller: IntegrationsListViewController
8073 controller: IntegrationsListViewController
8070 });
8074 });
8071
8075
8072 IntegrationsListViewController.$inject = ['$state', 'applicationsResource'];
8076 IntegrationsListViewController.$inject = ['$state', 'applicationsResource'];
8073
8077
8074 function IntegrationsListViewController($state, applicationsResource) {
8078 function IntegrationsListViewController($state, applicationsResource) {
8075
8079
8076 var vm = this;
8080 var vm = this;
8077 vm.$onInit = function () {
8081 vm.$onInit = function () {
8078 vm.loading = {application: true};
8082 vm.loading = {application: true};
8079 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
8083 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
8080 vm.loading.application = false;
8084 vm.loading.application = false;
8081 $state.current.data.resource = vm.resource;
8085 $state.current.data.resource = vm.resource;
8082 });
8086 });
8083 }
8087 }
8084 }
8088 }
8085
8089
8086 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8090 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8087 //
8091 //
8088 // Licensed under the Apache License, Version 2.0 (the "License");
8092 // Licensed under the Apache License, Version 2.0 (the "License");
8089 // you may not use this file except in compliance with the License.
8093 // you may not use this file except in compliance with the License.
8090 // You may obtain a copy of the License at
8094 // You may obtain a copy of the License at
8091 //
8095 //
8092 // http://www.apache.org/licenses/LICENSE-2.0
8096 // http://www.apache.org/licenses/LICENSE-2.0
8093 //
8097 //
8094 // Unless required by applicable law or agreed to in writing, software
8098 // Unless required by applicable law or agreed to in writing, software
8095 // distributed under the License is distributed on an "AS IS" BASIS,
8099 // distributed under the License is distributed on an "AS IS" BASIS,
8096 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8100 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8097 // See the License for the specific language governing permissions and
8101 // See the License for the specific language governing permissions and
8098 // limitations under the License.
8102 // limitations under the License.
8099
8103
8100 angular.module('appenlight.components.applicationsListView', [])
8104 angular.module('appenlight.components.applicationsListView', [])
8101 .component('applicationsListView', {
8105 .component('applicationsListView', {
8102 templateUrl: 'components/views/applications-list-view/applications-list-view.html',
8106 templateUrl: 'components/views/applications-list-view/applications-list-view.html',
8103 controller: ApplicationsListViewController
8107 controller: ApplicationsListViewController
8104 });
8108 });
8105
8109
8106 ApplicationsListViewController.$inject = ['$state', 'applicationsResource'];
8110 ApplicationsListViewController.$inject = ['$state', 'applicationsResource'];
8107
8111
8108 function ApplicationsListViewController($state, applicationsResource) {
8112 function ApplicationsListViewController($state, applicationsResource) {
8109
8113
8110 var vm = this;
8114 var vm = this;
8111 vm.$onInit = function () {
8115 vm.$onInit = function () {
8112 vm.$state = $state;
8116 vm.$state = $state;
8113 vm.loading = {applications: true};
8117 vm.loading = {applications: true};
8114 vm.applications = applicationsResource.query(null, function () {
8118 vm.applications = applicationsResource.query(null, function () {
8115 vm.loading.applications = false;
8119 vm.loading.applications = false;
8116 });
8120 });
8117 }
8121 }
8118 }
8122 }
8119
8123
8120 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8124 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8121 //
8125 //
8122 // Licensed under the Apache License, Version 2.0 (the "License");
8126 // Licensed under the Apache License, Version 2.0 (the "License");
8123 // you may not use this file except in compliance with the License.
8127 // you may not use this file except in compliance with the License.
8124 // You may obtain a copy of the License at
8128 // You may obtain a copy of the License at
8125 //
8129 //
8126 // http://www.apache.org/licenses/LICENSE-2.0
8130 // http://www.apache.org/licenses/LICENSE-2.0
8127 //
8131 //
8128 // Unless required by applicable law or agreed to in writing, software
8132 // Unless required by applicable law or agreed to in writing, software
8129 // distributed under the License is distributed on an "AS IS" BASIS,
8133 // distributed under the License is distributed on an "AS IS" BASIS,
8130 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8134 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8131 // See the License for the specific language governing permissions and
8135 // See the License for the specific language governing permissions and
8132 // limitations under the License.
8136 // limitations under the License.
8133
8137
8134 angular.module('appenlight.components.applicationsPurgeLogsView', [])
8138 angular.module('appenlight.components.applicationsPurgeLogsView', [])
8135 .component('applicationsPurgeLogsView', {
8139 .component('applicationsPurgeLogsView', {
8136 templateUrl: 'components/views/applications-purge-logs-view/applications-purge-logs-view.html',
8140 templateUrl: 'components/views/applications-purge-logs-view/applications-purge-logs-view.html',
8137 controller: applicationsPurgeLogsViewController
8141 controller: applicationsPurgeLogsViewController
8138 });
8142 });
8139
8143
8140 applicationsPurgeLogsViewController.$inject = ['$state', 'applicationsResource', 'sectionViewResource', 'logsNoIdResource'];
8144 applicationsPurgeLogsViewController.$inject = ['$state', 'applicationsResource', 'sectionViewResource', 'logsNoIdResource'];
8141
8145
8142 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
8146 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
8143
8147
8144 var vm = this;
8148 var vm = this;
8145 vm.$onInit = function () {
8149 vm.$onInit = function () {
8146 vm.$state = $state;
8150 vm.$state = $state;
8147 vm.loading = {applications: true};
8151 vm.loading = {applications: true};
8148
8152
8149 vm.namespace = null;
8153 vm.namespace = null;
8150 vm.selectedResource = null;
8154 vm.selectedResource = null;
8151 vm.commonNamespaces = [];
8155 vm.commonNamespaces = [];
8152
8156
8153 vm.applications = applicationsResource.query({'type': 'update_reports'}, function () {
8157 vm.applications = applicationsResource.query({'type': 'update_reports'}, function () {
8154 vm.loading.applications = false;
8158 vm.loading.applications = false;
8155 vm.selectedResource = vm.applications[0].resource_id;
8159 vm.selectedResource = vm.applications[0].resource_id;
8156 vm.getCommonKeys();
8160 vm.getCommonKeys();
8157 });
8161 });
8158 }
8162 }
8159
8163
8160 /**
8164 /**
8161 * Fetches most commonly used tags in logs
8165 * Fetches most commonly used tags in logs
8162 */
8166 */
8163 vm.getCommonKeys = function () {
8167 vm.getCommonKeys = function () {
8164 sectionViewResource.get({
8168 sectionViewResource.get({
8165 section: 'logs_section',
8169 section: 'logs_section',
8166 view: 'common_tags',
8170 view: 'common_tags',
8167 resource: vm.selectedResource
8171 resource: vm.selectedResource
8168 }, function (data) {
8172 }, function (data) {
8169 vm.commonNamespaces = data['namespaces']
8173 vm.commonNamespaces = data['namespaces']
8170 });
8174 });
8171 };
8175 };
8172
8176
8173 vm.purgeLogs = function () {
8177 vm.purgeLogs = function () {
8174 vm.loading.applications = true;
8178 vm.loading.applications = true;
8175 logsNoIdResource.delete({
8179 logsNoIdResource.delete({
8176 resource: vm.selectedResource,
8180 resource: vm.selectedResource,
8177 namespace: vm.namespace
8181 namespace: vm.namespace
8178 }, function () {
8182 }, function () {
8179 vm.loading.applications = false;
8183 vm.loading.applications = false;
8180 });
8184 });
8181 }
8185 }
8182 }
8186 }
8183
8187
8184 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8188 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8185 //
8189 //
8186 // Licensed under the Apache License, Version 2.0 (the "License");
8190 // Licensed under the Apache License, Version 2.0 (the "License");
8187 // you may not use this file except in compliance with the License.
8191 // you may not use this file except in compliance with the License.
8188 // You may obtain a copy of the License at
8192 // You may obtain a copy of the License at
8189 //
8193 //
8190 // http://www.apache.org/licenses/LICENSE-2.0
8194 // http://www.apache.org/licenses/LICENSE-2.0
8191 //
8195 //
8192 // Unless required by applicable law or agreed to in writing, software
8196 // Unless required by applicable law or agreed to in writing, software
8193 // distributed under the License is distributed on an "AS IS" BASIS,
8197 // distributed under the License is distributed on an "AS IS" BASIS,
8194 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8198 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8195 // See the License for the specific language governing permissions and
8199 // See the License for the specific language governing permissions and
8196 // limitations under the License.
8200 // limitations under the License.
8197
8201
8198 angular.module('appenlight.components.applicationsUpdateView', [])
8202 angular.module('appenlight.components.applicationsUpdateView', [])
8199 .component('applicationsUpdateView', {
8203 .component('applicationsUpdateView', {
8200 templateUrl: 'components/views/applications-update-view/applications-update-view.html',
8204 templateUrl: 'components/views/applications-update-view/applications-update-view.html',
8201 controller: applicationsUpdateViewController
8205 controller: applicationsUpdateViewController
8202 });
8206 });
8203
8207
8204 applicationsUpdateViewController.$inject = ['$state', 'applicationsNoIdResource', 'applicationsResource', 'applicationsPropertyResource', 'stateHolder', 'AeConfig'];
8208 applicationsUpdateViewController.$inject = ['$state', 'applicationsNoIdResource', 'applicationsResource', 'applicationsPropertyResource', 'stateHolder', 'AeConfig'];
8205
8209
8206 function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder, AeConfig) {
8210 function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder, AeConfig) {
8207 'use strict';
8211 'use strict';
8208
8212
8209 var vm = this;
8213 var vm = this;
8210 vm.$onInit = function () {
8214 vm.$onInit = function () {
8211 vm.AeConfig = AeConfig;
8215 vm.AeConfig = AeConfig;
8212 vm.$state = $state;
8216 vm.$state = $state;
8213 vm.loading = {application: false};
8217 vm.loading = {application: false};
8214
8218
8215 vm.groupingOptions = [
8219 vm.groupingOptions = [
8216 ['url_type', 'Error Type + location'],
8220 ['url_type', 'Error Type + location'],
8217 ['url_traceback', 'Traceback + location'],
8221 ['url_traceback', 'Traceback + location'],
8218 ['traceback_server', 'Traceback + Server'],
8222 ['traceback_server', 'Traceback + Server'],
8219 ];
8223 ];
8220 var resourceId = $state.params.resourceId;
8224 var resourceId = $state.params.resourceId;
8221 var options = {};
8225 var options = {};
8222 vm.momentJs = moment;
8226 vm.momentJs = moment;
8223 vm.formTransferModel = {password: ''};
8227 vm.formTransferModel = {password: ''};
8224
8228
8225 // set initial data
8229 // set initial data
8226
8230
8227 if (resourceId === 'new') {
8231 if (resourceId === 'new') {
8228 vm.resource = {
8232 vm.resource = {
8229 resource_id: null,
8233 resource_id: null,
8230 slow_report_threshold: 10,
8234 slow_report_threshold: 10,
8231 error_report_threshold: 10,
8235 error_report_threshold: 10,
8232 allow_permanent_storage: true,
8236 allow_permanent_storage: true,
8233 default_grouping: vm.groupingOptions[1][0]
8237 default_grouping: vm.groupingOptions[1][0]
8234 };
8238 };
8235 } else {
8239 } else {
8236 vm.loading.application = true;
8240 vm.loading.application = true;
8237 vm.resource = applicationsResource.get({
8241 vm.resource = applicationsResource.get({
8238 'resourceId': resourceId
8242 'resourceId': resourceId
8239 }, function (data) {
8243 }, function (data) {
8240 vm.loading.application = false;
8244 vm.loading.application = false;
8241 });
8245 });
8242 }
8246 }
8243 }
8247 }
8244
8248
8245 vm.updateBasicForm = function () {
8249 vm.updateBasicForm = function () {
8246 vm.loading.application = true;
8250 vm.loading.application = true;
8247 if (vm.resource.resource_id === null) {
8251 if (vm.resource.resource_id === null) {
8248 applicationsNoIdResource.save(null, vm.resource, function (data) {
8252 applicationsNoIdResource.save(null, vm.resource, function (data) {
8249 stateHolder.AeUser.addApplication(data);
8253 stateHolder.AeUser.addApplication(data);
8250 $state.go('applications.update', {resourceId: data.resource_id});
8254 $state.go('applications.update', {resourceId: data.resource_id});
8251 setServerValidation(vm.BasicForm);
8255 setServerValidation(vm.BasicForm);
8252 }, function (response) {
8256 }, function (response) {
8253 if (response.status == 422) {
8257 if (response.status == 422) {
8254 setServerValidation(vm.BasicForm, response.data);
8258 setServerValidation(vm.BasicForm, response.data);
8255 }
8259 }
8256 vm.loading.application = false;
8260 vm.loading.application = false;
8257
8261
8258 });
8262 });
8259 }
8263 }
8260 else {
8264 else {
8261 applicationsResource.update({resourceId: vm.resource.resource_id},
8265 applicationsResource.update({resourceId: vm.resource.resource_id},
8262 vm.resource, function (data) {
8266 vm.resource, function (data) {
8263 vm.resource = data;
8267 vm.resource = data;
8264 vm.loading.application = false;
8268 vm.loading.application = false;
8265 setServerValidation(vm.BasicForm);
8269 setServerValidation(vm.BasicForm);
8266 }, function (response) {
8270 }, function (response) {
8267 if (response.status == 422) {
8271 if (response.status == 422) {
8268 setServerValidation(vm.BasicForm, response.data);
8272 setServerValidation(vm.BasicForm, response.data);
8269 }
8273 }
8270 vm.loading.application = false;
8274 vm.loading.application = false;
8271 });
8275 });
8272 }
8276 }
8273 };
8277 };
8274
8278
8275 vm.addRule = function () {
8279 vm.addRule = function () {
8276
8280
8277 applicationsPropertyResource.save({
8281 applicationsPropertyResource.save({
8278 resourceId: vm.resource.resource_id,
8282 resourceId: vm.resource.resource_id,
8279 key: 'postprocessing_rules'
8283 key: 'postprocessing_rules'
8280 }, null,
8284 }, null,
8281 function (data) {
8285 function (data) {
8282 vm.resource.postprocessing_rules.push(data);
8286 vm.resource.postprocessing_rules.push(data);
8283 }
8287 }
8284 );
8288 );
8285 };
8289 };
8286
8290
8287 vm.regenerateAPIKeys = function(){
8291 vm.regenerateAPIKeys = function(){
8288 vm.loading.application = true;
8292 vm.loading.application = true;
8289 applicationsPropertyResource.save({
8293 applicationsPropertyResource.save({
8290 resourceId: vm.resource.resource_id,
8294 resourceId: vm.resource.resource_id,
8291 key: 'api_key'
8295 key: 'api_key'
8292 }, {password: vm.regenerateAPIKeysPassword},
8296 }, {password: vm.regenerateAPIKeysPassword},
8293 function (data) {
8297 function (data) {
8294 vm.resource = data;
8298 vm.resource = data;
8295 vm.loading.application = false;
8299 vm.loading.application = false;
8296 vm.regenerateAPIKeysPassword = '';
8300 vm.regenerateAPIKeysPassword = '';
8297 setServerValidation(vm.regenerateAPIKeysForm);
8301 setServerValidation(vm.regenerateAPIKeysForm);
8298 },
8302 },
8299 function (response) {
8303 function (response) {
8300 if (response.status == 422) {
8304 if (response.status == 422) {
8301 setServerValidation(vm.regenerateAPIKeysForm, response.data);
8305 setServerValidation(vm.regenerateAPIKeysForm, response.data);
8302
8306
8303 }
8307 }
8304 vm.loading.application = false;
8308 vm.loading.application = false;
8305 }
8309 }
8306 )
8310 )
8307 };
8311 };
8308
8312
8309 vm.deleteApplication = function(){
8313 vm.deleteApplication = function(){
8310 vm.loading.application = true;
8314 vm.loading.application = true;
8311 applicationsPropertyResource.update({
8315 applicationsPropertyResource.update({
8312 resourceId: vm.resource.resource_id,
8316 resourceId: vm.resource.resource_id,
8313 key: 'delete_resource'
8317 key: 'delete_resource'
8314 }, vm.formDeleteModel,
8318 }, vm.formDeleteModel,
8315 function (data) {
8319 function (data) {
8316 stateHolder.AeUser.removeApplicationById(vm.resource.resource_id);
8320 stateHolder.AeUser.removeApplicationById(vm.resource.resource_id);
8317 $state.go('applications.list');
8321 $state.go('applications.list');
8318 },
8322 },
8319 function (response) {
8323 function (response) {
8320 if (response.status == 422) {
8324 if (response.status == 422) {
8321 setServerValidation(vm.formDelete, response.data);
8325 setServerValidation(vm.formDelete, response.data);
8322
8326
8323 }
8327 }
8324 vm.loading.application = false;
8328 vm.loading.application = false;
8325 }
8329 }
8326 );
8330 );
8327 };
8331 };
8328
8332
8329 vm.transferApplication = function(){
8333 vm.transferApplication = function(){
8330 vm.loading.application = true;
8334 vm.loading.application = true;
8331 applicationsPropertyResource.update({
8335 applicationsPropertyResource.update({
8332 resourceId: vm.resource.resource_id,
8336 resourceId: vm.resource.resource_id,
8333 key: 'owner'
8337 key: 'owner'
8334 }, vm.formTransferModel,
8338 }, vm.formTransferModel,
8335 function (data) {
8339 function (data) {
8336 $state.go('applications.list');
8340 $state.go('applications.list');
8337 },
8341 },
8338 function (response) {
8342 function (response) {
8339 if (response.status == 422) {
8343 if (response.status == 422) {
8340 setServerValidation(vm.formTransfer, response.data);
8344 setServerValidation(vm.formTransfer, response.data);
8341
8345
8342 }
8346 }
8343 vm.loading.application = false;
8347 vm.loading.application = false;
8344 }
8348 }
8345 )
8349 )
8346 }
8350 }
8347
8351
8348 }
8352 }
8349
8353
8350 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8354 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8351 //
8355 //
8352 // Licensed under the Apache License, Version 2.0 (the "License");
8356 // Licensed under the Apache License, Version 2.0 (the "License");
8353 // you may not use this file except in compliance with the License.
8357 // you may not use this file except in compliance with the License.
8354 // You may obtain a copy of the License at
8358 // You may obtain a copy of the License at
8355 //
8359 //
8356 // http://www.apache.org/licenses/LICENSE-2.0
8360 // http://www.apache.org/licenses/LICENSE-2.0
8357 //
8361 //
8358 // Unless required by applicable law or agreed to in writing, software
8362 // Unless required by applicable law or agreed to in writing, software
8359 // distributed under the License is distributed on an "AS IS" BASIS,
8363 // distributed under the License is distributed on an "AS IS" BASIS,
8360 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8364 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8361 // See the License for the specific language governing permissions and
8365 // See the License for the specific language governing permissions and
8362 // limitations under the License.
8366 // limitations under the License.
8363
8367
8364 angular.module('appenlight.components.eventBrowserView', [])
8368 angular.module('appenlight.components.eventBrowserView', [])
8365 .component('eventBrowserView', {
8369 .component('eventBrowserView', {
8366 templateUrl: 'components/views/event-browser/event-browser.html',
8370 templateUrl: 'components/views/event-browser/event-browser.html',
8367 controller: EventBrowserController
8371 controller: EventBrowserController
8368 });
8372 });
8369
8373
8370 EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource'];
8374 EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource'];
8371
8375
8372 function EventBrowserController(eventsNoIdResource, eventsResource) {
8376 function EventBrowserController(eventsNoIdResource, eventsResource) {
8373 console.info('EventBrowserController');
8377 console.info('EventBrowserController');
8374 var vm = this;
8378 var vm = this;
8375 vm.$onInit = function () {
8379 vm.$onInit = function () {
8376
8380
8377 vm.loading = {events: true};
8381 vm.loading = {events: true};
8378
8382
8379 vm.events = eventsNoIdResource.query(
8383 vm.events = eventsNoIdResource.query(
8380 {key: 'events'},
8384 {key: 'events'},
8381 function (data) {
8385 function (data) {
8382 vm.loading.events = false;
8386 vm.loading.events = false;
8383 });
8387 });
8384 }
8388 }
8385
8389
8386 vm.closeEvent = function (event) {
8390 vm.closeEvent = function (event) {
8387
8391
8388 eventsResource.update({eventId: event.id}, {status: 0}, function (data) {
8392 eventsResource.update({eventId: event.id}, {status: 0}, function (data) {
8389 event.status = 0;
8393 event.status = 0;
8390 });
8394 });
8391 }
8395 }
8392
8396
8393 }
8397 }
8394
8398
8395 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8399 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8396 //
8400 //
8397 // Licensed under the Apache License, Version 2.0 (the "License");
8401 // Licensed under the Apache License, Version 2.0 (the "License");
8398 // you may not use this file except in compliance with the License.
8402 // you may not use this file except in compliance with the License.
8399 // You may obtain a copy of the License at
8403 // You may obtain a copy of the License at
8400 //
8404 //
8401 // http://www.apache.org/licenses/LICENSE-2.0
8405 // http://www.apache.org/licenses/LICENSE-2.0
8402 //
8406 //
8403 // Unless required by applicable law or agreed to in writing, software
8407 // Unless required by applicable law or agreed to in writing, software
8404 // distributed under the License is distributed on an "AS IS" BASIS,
8408 // distributed under the License is distributed on an "AS IS" BASIS,
8405 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8409 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8406 // See the License for the specific language governing permissions and
8410 // See the License for the specific language governing permissions and
8407 // limitations under the License.
8411 // limitations under the License.
8408
8412
8409 angular.module('appenlight.components.indexDashboardView', [])
8413 angular.module('appenlight.components.indexDashboardView', [])
8410 .component('indexDashboardView', {
8414 .component('indexDashboardView', {
8411 templateUrl: 'components/views/index-dashboard/index-dashboard.html',
8415 templateUrl: 'components/views/index-dashboard/index-dashboard.html',
8412 controller: IndexDashboardController
8416 controller: IndexDashboardController
8413 });
8417 });
8414
8418
8415 IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig'];
8419 IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig'];
8416
8420
8417 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
8421 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
8418 var vm = this;
8422 var vm = this;
8419 vm.$onInit = function () {
8423 vm.$onInit = function () {
8420 stateHolder.section = 'dashboard';
8424 stateHolder.section = 'dashboard';
8421 vm.timeOptions = {};
8425 vm.timeOptions = {};
8422 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
8426 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
8423 _.each(allowed, function (key) {
8427 _.each(allowed, function (key) {
8424 if (allowed.indexOf(key) !== -1) {
8428 if (allowed.indexOf(key) !== -1) {
8425 vm.timeOptions[key] = AeConfig.timeOptions[key];
8429 vm.timeOptions[key] = AeConfig.timeOptions[key];
8426 }
8430 }
8427 });
8431 });
8428 vm.stateHolder = stateHolder;
8432 vm.stateHolder = stateHolder;
8429 vm.urls = AeConfig.urls;
8433 vm.urls = AeConfig.urls;
8430 vm.applications = stateHolder.AeUser.applications_map;
8434 vm.applications = stateHolder.AeUser.applications_map;
8431 vm.show_dashboard = false;
8435 vm.show_dashboard = false;
8432 vm.resource = null;
8436 vm.resource = null;
8433 vm.graphType = {selected: null};
8437 vm.graphType = {selected: null};
8434 vm.timeSpan = vm.timeOptions['1h'];
8438 vm.timeSpan = vm.timeOptions['1h'];
8435 vm.trendingReports = [];
8439 vm.trendingReports = [];
8436 vm.exceptions = 0;
8440 vm.exceptions = 0;
8437 vm.satisfyingRequests = 0;
8441 vm.satisfyingRequests = 0;
8438 vm.toleratedRequests = 0;
8442 vm.toleratedRequests = 0;
8439 vm.frustratingRequests = 0;
8443 vm.frustratingRequests = 0;
8440 vm.uptimeStats = 0;
8444 vm.uptimeStats = 0;
8441 vm.apdexStats = [];
8445 vm.apdexStats = [];
8442 vm.seriesRequestsData = [];
8446 vm.seriesRequestsData = [];
8443 vm.seriesMetricsData = [];
8447 vm.seriesMetricsData = [];
8444 vm.seriesSlowData = [];
8448 vm.seriesSlowData = [];
8445 vm.slowCalls = [];
8449 vm.slowCalls = [];
8446 vm.slowURIS = [];
8450 vm.slowURIS = [];
8447
8451
8448 vm.reportChartConfig = {
8452 vm.reportChartConfig = {
8449 data: {
8453 data: {
8450 json: [],
8454 json: [],
8451 xFormat: '%Y-%m-%dT%H:%M:%S'
8455 xFormat: '%Y-%m-%dT%H:%M:%S'
8452 },
8456 },
8453 color: {
8457 color: {
8454 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8458 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8455 },
8459 },
8456 axis: {
8460 axis: {
8457 x: {
8461 x: {
8458 type: 'timeseries',
8462 type: 'timeseries',
8459 tick: {
8463 tick: {
8460 culling: {
8464 culling: {
8461 max: 6 // the number of tick texts will be adjusted to less than this value
8465 max: 6 // the number of tick texts will be adjusted to less than this value
8462 },
8466 },
8463 format: '%Y-%m-%d %H:%M'
8467 format: '%Y-%m-%d %H:%M'
8464 }
8468 }
8465 },
8469 },
8466 y: {
8470 y: {
8467 tick: {
8471 tick: {
8468 count: 5,
8472 count: 5,
8469 format: d3.format('.2s')
8473 format: d3.format('.2s')
8470 }
8474 }
8471 }
8475 }
8472 },
8476 },
8473 subchart: {
8477 subchart: {
8474 show: true,
8478 show: true,
8475 size: {
8479 size: {
8476 height: 20
8480 height: 20
8477 }
8481 }
8478 },
8482 },
8479 size: {
8483 size: {
8480 height: 250
8484 height: 250
8481 },
8485 },
8482 zoom: {
8486 zoom: {
8483 rescale: true
8487 rescale: true
8484 },
8488 },
8485 grid: {
8489 grid: {
8486 x: {
8490 x: {
8487 show: true
8491 show: true
8488 },
8492 },
8489 y: {
8493 y: {
8490 show: true
8494 show: true
8491 }
8495 }
8492 },
8496 },
8493 tooltip: {
8497 tooltip: {
8494 format: {
8498 format: {
8495 title: function (d) {
8499 title: function (d) {
8496 return '' + d;
8500 return '' + d;
8497 },
8501 },
8498 value: function (v) {
8502 value: function (v) {
8499 return v
8503 return v
8500 }
8504 }
8501 }
8505 }
8502 }
8506 }
8503 };
8507 };
8504 vm.reportChartData = {};
8508 vm.reportChartData = {};
8505
8509
8506 vm.reportSlowChartConfig = {
8510 vm.reportSlowChartConfig = {
8507 data: {
8511 data: {
8508 json: [],
8512 json: [],
8509 xFormat: '%Y-%m-%dT%H:%M:%S'
8513 xFormat: '%Y-%m-%dT%H:%M:%S'
8510 },
8514 },
8511 color: {
8515 color: {
8512 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8516 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8513 },
8517 },
8514 axis: {
8518 axis: {
8515 x: {
8519 x: {
8516 type: 'timeseries',
8520 type: 'timeseries',
8517 tick: {
8521 tick: {
8518 culling: {
8522 culling: {
8519 max: 6 // the number of tick texts will be adjusted to less than this value
8523 max: 6 // the number of tick texts will be adjusted to less than this value
8520 },
8524 },
8521 format: '%Y-%m-%d %H:%M'
8525 format: '%Y-%m-%d %H:%M'
8522 }
8526 }
8523 },
8527 },
8524 y: {
8528 y: {
8525 tick: {
8529 tick: {
8526 count: 5,
8530 count: 5,
8527 format: d3.format('.2s')
8531 format: d3.format('.2s')
8528 }
8532 }
8529 }
8533 }
8530 },
8534 },
8531 subchart: {
8535 subchart: {
8532 show: true,
8536 show: true,
8533 size: {
8537 size: {
8534 height: 20
8538 height: 20
8535 }
8539 }
8536 },
8540 },
8537 size: {
8541 size: {
8538 height: 250
8542 height: 250
8539 },
8543 },
8540 zoom: {
8544 zoom: {
8541 rescale: true
8545 rescale: true
8542 },
8546 },
8543 grid: {
8547 grid: {
8544 x: {
8548 x: {
8545 show: true
8549 show: true
8546 },
8550 },
8547 y: {
8551 y: {
8548 show: true
8552 show: true
8549 }
8553 }
8550 },
8554 },
8551 tooltip: {
8555 tooltip: {
8552 format: {
8556 format: {
8553 title: function (d) {
8557 title: function (d) {
8554 return '' + d;
8558 return '' + d;
8555 },
8559 },
8556 value: function (v) {
8560 value: function (v) {
8557 return v
8561 return v
8558 }
8562 }
8559 }
8563 }
8560 }
8564 }
8561 };
8565 };
8562 vm.reportSlowChartData = {};
8566 vm.reportSlowChartData = {};
8563
8567
8564 vm.metricsChartConfig = {
8568 vm.metricsChartConfig = {
8565 data: {
8569 data: {
8566 json: [],
8570 json: [],
8567 xFormat: '%Y-%m-%dT%H:%M:%S',
8571 xFormat: '%Y-%m-%dT%H:%M:%S',
8568 keys: {
8572 keys: {
8569 x: 'x',
8573 x: 'x',
8570 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8574 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8571 },
8575 },
8572 names: {
8576 names: {
8573 main: 'View/Application logic',
8577 main: 'View/Application logic',
8574 sql: 'Relational database queries',
8578 sql: 'Relational database queries',
8575 nosql: 'NoSql datastore calls',
8579 nosql: 'NoSql datastore calls',
8576 tmpl: 'Template rendering',
8580 tmpl: 'Template rendering',
8577 custom: 'Custom timed calls',
8581 custom: 'Custom timed calls',
8578 remote: 'Requests to remote resources'
8582 remote: 'Requests to remote resources'
8579 },
8583 },
8580 type: 'area',
8584 type: 'area',
8581 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8585 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8582 order: null
8586 order: null
8583 },
8587 },
8584 color: {
8588 color: {
8585 pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef']
8589 pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef']
8586 },
8590 },
8587 axis: {
8591 axis: {
8588 x: {
8592 x: {
8589 type: 'timeseries',
8593 type: 'timeseries',
8590 tick: {
8594 tick: {
8591 culling: {
8595 culling: {
8592 max: 6 // the number of tick texts will be adjusted to less than this value
8596 max: 6 // the number of tick texts will be adjusted to less than this value
8593 },
8597 },
8594 format: '%Y-%m-%d %H:%M'
8598 format: '%Y-%m-%d %H:%M'
8595 }
8599 }
8596 },
8600 },
8597 y: {
8601 y: {
8598 tick: {
8602 tick: {
8599 count: 5,
8603 count: 5,
8600 format: d3.format('.2f')
8604 format: d3.format('.2f')
8601 }
8605 }
8602 }
8606 }
8603 },
8607 },
8604 point: {
8608 point: {
8605 show: false
8609 show: false
8606 },
8610 },
8607 subchart: {
8611 subchart: {
8608 show: true,
8612 show: true,
8609 size: {
8613 size: {
8610 height: 20
8614 height: 20
8611 }
8615 }
8612 },
8616 },
8613 size: {
8617 size: {
8614 height: 350
8618 height: 350
8615 },
8619 },
8616 zoom: {
8620 zoom: {
8617 rescale: true
8621 rescale: true
8618 },
8622 },
8619 grid: {
8623 grid: {
8620 x: {
8624 x: {
8621 show: true
8625 show: true
8622 },
8626 },
8623 y: {
8627 y: {
8624 show: true
8628 show: true
8625 }
8629 }
8626 },
8630 },
8627 tooltip: {
8631 tooltip: {
8628 format: {
8632 format: {
8629 title: function (d) {
8633 title: function (d) {
8630 return '' + d;
8634 return '' + d;
8631 },
8635 },
8632 value: function (v) {
8636 value: function (v) {
8633 return v
8637 return v
8634 }
8638 }
8635 }
8639 }
8636 }
8640 }
8637 };
8641 };
8638 vm.metricsChartData = {};
8642 vm.metricsChartData = {};
8639
8643
8640 vm.responseChartConfig = {
8644 vm.responseChartConfig = {
8641 data: {
8645 data: {
8642 json: [],
8646 json: [],
8643 xFormat: '%Y-%m-%dT%H:%M:%S'
8647 xFormat: '%Y-%m-%dT%H:%M:%S'
8644 },
8648 },
8645 color: {
8649 color: {
8646 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8650 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8647 },
8651 },
8648 axis: {
8652 axis: {
8649 x: {
8653 x: {
8650 type: 'timeseries',
8654 type: 'timeseries',
8651 tick: {
8655 tick: {
8652 culling: {
8656 culling: {
8653 max: 6 // the number of tick texts will be adjusted to less than this value
8657 max: 6 // the number of tick texts will be adjusted to less than this value
8654 },
8658 },
8655 format: '%Y-%m-%d %H:%M'
8659 format: '%Y-%m-%d %H:%M'
8656 }
8660 }
8657 },
8661 },
8658 y: {
8662 y: {
8659 tick: {
8663 tick: {
8660 count: 5,
8664 count: 5,
8661 format: d3.format('.2f')
8665 format: d3.format('.2f')
8662 }
8666 }
8663 }
8667 }
8664 },
8668 },
8665 point: {
8669 point: {
8666 show: false
8670 show: false
8667 },
8671 },
8668 subchart: {
8672 subchart: {
8669 show: true,
8673 show: true,
8670 size: {
8674 size: {
8671 height: 20
8675 height: 20
8672 }
8676 }
8673 },
8677 },
8674 size: {
8678 size: {
8675 height: 350
8679 height: 350
8676 },
8680 },
8677 zoom: {
8681 zoom: {
8678 rescale: true
8682 rescale: true
8679 },
8683 },
8680 grid: {
8684 grid: {
8681 x: {
8685 x: {
8682 show: true
8686 show: true
8683 },
8687 },
8684 y: {
8688 y: {
8685 show: true
8689 show: true
8686 }
8690 }
8687 },
8691 },
8688 tooltip: {
8692 tooltip: {
8689 format: {
8693 format: {
8690 title: function (d) {
8694 title: function (d) {
8691 return '' + d;
8695 return '' + d;
8692 },
8696 },
8693 value: function (v) {
8697 value: function (v) {
8694 return v
8698 return v
8695 }
8699 }
8696 }
8700 }
8697 }
8701 }
8698 };
8702 };
8699 vm.responseChartData = {};
8703 vm.responseChartData = {};
8700
8704
8701 vm.requestsChartConfig = {
8705 vm.requestsChartConfig = {
8702 data: {
8706 data: {
8703 json: [],
8707 json: [],
8704 xFormat: '%Y-%m-%dT%H:%M:%S'
8708 xFormat: '%Y-%m-%dT%H:%M:%S'
8705 },
8709 },
8706 color: {
8710 color: {
8707 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8711 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8708 },
8712 },
8709 axis: {
8713 axis: {
8710 x: {
8714 x: {
8711 type: 'timeseries',
8715 type: 'timeseries',
8712 tick: {
8716 tick: {
8713 culling: {
8717 culling: {
8714 max: 6 // the number of tick texts will be adjusted to less than this value
8718 max: 6 // the number of tick texts will be adjusted to less than this value
8715 },
8719 },
8716 format: '%Y-%m-%d %H:%M'
8720 format: '%Y-%m-%d %H:%M'
8717 }
8721 }
8718 },
8722 },
8719 y: {
8723 y: {
8720 tick: {
8724 tick: {
8721 count: 5,
8725 count: 5,
8722 format: d3.format('.2f')
8726 format: d3.format('.2f')
8723 }
8727 }
8724 }
8728 }
8725 },
8729 },
8726 point: {
8730 point: {
8727 show: false
8731 show: false
8728 },
8732 },
8729 subchart: {
8733 subchart: {
8730 show: true,
8734 show: true,
8731 size: {
8735 size: {
8732 height: 20
8736 height: 20
8733 }
8737 }
8734 },
8738 },
8735 size: {
8739 size: {
8736 height: 350
8740 height: 350
8737 },
8741 },
8738 zoom: {
8742 zoom: {
8739 rescale: true
8743 rescale: true
8740 },
8744 },
8741 grid: {
8745 grid: {
8742 x: {
8746 x: {
8743 show: true
8747 show: true
8744 },
8748 },
8745 y: {
8749 y: {
8746 show: true
8750 show: true
8747 }
8751 }
8748 },
8752 },
8749 tooltip: {
8753 tooltip: {
8750 format: {
8754 format: {
8751 title: function (d) {
8755 title: function (d) {
8752 return '' + d;
8756 return '' + d;
8753 },
8757 },
8754 value: function (v) {
8758 value: function (v) {
8755 return v
8759 return v
8756 }
8760 }
8757 }
8761 }
8758 }
8762 }
8759 };
8763 };
8760 vm.requestsChartData = {};
8764 vm.requestsChartData = {};
8761
8765
8762 vm.loading = {
8766 vm.loading = {
8763 'apdex': true,
8767 'apdex': true,
8764 'reports': true,
8768 'reports': true,
8765 'graphs': true,
8769 'graphs': true,
8766 'slowCalls': true,
8770 'slowCalls': true,
8767 'slowURIS': true,
8771 'slowURIS': true,
8768 'requestsBreakdown': true,
8772 'requestsBreakdown': true,
8769 'series': true
8773 'series': true
8770 };
8774 };
8771 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
8775 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
8772
8776
8773 vm.intervalId = $interval(function () {
8777 vm.intervalId = $interval(function () {
8774 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
8778 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
8775 // don't do anything if window is unfocused
8779 // don't do anything if window is unfocused
8776 if(document.hidden === true){
8780 if(document.hidden === true){
8777 return ;
8781 return ;
8778 }
8782 }
8779 vm.refreshData();
8783 vm.refreshData();
8780 }
8784 }
8781 }, 60000);
8785 }, 60000);
8782
8786
8783 if (stateHolder.AeUser.applications.length){
8787 if (stateHolder.AeUser.applications.length){
8784 vm.show_dashboard = true;
8788 vm.show_dashboard = true;
8785 vm.determineStartState();
8789 vm.determineStartState();
8786 }
8790 }
8787
8791
8788 }
8792 }
8789 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
8793 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
8790 var ws_report = message.message.report;
8794 var ws_report = message.message.report;
8791 if (ws_report.http_status != 500) {
8795 if (ws_report.http_status != 500) {
8792 return
8796 return
8793 }
8797 }
8794 if (vm.stream.paused == true) {
8798 if (vm.stream.paused == true) {
8795 return
8799 return
8796 }
8800 }
8797 if (vm.stream.filtered && ws_report.resource_id != vm.resource) {
8801 if (vm.stream.filtered && ws_report.resource_id != vm.resource) {
8798 return
8802 return
8799 }
8803 }
8800 var should_insert = true;
8804 var should_insert = true;
8801 _.each(vm.stream.reports, function (report) {
8805 _.each(vm.stream.reports, function (report) {
8802 if (report.report_id == ws_report.report_id) {
8806 if (report.report_id == ws_report.report_id) {
8803 report.occurences = ws_report.occurences;
8807 report.occurences = ws_report.occurences;
8804 should_insert = false;
8808 should_insert = false;
8805 }
8809 }
8806 });
8810 });
8807 if (should_insert) {
8811 if (should_insert) {
8808 if (vm.stream.reports.length > 7) {
8812 if (vm.stream.reports.length > 7) {
8809 vm.stream.reports.pop();
8813 vm.stream.reports.pop();
8810 }
8814 }
8811 vm.stream.reports.unshift(ws_report);
8815 vm.stream.reports.unshift(ws_report);
8812 }
8816 }
8813 });
8817 });
8814
8818
8815 vm.determineStartState = function () {
8819 vm.determineStartState = function () {
8816 if (stateHolder.AeUser.applications.length) {
8820 if (stateHolder.AeUser.applications.length) {
8817 vm.resource = Number($location.search().resource);
8821 vm.resource = Number($location.search().resource);
8818
8822
8819 if (!vm.resource){
8823 if (!vm.resource){
8820 var cookieResource = $cookies.getObject('resource');
8824 var cookieResource = $cookies.getObject('resource');
8821
8825
8822
8826
8823 if (cookieResource) {
8827 if (cookieResource) {
8824 vm.resource = cookieResource;
8828 vm.resource = cookieResource;
8825 }
8829 }
8826 else{
8830 else{
8827 vm.resource = stateHolder.AeUser.applications[0].resource_id;
8831 vm.resource = stateHolder.AeUser.applications[0].resource_id;
8828 }
8832 }
8829 }
8833 }
8830 }
8834 }
8831
8835
8832 var timespan = $location.search().timespan;
8836 var timespan = $location.search().timespan;
8833
8837
8834 if(_.has(vm.timeOptions, timespan)){
8838 if(_.has(vm.timeOptions, timespan)){
8835 vm.timeSpan = vm.timeOptions[timespan];
8839 vm.timeSpan = vm.timeOptions[timespan];
8836 }
8840 }
8837 else{
8841 else{
8838 vm.timeSpan = vm.timeOptions['1h'];
8842 vm.timeSpan = vm.timeOptions['1h'];
8839 }
8843 }
8840
8844
8841 var graphType = $location.search().graphtype;
8845 var graphType = $location.search().graphtype;
8842 if(!graphType){
8846 if(!graphType){
8843 vm.graphType = {selected: 'metrics_graphs'};
8847 vm.graphType = {selected: 'metrics_graphs'};
8844 }
8848 }
8845 else{
8849 else{
8846 vm.graphType = {selected: graphType};
8850 vm.graphType = {selected: graphType};
8847 }
8851 }
8848 vm.updateSearchParams();
8852 vm.updateSearchParams();
8849 };
8853 };
8850
8854
8851 vm.updateSearchParams = function () {
8855 vm.updateSearchParams = function () {
8852 $location.search('resource', vm.resource);
8856 $location.search('resource', vm.resource);
8853 $location.search('timespan', vm.timeSpan.key);
8857 $location.search('timespan', vm.timeSpan.key);
8854 $location.search('graphtype', vm.graphType.selected);
8858 $location.search('graphtype', vm.graphType.selected);
8855 stateHolder.resource = vm.resource;
8859 stateHolder.resource = vm.resource;
8856
8860
8857 if (vm.resource){
8861 if (vm.resource){
8858 $cookies.putObject('resource', vm.resource,
8862 $cookies.putObject('resource', vm.resource,
8859 {expires:new Date(3000, 1, 1)});
8863 {expires:new Date(3000, 1, 1)});
8860 }
8864 }
8861 vm.refreshData();
8865 vm.refreshData();
8862 };
8866 };
8863
8867
8864 vm.refreshData = function () {
8868 vm.refreshData = function () {
8865 vm.fetchApdexStats();
8869 vm.fetchApdexStats();
8866 vm.fetchTrendingReports();
8870 vm.fetchTrendingReports();
8867 vm.fetchMetrics();
8871 vm.fetchMetrics();
8868 vm.fetchRequestsBreakdown();
8872 vm.fetchRequestsBreakdown();
8869 vm.fetchSlowCalls();
8873 vm.fetchSlowCalls();
8870 };
8874 };
8871
8875
8872 vm.changedTimeSpan = function(){
8876 vm.changedTimeSpan = function(){
8873 vm.startDateFilter = timeSpanToStartDate(vm.timeSpan.key);
8877 vm.startDateFilter = timeSpanToStartDate(vm.timeSpan.key);
8874 vm.refreshData();
8878 vm.refreshData();
8875 };
8879 };
8876
8880
8877 vm.fetchApdexStats = function () {
8881 vm.fetchApdexStats = function () {
8878 vm.loading.apdex = true;
8882 vm.loading.apdex = true;
8879 vm.apdexStats = applicationsPropertyResource.query({
8883 vm.apdexStats = applicationsPropertyResource.query({
8880 'key': 'apdex_stats',
8884 'key': 'apdex_stats',
8881 'resourceId': vm.resource,
8885 'resourceId': vm.resource,
8882 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8886 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8883 },
8887 },
8884 function (data) {
8888 function (data) {
8885 vm.loading.apdex = false;
8889 vm.loading.apdex = false;
8886
8890
8887 vm.exceptions = _.reduce(data, function (memo, row) {
8891 vm.exceptions = _.reduce(data, function (memo, row) {
8888 return memo + row.errors;
8892 return memo + row.errors;
8889 }, 0);
8893 }, 0);
8890 vm.satisfyingRequests = _.reduce(data, function (memo, row) {
8894 vm.satisfyingRequests = _.reduce(data, function (memo, row) {
8891 return memo + row.satisfying_requests;
8895 return memo + row.satisfying_requests;
8892 }, 0);
8896 }, 0);
8893 vm.toleratedRequests = _.reduce(data, function (memo, row) {
8897 vm.toleratedRequests = _.reduce(data, function (memo, row) {
8894 return memo + row.tolerated_requests;
8898 return memo + row.tolerated_requests;
8895 }, 0);
8899 }, 0);
8896 vm.frustratingRequests = _.reduce(data, function (memo, row) {
8900 vm.frustratingRequests = _.reduce(data, function (memo, row) {
8897 return memo + row.frustrating_requests;
8901 return memo + row.frustrating_requests;
8898 }, 0);
8902 }, 0);
8899 if (data.length) {
8903 if (data.length) {
8900 vm.uptimeStats = data[0].uptime;
8904 vm.uptimeStats = data[0].uptime;
8901 }
8905 }
8902
8906
8903 },
8907 },
8904 function () {
8908 function () {
8905 vm.loading.apdex = false;
8909 vm.loading.apdex = false;
8906 }
8910 }
8907 );
8911 );
8908 }
8912 }
8909
8913
8910 vm.fetchMetrics = function () {
8914 vm.fetchMetrics = function () {
8911 vm.loading.series = true;
8915 vm.loading.series = true;
8912 applicationsPropertyResource.query({
8916 applicationsPropertyResource.query({
8913 'resourceId': vm.resource,
8917 'resourceId': vm.resource,
8914 'key': vm.graphType.selected,
8918 'key': vm.graphType.selected,
8915 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8919 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8916 }, function (data) {
8920 }, function (data) {
8917 if (vm.graphType.selected == 'metrics_graphs') {
8921 if (vm.graphType.selected == 'metrics_graphs') {
8918 vm.metricsChartData = {
8922 vm.metricsChartData = {
8919 json: data,
8923 json: data,
8920 xFormat: '%Y-%m-%dT%H:%M:%S',
8924 xFormat: '%Y-%m-%dT%H:%M:%S',
8921 keys: {
8925 keys: {
8922 x: 'x',
8926 x: 'x',
8923 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8927 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8924 },
8928 },
8925 names: {
8929 names: {
8926 main: 'View/Application logic',
8930 main: 'View/Application logic',
8927 sql: 'Relational database queries',
8931 sql: 'Relational database queries',
8928 nosql: 'NoSql datastore calls',
8932 nosql: 'NoSql datastore calls',
8929 tmpl: 'Template rendering',
8933 tmpl: 'Template rendering',
8930 custom: 'Custom timed calls',
8934 custom: 'Custom timed calls',
8931 remote: 'Requests to remote resources'
8935 remote: 'Requests to remote resources'
8932 },
8936 },
8933 type: 'area',
8937 type: 'area',
8934 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8938 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8935 order: null
8939 order: null
8936 };
8940 };
8937 }
8941 }
8938 else if (vm.graphType.selected == 'report_graphs') {
8942 else if (vm.graphType.selected == 'report_graphs') {
8939 vm.reportChartData = {
8943 vm.reportChartData = {
8940 json: data,
8944 json: data,
8941 xFormat: '%Y-%m-%dT%H:%M:%S',
8945 xFormat: '%Y-%m-%dT%H:%M:%S',
8942 keys: {
8946 keys: {
8943 x: 'x',
8947 x: 'x',
8944 value: ["not_found", "report"]
8948 value: ["not_found", "report"]
8945 },
8949 },
8946 names: {
8950 names: {
8947 report: 'Errors',
8951 report: 'Errors',
8948 not_found: '404\'s requests'
8952 not_found: '404\'s requests'
8949 },
8953 },
8950 type: 'bar'
8954 type: 'bar'
8951 };
8955 };
8952 }
8956 }
8953 else if (vm.graphType.selected == 'slow_report_graphs') {
8957 else if (vm.graphType.selected == 'slow_report_graphs') {
8954 vm.reportSlowChartData = {
8958 vm.reportSlowChartData = {
8955 json: data,
8959 json: data,
8956 xFormat: '%Y-%m-%dT%H:%M:%S',
8960 xFormat: '%Y-%m-%dT%H:%M:%S',
8957 keys: {
8961 keys: {
8958 x: 'x',
8962 x: 'x',
8959 value: ["slow_report"]
8963 value: ["slow_report"]
8960 },
8964 },
8961 names: {
8965 names: {
8962 slow_report: 'Slow reports'
8966 slow_report: 'Slow reports'
8963 },
8967 },
8964 type: 'bar'
8968 type: 'bar'
8965 };
8969 };
8966 }
8970 }
8967 else if (vm.graphType.selected == 'response_graphs') {
8971 else if (vm.graphType.selected == 'response_graphs') {
8968 vm.responseChartData = {
8972 vm.responseChartData = {
8969 json: data,
8973 json: data,
8970 xFormat: '%Y-%m-%dT%H:%M:%S',
8974 xFormat: '%Y-%m-%dT%H:%M:%S',
8971 keys: {
8975 keys: {
8972 x: 'x',
8976 x: 'x',
8973 value: ["today", "days_ago_2", "days_ago_7"]
8977 value: ["today", "days_ago_2", "days_ago_7"]
8974 },
8978 },
8975 names: {
8979 names: {
8976 today: 'Today',
8980 today: 'Today',
8977 "days_ago_2": '2 days ago',
8981 "days_ago_2": '2 days ago',
8978 "days_ago_7": '7 days ago'
8982 "days_ago_7": '7 days ago'
8979 }
8983 }
8980 };
8984 };
8981 }
8985 }
8982 else if (vm.graphType.selected == 'requests_graphs') {
8986 else if (vm.graphType.selected == 'requests_graphs') {
8983 vm.requestsChartData = {
8987 vm.requestsChartData = {
8984 json: data,
8988 json: data,
8985 xFormat: '%Y-%m-%dT%H:%M:%S',
8989 xFormat: '%Y-%m-%dT%H:%M:%S',
8986 keys: {
8990 keys: {
8987 x: 'x',
8991 x: 'x',
8988 value: ["requests"]
8992 value: ["requests"]
8989 },
8993 },
8990 names: {
8994 names: {
8991 requests: 'Requests/s'
8995 requests: 'Requests/s'
8992 }
8996 }
8993 };
8997 };
8994 }
8998 }
8995 vm.loading.series = false;
8999 vm.loading.series = false;
8996 }, function(){
9000 }, function(){
8997 vm.loading.series = false;
9001 vm.loading.series = false;
8998 });
9002 });
8999 }
9003 }
9000
9004
9001 vm.fetchSlowCalls = function () {
9005 vm.fetchSlowCalls = function () {
9002 vm.loading.slowCalls = true;
9006 vm.loading.slowCalls = true;
9003 applicationsPropertyResource.query({
9007 applicationsPropertyResource.query({
9004 'resourceId': vm.resource,
9008 'resourceId': vm.resource,
9005 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9009 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9006 'key': 'slow_calls'
9010 'key': 'slow_calls'
9007 }, function (data) {
9011 }, function (data) {
9008 vm.slowCalls = data;
9012 vm.slowCalls = data;
9009 vm.loading.slowCalls = false;
9013 vm.loading.slowCalls = false;
9010 }, function () {
9014 }, function () {
9011 vm.loading.slowCalls = false;
9015 vm.loading.slowCalls = false;
9012 });
9016 });
9013 }
9017 }
9014
9018
9015 vm.fetchRequestsBreakdown = function () {
9019 vm.fetchRequestsBreakdown = function () {
9016 vm.loading.requestsBreakdown = true;
9020 vm.loading.requestsBreakdown = true;
9017 applicationsPropertyResource.query({
9021 applicationsPropertyResource.query({
9018 'resourceId': vm.resource,
9022 'resourceId': vm.resource,
9019 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9023 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9020 'key': 'requests_breakdown'
9024 'key': 'requests_breakdown'
9021 }, function (data) {
9025 }, function (data) {
9022 vm.requestsBreakdown = data;
9026 vm.requestsBreakdown = data;
9023 vm.loading.requestsBreakdown = false;
9027 vm.loading.requestsBreakdown = false;
9024 }, function () {
9028 }, function () {
9025 vm.loading.requestsBreakdown = false;
9029 vm.loading.requestsBreakdown = false;
9026 });
9030 });
9027 }
9031 }
9028
9032
9029 vm.fetchTrendingReports = function () {
9033 vm.fetchTrendingReports = function () {
9030
9034
9031 if (vm.graphType.selected == 'slow_report_graphs') {
9035 if (vm.graphType.selected == 'slow_report_graphs') {
9032 var report_type = 'slow';
9036 var report_type = 'slow';
9033 }
9037 }
9034 else {
9038 else {
9035 var report_type = 'error';
9039 var report_type = 'error';
9036 }
9040 }
9037
9041
9038 vm.loading.reports = true;
9042 vm.loading.reports = true;
9039 vm.trendingReports = applicationsPropertyResource.query({
9043 vm.trendingReports = applicationsPropertyResource.query({
9040 'key': 'trending_reports',
9044 'key': 'trending_reports',
9041 'resourceId': vm.resource,
9045 'resourceId': vm.resource,
9042 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9046 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9043 "report_type": report_type
9047 "report_type": report_type
9044 },
9048 },
9045 function () {
9049 function () {
9046 vm.loading.reports = false;
9050 vm.loading.reports = false;
9047 },
9051 },
9048 function () {
9052 function () {
9049 vm.loading.reports = false;
9053 vm.loading.reports = false;
9050 }
9054 }
9051 );
9055 );
9052 };
9056 };
9053
9057
9054 $scope.$on('$destroy',function(){
9058 $scope.$on('$destroy',function(){
9055 $interval.cancel(vm.intervalId);
9059 $interval.cancel(vm.intervalId);
9056 });
9060 });
9057 }
9061 }
9058
9062
9059 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9063 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9060 //
9064 //
9061 // Licensed under the Apache License, Version 2.0 (the "License");
9065 // Licensed under the Apache License, Version 2.0 (the "License");
9062 // you may not use this file except in compliance with the License.
9066 // you may not use this file except in compliance with the License.
9063 // You may obtain a copy of the License at
9067 // You may obtain a copy of the License at
9064 //
9068 //
9065 // http://www.apache.org/licenses/LICENSE-2.0
9069 // http://www.apache.org/licenses/LICENSE-2.0
9066 //
9070 //
9067 // Unless required by applicable law or agreed to in writing, software
9071 // Unless required by applicable law or agreed to in writing, software
9068 // distributed under the License is distributed on an "AS IS" BASIS,
9072 // distributed under the License is distributed on an "AS IS" BASIS,
9069 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9073 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9070 // See the License for the specific language governing permissions and
9074 // See the License for the specific language governing permissions and
9071 // limitations under the License.
9075 // limitations under the License.
9072
9076
9073
9077
9074 ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource'];
9078 ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource'];
9075
9079
9076 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
9080 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
9077
9081
9078 var vm = this;
9082 var vm = this;
9079 vm.$onInit = function () {
9083 vm.$onInit = function () {
9080 vm.$state = $state;
9084 vm.$state = $state;
9081 vm.loading = {integration: true};
9085 vm.loading = {integration: true};
9082 vm.config = integrationResource.get(
9086 vm.config = integrationResource.get(
9083 {
9087 {
9084 integration: $state.params.integration,
9088 integration: $state.params.integration,
9085 action: 'setup',
9089 action: 'setup',
9086 resourceId: $state.params.resourceId
9090 resourceId: $state.params.resourceId
9087 }, function (data) {
9091 }, function (data) {
9088 vm.loading.integration = false;
9092 vm.loading.integration = false;
9089 });
9093 });
9090 }
9094 }
9091 vm.configureIntegration = function () {
9095 vm.configureIntegration = function () {
9092 console.info('configureIntegration');
9096 console.info('configureIntegration');
9093 vm.loading.integration = true;
9097 vm.loading.integration = true;
9094 integrationResource.save(
9098 integrationResource.save(
9095 {
9099 {
9096 integration: $state.params.integration,
9100 integration: $state.params.integration,
9097 action: 'setup',
9101 action: 'setup',
9098 resourceId: $state.params.resourceId
9102 resourceId: $state.params.resourceId
9099 }, vm.config, function (data) {
9103 }, vm.config, function (data) {
9100 vm.loading.integration = false;
9104 vm.loading.integration = false;
9101 setServerValidation(vm.integrationForm);
9105 setServerValidation(vm.integrationForm);
9102 }, function (response) {
9106 }, function (response) {
9103 if (response.status == 422) {
9107 if (response.status == 422) {
9104 setServerValidation(vm.integrationForm, response.data);
9108 setServerValidation(vm.integrationForm, response.data);
9105 }
9109 }
9106 vm.loading.integration = false;
9110 vm.loading.integration = false;
9107 });
9111 });
9108 };
9112 };
9109
9113
9110 vm.removeIntegration = function () {
9114 vm.removeIntegration = function () {
9111 console.info('removeIntegration');
9115 console.info('removeIntegration');
9112 integrationResource.remove({
9116 integrationResource.remove({
9113 integration: $state.params.integration,
9117 integration: $state.params.integration,
9114 resourceId: $state.params.resourceId,
9118 resourceId: $state.params.resourceId,
9115 action: 'delete'
9119 action: 'delete'
9116 },
9120 },
9117 function () {
9121 function () {
9118 $state.go('applications.integrations',
9122 $state.go('applications.integrations',
9119 {resourceId: $state.params.resourceId});
9123 {resourceId: $state.params.resourceId});
9120 }
9124 }
9121 );
9125 );
9122 }
9126 }
9123
9127
9124 vm.testIntegration = function (to_test) {
9128 vm.testIntegration = function (to_test) {
9125 console.info('testIntegration', to_test);
9129 console.info('testIntegration', to_test);
9126 vm.loading.integration = true;
9130 vm.loading.integration = true;
9127 integrationResource.save(
9131 integrationResource.save(
9128 {
9132 {
9129 integration: $state.params.integration,
9133 integration: $state.params.integration,
9130 action: 'test_' + to_test,
9134 action: 'test_' + to_test,
9131 resourceId: $state.params.resourceId
9135 resourceId: $state.params.resourceId
9132 }, vm.config, function (data) {
9136 }, vm.config, function (data) {
9133 vm.loading.integration = false;
9137 vm.loading.integration = false;
9134 }, function (response) {
9138 }, function (response) {
9135 vm.loading.integration = false;
9139 vm.loading.integration = false;
9136 });
9140 });
9137 }
9141 }
9138
9142
9139
9143
9140 }
9144 }
9141
9145
9142 ;angular.module('appenlight.components.bitbucketIntegrationConfigView', [])
9146 ;angular.module('appenlight.components.bitbucketIntegrationConfigView', [])
9143 .component('bitbucketIntegrationConfigView', {
9147 .component('bitbucketIntegrationConfigView', {
9144 templateUrl: 'components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
9148 templateUrl: 'components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
9145 controller: ApplicationsIntegrationsEditViewController
9149 controller: ApplicationsIntegrationsEditViewController
9146 });
9150 });
9147
9151
9148 ;angular.module('appenlight.components.campfireIntegrationConfigView', [])
9152 ;angular.module('appenlight.components.campfireIntegrationConfigView', [])
9149 .component('campfireIntegrationConfigView', {
9153 .component('campfireIntegrationConfigView', {
9150 templateUrl: 'components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
9154 templateUrl: 'components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
9151 controller: ApplicationsIntegrationsEditViewController
9155 controller: ApplicationsIntegrationsEditViewController
9152 });
9156 });
9153
9157
9154 ;angular.module('appenlight.components.flowdockIntegrationConfigView', [])
9158 ;angular.module('appenlight.components.flowdockIntegrationConfigView', [])
9155 .component('flowdockIntegrationConfigView', {
9159 .component('flowdockIntegrationConfigView', {
9156 templateUrl: 'components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
9160 templateUrl: 'components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
9157 controller: ApplicationsIntegrationsEditViewController
9161 controller: ApplicationsIntegrationsEditViewController
9158 });
9162 });
9159
9163
9160 ;angular.module('appenlight.components.githubIntegrationConfigView', [])
9164 ;angular.module('appenlight.components.githubIntegrationConfigView', [])
9161 .component('githubIntegrationConfigView', {
9165 .component('githubIntegrationConfigView', {
9162 templateUrl: 'components/views/integrations/github-integration-config-view/github-integration-config-view.html',
9166 templateUrl: 'components/views/integrations/github-integration-config-view/github-integration-config-view.html',
9163 controller: ApplicationsIntegrationsEditViewController
9167 controller: ApplicationsIntegrationsEditViewController
9164 });
9168 });
9165
9169
9166 ;angular.module('appenlight.components.hipchatIntegrationConfigView', [])
9170 ;angular.module('appenlight.components.hipchatIntegrationConfigView', [])
9167 .component('hipchatIntegrationConfigView', {
9171 .component('hipchatIntegrationConfigView', {
9168 templateUrl: 'components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
9172 templateUrl: 'components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
9169 controller: ApplicationsIntegrationsEditViewController
9173 controller: ApplicationsIntegrationsEditViewController
9170 });
9174 });
9171
9175
9172 ;angular.module('appenlight.components.jiraIntegrationConfigView', [])
9176 ;angular.module('appenlight.components.jiraIntegrationConfigView', [])
9173 .component('jiraIntegrationConfigView', {
9177 .component('jiraIntegrationConfigView', {
9174 templateUrl: 'components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
9178 templateUrl: 'components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
9175 controller: ApplicationsIntegrationsEditViewController
9179 controller: ApplicationsIntegrationsEditViewController
9176 });
9180 });
9177
9181
9178 ;angular.module('appenlight.components.slackIntegrationConfigView', [])
9182 ;angular.module('appenlight.components.slackIntegrationConfigView', [])
9179 .component('slackIntegrationConfigView', {
9183 .component('slackIntegrationConfigView', {
9180 templateUrl: 'components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
9184 templateUrl: 'components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
9181 controller: ApplicationsIntegrationsEditViewController
9185 controller: ApplicationsIntegrationsEditViewController
9182 });
9186 });
9183
9187
9184 ;angular.module('appenlight.components.webhooksIntegrationConfigView', [])
9188 ;angular.module('appenlight.components.webhooksIntegrationConfigView', [])
9185 .component('webhooksIntegrationConfigView', {
9189 .component('webhooksIntegrationConfigView', {
9186 templateUrl: 'components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
9190 templateUrl: 'components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
9187 controller: ApplicationsIntegrationsEditViewController
9191 controller: ApplicationsIntegrationsEditViewController
9188 });
9192 });
9189
9193
9190 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9194 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9191 //
9195 //
9192 // Licensed under the Apache License, Version 2.0 (the "License");
9196 // Licensed under the Apache License, Version 2.0 (the "License");
9193 // you may not use this file except in compliance with the License.
9197 // you may not use this file except in compliance with the License.
9194 // You may obtain a copy of the License at
9198 // You may obtain a copy of the License at
9195 //
9199 //
9196 // http://www.apache.org/licenses/LICENSE-2.0
9200 // http://www.apache.org/licenses/LICENSE-2.0
9197 //
9201 //
9198 // Unless required by applicable law or agreed to in writing, software
9202 // Unless required by applicable law or agreed to in writing, software
9199 // distributed under the License is distributed on an "AS IS" BASIS,
9203 // distributed under the License is distributed on an "AS IS" BASIS,
9200 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9204 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9201 // See the License for the specific language governing permissions and
9205 // See the License for the specific language governing permissions and
9202 // limitations under the License.
9206 // limitations under the License.
9203
9207
9204 angular.module('appenlight.components.logsBrowserView', [])
9208 angular.module('appenlight.components.logsBrowserView', [])
9205 .component('logsBrowserView', {
9209 .component('logsBrowserView', {
9206 templateUrl: 'components/views/logs-browser/logs-browser.html',
9210 templateUrl: 'components/views/logs-browser/logs-browser.html',
9207 controller: LogsBrowserController
9211 controller: LogsBrowserController
9208 });
9212 });
9209
9213
9210 LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
9214 LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
9211
9215
9212 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
9216 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
9213 var vm = this;
9217 var vm = this;
9214 vm.$onInit = function () {
9218 vm.$onInit = function () {
9215 vm.logEventsChartConfig = {
9219 vm.logEventsChartConfig = {
9216 data: {
9220 data: {
9217 json: [],
9221 json: [],
9218 xFormat: '%Y-%m-%dT%H:%M:%S'
9222 xFormat: '%Y-%m-%dT%H:%M:%S'
9219 },
9223 },
9220 color: {
9224 color: {
9221 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9225 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9222 },
9226 },
9223 axis: {
9227 axis: {
9224 x: {
9228 x: {
9225 type: 'timeseries',
9229 type: 'timeseries',
9226 tick: {
9230 tick: {
9227 format: '%Y-%m-%d'
9231 format: '%Y-%m-%d'
9228 }
9232 }
9229 },
9233 },
9230 y: {
9234 y: {
9231 tick: {
9235 tick: {
9232 count: 5,
9236 count: 5,
9233 format: d3.format('.2s')
9237 format: d3.format('.2s')
9234 }
9238 }
9235 }
9239 }
9236 },
9240 },
9237 subchart: {
9241 subchart: {
9238 show: true,
9242 show: true,
9239 size: {
9243 size: {
9240 height: 20
9244 height: 20
9241 }
9245 }
9242 },
9246 },
9243 size: {
9247 size: {
9244 height: 250
9248 height: 250
9245 },
9249 },
9246 zoom: {
9250 zoom: {
9247 rescale: true
9251 rescale: true
9248 },
9252 },
9249 grid: {
9253 grid: {
9250 x: {
9254 x: {
9251 show: true
9255 show: true
9252 },
9256 },
9253 y: {
9257 y: {
9254 show: true
9258 show: true
9255 }
9259 }
9256 },
9260 },
9257 tooltip: {
9261 tooltip: {
9258 format: {
9262 format: {
9259 title: function (d) {
9263 title: function (d) {
9260 return '' + d;
9264 return '' + d;
9261 },
9265 },
9262 value: function (v) {
9266 value: function (v) {
9263 return v
9267 return v
9264 }
9268 }
9265 }
9269 }
9266 }
9270 }
9267 };
9271 };
9268 vm.logEventsChartData = {};
9272 vm.logEventsChartData = {};
9269 stateHolder.section = 'logs';
9273 stateHolder.section = 'logs';
9270 vm.today = function () {
9274 vm.today = function () {
9271 vm.pickerDate = new Date();
9275 vm.pickerDate = new Date();
9272 };
9276 };
9273 vm.today();
9277 vm.today();
9274
9278
9275 vm.applications = stateHolder.AeUser.applications_map;
9279 vm.applications = stateHolder.AeUser.applications_map;
9276 vm.logsPage = [];
9280 vm.logsPage = [];
9277 vm.itemCount = 0;
9281 vm.itemCount = 0;
9278 vm.itemsPerPage = 250;
9282 vm.itemsPerPage = 250;
9279 vm.page = 1;
9283 vm.page = 1;
9280 vm.$location = $location;
9284 vm.$location = $location;
9281 vm.isLoading = {
9285 vm.isLoading = {
9282 logs: true,
9286 logs: true,
9283 series: true
9287 series: true
9284 };
9288 };
9285 vm.filterTypeAheadOptions = [
9289 vm.filterTypeAheadOptions = [
9286 {
9290 {
9287 type: 'message',
9291 type: 'message',
9288 text: 'message:',
9292 text: 'message:',
9289 'description': 'Full-text search in your logs',
9293 'description': 'Full-text search in your logs',
9290 tag: 'Message',
9294 tag: 'Message',
9291 example: 'message:text-im-looking-for'
9295 example: 'message:text-im-looking-for'
9292 },
9296 },
9293 {
9297 {
9294 type: 'namespace',
9298 type: 'namespace',
9295 text: 'namespace:',
9299 text: 'namespace:',
9296 'description': 'Query logs from specific namespace',
9300 'description': 'Query logs from specific namespace',
9297 tag: 'Namespace',
9301 tag: 'Namespace',
9298 example: "namespace:module.foo"
9302 example: "namespace:module.foo"
9299 },
9303 },
9300 {
9304 {
9301 type: 'resource',
9305 type: 'resource',
9302 text: 'resource:',
9306 text: 'resource:',
9303 'description': 'Restrict resultset to application',
9307 'description': 'Restrict resultset to application',
9304 tag: 'Application',
9308 tag: 'Application',
9305 example: "resource:ID"
9309 example: "resource:ID"
9306 },
9310 },
9307 {
9311 {
9308 type: 'request_id',
9312 type: 'request_id',
9309 text: 'request_id:',
9313 text: 'request_id:',
9310 'description': 'Show logs with specific request id',
9314 'description': 'Show logs with specific request id',
9311 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9315 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9312 tag: 'Request ID'
9316 tag: 'Request ID'
9313 },
9317 },
9314 {
9318 {
9315 type: 'level',
9319 type: 'level',
9316 text: 'level:',
9320 text: 'level:',
9317 'description': 'Show entries with specific log level',
9321 'description': 'Show entries with specific log level',
9318 example: 'level:warning',
9322 example: 'level:warning',
9319 tag: 'Level'
9323 tag: 'Level'
9320 },
9324 },
9321 {
9325 {
9322 type: 'server_name',
9326 type: 'server_name',
9323 text: 'server_name:',
9327 text: 'server_name:',
9324 'description': 'Show entries tagged with this key/value pair',
9328 'description': 'Show entries tagged with this key/value pair',
9325 example: 'server_name:hostname',
9329 example: 'server_name:hostname',
9326 tag: 'Tag'
9330 tag: 'Tag'
9327 },
9331 },
9328 {
9332 {
9329 type: 'start_date',
9333 type: 'start_date',
9330 text: 'start_date:',
9334 text: 'start_date:',
9331 'description': 'Show results newer than this date (press TAB for dropdown)',
9335 'description': 'Show results newer than this date (press TAB for dropdown)',
9332 example: 'start_date:2014-08-15T13:00',
9336 example: 'start_date:2014-08-15T13:00',
9333 tag: 'Start Date'
9337 tag: 'Start Date'
9334 },
9338 },
9335 {
9339 {
9336 type: 'end_date',
9340 type: 'end_date',
9337 text: 'end_date:',
9341 text: 'end_date:',
9338 'description': 'Show results older than this date (press TAB for dropdown)',
9342 'description': 'Show results older than this date (press TAB for dropdown)',
9339 example: 'start_date:2014-08-15T23:59',
9343 example: 'start_date:2014-08-15T23:59',
9340 tag: 'End Date'
9344 tag: 'End Date'
9341 },
9345 },
9342 {type: 'level', value: 'debug', text: 'level:debug'},
9346 {type: 'level', value: 'debug', text: 'level:debug'},
9343 {type: 'level', value: 'info', text: 'level:info'},
9347 {type: 'level', value: 'info', text: 'level:info'},
9344 {type: 'level', value: 'warning', text: 'level:warning'},
9348 {type: 'level', value: 'warning', text: 'level:warning'},
9345 {type: 'level', value: 'critical', text: 'level:critical'}
9349 {type: 'level', value: 'critical', text: 'level:critical'}
9346 ];
9350 ];
9347 vm.filterTypeAhead = null;
9351 vm.filterTypeAhead = null;
9348 vm.showDatePicker = false;
9352 vm.showDatePicker = false;
9349 vm.manualOpen = false;
9353 vm.manualOpen = false;
9350 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9354 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9351
9355
9352 _.each(vm.applications, function (item) {
9356 _.each(vm.applications, function (item) {
9353 vm.filterTypeAheadOptions.push({
9357 vm.filterTypeAheadOptions.push({
9354 type: 'resource',
9358 type: 'resource',
9355 text: 'resource:' + item.resource_id + ':' + item.resource_name,
9359 text: 'resource:' + item.resource_id + ':' + item.resource_name,
9356 example: 'resource:' + item.resource_id,
9360 example: 'resource:' + item.resource_id,
9357 'tag': item.resource_name,
9361 'tag': item.resource_name,
9358 'description': 'Restrict resultset to this application'
9362 'description': 'Restrict resultset to this application'
9359 });
9363 });
9360 });
9364 });
9361 console.info('page load');
9365 console.info('page load');
9362 vm.refresh();
9366 vm.refresh();
9363 }
9367 }
9364 vm.removeSearchTag = function (tag) {
9368 vm.removeSearchTag = function (tag) {
9365 $location.search(tag.type, null);
9369 $location.search(tag.type, null);
9366 vm.refresh();
9370 vm.refresh();
9367 };
9371 };
9368 vm.addSearchTag = function (tag) {
9372 vm.addSearchTag = function (tag) {
9369 $location.search(tag.type, tag.value);
9373 $location.search(tag.type, tag.value);
9370 vm.refresh();
9374 vm.refresh();
9371 };
9375 };
9372
9376
9373 vm.paginationChange = function(){
9377 vm.paginationChange = function(){
9374 $location.search('page', vm.page);
9378 $location.search('page', vm.page);
9375 vm.refresh();
9379 vm.refresh();
9376 };
9380 };
9377
9381
9378 vm.typeAheadTag = function (event) {
9382 vm.typeAheadTag = function (event) {
9379 var text = vm.filterTypeAhead;
9383 var text = vm.filterTypeAhead;
9380 if (_.isObject(vm.filterTypeAhead)) {
9384 if (_.isObject(vm.filterTypeAhead)) {
9381 text = vm.filterTypeAhead.text;
9385 text = vm.filterTypeAhead.text;
9382 };
9386 };
9383 if (!vm.filterTypeAhead) {
9387 if (!vm.filterTypeAhead) {
9384 return
9388 return
9385 }
9389 }
9386 var parsed = text.split(':');
9390 var parsed = text.split(':');
9387 var tag = {'type': null, 'value': null};
9391 var tag = {'type': null, 'value': null};
9388 // app tags have : twice
9392 // app tags have : twice
9389 if (parsed.length > 2 && parsed[0] == 'resource') {
9393 if (parsed.length > 2 && parsed[0] == 'resource') {
9390 tag.type = 'resource';
9394 tag.type = 'resource';
9391 tag.value = parsed[1];
9395 tag.value = parsed[1];
9392 }
9396 }
9393 // normal tag:value
9397 // normal tag:value
9394 else if (parsed.length > 1) {
9398 else if (parsed.length > 1) {
9395 tag.type = parsed[0];
9399 tag.type = parsed[0];
9396 tag.value = parsed.slice(1).join(':');
9400 tag.value = parsed.slice(1).join(':');
9397 }
9401 }
9398 else {
9402 else {
9399 tag.type = 'message';
9403 tag.type = 'message';
9400 tag.value = parsed.join(':');
9404 tag.value = parsed.join(':');
9401 }
9405 }
9402
9406
9403 // set datepicker hour based on type of field
9407 // set datepicker hour based on type of field
9404 if ('start_date:' == text) {
9408 if ('start_date:' == text) {
9405 vm.showDatePicker = true;
9409 vm.showDatePicker = true;
9406 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9410 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9407 }
9411 }
9408 else if ('end_date:' == text) {
9412 else if ('end_date:' == text) {
9409 vm.showDatePicker = true;
9413 vm.showDatePicker = true;
9410 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9414 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9411 }
9415 }
9412
9416
9413 if (event.keyCode != 13 || !tag.type || !tag.value) {
9417 if (event.keyCode != 13 || !tag.type || !tag.value) {
9414 return
9418 return
9415 }
9419 }
9416 vm.showDatePicker = false;
9420 vm.showDatePicker = false;
9417 // aka we selected one of main options
9421 // aka we selected one of main options
9418 vm.addSearchTag({type: tag.type, value: tag.value});
9422 vm.addSearchTag({type: tag.type, value: tag.value});
9419 // clear typeahead
9423 // clear typeahead
9420 vm.filterTypeAhead = undefined;
9424 vm.filterTypeAhead = undefined;
9421 };
9425 };
9422
9426
9423
9427
9424 vm.pickerDateChanged = function(){
9428 vm.pickerDateChanged = function(){
9425 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
9429 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
9426 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9430 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9427 }
9431 }
9428 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
9432 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
9429 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9433 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9430 }
9434 }
9431 vm.showDatePicker = false;
9435 vm.showDatePicker = false;
9432 };
9436 };
9433
9437
9434 vm.fetchLogs = function (searchParams) {
9438 vm.fetchLogs = function (searchParams) {
9435 vm.isLoading.logs = true;
9439 vm.isLoading.logs = true;
9436 logsNoIdResource.query(searchParams, function (data, getResponseHeaders) {
9440 logsNoIdResource.query(searchParams, function (data, getResponseHeaders) {
9437 vm.isLoading.logs = false;
9441 vm.isLoading.logs = false;
9438 var headers = getResponseHeaders();
9442 var headers = getResponseHeaders();
9439 vm.logsPage = data;
9443 vm.logsPage = data;
9440 vm.itemCount = headers['x-total-count'];
9444 vm.itemCount = headers['x-total-count'];
9441 vm.itemsPerPage = headers['x-items-per-page'];
9445 vm.itemsPerPage = headers['x-items-per-page'];
9442 }, function () {
9446 }, function () {
9443 vm.isLoading.logs = false;
9447 vm.isLoading.logs = false;
9444 });
9448 });
9445 };
9449 };
9446
9450
9447 vm.fetchSeriesData = function (searchParams) {
9451 vm.fetchSeriesData = function (searchParams) {
9448 searchParams['section'] = 'logs_section';
9452 searchParams['section'] = 'logs_section';
9449 searchParams['view'] = 'fetch_series';
9453 searchParams['view'] = 'fetch_series';
9450 vm.isLoading.series = true;
9454 vm.isLoading.series = true;
9451 sectionViewResource.query(searchParams, function (data) {
9455 sectionViewResource.query(searchParams, function (data) {
9452
9456
9453 vm.logEventsChartData = {
9457 vm.logEventsChartData = {
9454 json: data,
9458 json: data,
9455 xFormat: '%Y-%m-%dT%H:%M:%S',
9459 xFormat: '%Y-%m-%dT%H:%M:%S',
9456 keys: {
9460 keys: {
9457 x: 'x',
9461 x: 'x',
9458 value: ["logs"]
9462 value: ["logs"]
9459 },
9463 },
9460 names: {
9464 names: {
9461 logs: 'Log events'
9465 logs: 'Log events'
9462 },
9466 },
9463 type: 'bar'
9467 type: 'bar'
9464 };
9468 };
9465 vm.isLoading.series = false;
9469 vm.isLoading.series = false;
9466 }, function () {
9470 }, function () {
9467 vm.isLoading.series = false;
9471 vm.isLoading.series = false;
9468 });
9472 });
9469 };
9473 };
9470
9474
9471 vm.filterId = function (log) {
9475 vm.filterId = function (log) {
9472 $location.search('request_id', log.request_id);
9476 $location.search('request_id', log.request_id);
9473 vm.refresh();
9477 vm.refresh();
9474 };
9478 };
9475
9479
9476 vm.refresh = function(){
9480 vm.refresh = function(){
9477 vm.searchParams = parseSearchToTags($location.search());
9481 vm.searchParams = parseSearchToTags($location.search());
9478 vm.page = Number(vm.searchParams.page) || 1;
9482 vm.page = Number(vm.searchParams.page) || 1;
9479 var params = parseTagsToSearch(vm.searchParams);
9483 var params = parseTagsToSearch(vm.searchParams);
9480 vm.fetchLogs(params);
9484 vm.fetchLogs(params);
9481 vm.fetchSeriesData(params);
9485 vm.fetchSeriesData(params);
9482 };
9486 };
9483
9487
9484 }
9488 }
9485
9489
9486 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9490 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9487 //
9491 //
9488 // Licensed under the Apache License, Version 2.0 (the "License");
9492 // Licensed under the Apache License, Version 2.0 (the "License");
9489 // you may not use this file except in compliance with the License.
9493 // you may not use this file except in compliance with the License.
9490 // You may obtain a copy of the License at
9494 // You may obtain a copy of the License at
9491 //
9495 //
9492 // http://www.apache.org/licenses/LICENSE-2.0
9496 // http://www.apache.org/licenses/LICENSE-2.0
9493 //
9497 //
9494 // Unless required by applicable law or agreed to in writing, software
9498 // Unless required by applicable law or agreed to in writing, software
9495 // distributed under the License is distributed on an "AS IS" BASIS,
9499 // distributed under the License is distributed on an "AS IS" BASIS,
9496 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9500 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9497 // See the License for the specific language governing permissions and
9501 // See the License for the specific language governing permissions and
9498 // limitations under the License.
9502 // limitations under the License.
9499
9503
9500 angular.module('appenlight.components.reportView', [])
9504 angular.module('appenlight.components.reportView', [])
9501 .component('reportView', {
9505 .component('reportView', {
9502 templateUrl: 'components/views/report-view/report-view.html',
9506 templateUrl: 'components/views/report-view/report-view.html',
9503 controller: ReportViewController
9507 controller: ReportViewController
9504 });
9508 });
9505
9509
9506 ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal',
9510 ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal',
9507 '$cookies', 'reportGroupPropertyResource', 'reportGroupResource',
9511 '$cookies', 'reportGroupPropertyResource', 'reportGroupResource',
9508 'logsNoIdResource', 'stateHolder'];
9512 'logsNoIdResource', 'stateHolder'];
9509
9513
9510 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
9514 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
9511 var vm = this;
9515 var vm = this;
9512 vm.$onInit = function () {
9516 vm.$onInit = function () {
9513 vm.window = $window;
9517 vm.window = $window;
9514 vm.stateHolder = stateHolder;
9518 vm.stateHolder = stateHolder;
9515 vm.$state = $state;
9519 vm.$state = $state;
9516 vm.reportHistoryConfig = {
9520 vm.reportHistoryConfig = {
9517 data: {
9521 data: {
9518 json: [],
9522 json: [],
9519 xFormat: '%Y-%m-%dT%H:%M:%S'
9523 xFormat: '%Y-%m-%dT%H:%M:%S'
9520 },
9524 },
9521 color: {
9525 color: {
9522 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9526 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9523 },
9527 },
9524 axis: {
9528 axis: {
9525 x: {
9529 x: {
9526 type: 'timeseries',
9530 type: 'timeseries',
9527 tick: {
9531 tick: {
9528 format: '%Y-%m-%d'
9532 format: '%Y-%m-%d'
9529 }
9533 }
9530 },
9534 },
9531 y: {
9535 y: {
9532 tick: {
9536 tick: {
9533 count: 5,
9537 count: 5,
9534 format: d3.format('.2s')
9538 format: d3.format('.2s')
9535 }
9539 }
9536 }
9540 }
9537 },
9541 },
9538 subchart: {
9542 subchart: {
9539 show: true,
9543 show: true,
9540 size: {
9544 size: {
9541 height: 20
9545 height: 20
9542 }
9546 }
9543 },
9547 },
9544 size: {
9548 size: {
9545 height: 250
9549 height: 250
9546 },
9550 },
9547 zoom: {
9551 zoom: {
9548 rescale: true
9552 rescale: true
9549 },
9553 },
9550 grid: {
9554 grid: {
9551 x: {
9555 x: {
9552 show: true
9556 show: true
9553 },
9557 },
9554 y: {
9558 y: {
9555 show: true
9559 show: true
9556 }
9560 }
9557 },
9561 },
9558 tooltip: {
9562 tooltip: {
9559 format: {
9563 format: {
9560 title: function (d) {
9564 title: function (d) {
9561 return '' + d;
9565 return '' + d;
9562 },
9566 },
9563 value: function (v) {
9567 value: function (v) {
9564 return v
9568 return v
9565 }
9569 }
9566 }
9570 }
9567 }
9571 }
9568 };
9572 };
9569 vm.mentionedPeople = [];
9573 vm.mentionedPeople = [];
9570 vm.reportHistoryData = {};
9574 vm.reportHistoryData = {};
9571 vm.textTraceback = true;
9575 vm.textTraceback = true;
9572 vm.rawTraceback = '';
9576 vm.rawTraceback = '';
9573 vm.traceback = '';
9577 vm.traceback = '';
9574 vm.reportType = 'report';
9578 vm.reportType = 'report';
9575 vm.report = null;
9579 vm.report = null;
9576 vm.showLong = false;
9580 vm.showLong = false;
9577 vm.reportLogs = null;
9581 vm.reportLogs = null;
9578 vm.requestStats = null;
9582 vm.requestStats = null;
9579 vm.comment = null;
9583 vm.comment = null;
9580 vm.is_loading = {
9584 vm.is_loading = {
9581 report: true,
9585 report: true,
9582 logs: true,
9586 logs: true,
9583 history: true
9587 history: true
9584 };
9588 };
9585
9589
9586 vm.tabs = {
9590 vm.tabs = {
9587 slow_calls:false,
9591 slow_calls:false,
9588 request_details:false,
9592 request_details:false,
9589 logs:false,
9593 logs:false,
9590 comments:false,
9594 comments:false,
9591 affected_users:false
9595 affected_users:false
9592 };
9596 };
9593 if ($cookies.selectedReportTab) {
9597 if ($cookies.selectedReportTab) {
9594 vm.tabs[$cookies.selectedReportTab] = true;
9598 vm.tabs[$cookies.selectedReportTab] = true;
9595 }
9599 }
9596 else{
9600 else{
9597 $cookies.selectedReportTab = 'request_details';
9601 $cookies.selectedReportTab = 'request_details';
9598 vm.tabs.request_details = true;
9602 vm.tabs.request_details = true;
9599 }
9603 }
9600
9604
9601 // load report
9605 // load report
9602 vm.fetchReport();
9606 vm.fetchReport();
9603 }
9607 }
9604
9608
9605 vm.searchMentionedPeople = function(term){
9609 vm.searchMentionedPeople = function(term){
9606 //vm.mentionedPeople = [];
9610 //vm.mentionedPeople = [];
9607 var term = term.toLowerCase();
9611 var term = term.toLowerCase();
9608 reportGroupPropertyResource.get({
9612 reportGroupPropertyResource.get({
9609 groupId: vm.report.group_id,
9613 groupId: vm.report.group_id,
9610 key: 'assigned_users'
9614 key: 'assigned_users'
9611 }, null,
9615 }, null,
9612 function (data) {
9616 function (data) {
9613 var users = [];
9617 var users = [];
9614 _.each(data.assigned, function(u){
9618 _.each(data.assigned, function(u){
9615 users.push({label: u.user_name});
9619 users.push({label: u.user_name});
9616 });
9620 });
9617 _.each(data.unassigned, function(u){
9621 _.each(data.unassigned, function(u){
9618 users.push({label: u.user_name});
9622 users.push({label: u.user_name});
9619 });
9623 });
9620
9624
9621 var result = _.filter(users, function(u){
9625 var result = _.filter(users, function(u){
9622 return u.label.toLowerCase().indexOf(term) !== -1;
9626 return u.label.toLowerCase().indexOf(term) !== -1;
9623 });
9627 });
9624 vm.mentionedPeople = result;
9628 vm.mentionedPeople = result;
9625 });
9629 });
9626 };
9630 };
9627
9631
9628 vm.searchTag = function (tag, value) {
9632 vm.searchTag = function (tag, value) {
9629
9633
9630 if (vm.report.report_type === 3) {
9634 if (vm.report.report_type === 3) {
9631 $location.url($state.href('report.list_slow'));
9635 $location.url($state.href('report.list_slow'));
9632 }
9636 }
9633 else {
9637 else {
9634 $location.url($state.href('report.list'));
9638 $location.url($state.href('report.list'));
9635 }
9639 }
9636 $location.search(tag, value);
9640 $location.search(tag, value);
9637 };
9641 };
9638
9642
9639 vm.fetchLogs = function () {
9643 vm.fetchLogs = function () {
9640 if (!vm.report.request_id){
9644 if (!vm.report.request_id){
9641 return
9645 return
9642 }
9646 }
9643 vm.is_loading.logs = true;
9647 vm.is_loading.logs = true;
9644 logsNoIdResource.query({request_id: vm.report.request_id},
9648 logsNoIdResource.query({request_id: vm.report.request_id},
9645 function (data) {
9649 function (data) {
9646 vm.is_loading.logs = false;
9650 vm.is_loading.logs = false;
9647 vm.reportLogs = data;
9651 vm.reportLogs = data;
9648 }, function () {
9652 }, function () {
9649 vm.is_loading.logs = false;
9653 vm.is_loading.logs = false;
9650 });
9654 });
9651 };
9655 };
9652 vm.addComment = function () {
9656 vm.addComment = function () {
9653 reportGroupPropertyResource.save({
9657 reportGroupPropertyResource.save({
9654 groupId: vm.report.group_id,
9658 groupId: vm.report.group_id,
9655 key: 'comments'
9659 key: 'comments'
9656 }, {body: vm.comment},
9660 }, {body: vm.comment},
9657 function (data) {
9661 function (data) {
9658 vm.report.comments.push(data);
9662 vm.report.comments.push(data);
9659 });
9663 });
9660 vm.comment = '';
9664 vm.comment = '';
9661 };
9665 };
9662
9666
9663 vm.fetchReport = function () {
9667 vm.fetchReport = function () {
9664
9668
9665 vm.is_loading.report = true;
9669 vm.is_loading.report = true;
9666 reportGroupResource.get($state.params, function (data) {
9670 reportGroupResource.get($state.params, function (data) {
9667 vm.is_loading.report = false;
9671 vm.is_loading.report = false;
9668 if (data.request) {
9672 if (data.request) {
9669 try {
9673 try {
9670 var to_sort = _.pairs(data.request);
9674 var to_sort = _.pairs(data.request);
9671 data.request = _.object(_.sortBy(to_sort, function (i) {
9675 data.request = _.object(_.sortBy(to_sort, function (i) {
9672 return i[0]
9676 return i[0]
9673 }));
9677 }));
9674 }
9678 }
9675 catch (err) {
9679 catch (err) {
9676 }
9680 }
9677 }
9681 }
9678 vm.report = data;
9682 vm.report = data;
9679 if (vm.report.req_stats) {
9683 if (vm.report.req_stats) {
9680 vm.requestStats = [];
9684 vm.requestStats = [];
9681 _.each(_.pairs(vm.report.req_stats['percentages']), function (p) {
9685 _.each(_.pairs(vm.report.req_stats['percentages']), function (p) {
9682 vm.requestStats.push({
9686 vm.requestStats.push({
9683 name: p[0],
9687 name: p[0],
9684 value: vm.report.req_stats[p[0]].toFixed(3),
9688 value: vm.report.req_stats[p[0]].toFixed(3),
9685 percent: p[1],
9689 percent: p[1],
9686 calls: vm.report.req_stats[p[0] + '_calls']
9690 calls: vm.report.req_stats[p[0] + '_calls']
9687 })
9691 })
9688 });
9692 });
9689 }
9693 }
9690 vm.traceback = data.traceback;
9694 vm.traceback = data.traceback;
9691 _.each(vm.traceback, function (frame) {
9695 _.each(vm.traceback, function (frame) {
9692 if (frame.line) {
9696 if (frame.line) {
9693 vm.rawTraceback += 'File ' + frame.file + ' line ' + frame.line + ' in ' + frame.fn + ": \r\n";
9697 vm.rawTraceback += 'File ' + frame.file + ' line ' + frame.line + ' in ' + frame.fn + ": \r\n";
9694 }
9698 }
9695 vm.rawTraceback += ' ' + frame.cline + "\r\n";
9699 vm.rawTraceback += ' ' + frame.cline + "\r\n";
9696 });
9700 });
9697
9701
9698 if (stateHolder.AeUser.id){
9702 if (stateHolder.AeUser.id){
9699 vm.fetchHistory();
9703 vm.fetchHistory();
9700 }
9704 }
9701
9705
9702 vm.selectedTab($cookies.selectedReportTab);
9706 vm.selectedTab($cookies.selectedReportTab);
9703
9707
9704 }, function (response) {
9708 }, function (response) {
9705
9709
9706 if (response.status == 403) {
9710 if (response.status == 403) {
9707 var uid = response.headers('x-appenlight-uid');
9711 var uid = response.headers('x-appenlight-uid');
9708 if (!uid) {
9712 if (!uid) {
9709 window.location = '/register?came_from=' + encodeURIComponent(window.location);
9713 window.location = '/register?came_from=' + encodeURIComponent(window.location);
9710 }
9714 }
9711 }
9715 }
9712 vm.is_loading.report = false;
9716 vm.is_loading.report = false;
9713 });
9717 });
9714 };
9718 };
9715
9719
9716 vm.selectedTab = function(tab_name){
9720 vm.selectedTab = function(tab_name){
9717 $cookies.selectedReportTab = tab_name;
9721 $cookies.selectedReportTab = tab_name;
9718 if (tab_name == 'logs' && vm.reportLogs === null) {
9722 if (tab_name == 'logs' && vm.reportLogs === null) {
9719 vm.fetchLogs();
9723 vm.fetchLogs();
9720 }
9724 }
9721 };
9725 };
9722
9726
9723 vm.markFixed = function () {
9727 vm.markFixed = function () {
9724 reportGroupResource.update({
9728 reportGroupResource.update({
9725 groupId: vm.report.group_id
9729 groupId: vm.report.group_id
9726 }, {fixed: !vm.report.group.fixed},
9730 }, {fixed: !vm.report.group.fixed},
9727 function (data) {
9731 function (data) {
9728 vm.report.group.fixed = data.fixed;
9732 vm.report.group.fixed = data.fixed;
9729 });
9733 });
9730 };
9734 };
9731
9735
9732 vm.markPublic = function () {
9736 vm.markPublic = function () {
9733 reportGroupResource.update({
9737 reportGroupResource.update({
9734 groupId: vm.report.group_id
9738 groupId: vm.report.group_id
9735 }, {public: !vm.report.group.public},
9739 }, {public: !vm.report.group.public},
9736 function (data) {
9740 function (data) {
9737 vm.report.group.public = data.public;
9741 vm.report.group.public = data.public;
9738 });
9742 });
9739 };
9743 };
9740
9744
9741 vm.delete = function () {
9745 vm.delete = function () {
9742 reportGroupResource.delete({'groupId': vm.report.group_id},
9746 reportGroupResource.delete({'groupId': vm.report.group_id},
9743 function (data) {
9747 function (data) {
9744 $state.go('report.list');
9748 $state.go('report.list');
9745 })
9749 })
9746 };
9750 };
9747
9751
9748 vm.assignUsersModal = function (index) {
9752 vm.assignUsersModal = function (index) {
9749 vm.opts = {
9753 vm.opts = {
9750 backdrop: 'static',
9754 backdrop: 'static',
9751 templateUrl: 'AssignReportCtrl.html',
9755 templateUrl: 'AssignReportCtrl.html',
9752 controller: 'AssignReportCtrl as ctrl',
9756 controller: 'AssignReportCtrl as ctrl',
9753 resolve: {
9757 resolve: {
9754 report: function () {
9758 report: function () {
9755 return vm.report;
9759 return vm.report;
9756 }
9760 }
9757 }
9761 }
9758 };
9762 };
9759 var modalInstance = $uibModal.open(vm.opts);
9763 var modalInstance = $uibModal.open(vm.opts);
9760 modalInstance.result.then(function (report) {
9764 modalInstance.result.then(function (report) {
9761
9765
9762 }, function () {
9766 }, function () {
9763 console.info('Modal dismissed at: ' + new Date());
9767 console.info('Modal dismissed at: ' + new Date());
9764 });
9768 });
9765
9769
9766 };
9770 };
9767
9771
9768 vm.fetchHistory = function () {
9772 vm.fetchHistory = function () {
9769 reportGroupPropertyResource.query({
9773 reportGroupPropertyResource.query({
9770 groupId: vm.report.group_id,
9774 groupId: vm.report.group_id,
9771 key: 'history'
9775 key: 'history'
9772 }, function (data) {
9776 }, function (data) {
9773 vm.reportHistoryData = {
9777 vm.reportHistoryData = {
9774 json: data,
9778 json: data,
9775 keys: {
9779 keys: {
9776 x: 'x',
9780 x: 'x',
9777 value: ["reports"]
9781 value: ["reports"]
9778 },
9782 },
9779 names: {
9783 names: {
9780 reports: 'Reports history'
9784 reports: 'Reports history'
9781 },
9785 },
9782 type: 'bar'
9786 type: 'bar'
9783 };
9787 };
9784 vm.is_loading.history = false;
9788 vm.is_loading.history = false;
9785 });
9789 });
9786 };
9790 };
9787
9791
9788 vm.nextDetail = function () {
9792 vm.nextDetail = function () {
9789 $state.go('report.view_detail', {
9793 $state.go('report.view_detail', {
9790 groupId: vm.report.group_id,
9794 groupId: vm.report.group_id,
9791 reportId: vm.report.group.next_report
9795 reportId: vm.report.group.next_report
9792 });
9796 });
9793 };
9797 };
9794 vm.previousDetail = function () {
9798 vm.previousDetail = function () {
9795 $state.go('report.view_detail', {
9799 $state.go('report.view_detail', {
9796 groupId: vm.report.group_id,
9800 groupId: vm.report.group_id,
9797 reportId: vm.report.group.previous_report
9801 reportId: vm.report.group.previous_report
9798 });
9802 });
9799 };
9803 };
9800
9804
9801 vm.runIntegration = function (integration_name) {
9805 vm.runIntegration = function (integration_name) {
9802
9806
9803 if (integration_name == 'bitbucket') {
9807 if (integration_name == 'bitbucket') {
9804 var controller = 'BitbucketIntegrationCtrl as ctrl';
9808 var controller = 'BitbucketIntegrationCtrl as ctrl';
9805 var template_url = 'templates/integrations/bitbucket.html';
9809 var template_url = 'templates/integrations/bitbucket.html';
9806 }
9810 }
9807 else if (integration_name == 'github') {
9811 else if (integration_name == 'github') {
9808 var controller = 'GithubIntegrationCtrl as ctrl';
9812 var controller = 'GithubIntegrationCtrl as ctrl';
9809 var template_url = 'templates/integrations/github.html';
9813 var template_url = 'templates/integrations/github.html';
9810 }
9814 }
9811 else if (integration_name == 'jira') {
9815 else if (integration_name == 'jira') {
9812 var controller = 'JiraIntegrationCtrl as ctrl';
9816 var controller = 'JiraIntegrationCtrl as ctrl';
9813 var template_url = 'templates/integrations/jira.html';
9817 var template_url = 'templates/integrations/jira.html';
9814 }
9818 }
9815 else {
9819 else {
9816 return false;
9820 return false;
9817 }
9821 }
9818
9822
9819 vm.opts = {
9823 vm.opts = {
9820 backdrop: 'static',
9824 backdrop: 'static',
9821 templateUrl: template_url,
9825 templateUrl: template_url,
9822 controller: controller,
9826 controller: controller,
9823 resolve: {
9827 resolve: {
9824 integrationName: function () {
9828 integrationName: function () {
9825 return integration_name
9829 return integration_name
9826 },
9830 },
9827 report: function () {
9831 report: function () {
9828 return vm.report;
9832 return vm.report;
9829 }
9833 }
9830 }
9834 }
9831 };
9835 };
9832 var modalInstance = $uibModal.open(vm.opts);
9836 var modalInstance = $uibModal.open(vm.opts);
9833 modalInstance.result.then(function (report) {
9837 modalInstance.result.then(function (report) {
9834
9838
9835 }, function () {
9839 }, function () {
9836 console.info('Modal dismissed at: ' + new Date());
9840 console.info('Modal dismissed at: ' + new Date());
9837 });
9841 });
9838
9842
9839 };
9843 };
9840 }
9844 }
9841
9845
9842 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9846 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9843 //
9847 //
9844 // Licensed under the Apache License, Version 2.0 (the "License");
9848 // Licensed under the Apache License, Version 2.0 (the "License");
9845 // you may not use this file except in compliance with the License.
9849 // you may not use this file except in compliance with the License.
9846 // You may obtain a copy of the License at
9850 // You may obtain a copy of the License at
9847 //
9851 //
9848 // http://www.apache.org/licenses/LICENSE-2.0
9852 // http://www.apache.org/licenses/LICENSE-2.0
9849 //
9853 //
9850 // Unless required by applicable law or agreed to in writing, software
9854 // Unless required by applicable law or agreed to in writing, software
9851 // distributed under the License is distributed on an "AS IS" BASIS,
9855 // distributed under the License is distributed on an "AS IS" BASIS,
9852 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9856 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9853 // See the License for the specific language governing permissions and
9857 // See the License for the specific language governing permissions and
9854 // limitations under the License.
9858 // limitations under the License.
9855
9859
9856 angular.module('appenlight.components.reportsBrowserView', [])
9860 angular.module('appenlight.components.reportsBrowserView', [])
9857 .component('reportsBrowserView', {
9861 .component('reportsBrowserView', {
9858 templateUrl: 'components/views/reports-browser-view/reports-browser-view.html',
9862 templateUrl: 'components/views/reports-browser-view/reports-browser-view.html',
9859 controller: reportsBrowserViewController
9863 controller: reportsBrowserViewController
9860 });
9864 });
9861
9865
9862 reportsBrowserViewController.$inject = ['$location', '$cookies',
9866 reportsBrowserViewController.$inject = ['$location', '$cookies',
9863 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
9867 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
9864
9868
9865 function reportsBrowserViewController($location, $cookies, stateHolder,
9869 function reportsBrowserViewController($location, $cookies, stateHolder,
9866 typeAheadTagHelper, reportsResource) {
9870 typeAheadTagHelper, reportsResource) {
9867 var vm = this;
9871 var vm = this;
9868 vm.$onInit = function () {
9872 vm.$onInit = function () {
9869 vm.applications = stateHolder.AeUser.applications_map;
9873 vm.applications = stateHolder.AeUser.applications_map;
9870 stateHolder.section = 'reports';
9874 stateHolder.section = 'reports';
9871 vm.today = function () {
9875 vm.today = function () {
9872 vm.pickerDate = new Date();
9876 vm.pickerDate = new Date();
9873 };
9877 };
9874 vm.today();
9878 vm.today();
9875 vm.reportsPage = [];
9879 vm.reportsPage = [];
9876 vm.page = 1;
9880 vm.page = 1;
9877 vm.itemCount = 0;
9881 vm.itemCount = 0;
9878 vm.itemsPerPage = 250;
9882 vm.itemsPerPage = 250;
9879 typeAheadTagHelper.tags = [];
9883 typeAheadTagHelper.tags = [];
9880 vm.searchParams = {tags: [], page: 1, type: 'report'};
9884 vm.searchParams = {tags: [], page: 1, type: 'report'};
9881 vm.is_loading = false;
9885 vm.is_loading = false;
9882 vm.filterTypeAheadOptions = [
9886 vm.filterTypeAheadOptions = [
9883 {
9887 {
9884 type: 'error',
9888 type: 'error',
9885 text: 'error:',
9889 text: 'error:',
9886 'description': 'Full-text search in your reports',
9890 'description': 'Full-text search in your reports',
9887 example: 'error:text-im-looking-for',
9891 example: 'error:text-im-looking-for',
9888 tag: 'Error'
9892 tag: 'Error'
9889 },
9893 },
9890 {
9894 {
9891 type: 'view_name',
9895 type: 'view_name',
9892 text: 'view_name:',
9896 text: 'view_name:',
9893 'description': 'Query reports occured in specific views',
9897 'description': 'Query reports occured in specific views',
9894 example: "view_name:module.foo",
9898 example: "view_name:module.foo",
9895 tag: 'View Name'
9899 tag: 'View Name'
9896 },
9900 },
9897 {
9901 {
9898 type: 'resource',
9902 type: 'resource',
9899 text: 'resource:',
9903 text: 'resource:',
9900 'description': 'Restrict resultset to application',
9904 'description': 'Restrict resultset to application',
9901 example: "resource:ID",
9905 example: "resource:ID",
9902 tag: 'Application'
9906 tag: 'Application'
9903 },
9907 },
9904 {
9908 {
9905 type: 'priority',
9909 type: 'priority',
9906 text: 'priority:',
9910 text: 'priority:',
9907 'description': 'Show reports with specific priority',
9911 'description': 'Show reports with specific priority',
9908 example: 'priority:8',
9912 example: 'priority:8',
9909 tag: 'Priority'
9913 tag: 'Priority'
9910 },
9914 },
9911 {
9915 {
9912 type: 'min_occurences',
9916 type: 'min_occurences',
9913 text: 'min_occurences:',
9917 text: 'min_occurences:',
9914 'description': 'Show reports from groups with at least X occurences',
9918 'description': 'Show reports from groups with at least X occurences',
9915 example: 'min_occurences:25',
9919 example: 'min_occurences:25',
9916 tag: 'Occurences'
9920 tag: 'Occurences'
9917 },
9921 },
9918 {
9922 {
9919 type: 'url_path',
9923 type: 'url_path',
9920 text: 'url_path:',
9924 text: 'url_path:',
9921 'description': 'Show reports from specific URL paths',
9925 'description': 'Show reports from specific URL paths',
9922 example: 'url_path:/foo/bar/baz',
9926 example: 'url_path:/foo/bar/baz',
9923 tag: 'Url Path'
9927 tag: 'Url Path'
9924 },
9928 },
9925 {
9929 {
9926 type: 'url_domain',
9930 type: 'url_domain',
9927 text: 'url_domain:',
9931 text: 'url_domain:',
9928 'description': 'Show reports from specific domain',
9932 'description': 'Show reports from specific domain',
9929 example: 'url_domain:domain.com',
9933 example: 'url_domain:domain.com',
9930 tag: 'Domain'
9934 tag: 'Domain'
9931 },
9935 },
9932 {
9936 {
9933 type: 'report_status',
9937 type: 'report_status',
9934 text: 'report_status:',
9938 text: 'report_status:',
9935 'description': 'Show reports from groups with specific status',
9939 'description': 'Show reports from groups with specific status',
9936 example: 'report_status:never_reviewed',
9940 example: 'report_status:never_reviewed',
9937 tag: 'Status'
9941 tag: 'Status'
9938 },
9942 },
9939 {
9943 {
9940 type: 'request_id',
9944 type: 'request_id',
9941 text: 'request_id:',
9945 text: 'request_id:',
9942 'description': 'Show reports with specific request id',
9946 'description': 'Show reports with specific request id',
9943 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9947 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9944 tag: 'Request ID'
9948 tag: 'Request ID'
9945 },
9949 },
9946 {
9950 {
9947 type: 'server_name',
9951 type: 'server_name',
9948 text: 'server_name:',
9952 text: 'server_name:',
9949 'description': 'Show reports tagged with this key/value pair',
9953 'description': 'Show reports tagged with this key/value pair',
9950 example: 'server_name:hostname',
9954 example: 'server_name:hostname',
9951 tag: 'Tag'
9955 tag: 'Tag'
9952 },
9956 },
9953 {
9957 {
9954 type: 'http_status',
9958 type: 'http_status',
9955 text: 'http_status:',
9959 text: 'http_status:',
9956 'description': 'Show reports with specific HTTP status code',
9960 'description': 'Show reports with specific HTTP status code',
9957 example: "http_status:",
9961 example: "http_status:",
9958 tag: 'HTTP Status'
9962 tag: 'HTTP Status'
9959 },
9963 },
9960 {
9964 {
9961 type: 'http_status',
9965 type: 'http_status',
9962 text: 'http_status:500',
9966 text: 'http_status:500',
9963 'description': 'Show reports with specific HTTP status code',
9967 'description': 'Show reports with specific HTTP status code',
9964 example: "http_status:500",
9968 example: "http_status:500",
9965 tag: 'HTTP Status'
9969 tag: 'HTTP Status'
9966 },
9970 },
9967 {
9971 {
9968 type: 'http_status',
9972 type: 'http_status',
9969 text: 'http_status:404',
9973 text: 'http_status:404',
9970 'description': 'Include 404 reports in your search',
9974 'description': 'Include 404 reports in your search',
9971 example: "http_status:404",
9975 example: "http_status:404",
9972 tag: 'HTTP Status'
9976 tag: 'HTTP Status'
9973 },
9977 },
9974 {
9978 {
9975 type: 'start_date',
9979 type: 'start_date',
9976 text: 'start_date:',
9980 text: 'start_date:',
9977 'description': 'Show reports newer than this date (press TAB for dropdown)',
9981 'description': 'Show reports newer than this date (press TAB for dropdown)',
9978 example: 'start_date:2014-08-15T13:00',
9982 example: 'start_date:2014-08-15T13:00',
9979 tag: 'Start Date'
9983 tag: 'Start Date'
9980 },
9984 },
9981 {
9985 {
9982 type: 'end_date',
9986 type: 'end_date',
9983 text: 'end_date:',
9987 text: 'end_date:',
9984 'description': 'Show reports older than this date (press TAB for dropdown)',
9988 'description': 'Show reports older than this date (press TAB for dropdown)',
9985 example: 'start_date:2014-08-15T23:59',
9989 example: 'start_date:2014-08-15T23:59',
9986 tag: 'End Date'
9990 tag: 'End Date'
9987 }
9991 }
9988 ];
9992 ];
9989
9993
9990 vm.filterTypeAhead = undefined;
9994 vm.filterTypeAhead = undefined;
9991 vm.showDatePicker = false;
9995 vm.showDatePicker = false;
9992 vm.manualOpen = false;
9996 vm.manualOpen = false;
9993 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9997 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9994
9998
9995 vm.notRelativeTime = false;
9999 vm.notRelativeTime = false;
9996 if ($cookies.notRelativeTime) {
10000 if ($cookies.notRelativeTime) {
9997 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10001 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
9998 }
10002 }
9999
10003
10000 _.each(_.range(1, 11), function (priority) {
10004 _.each(_.range(1, 11), function (priority) {
10001 vm.filterTypeAheadOptions.push({
10005 vm.filterTypeAheadOptions.push({
10002 type: 'priority',
10006 type: 'priority',
10003 text: 'priority:' + priority.toString(),
10007 text: 'priority:' + priority.toString(),
10004 description: 'Show entries with specific priority',
10008 description: 'Show entries with specific priority',
10005 example: 'priority:' + priority,
10009 example: 'priority:' + priority,
10006 tag: 'Priority'
10010 tag: 'Priority'
10007 });
10011 });
10008 });
10012 });
10009 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10013 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10010 vm.filterTypeAheadOptions.push({
10014 vm.filterTypeAheadOptions.push({
10011 type: 'report_status',
10015 type: 'report_status',
10012 text: 'report_status:' + status,
10016 text: 'report_status:' + status,
10013 'description': 'Show only reports with this status',
10017 'description': 'Show only reports with this status',
10014 example: 'report_status:' + status,
10018 example: 'report_status:' + status,
10015 tag: 'Status ' + status.toUpperCase()
10019 tag: 'Status ' + status.toUpperCase()
10016 });
10020 });
10017 });
10021 });
10018 _.each(stateHolder.AeUser.applications, function (item) {
10022 _.each(stateHolder.AeUser.applications, function (item) {
10019 vm.filterTypeAheadOptions.push({
10023 vm.filterTypeAheadOptions.push({
10020 type: 'resource',
10024 type: 'resource',
10021 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10025 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10022 example: 'resource:' + item.resource_id,
10026 example: 'resource:' + item.resource_id,
10023 'tag': item.resource_name,
10027 'tag': item.resource_name,
10024 'description': 'Restrict resultset to this application'
10028 'description': 'Restrict resultset to this application'
10025 });
10029 });
10026 });
10030 });
10027
10031
10028 // initial load
10032 // initial load
10029 vm.refresh();
10033 vm.refresh();
10030
10034
10031 }
10035 }
10032
10036
10033 vm.removeSearchTag = function (tag) {
10037 vm.removeSearchTag = function (tag) {
10034 $location.search(tag.type, null);
10038 $location.search(tag.type, null);
10035 vm.refresh();
10039 vm.refresh();
10036 };
10040 };
10037 vm.addSearchTag = function (tag) {
10041 vm.addSearchTag = function (tag) {
10038 $location.search(tag.type, tag.value);
10042 $location.search(tag.type, tag.value);
10039 vm.refresh();
10043 vm.refresh();
10040 };
10044 };
10041
10045
10042 vm.changeRelativeTime = function () {
10046 vm.changeRelativeTime = function () {
10043 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10047 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10044 };
10048 };
10045
10049
10046 vm.paginationChange = function () {
10050 vm.paginationChange = function () {
10047 $location.search('page', vm.page);
10051 $location.search('page', vm.page);
10048 vm.refresh();
10052 vm.refresh();
10049 };
10053 };
10050
10054
10051 vm.typeAheadTag = function (event) {
10055 vm.typeAheadTag = function (event) {
10052 var text = vm.filterTypeAhead;
10056 var text = vm.filterTypeAhead;
10053 if (_.isObject(vm.filterTypeAhead)) {
10057 if (_.isObject(vm.filterTypeAhead)) {
10054 text = vm.filterTypeAhead.text;
10058 text = vm.filterTypeAhead.text;
10055 }
10059 }
10056 if (!vm.filterTypeAhead) {
10060 if (!vm.filterTypeAhead) {
10057 return
10061 return
10058 }
10062 }
10059
10063
10060 var parsed = text.split(':');
10064 var parsed = text.split(':');
10061 var tag = {'type': null, 'value': null};
10065 var tag = {'type': null, 'value': null};
10062 // app tags have : twice
10066 // app tags have : twice
10063 if (parsed.length > 2 && parsed[0] == 'resource') {
10067 if (parsed.length > 2 && parsed[0] == 'resource') {
10064 tag.type = 'resource';
10068 tag.type = 'resource';
10065 tag.value = parsed[1];
10069 tag.value = parsed[1];
10066 }
10070 }
10067 // normal tag:value
10071 // normal tag:value
10068 else if (parsed.length > 1) {
10072 else if (parsed.length > 1) {
10069 tag.type = parsed[0];
10073 tag.type = parsed[0];
10070 var tagValue = parsed.slice(1);
10074 var tagValue = parsed.slice(1);
10071 if (tagValue) {
10075 if (tagValue) {
10072 tag.value = tagValue.join(':');
10076 tag.value = tagValue.join(':');
10073 }
10077 }
10074 } else {
10078 } else {
10075 tag.type = 'error';
10079 tag.type = 'error';
10076 tag.value = parsed.join(':');
10080 tag.value = parsed.join(':');
10077 }
10081 }
10078
10082
10079 // set datepicker hour based on type of field
10083 // set datepicker hour based on type of field
10080 if ('start_date:' == text) {
10084 if ('start_date:' == text) {
10081 vm.showDatePicker = true;
10085 vm.showDatePicker = true;
10082 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10086 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10083 } else if ('end_date:' == text) {
10087 } else if ('end_date:' == text) {
10084 vm.showDatePicker = true;
10088 vm.showDatePicker = true;
10085 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10089 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10086 }
10090 }
10087
10091
10088 if (event.keyCode != 13 || !tag.type || !tag.value) {
10092 if (event.keyCode != 13 || !tag.type || !tag.value) {
10089 return
10093 return
10090 }
10094 }
10091 vm.showDatePicker = false;
10095 vm.showDatePicker = false;
10092 // aka we selected one of main options
10096 // aka we selected one of main options
10093 vm.addSearchTag({type: tag.type, value: tag.value});
10097 vm.addSearchTag({type: tag.type, value: tag.value});
10094 // clear typeahead
10098 // clear typeahead
10095 vm.filterTypeAhead = undefined;
10099 vm.filterTypeAhead = undefined;
10096 };
10100 };
10097
10101
10098 vm.pickerDateChanged = function () {
10102 vm.pickerDateChanged = function () {
10099 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10103 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10100 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10104 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10101 } else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10105 } else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10102 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10106 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10103 }
10107 }
10104 vm.showDatePicker = false;
10108 vm.showDatePicker = false;
10105 };
10109 };
10106
10110
10107 var reportPresentation = function (report) {
10111 var reportPresentation = function (report) {
10108 report.presentation = {};
10112 report.presentation = {};
10109 if (report.group.public) {
10113 if (report.group.public) {
10110 report.presentation.className = 'public';
10114 report.presentation.className = 'public';
10111 report.presentation.tooltip = 'Public';
10115 report.presentation.tooltip = 'Public';
10112 } else if (report.group.fixed) {
10116 } else if (report.group.fixed) {
10113 report.presentation.className = 'fixed';
10117 report.presentation.className = 'fixed';
10114 report.presentation.tooltip = 'Fixed';
10118 report.presentation.tooltip = 'Fixed';
10115 } else if (report.group.read) {
10119 } else if (report.group.read) {
10116 report.presentation.className = 'reviewed';
10120 report.presentation.className = 'reviewed';
10117 report.presentation.tooltip = 'Reviewed';
10121 report.presentation.tooltip = 'Reviewed';
10118 } else {
10122 } else {
10119 report.presentation.className = 'new';
10123 report.presentation.className = 'new';
10120 report.presentation.tooltip = 'New';
10124 report.presentation.tooltip = 'New';
10121 }
10125 }
10122 return report;
10126 return report;
10123 };
10127 };
10124
10128
10125 vm.fetchReports = function (searchParams) {
10129 vm.fetchReports = function (searchParams) {
10126 vm.is_loading = true;
10130 vm.is_loading = true;
10127 reportsResource.query(searchParams, function (data, getResponseHeaders) {
10131 reportsResource.query(searchParams, function (data, getResponseHeaders) {
10128 var headers = getResponseHeaders();
10132 var headers = getResponseHeaders();
10129
10133
10130 vm.is_loading = false;
10134 vm.is_loading = false;
10131 vm.reportsPage = _.map(data, function (item) {
10135 vm.reportsPage = _.map(data, function (item) {
10132 return reportPresentation(item);
10136 return reportPresentation(item);
10133 });
10137 });
10134 vm.itemCount = headers['x-total-count'];
10138 vm.itemCount = headers['x-total-count'];
10135 vm.itemsPerPage = headers['x-items-per-page'];
10139 vm.itemsPerPage = headers['x-items-per-page'];
10136 }, function () {
10140 }, function () {
10137 vm.is_loading = false;
10141 vm.is_loading = false;
10138 });
10142 });
10139 };
10143 };
10140
10144
10141 vm.filterId = function (log) {
10145 vm.filterId = function (log) {
10142 vm.searchParams.tags.push({
10146 vm.searchParams.tags.push({
10143 type: "request_id",
10147 type: "request_id",
10144 value: log.request_id
10148 value: log.request_id
10145 });
10149 });
10146 vm.refresh();
10150 vm.refresh();
10147 };
10151 };
10148
10152
10149 vm.refresh = function () {
10153 vm.refresh = function () {
10150 vm.searchParams = parseSearchToTags($location.search());
10154 vm.searchParams = parseSearchToTags($location.search());
10151 vm.page = Number(vm.searchParams.page) || 1;
10155 vm.page = Number(vm.searchParams.page) || 1;
10152 var params = parseTagsToSearch(vm.searchParams);
10156 var params = parseTagsToSearch(vm.searchParams);
10153
10157
10154 vm.fetchReports(params);
10158 vm.fetchReports(params);
10155 };
10159 };
10156
10160
10157 }
10161 }
10158
10162
10159 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10163 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10160 //
10164 //
10161 // Licensed under the Apache License, Version 2.0 (the "License");
10165 // Licensed under the Apache License, Version 2.0 (the "License");
10162 // you may not use this file except in compliance with the License.
10166 // you may not use this file except in compliance with the License.
10163 // You may obtain a copy of the License at
10167 // You may obtain a copy of the License at
10164 //
10168 //
10165 // http://www.apache.org/licenses/LICENSE-2.0
10169 // http://www.apache.org/licenses/LICENSE-2.0
10166 //
10170 //
10167 // Unless required by applicable law or agreed to in writing, software
10171 // Unless required by applicable law or agreed to in writing, software
10168 // distributed under the License is distributed on an "AS IS" BASIS,
10172 // distributed under the License is distributed on an "AS IS" BASIS,
10169 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10173 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10170 // See the License for the specific language governing permissions and
10174 // See the License for the specific language governing permissions and
10171 // limitations under the License.
10175 // limitations under the License.
10172
10176
10173 'use strict';
10177 'use strict';
10174
10178
10175 /* Controllers */
10179 /* Controllers */
10176
10180
10177 angular.module('appenlight.components.reportsSlowBrowserView', [])
10181 angular.module('appenlight.components.reportsSlowBrowserView', [])
10178 .component('reportsSlowBrowserView', {
10182 .component('reportsSlowBrowserView', {
10179 templateUrl: 'components/views/reports-slow-browser-view/reports-slow-browser-view.html',
10183 templateUrl: 'components/views/reports-slow-browser-view/reports-slow-browser-view.html',
10180 controller: ReportsSlowBrowserViewController
10184 controller: ReportsSlowBrowserViewController
10181 });
10185 });
10182
10186
10183 ReportsSlowBrowserViewController.$inject = ['$location', '$cookies',
10187 ReportsSlowBrowserViewController.$inject = ['$location', '$cookies',
10184 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
10188 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
10185
10189
10186 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
10190 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
10187 var vm = this;
10191 var vm = this;
10188 vm.$onInit = function () {
10192 vm.$onInit = function () {
10189 vm.applications = stateHolder.AeUser.applications_map;
10193 vm.applications = stateHolder.AeUser.applications_map;
10190 stateHolder.section = 'slow_reports';
10194 stateHolder.section = 'slow_reports';
10191 vm.today = function () {
10195 vm.today = function () {
10192 vm.pickerDate = new Date();
10196 vm.pickerDate = new Date();
10193 };
10197 };
10194 vm.today();
10198 vm.today();
10195 vm.reportsPage = [];
10199 vm.reportsPage = [];
10196 vm.page = 1;
10200 vm.page = 1;
10197 vm.itemCount = 0;
10201 vm.itemCount = 0;
10198 vm.itemsPerPage = 250;
10202 vm.itemsPerPage = 250;
10199 typeAheadTagHelper.tags = [];
10203 typeAheadTagHelper.tags = [];
10200 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
10204 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
10201 vm.is_loading = false;
10205 vm.is_loading = false;
10202 vm.filterTypeAheadOptions = [
10206 vm.filterTypeAheadOptions = [
10203 {
10207 {
10204 type: 'view_name',
10208 type: 'view_name',
10205 text: 'view_name:',
10209 text: 'view_name:',
10206 'description': 'Query reports occured in specific views',
10210 'description': 'Query reports occured in specific views',
10207 tag: 'View Name',
10211 tag: 'View Name',
10208 example: "view_name:module.foo"
10212 example: "view_name:module.foo"
10209 },
10213 },
10210 {
10214 {
10211 type: 'resource',
10215 type: 'resource',
10212 text: 'resource:',
10216 text: 'resource:',
10213 'description': 'Restrict resultset to application',
10217 'description': 'Restrict resultset to application',
10214 tag: 'Application',
10218 tag: 'Application',
10215 example: "resource:ID"
10219 example: "resource:ID"
10216 },
10220 },
10217 {
10221 {
10218 type: 'priority',
10222 type: 'priority',
10219 text: 'priority:',
10223 text: 'priority:',
10220 'description': 'Show reports with specific priority',
10224 'description': 'Show reports with specific priority',
10221 example: 'priority:8',
10225 example: 'priority:8',
10222 tag: 'Priority'
10226 tag: 'Priority'
10223 },
10227 },
10224 {
10228 {
10225 type: 'min_occurences',
10229 type: 'min_occurences',
10226 text: 'min_occurences:',
10230 text: 'min_occurences:',
10227 'description': 'Show reports from groups with at least X occurences',
10231 'description': 'Show reports from groups with at least X occurences',
10228 example: 'min_occurences:25',
10232 example: 'min_occurences:25',
10229 tag: 'Min. occurences'
10233 tag: 'Min. occurences'
10230 },
10234 },
10231 {
10235 {
10232 type: 'min_duration',
10236 type: 'min_duration',
10233 text: 'min_duration:',
10237 text: 'min_duration:',
10234 'description': 'Show reports from groups with average duration >= Xs',
10238 'description': 'Show reports from groups with average duration >= Xs',
10235 example: 'min_duration:4.5',
10239 example: 'min_duration:4.5',
10236 tag: 'Min. duration'
10240 tag: 'Min. duration'
10237 },
10241 },
10238 {
10242 {
10239 type: 'url_path',
10243 type: 'url_path',
10240 text: 'url_path:',
10244 text: 'url_path:',
10241 'description': 'Show reports from specific URL paths',
10245 'description': 'Show reports from specific URL paths',
10242 example: 'url_path:/foo/bar/baz',
10246 example: 'url_path:/foo/bar/baz',
10243 tag: 'Url Path'
10247 tag: 'Url Path'
10244 },
10248 },
10245 {
10249 {
10246 type: 'url_domain',
10250 type: 'url_domain',
10247 text: 'url_domain:',
10251 text: 'url_domain:',
10248 'description': 'Show reports from specific domain',
10252 'description': 'Show reports from specific domain',
10249 example: 'url_domain:domain.com',
10253 example: 'url_domain:domain.com',
10250 tag: 'Domain'
10254 tag: 'Domain'
10251 },
10255 },
10252 {
10256 {
10253 type: 'request_id',
10257 type: 'request_id',
10254 text: 'request_id:',
10258 text: 'request_id:',
10255 'description': 'Show reports with specific request id',
10259 'description': 'Show reports with specific request id',
10256 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
10260 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
10257 tag: 'Request ID'
10261 tag: 'Request ID'
10258 },
10262 },
10259 {
10263 {
10260 type: 'report_status',
10264 type: 'report_status',
10261 text: 'report_status:',
10265 text: 'report_status:',
10262 'description': 'Show reports from groups with specific status',
10266 'description': 'Show reports from groups with specific status',
10263 example: 'report_status:never_reviewed',
10267 example: 'report_status:never_reviewed',
10264 tag: 'Status'
10268 tag: 'Status'
10265 },
10269 },
10266 {
10270 {
10267 type: 'server_name',
10271 type: 'server_name',
10268 text: 'server_name:',
10272 text: 'server_name:',
10269 'description': 'Show reports tagged with this key/value pair',
10273 'description': 'Show reports tagged with this key/value pair',
10270 example: 'server_name:hostname',
10274 example: 'server_name:hostname',
10271 tag: 'Tag'
10275 tag: 'Tag'
10272 },
10276 },
10273 {
10277 {
10274 type: 'start_date',
10278 type: 'start_date',
10275 text: 'start_date:',
10279 text: 'start_date:',
10276 'description': 'Show reports newer than this date (press TAB for dropdown)',
10280 'description': 'Show reports newer than this date (press TAB for dropdown)',
10277 example: 'start_date:2014-08-15T13:00',
10281 example: 'start_date:2014-08-15T13:00',
10278 tag: 'Start Date'
10282 tag: 'Start Date'
10279 },
10283 },
10280 {
10284 {
10281 type: 'end_date',
10285 type: 'end_date',
10282 text: 'end_date:',
10286 text: 'end_date:',
10283 'description': 'Show reports older than this date (press TAB for dropdown)',
10287 'description': 'Show reports older than this date (press TAB for dropdown)',
10284 example: 'start_date:2014-08-15T23:59',
10288 example: 'start_date:2014-08-15T23:59',
10285 tag: 'End Date'
10289 tag: 'End Date'
10286 }
10290 }
10287 ];
10291 ];
10288
10292
10289 vm.filterTypeAhead = undefined;
10293 vm.filterTypeAhead = undefined;
10290 vm.showDatePicker = false;
10294 vm.showDatePicker = false;
10291 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
10295 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
10292
10296
10293 vm.manualOpen = false;
10297 vm.manualOpen = false;
10294 vm.notRelativeTime = false;
10298 vm.notRelativeTime = false;
10295 if ($cookies.notRelativeTime) {
10299 if ($cookies.notRelativeTime) {
10296 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10300 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10297 }
10301 }
10298
10302
10299 _.each(_.range(1, 11), function (priority) {
10303 _.each(_.range(1, 11), function (priority) {
10300 vm.filterTypeAheadOptions.push({
10304 vm.filterTypeAheadOptions.push({
10301 type: 'priority',
10305 type: 'priority',
10302 text: 'priority:' + priority.toString(),
10306 text: 'priority:' + priority.toString(),
10303 description: 'Show entries with specific priority',
10307 description: 'Show entries with specific priority',
10304 example: 'priority:' + priority,
10308 example: 'priority:' + priority,
10305 tag: 'Priority'
10309 tag: 'Priority'
10306 });
10310 });
10307 });
10311 });
10308 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10312 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10309 vm.filterTypeAheadOptions.push({
10313 vm.filterTypeAheadOptions.push({
10310 type: 'report_status',
10314 type: 'report_status',
10311 text: 'report_status:' + status,
10315 text: 'report_status:' + status,
10312 'description': 'Show only reports with this status',
10316 'description': 'Show only reports with this status',
10313 example: 'report_status:' + status,
10317 example: 'report_status:' + status,
10314 tag: 'Status ' + status.toUpperCase()
10318 tag: 'Status ' + status.toUpperCase()
10315 });
10319 });
10316 });
10320 });
10317 _.each(stateHolder.AeUser.applications, function (item) {
10321 _.each(stateHolder.AeUser.applications, function (item) {
10318 vm.filterTypeAheadOptions.push({
10322 vm.filterTypeAheadOptions.push({
10319 type: 'resource',
10323 type: 'resource',
10320 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10324 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10321 example: 'resource:' + item.resource_id,
10325 example: 'resource:' + item.resource_id,
10322 'tag': item.resource_name,
10326 'tag': item.resource_name,
10323 'description': 'Restrict resultset to this application'
10327 'description': 'Restrict resultset to this application'
10324 });
10328 });
10325 });
10329 });
10326
10330
10327 //initial load
10331 //initial load
10328 vm.refresh();
10332 vm.refresh();
10329 }
10333 }
10330
10334
10331 vm.removeSearchTag = function (tag) {
10335 vm.removeSearchTag = function (tag) {
10332 $location.search(tag.type, null);
10336 $location.search(tag.type, null);
10333 vm.refresh();
10337 vm.refresh();
10334 };
10338 };
10335 vm.addSearchTag = function (tag) {
10339 vm.addSearchTag = function (tag) {
10336 $location.search(tag.type, tag.value);
10340 $location.search(tag.type, tag.value);
10337 vm.refresh();
10341 vm.refresh();
10338 };
10342 };
10339
10343
10340
10344
10341 vm.changeRelativeTime = function () {
10345 vm.changeRelativeTime = function () {
10342 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10346 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10343 };
10347 };
10344
10348
10345 vm.typeAheadTag = function (event) {
10349 vm.typeAheadTag = function (event) {
10346 var text = vm.filterTypeAhead;
10350 var text = vm.filterTypeAhead;
10347 if (_.isObject(vm.filterTypeAhead)) {
10351 if (_.isObject(vm.filterTypeAhead)) {
10348 text = vm.filterTypeAhead.text;
10352 text = vm.filterTypeAhead.text;
10349 };
10353 };
10350 if (!vm.filterTypeAhead) {
10354 if (!vm.filterTypeAhead) {
10351 return
10355 return
10352 }
10356 }
10353 var parsed = text.split(':');
10357 var parsed = text.split(':');
10354 var tag = {'type': null, 'value': null};
10358 var tag = {'type': null, 'value': null};
10355 // app tags have : twice
10359 // app tags have : twice
10356 if (parsed.length > 2 && parsed[0] == 'resource') {
10360 if (parsed.length > 2 && parsed[0] == 'resource') {
10357 tag.type = 'resource';
10361 tag.type = 'resource';
10358 tag.value = parsed[1];
10362 tag.value = parsed[1];
10359 }
10363 }
10360 // normal tag:value
10364 // normal tag:value
10361 else if (parsed.length > 1) {
10365 else if (parsed.length > 1) {
10362 tag.type = parsed[0];
10366 tag.type = parsed[0];
10363 var tagValue = parsed.slice(1);
10367 var tagValue = parsed.slice(1);
10364 if (tagValue) {
10368 if (tagValue) {
10365 tag.value = tagValue.join(':');
10369 tag.value = tagValue.join(':');
10366 }
10370 }
10367 }
10371 }
10368
10372
10369 // set datepicker hour based on type of field
10373 // set datepicker hour based on type of field
10370 if ('start_date:' == text) {
10374 if ('start_date:' == text) {
10371 vm.showDatePicker = true;
10375 vm.showDatePicker = true;
10372 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10376 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10373 }
10377 }
10374 else if ('end_date:' == text) {
10378 else if ('end_date:' == text) {
10375 vm.showDatePicker = true;
10379 vm.showDatePicker = true;
10376 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10380 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10377 }
10381 }
10378
10382
10379 if (event.keyCode != 13 || !tag.type || !tag.value) {
10383 if (event.keyCode != 13 || !tag.type || !tag.value) {
10380 return
10384 return
10381 }
10385 }
10382 vm.showDatePicker = false;
10386 vm.showDatePicker = false;
10383 // aka we selected one of main options
10387 // aka we selected one of main options
10384 vm.addSearchTag({type: tag.type, value: tag.value});
10388 vm.addSearchTag({type: tag.type, value: tag.value});
10385 // clear typeahead
10389 // clear typeahead
10386 vm.filterTypeAhead = undefined;
10390 vm.filterTypeAhead = undefined;
10387 };
10391 };
10388
10392
10389 vm.paginationChange = function(){
10393 vm.paginationChange = function(){
10390 $location.search('page', vm.page);
10394 $location.search('page', vm.page);
10391 vm.refresh();
10395 vm.refresh();
10392 };
10396 };
10393
10397
10394 vm.pickerDateChanged = function(){
10398 vm.pickerDateChanged = function(){
10395 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10399 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10396 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10400 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10397 }
10401 }
10398 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10402 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10399 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10403 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10400 }
10404 }
10401 vm.showDatePicker = false;
10405 vm.showDatePicker = false;
10402 };
10406 };
10403
10407
10404 var reportPresentation = function (report) {
10408 var reportPresentation = function (report) {
10405 report.presentation = {};
10409 report.presentation = {};
10406 if (report.group.public) {
10410 if (report.group.public) {
10407 report.presentation.className = 'public';
10411 report.presentation.className = 'public';
10408 report.presentation.tooltip = 'Public';
10412 report.presentation.tooltip = 'Public';
10409 }
10413 }
10410 else if (report.group.fixed) {
10414 else if (report.group.fixed) {
10411 report.presentation.className = 'fixed';
10415 report.presentation.className = 'fixed';
10412 report.presentation.tooltip = 'Fixed';
10416 report.presentation.tooltip = 'Fixed';
10413 }
10417 }
10414 else if (report.group.read) {
10418 else if (report.group.read) {
10415 report.presentation.className = 'reviewed';
10419 report.presentation.className = 'reviewed';
10416 report.presentation.tooltip = 'Reviewed';
10420 report.presentation.tooltip = 'Reviewed';
10417 }
10421 }
10418 else {
10422 else {
10419 report.presentation.className = 'new';
10423 report.presentation.className = 'new';
10420 report.presentation.tooltip = 'New';
10424 report.presentation.tooltip = 'New';
10421 }
10425 }
10422 return report;
10426 return report;
10423 };
10427 };
10424
10428
10425 vm.fetchReports = function (searchParams) {
10429 vm.fetchReports = function (searchParams) {
10426 vm.is_loading = true;
10430 vm.is_loading = true;
10427 slowReportsResource.query(searchParams, function (data, getResponseHeaders) {
10431 slowReportsResource.query(searchParams, function (data, getResponseHeaders) {
10428 var headers = getResponseHeaders();
10432 var headers = getResponseHeaders();
10429
10433
10430 vm.is_loading = false;
10434 vm.is_loading = false;
10431 vm.reportsPage = _.map(data, function (item) {
10435 vm.reportsPage = _.map(data, function (item) {
10432 return reportPresentation(item);
10436 return reportPresentation(item);
10433 });
10437 });
10434 vm.itemCount = headers['x-total-count'];
10438 vm.itemCount = headers['x-total-count'];
10435 vm.itemsPerPage = headers['x-items-per-page'];
10439 vm.itemsPerPage = headers['x-items-per-page'];
10436 }, function () {
10440 }, function () {
10437 vm.is_loading = false;
10441 vm.is_loading = false;
10438 });
10442 });
10439 };
10443 };
10440
10444
10441 vm.filterId = function (log) {
10445 vm.filterId = function (log) {
10442 vm.searchParams.tags.push({
10446 vm.searchParams.tags.push({
10443 type: "request_id",
10447 type: "request_id",
10444 value: log.request_id
10448 value: log.request_id
10445 });
10449 });
10446 vm.refresh();
10450 vm.refresh();
10447 };
10451 };
10448 vm.refresh = function(){
10452 vm.refresh = function(){
10449 vm.searchParams = parseSearchToTags($location.search());
10453 vm.searchParams = parseSearchToTags($location.search());
10450 vm.page = Number(vm.searchParams.page) || 1;
10454 vm.page = Number(vm.searchParams.page) || 1;
10451 var params = parseTagsToSearch(vm.searchParams);
10455 var params = parseTagsToSearch(vm.searchParams);
10452 vm.fetchReports(params);
10456 vm.fetchReports(params);
10453 };
10457 };
10454
10458
10455 }
10459 }
10456
10460
10457 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10461 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10458 //
10462 //
10459 // Licensed under the Apache License, Version 2.0 (the "License");
10463 // Licensed under the Apache License, Version 2.0 (the "License");
10460 // you may not use this file except in compliance with the License.
10464 // you may not use this file except in compliance with the License.
10461 // You may obtain a copy of the License at
10465 // You may obtain a copy of the License at
10462 //
10466 //
10463 // http://www.apache.org/licenses/LICENSE-2.0
10467 // http://www.apache.org/licenses/LICENSE-2.0
10464 //
10468 //
10465 // Unless required by applicable law or agreed to in writing, software
10469 // Unless required by applicable law or agreed to in writing, software
10466 // distributed under the License is distributed on an "AS IS" BASIS,
10470 // distributed under the License is distributed on an "AS IS" BASIS,
10467 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10471 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10468 // See the License for the specific language governing permissions and
10472 // See the License for the specific language governing permissions and
10469 // limitations under the License.
10473 // limitations under the License.
10470
10474
10471 angular.module('appenlight.components.settingsView', [])
10475 angular.module('appenlight.components.settingsView', [])
10472 .component('settingsView', {
10476 .component('settingsView', {
10473 templateUrl: 'components/views/settings-view/settings-view.html',
10477 templateUrl: 'components/views/settings-view/settings-view.html',
10474 controller: SettingsViewController
10478 controller: SettingsViewController
10475 });
10479 });
10476
10480
10477 SettingsViewController.$inject = ['$state', 'AeConfig'];
10481 SettingsViewController.$inject = ['$state', 'AeConfig'];
10478
10482
10479 function SettingsViewController($state, AeConfig) {
10483 function SettingsViewController($state, AeConfig) {
10480 this.$onInit = function () {
10484 this.$onInit = function () {
10481 this.$state = $state;
10485 this.$state = $state;
10482 this.AeConfig = AeConfig;
10486 this.AeConfig = AeConfig;
10483 console.info('SettingsViewController');
10487 console.info('SettingsViewController');
10484 }
10488 }
10485 }
10489 }
10486
10490
10487 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10491 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10488 //
10492 //
10489 // Licensed under the Apache License, Version 2.0 (the "License");
10493 // Licensed under the Apache License, Version 2.0 (the "License");
10490 // you may not use this file except in compliance with the License.
10494 // you may not use this file except in compliance with the License.
10491 // You may obtain a copy of the License at
10495 // You may obtain a copy of the License at
10492 //
10496 //
10493 // http://www.apache.org/licenses/LICENSE-2.0
10497 // http://www.apache.org/licenses/LICENSE-2.0
10494 //
10498 //
10495 // Unless required by applicable law or agreed to in writing, software
10499 // Unless required by applicable law or agreed to in writing, software
10496 // distributed under the License is distributed on an "AS IS" BASIS,
10500 // distributed under the License is distributed on an "AS IS" BASIS,
10497 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10501 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10498 // See the License for the specific language governing permissions and
10502 // See the License for the specific language governing permissions and
10499 // limitations under the License.
10503 // limitations under the License.
10500
10504
10501 angular.module('appenlight.components.userAlertChannelsEmailNewView', [])
10505 angular.module('appenlight.components.userAlertChannelsEmailNewView', [])
10502 .component('userAlertChannelsEmailNewView', {
10506 .component('userAlertChannelsEmailNewView', {
10503 templateUrl: 'components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
10507 templateUrl: 'components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
10504 controller: AlertChannelsEmailController
10508 controller: AlertChannelsEmailController
10505 });
10509 });
10506
10510
10507 AlertChannelsEmailController.$inject = ['$state', 'userSelfPropertyResource'];
10511 AlertChannelsEmailController.$inject = ['$state', 'userSelfPropertyResource'];
10508
10512
10509 function AlertChannelsEmailController($state, userSelfPropertyResource) {
10513 function AlertChannelsEmailController($state, userSelfPropertyResource) {
10510
10514
10511 var vm = this;
10515 var vm = this;
10512 vm.$onInit = function () {
10516 vm.$onInit = function () {
10513 var vm = this;
10517 var vm = this;
10514 vm.$state = $state;
10518 vm.$state = $state;
10515 vm.loading = {email: false};
10519 vm.loading = {email: false};
10516 vm.form = {};
10520 vm.form = {};
10517 }
10521 }
10518 vm.createChannel = function () {
10522 vm.createChannel = function () {
10519 vm.loading.email = true;
10523 vm.loading.email = true;
10520
10524
10521 userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () {
10525 userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () {
10522 //vm.loading.email = false;
10526 //vm.loading.email = false;
10523 //setServerValidation(vm.channelForm);
10527 //setServerValidation(vm.channelForm);
10524 //vm.form = {};
10528 //vm.form = {};
10525 $state.go('user.alert_channels.list');
10529 $state.go('user.alert_channels.list');
10526 }, function (response) {
10530 }, function (response) {
10527 if (response.status == 422) {
10531 if (response.status == 422) {
10528 setServerValidation(vm.channelForm, response.data);
10532 setServerValidation(vm.channelForm, response.data);
10529 }
10533 }
10530 vm.loading.email = false;
10534 vm.loading.email = false;
10531 });
10535 });
10532 }
10536 }
10533 }
10537 }
10534
10538
10535 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10539 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10536 //
10540 //
10537 // Licensed under the Apache License, Version 2.0 (the "License");
10541 // Licensed under the Apache License, Version 2.0 (the "License");
10538 // you may not use this file except in compliance with the License.
10542 // you may not use this file except in compliance with the License.
10539 // You may obtain a copy of the License at
10543 // You may obtain a copy of the License at
10540 //
10544 //
10541 // http://www.apache.org/licenses/LICENSE-2.0
10545 // http://www.apache.org/licenses/LICENSE-2.0
10542 //
10546 //
10543 // Unless required by applicable law or agreed to in writing, software
10547 // Unless required by applicable law or agreed to in writing, software
10544 // distributed under the License is distributed on an "AS IS" BASIS,
10548 // distributed under the License is distributed on an "AS IS" BASIS,
10545 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10549 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10546 // See the License for the specific language governing permissions and
10550 // See the License for the specific language governing permissions and
10547 // limitations under the License.
10551 // limitations under the License.
10548
10552
10549 angular.module('appenlight.components.userAlertChannelsListView', [])
10553 angular.module('appenlight.components.userAlertChannelsListView', [])
10550 .component('userAlertChannelsListView', {
10554 .component('userAlertChannelsListView', {
10551 templateUrl: 'components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
10555 templateUrl: 'components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
10552 controller: userAlertChannelsListViewController
10556 controller: userAlertChannelsListViewController
10553 });
10557 });
10554
10558
10555 userAlertChannelsListViewController.$inject = ['$state', 'userSelfPropertyResource', 'applicationsNoIdResource'];
10559 userAlertChannelsListViewController.$inject = ['$state', 'userSelfPropertyResource', 'applicationsNoIdResource'];
10556
10560
10557 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
10561 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
10558
10562
10559 var vm = this;
10563 var vm = this;
10560 vm.$onInit = function () {
10564 vm.$onInit = function () {
10561 vm.$state = $state;
10565 vm.$state = $state;
10562 vm.loading = {channels: true, applications: true, actions: true};
10566 vm.loading = {channels: true, applications: true, actions: true};
10563
10567
10564 vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'},
10568 vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'},
10565 function (data) {
10569 function (data) {
10566 vm.loading.channels = false;
10570 vm.loading.channels = false;
10567 });
10571 });
10568
10572
10569 vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'},
10573 vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'},
10570 function (data) {
10574 function (data) {
10571 vm.loading.actions = false;
10575 vm.loading.actions = false;
10572 });
10576 });
10573
10577
10574 vm.applications = applicationsNoIdResource.query({permission: 'view'},
10578 vm.applications = applicationsNoIdResource.query({permission: 'view'},
10575 function (data) {
10579 function (data) {
10576 vm.loading.applications = false;
10580 vm.loading.applications = false;
10577 });
10581 });
10578
10582
10579 var allOps = {
10583 var allOps = {
10580 'eq': 'Equal',
10584 'eq': 'Equal',
10581 'ne': 'Not equal',
10585 'ne': 'Not equal',
10582 'ge': 'Greater or equal',
10586 'ge': 'Greater or equal',
10583 'gt': 'Greater than',
10587 'gt': 'Greater than',
10584 'le': 'Lesser or equal',
10588 'le': 'Lesser or equal',
10585 'lt': 'Lesser than',
10589 'lt': 'Lesser than',
10586 'startswith': 'Starts with',
10590 'startswith': 'Starts with',
10587 'endswith': 'Ends with',
10591 'endswith': 'Ends with',
10588 'contains': 'Contains'
10592 'contains': 'Contains'
10589 };
10593 };
10590
10594
10591 var fieldOps = {};
10595 var fieldOps = {};
10592 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
10596 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
10593 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
10597 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
10594 fieldOps['duration'] = ['ge', 'le'];
10598 fieldOps['duration'] = ['ge', 'le'];
10595 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
10599 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
10596 'contains'];
10600 'contains'];
10597 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
10601 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
10598 'contains'];
10602 'contains'];
10599 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
10603 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
10600 'contains'];
10604 'contains'];
10601 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
10605 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
10602 'contains'];
10606 'contains'];
10603 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
10607 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
10604
10608
10605 var possibleFields = {
10609 var possibleFields = {
10606 '__AND__': 'All met (composite rule)',
10610 '__AND__': 'All met (composite rule)',
10607 '__OR__': 'One met (composite rule)',
10611 '__OR__': 'One met (composite rule)',
10608 '__NOT__': 'Not met (composite rule)',
10612 '__NOT__': 'Not met (composite rule)',
10609 'http_status': 'HTTP Status',
10613 'http_status': 'HTTP Status',
10610 'duration': 'Request duration',
10614 'duration': 'Request duration',
10611 'group:priority': 'Group -> Priority',
10615 'group:priority': 'Group -> Priority',
10612 'url_domain': 'Domain',
10616 'url_domain': 'Domain',
10613 'url_path': 'URL Path',
10617 'url_path': 'URL Path',
10614 'error': 'Error',
10618 'error': 'Error',
10615 'tags:server_name': 'Tag -> Server name',
10619 'tags:server_name': 'Tag -> Server name',
10616 'group:occurences': 'Group -> Occurences'
10620 'group:occurences': 'Group -> Occurences'
10617 };
10621 };
10618
10622
10619 vm.ruleDefinitions = {
10623 vm.ruleDefinitions = {
10620 fieldOps: fieldOps,
10624 fieldOps: fieldOps,
10621 allOps: allOps,
10625 allOps: allOps,
10622 possibleFields: possibleFields
10626 possibleFields: possibleFields
10623 };
10627 };
10624 }
10628 }
10625 vm.addAction = function (channel) {
10629 vm.addAction = function (channel) {
10626
10630
10627 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
10631 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
10628 vm.alertActions.push(data);
10632 vm.alertActions.push(data);
10629 }, function (response) {
10633 }, function (response) {
10630 if (response.status == 422) {
10634 if (response.status == 422) {
10631
10635
10632 }
10636 }
10633 });
10637 });
10634 };
10638 };
10635
10639
10636 vm.updateChannel = function (channel, subKey) {
10640 vm.updateChannel = function (channel, subKey) {
10637 var params = {
10641 var params = {
10638 key: 'alert_channels',
10642 key: 'alert_channels',
10639 channel_name: channel['channel_name'],
10643 channel_name: channel['channel_name'],
10640 channel_value: channel['channel_value']
10644 channel_value: channel['channel_value']
10641 };
10645 };
10642 var toUpdate = {};
10646 var toUpdate = {};
10643 if (['daily_digest', 'send_alerts'].indexOf(subKey) !== -1) {
10647 if (['daily_digest', 'send_alerts'].indexOf(subKey) !== -1) {
10644 toUpdate[subKey] = !channel[subKey];
10648 toUpdate[subKey] = !channel[subKey];
10645 }
10649 }
10646 userSelfPropertyResource.update(params, toUpdate, function (data) {
10650 userSelfPropertyResource.update(params, toUpdate, function (data) {
10647 _.extend(channel, data);
10651 _.extend(channel, data);
10648 });
10652 });
10649 };
10653 };
10650
10654
10651 vm.removeChannel = function (channel) {
10655 vm.removeChannel = function (channel) {
10652
10656
10653 userSelfPropertyResource.delete({
10657 userSelfPropertyResource.delete({
10654 key: 'alert_channels',
10658 key: 'alert_channels',
10655 channel_name: channel.channel_name,
10659 channel_name: channel.channel_name,
10656 channel_value: channel.channel_value
10660 channel_value: channel.channel_value
10657 }, function () {
10661 }, function () {
10658 vm.alertChannels = _.filter(vm.alertChannels, function (item) {
10662 vm.alertChannels = _.filter(vm.alertChannels, function (item) {
10659 return item != channel;
10663 return item != channel;
10660 });
10664 });
10661 });
10665 });
10662
10666
10663 }
10667 }
10664
10668
10665 }
10669 }
10666
10670
10667 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10671 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10668 //
10672 //
10669 // Licensed under the Apache License, Version 2.0 (the "License");
10673 // Licensed under the Apache License, Version 2.0 (the "License");
10670 // you may not use this file except in compliance with the License.
10674 // you may not use this file except in compliance with the License.
10671 // You may obtain a copy of the License at
10675 // You may obtain a copy of the License at
10672 //
10676 //
10673 // http://www.apache.org/licenses/LICENSE-2.0
10677 // http://www.apache.org/licenses/LICENSE-2.0
10674 //
10678 //
10675 // Unless required by applicable law or agreed to in writing, software
10679 // Unless required by applicable law or agreed to in writing, software
10676 // distributed under the License is distributed on an "AS IS" BASIS,
10680 // distributed under the License is distributed on an "AS IS" BASIS,
10677 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10681 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10678 // See the License for the specific language governing permissions and
10682 // See the License for the specific language governing permissions and
10679 // limitations under the License.
10683 // limitations under the License.
10680
10684
10681 angular.module('appenlight.components.userAuthTokensView', [])
10685 angular.module('appenlight.components.userAuthTokensView', [])
10682 .component('userAuthTokensView', {
10686 .component('userAuthTokensView', {
10683 templateUrl: 'components/views/user-auth-tokens-view/user-auth-tokens-view.html',
10687 templateUrl: 'components/views/user-auth-tokens-view/user-auth-tokens-view.html',
10684 controller: userAuthTokensViewController
10688 controller: userAuthTokensViewController
10685 });
10689 });
10686
10690
10687 userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10691 userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10688
10692
10689 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
10693 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
10690
10694
10691 var vm = this;
10695 var vm = this;
10692 vm.$onInit = function () {
10696 vm.$onInit = function () {
10693 vm.$state = $state;
10697 vm.$state = $state;
10694 vm.loading = {tokens: true};
10698 vm.loading = {tokens: true};
10695
10699
10696 vm.expireOptions = AeConfig.timeOptions;
10700 vm.expireOptions = AeConfig.timeOptions;
10697
10701
10698 vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'},
10702 vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'},
10699 function (data) {
10703 function (data) {
10700 vm.loading.tokens = false;
10704 vm.loading.tokens = false;
10701 });
10705 });
10702 }
10706 }
10703 vm.addToken = function () {
10707 vm.addToken = function () {
10704 vm.loading.tokens = true;
10708 vm.loading.tokens = true;
10705 userSelfPropertyResource.save({key: 'auth_tokens'},
10709 userSelfPropertyResource.save({key: 'auth_tokens'},
10706 vm.form,
10710 vm.form,
10707 function (data) {
10711 function (data) {
10708 vm.loading.tokens = false;
10712 vm.loading.tokens = false;
10709 setServerValidation(vm.TokenForm);
10713 setServerValidation(vm.TokenForm);
10710 vm.form = {};
10714 vm.form = {};
10711 vm.tokens.push(data);
10715 vm.tokens.push(data);
10712 }, function (response) {
10716 }, function (response) {
10713 vm.loading.tokens = false;
10717 vm.loading.tokens = false;
10714 if (response.status == 422) {
10718 if (response.status == 422) {
10715 setServerValidation(vm.TokenForm, response.data);
10719 setServerValidation(vm.TokenForm, response.data);
10716 }
10720 }
10717 })
10721 })
10718 };
10722 };
10719
10723
10720 vm.removeToken = function (token) {
10724 vm.removeToken = function (token) {
10721 userSelfPropertyResource.delete({
10725 userSelfPropertyResource.delete({
10722 key: 'auth_tokens',
10726 key: 'auth_tokens',
10723 token: token.token
10727 token: token.token
10724 },
10728 },
10725 function () {
10729 function () {
10726 var index = vm.tokens.indexOf(token);
10730 var index = vm.tokens.indexOf(token);
10727 if (index !== -1) {
10731 if (index !== -1) {
10728 vm.tokens.splice(index, 1);
10732 vm.tokens.splice(index, 1);
10729 }
10733 }
10730 })
10734 })
10731 }
10735 }
10732 }
10736 }
10733
10737
10734 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10738 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10735 //
10739 //
10736 // Licensed under the Apache License, Version 2.0 (the "License");
10740 // Licensed under the Apache License, Version 2.0 (the "License");
10737 // you may not use this file except in compliance with the License.
10741 // you may not use this file except in compliance with the License.
10738 // You may obtain a copy of the License at
10742 // You may obtain a copy of the License at
10739 //
10743 //
10740 // http://www.apache.org/licenses/LICENSE-2.0
10744 // http://www.apache.org/licenses/LICENSE-2.0
10741 //
10745 //
10742 // Unless required by applicable law or agreed to in writing, software
10746 // Unless required by applicable law or agreed to in writing, software
10743 // distributed under the License is distributed on an "AS IS" BASIS,
10747 // distributed under the License is distributed on an "AS IS" BASIS,
10744 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10748 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10745 // See the License for the specific language governing permissions and
10749 // See the License for the specific language governing permissions and
10746 // limitations under the License.
10750 // limitations under the License.
10747
10751
10748 angular.module('appenlight.components.userIdentitiesView', [])
10752 angular.module('appenlight.components.userIdentitiesView', [])
10749 .component('userIdentitiesView', {
10753 .component('userIdentitiesView', {
10750 templateUrl: 'components/views/user-identities-view/user-identities-view.html',
10754 templateUrl: 'components/views/user-identities-view/user-identities-view.html',
10751 controller: UserIdentitiesController
10755 controller: UserIdentitiesController
10752 });
10756 });
10753
10757
10754 UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10758 UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10755
10759
10756 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
10760 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
10757
10761
10758 var vm = this;
10762 var vm = this;
10759 vm.$onInit = function () {
10763 vm.$onInit = function () {
10760 vm.$state = $state;
10764 vm.$state = $state;
10761 vm.AeConfig = AeConfig;
10765 vm.AeConfig = AeConfig;
10762 vm.loading = {identities: true};
10766 vm.loading = {identities: true};
10763
10767
10764 vm.identities = userSelfPropertyResource.query(
10768 vm.identities = userSelfPropertyResource.query(
10765 {key: 'external_identities'},
10769 {key: 'external_identities'},
10766 function (data) {
10770 function (data) {
10767 vm.loading.identities = false;
10771 vm.loading.identities = false;
10768
10772
10769 });
10773 });
10770 }
10774 }
10771 vm.removeProvider = function (provider) {
10775 vm.removeProvider = function (provider) {
10772
10776
10773 userSelfPropertyResource.delete(
10777 userSelfPropertyResource.delete(
10774 {
10778 {
10775 key: 'external_identities',
10779 key: 'external_identities',
10776 provider: provider.provider,
10780 provider: provider.provider,
10777 id: provider.id
10781 id: provider.id
10778 },
10782 },
10779 function (status) {
10783 function (status) {
10780 if (status) {
10784 if (status) {
10781 vm.identities = _.filter(vm.identities, function (item) {
10785 vm.identities = _.filter(vm.identities, function (item) {
10782 return item != provider
10786 return item != provider
10783 });
10787 });
10784 }
10788 }
10785
10789
10786 });
10790 });
10787 }
10791 }
10788 }
10792 }
10789
10793
10790 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10794 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10791 //
10795 //
10792 // Licensed under the Apache License, Version 2.0 (the "License");
10796 // Licensed under the Apache License, Version 2.0 (the "License");
10793 // you may not use this file except in compliance with the License.
10797 // you may not use this file except in compliance with the License.
10794 // You may obtain a copy of the License at
10798 // You may obtain a copy of the License at
10795 //
10799 //
10796 // http://www.apache.org/licenses/LICENSE-2.0
10800 // http://www.apache.org/licenses/LICENSE-2.0
10797 //
10801 //
10798 // Unless required by applicable law or agreed to in writing, software
10802 // Unless required by applicable law or agreed to in writing, software
10799 // distributed under the License is distributed on an "AS IS" BASIS,
10803 // distributed under the License is distributed on an "AS IS" BASIS,
10800 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10804 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10801 // See the License for the specific language governing permissions and
10805 // See the License for the specific language governing permissions and
10802 // limitations under the License.
10806 // limitations under the License.
10803
10807
10804 angular.module('appenlight.components.userPasswordView', [])
10808 angular.module('appenlight.components.userPasswordView', [])
10805 .component('userPasswordView', {
10809 .component('userPasswordView', {
10806 templateUrl: 'components/views/user-password-view/user-password-view.html',
10810 templateUrl: 'components/views/user-password-view/user-password-view.html',
10807 controller: UserPasswordViewController
10811 controller: UserPasswordViewController
10808 });
10812 });
10809
10813
10810 UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource'];
10814 UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource'];
10811
10815
10812 function UserPasswordViewController($state, userSelfPropertyResource) {
10816 function UserPasswordViewController($state, userSelfPropertyResource) {
10813
10817
10814 var vm = this;
10818 var vm = this;
10815 vm.$onInit = function () {
10819 vm.$onInit = function () {
10816 vm.$state = $state;
10820 vm.$state = $state;
10817 vm.loading = {password: false};
10821 vm.loading = {password: false};
10818 vm.form = {};
10822 vm.form = {};
10819 }
10823 }
10820 vm.updatePassword = function () {
10824 vm.updatePassword = function () {
10821 vm.loading.password = true;
10825 vm.loading.password = true;
10822
10826
10823 userSelfPropertyResource.update({key: 'password'}, vm.form, function () {
10827 userSelfPropertyResource.update({key: 'password'}, vm.form, function () {
10824 vm.loading.password = false;
10828 vm.loading.password = false;
10825 vm.form = {};
10829 vm.form = {};
10826 setServerValidation(vm.passwordForm);
10830 setServerValidation(vm.passwordForm);
10827 }, function (response) {
10831 }, function (response) {
10828 if (response.status == 422) {
10832 if (response.status == 422) {
10829
10833
10830 setServerValidation(vm.passwordForm, response.data);
10834 setServerValidation(vm.passwordForm, response.data);
10831
10835
10832 }
10836 }
10833 vm.loading.password = false;
10837 vm.loading.password = false;
10834 });
10838 });
10835 }
10839 }
10836 }
10840 }
10837
10841
10838 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10842 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10839 //
10843 //
10840 // Licensed under the Apache License, Version 2.0 (the "License");
10844 // Licensed under the Apache License, Version 2.0 (the "License");
10841 // you may not use this file except in compliance with the License.
10845 // you may not use this file except in compliance with the License.
10842 // You may obtain a copy of the License at
10846 // You may obtain a copy of the License at
10843 //
10847 //
10844 // http://www.apache.org/licenses/LICENSE-2.0
10848 // http://www.apache.org/licenses/LICENSE-2.0
10845 //
10849 //
10846 // Unless required by applicable law or agreed to in writing, software
10850 // Unless required by applicable law or agreed to in writing, software
10847 // distributed under the License is distributed on an "AS IS" BASIS,
10851 // distributed under the License is distributed on an "AS IS" BASIS,
10848 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10852 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10849 // See the License for the specific language governing permissions and
10853 // See the License for the specific language governing permissions and
10850 // limitations under the License.
10854 // limitations under the License.
10851
10855
10852 angular.module('appenlight.components.userProfileView', [])
10856 angular.module('appenlight.components.userProfileView', [])
10853 .component('userProfileView', {
10857 .component('userProfileView', {
10854 templateUrl: 'components/views/user-profile-view/user-profile-view.html',
10858 templateUrl: 'components/views/user-profile-view/user-profile-view.html',
10855 controller: UserProfileViewController
10859 controller: UserProfileViewController
10856 });
10860 });
10857
10861
10858 UserProfileViewController.$inject = ['$state', 'userSelfResource'];
10862 UserProfileViewController.$inject = ['$state', 'userSelfResource'];
10859
10863
10860 function UserProfileViewController($state, userSelfResource) {
10864 function UserProfileViewController($state, userSelfResource) {
10861
10865
10862 var vm = this;
10866 var vm = this;
10863 vm.$onInit = function () {
10867 vm.$onInit = function () {
10864 vm.$state = $state;
10868 vm.$state = $state;
10865 vm.loading = {profile: true};
10869 vm.loading = {profile: true};
10866
10870
10867 vm.user = userSelfResource.get(null, function (data) {
10871 vm.user = userSelfResource.get(null, function (data) {
10868 vm.loading.profile = false;
10872 vm.loading.profile = false;
10869
10873
10870 });
10874 });
10871 }
10875 }
10872 vm.updateProfile = function () {
10876 vm.updateProfile = function () {
10873 vm.loading.profile = true;
10877 vm.loading.profile = true;
10874
10878
10875
10879
10876 vm.user.$update(null, function () {
10880 vm.user.$update(null, function () {
10877 vm.loading.profile = false;
10881 vm.loading.profile = false;
10878 setServerValidation(vm.profileForm);
10882 setServerValidation(vm.profileForm);
10879 }, function (response) {
10883 }, function (response) {
10880 if (response.status == 422) {
10884 if (response.status == 422) {
10881 setServerValidation(vm.profileForm, response.data);
10885 setServerValidation(vm.profileForm, response.data);
10882 }
10886 }
10883 vm.loading.profile = false;
10887 vm.loading.profile = false;
10884 });
10888 });
10885 }
10889 }
10886 }
10890 }
10887
10891
10888 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10892 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10889 //
10893 //
10890 // Licensed under the Apache License, Version 2.0 (the "License");
10894 // Licensed under the Apache License, Version 2.0 (the "License");
10891 // you may not use this file except in compliance with the License.
10895 // you may not use this file except in compliance with the License.
10892 // You may obtain a copy of the License at
10896 // You may obtain a copy of the License at
10893 //
10897 //
10894 // http://www.apache.org/licenses/LICENSE-2.0
10898 // http://www.apache.org/licenses/LICENSE-2.0
10895 //
10899 //
10896 // Unless required by applicable law or agreed to in writing, software
10900 // Unless required by applicable law or agreed to in writing, software
10897 // distributed under the License is distributed on an "AS IS" BASIS,
10901 // distributed under the License is distributed on an "AS IS" BASIS,
10898 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10902 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10899 // See the License for the specific language governing permissions and
10903 // See the License for the specific language governing permissions and
10900 // limitations under the License.
10904 // limitations under the License.
10901
10905
10902 var aeconfig = angular.module('appenlight.config', []);
10906 var aeconfig = angular.module('appenlight.config', []);
10903 aeconfig.factory('AeConfig', function () {
10907 aeconfig.factory('AeConfig', function () {
10904 var obj = {};
10908 var obj = {};
10905 obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages);
10909 obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages);
10906 obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions);
10910 obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions);
10907 obj.plugins = decodeEncodedJSON(window.AE.plugins);
10911 obj.plugins = decodeEncodedJSON(window.AE.plugins);
10908 obj.topNav = {
10912 obj.topNav = {
10909 menuDashboardsItems: [],
10913 menuDashboardsItems: [],
10910 menuReportsItems: [],
10914 menuReportsItems: [],
10911 menuLogsItems: [],
10915 menuLogsItems: [],
10912 menuSettingsItems: [],
10916 menuSettingsItems: [],
10913 menuAdminItems: []
10917 menuAdminItems: []
10914 };
10918 };
10915 obj.settingsNav = {
10919 obj.settingsNav = {
10916 menuApplicationsItems: [],
10920 menuApplicationsItems: [],
10917 menuUserSettingsItems: [],
10921 menuUserSettingsItems: [],
10918 menuNotificationsItems: []
10922 menuNotificationsItems: []
10919 };
10923 };
10920 obj.adminNav = {
10924 obj.adminNav = {
10921 menuUsersItems: [],
10925 menuUsersItems: [],
10922 menuResourcesItems: [],
10926 menuResourcesItems: [],
10923 menuSystemItems: []
10927 menuSystemItems: []
10924 };
10928 };
10925 obj.ws_url = window.AE.ws_url;
10929 obj.ws_url = window.AE.ws_url;
10926 obj.urls = window.AE.urls;
10930 obj.urls = window.AE.urls;
10927 // set keys on values because we wont be able to retrieve them everywhere
10931 // set keys on values because we wont be able to retrieve them everywhere
10928 for (var key in obj.timeOptions) {
10932 for (var key in obj.timeOptions) {
10929 obj.timeOptions[key]['key'] = key;
10933 obj.timeOptions[key]['key'] = key;
10930 }
10934 }
10931 console.info('config', obj);
10935 console.info('config', obj);
10932 return obj;
10936 return obj;
10933 });
10937 });
10934
10938
10935 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10939 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10936 //
10940 //
10937 // Licensed under the Apache License, Version 2.0 (the "License");
10941 // Licensed under the Apache License, Version 2.0 (the "License");
10938 // you may not use this file except in compliance with the License.
10942 // you may not use this file except in compliance with the License.
10939 // You may obtain a copy of the License at
10943 // You may obtain a copy of the License at
10940 //
10944 //
10941 // http://www.apache.org/licenses/LICENSE-2.0
10945 // http://www.apache.org/licenses/LICENSE-2.0
10942 //
10946 //
10943 // Unless required by applicable law or agreed to in writing, software
10947 // Unless required by applicable law or agreed to in writing, software
10944 // distributed under the License is distributed on an "AS IS" BASIS,
10948 // distributed under the License is distributed on an "AS IS" BASIS,
10945 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10949 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10946 // See the License for the specific language governing permissions and
10950 // See the License for the specific language governing permissions and
10947 // limitations under the License.
10951 // limitations under the License.
10948
10952
10949 angular.module('appenlight.controllers')
10953 angular.module('appenlight.controllers')
10950 .controller('BitbucketIntegrationCtrl', BitbucketIntegrationCtrl)
10954 .controller('BitbucketIntegrationCtrl', BitbucketIntegrationCtrl)
10951
10955
10952 BitbucketIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
10956 BitbucketIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
10953
10957
10954 function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
10958 function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
10955 var vm = this;
10959 var vm = this;
10956 vm.$onInit = function () {
10960 vm.$onInit = function () {
10957 vm.loading = true;
10961 vm.loading = true;
10958 vm.assignees = [];
10962 vm.assignees = [];
10959 vm.report = report;
10963 vm.report = report;
10960 vm.integrationName = integrationName;
10964 vm.integrationName = integrationName;
10961 vm.statuses = [];
10965 vm.statuses = [];
10962 vm.priorities = [];
10966 vm.priorities = [];
10963 vm.error_messages = [];
10967 vm.error_messages = [];
10964 vm.form = {
10968 vm.form = {
10965 content: '\n' +
10969 content: '\n' +
10966 'Issue created for report: ' +
10970 'Issue created for report: ' +
10967 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
10971 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
10968 };
10972 };
10969 vm.fetchInfo();
10973 vm.fetchInfo();
10970 }
10974 }
10971 vm.fetchInfo = function () {
10975 vm.fetchInfo = function () {
10972 integrationResource.get({
10976 integrationResource.get({
10973 resourceId: vm.report.resource_id,
10977 resourceId: vm.report.resource_id,
10974 action: 'info',
10978 action: 'info',
10975 integration: vm.integrationName
10979 integration: vm.integrationName
10976 }, null,
10980 }, null,
10977 function (data) {
10981 function (data) {
10978 vm.loading = false;
10982 vm.loading = false;
10979 if (data.error_messages) {
10983 if (data.error_messages) {
10980 vm.error_messages = data.error_messages;
10984 vm.error_messages = data.error_messages;
10981 }
10985 }
10982 vm.assignees = data.assignees;
10986 vm.assignees = data.assignees;
10983 vm.priorities = data.priorities;
10987 vm.priorities = data.priorities;
10984 vm.form.responsible = vm.assignees[0];
10988 vm.form.responsible = vm.assignees[0];
10985 vm.form.priority = vm.priorities[0];
10989 vm.form.priority = vm.priorities[0];
10986 }, function (error_data) {
10990 }, function (error_data) {
10987 if (error_data.data.error_messages) {
10991 if (error_data.data.error_messages) {
10988 vm.error_messages = error_data.data.error_messages;
10992 vm.error_messages = error_data.data.error_messages;
10989 } else {
10993 } else {
10990 vm.error_messages = ['There was a problem processing your request'];
10994 vm.error_messages = ['There was a problem processing your request'];
10991 }
10995 }
10992 });
10996 });
10993 };
10997 };
10994 vm.ok = function () {
10998 vm.ok = function () {
10995 vm.loading = true;
10999 vm.loading = true;
10996 vm.form.group_id = vm.report.group_id;
11000 vm.form.group_id = vm.report.group_id;
10997 integrationResource.save({
11001 integrationResource.save({
10998 resourceId: vm.report.resource_id,
11002 resourceId: vm.report.resource_id,
10999 action: 'create-issue',
11003 action: 'create-issue',
11000 integration: vm.integrationName
11004 integration: vm.integrationName
11001 }, vm.form,
11005 }, vm.form,
11002 function (data) {
11006 function (data) {
11003 vm.loading = false;
11007 vm.loading = false;
11004 if (data.error_messages) {
11008 if (data.error_messages) {
11005 vm.error_messages = data.error_messages;
11009 vm.error_messages = data.error_messages;
11006 }
11010 }
11007 if (data !== false) {
11011 if (data !== false) {
11008 $uibModalInstance.dismiss('success');
11012 $uibModalInstance.dismiss('success');
11009 }
11013 }
11010 }, function (error_data) {
11014 }, function (error_data) {
11011 if (error_data.data.error_messages) {
11015 if (error_data.data.error_messages) {
11012 vm.error_messages = error_data.data.error_messages;
11016 vm.error_messages = error_data.data.error_messages;
11013 } else {
11017 } else {
11014 vm.error_messages = ['There was a problem processing your request'];
11018 vm.error_messages = ['There was a problem processing your request'];
11015 }
11019 }
11016 });
11020 });
11017 };
11021 };
11018 vm.cancel = function () {
11022 vm.cancel = function () {
11019 $uibModalInstance.dismiss('cancel');
11023 $uibModalInstance.dismiss('cancel');
11020 };
11024 };
11021 }
11025 }
11022
11026
11023 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11027 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11024 //
11028 //
11025 // Licensed under the Apache License, Version 2.0 (the "License");
11029 // Licensed under the Apache License, Version 2.0 (the "License");
11026 // you may not use this file except in compliance with the License.
11030 // you may not use this file except in compliance with the License.
11027 // You may obtain a copy of the License at
11031 // You may obtain a copy of the License at
11028 //
11032 //
11029 // http://www.apache.org/licenses/LICENSE-2.0
11033 // http://www.apache.org/licenses/LICENSE-2.0
11030 //
11034 //
11031 // Unless required by applicable law or agreed to in writing, software
11035 // Unless required by applicable law or agreed to in writing, software
11032 // distributed under the License is distributed on an "AS IS" BASIS,
11036 // distributed under the License is distributed on an "AS IS" BASIS,
11033 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11037 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11034 // See the License for the specific language governing permissions and
11038 // See the License for the specific language governing permissions and
11035 // limitations under the License.
11039 // limitations under the License.
11036
11040
11037 angular.module('appenlight.controllers')
11041 angular.module('appenlight.controllers')
11038 .controller('GithubIntegrationCtrl', GithubIntegrationCtrl);
11042 .controller('GithubIntegrationCtrl', GithubIntegrationCtrl);
11039
11043
11040 GithubIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
11044 GithubIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
11041
11045
11042 function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
11046 function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
11043 var vm = this;
11047 var vm = this;
11044 vm.$onInit = function () {
11048 vm.$onInit = function () {
11045 vm.loading = true;
11049 vm.loading = true;
11046 vm.assignees = [];
11050 vm.assignees = [];
11047 vm.report = report;
11051 vm.report = report;
11048 vm.integrationName = integrationName;
11052 vm.integrationName = integrationName;
11049 vm.statuses = [];
11053 vm.statuses = [];
11050 vm.assignees = [];
11054 vm.assignees = [];
11051 vm.error_messages = [];
11055 vm.error_messages = [];
11052 vm.form = {
11056 vm.form = {
11053 content: '\n' +
11057 content: '\n' +
11054 'Issue created for report: ' +
11058 'Issue created for report: ' +
11055 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
11059 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
11056 };
11060 };
11057 vm.fetchInfo();
11061 vm.fetchInfo();
11058 }
11062 }
11059 vm.fetchInfo = function () {
11063 vm.fetchInfo = function () {
11060 integrationResource.get({
11064 integrationResource.get({
11061 resourceId: vm.report.resource_id,
11065 resourceId: vm.report.resource_id,
11062 action: 'info',
11066 action: 'info',
11063 integration: vm.integrationName
11067 integration: vm.integrationName
11064 }, null,
11068 }, null,
11065 function (data) {
11069 function (data) {
11066 vm.loading = false;
11070 vm.loading = false;
11067 if (data.error_messages) {
11071 if (data.error_messages) {
11068 vm.error_messages = data.error_messages;
11072 vm.error_messages = data.error_messages;
11069 } else {
11073 } else {
11070 vm.assignees = data.assignees;
11074 vm.assignees = data.assignees;
11071 vm.statuses = data.statuses;
11075 vm.statuses = data.statuses;
11072 vm.form.responsible = vm.assignees[0];
11076 vm.form.responsible = vm.assignees[0];
11073 vm.form.status = vm.statuses[0];
11077 vm.form.status = vm.statuses[0];
11074 }
11078 }
11075 }, function (error_data) {
11079 }, function (error_data) {
11076 if (error_data.data.error_messages) {
11080 if (error_data.data.error_messages) {
11077 vm.error_messages = error_data.data.error_messages;
11081 vm.error_messages = error_data.data.error_messages;
11078 } else {
11082 } else {
11079 vm.error_messages = ['There was a problem processing your request'];
11083 vm.error_messages = ['There was a problem processing your request'];
11080 }
11084 }
11081 });
11085 });
11082 };
11086 };
11083 vm.ok = function () {
11087 vm.ok = function () {
11084 vm.loading = true;
11088 vm.loading = true;
11085 vm.form.group_id = vm.report.group_id;
11089 vm.form.group_id = vm.report.group_id;
11086 integrationResource.save({
11090 integrationResource.save({
11087 resourceId: vm.report.resource_id,
11091 resourceId: vm.report.resource_id,
11088 action: 'create-issue',
11092 action: 'create-issue',
11089 integration: vm.integrationName
11093 integration: vm.integrationName
11090 }, vm.form,
11094 }, vm.form,
11091 function (data) {
11095 function (data) {
11092 vm.loading = false;
11096 vm.loading = false;
11093 if (data.error_messages) {
11097 if (data.error_messages) {
11094 vm.error_messages = data.error_messages;
11098 vm.error_messages = data.error_messages;
11095 } else {
11099 } else {
11096 $uibModalInstance.dismiss('success');
11100 $uibModalInstance.dismiss('success');
11097 }
11101 }
11098 }, function (error_data) {
11102 }, function (error_data) {
11099 if (error_data.data.error_messages) {
11103 if (error_data.data.error_messages) {
11100 vm.error_messages = error_data.data.error_messages;
11104 vm.error_messages = error_data.data.error_messages;
11101 } else {
11105 } else {
11102 vm.error_messages = ['There was a problem processing your request'];
11106 vm.error_messages = ['There was a problem processing your request'];
11103 }
11107 }
11104 });
11108 });
11105 };
11109 };
11106 vm.cancel = function () {
11110 vm.cancel = function () {
11107 $uibModalInstance.dismiss('cancel');
11111 $uibModalInstance.dismiss('cancel');
11108 };
11112 };
11109 }
11113 }
11110
11114
11111 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11115 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11112 //
11116 //
11113 // Licensed under the Apache License, Version 2.0 (the "License");
11117 // Licensed under the Apache License, Version 2.0 (the "License");
11114 // you may not use this file except in compliance with the License.
11118 // you may not use this file except in compliance with the License.
11115 // You may obtain a copy of the License at
11119 // You may obtain a copy of the License at
11116 //
11120 //
11117 // http://www.apache.org/licenses/LICENSE-2.0
11121 // http://www.apache.org/licenses/LICENSE-2.0
11118 //
11122 //
11119 // Unless required by applicable law or agreed to in writing, software
11123 // Unless required by applicable law or agreed to in writing, software
11120 // distributed under the License is distributed on an "AS IS" BASIS,
11124 // distributed under the License is distributed on an "AS IS" BASIS,
11121 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11125 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11122 // See the License for the specific language governing permissions and
11126 // See the License for the specific language governing permissions and
11123 // limitations under the License.
11127 // limitations under the License.
11124
11128
11125 angular.module('appenlight.controllers')
11129 angular.module('appenlight.controllers')
11126 .controller('JiraIntegrationCtrl', JiraIntegrationCtrl)
11130 .controller('JiraIntegrationCtrl', JiraIntegrationCtrl)
11127
11131
11128 JiraIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
11132 JiraIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
11129
11133
11130 function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
11134 function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
11131 var vm = this;
11135 var vm = this;
11132 vm.$onInit = function () {
11136 vm.$onInit = function () {
11133 vm.loading = true;
11137 vm.loading = true;
11134 vm.assignees = [];
11138 vm.assignees = [];
11135 vm.report = report;
11139 vm.report = report;
11136 vm.integrationName = integrationName;
11140 vm.integrationName = integrationName;
11137 vm.statuses = [];
11141 vm.statuses = [];
11138 vm.priorities = [];
11142 vm.priorities = [];
11139 vm.issue_types = [];
11143 vm.issue_types = [];
11140 vm.error_messages = [];
11144 vm.error_messages = [];
11141 vm.form = {
11145 vm.form = {
11142 content: '\n' +
11146 content: '\n' +
11143 'Issue created for report: ' +
11147 'Issue created for report: ' +
11144 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
11148 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
11145 };
11149 };
11146 vm.fetchInfo();
11150 vm.fetchInfo();
11147 }
11151 }
11148 vm.fetchInfo = function () {
11152 vm.fetchInfo = function () {
11149 integrationResource.get({
11153 integrationResource.get({
11150 resourceId: vm.report.resource_id,
11154 resourceId: vm.report.resource_id,
11151 action: 'info',
11155 action: 'info',
11152 integration: vm.integrationName
11156 integration: vm.integrationName
11153 }, null,
11157 }, null,
11154 function (data) {
11158 function (data) {
11155 vm.loading = false;
11159 vm.loading = false;
11156 if (data.error_messages) {
11160 if (data.error_messages) {
11157 vm.error_messages = data.error_messages;
11161 vm.error_messages = data.error_messages;
11158 }
11162 }
11159 vm.assignees = data.assignees;
11163 vm.assignees = data.assignees;
11160 vm.priorities = data.priorities;
11164 vm.priorities = data.priorities;
11161 vm.issue_types = data.issue_types;
11165 vm.issue_types = data.issue_types;
11162 vm.form.issue_type = vm.issue_types[0];
11166 vm.form.issue_type = vm.issue_types[0];
11163 vm.form.responsible = vm.assignees[0];
11167 vm.form.responsible = vm.assignees[0];
11164 vm.form.priority = vm.priorities[0];
11168 vm.form.priority = vm.priorities[0];
11165 }, function (error_data) {
11169 }, function (error_data) {
11166
11170
11167 if (error_data.data.error_messages) {
11171 if (error_data.data.error_messages) {
11168 vm.error_messages = error_data.data.error_messages;
11172 vm.error_messages = error_data.data.error_messages;
11169 } else {
11173 } else {
11170 vm.error_messages = ['There was a problem processing your request'];
11174 vm.error_messages = ['There was a problem processing your request'];
11171 }
11175 }
11172 });
11176 });
11173 };
11177 };
11174 vm.ok = function () {
11178 vm.ok = function () {
11175 vm.loading = true;
11179 vm.loading = true;
11176 vm.form.group_id = vm.report.group_id;
11180 vm.form.group_id = vm.report.group_id;
11177 integrationResource.save({
11181 integrationResource.save({
11178 resourceId: vm.report.resource_id,
11182 resourceId: vm.report.resource_id,
11179 action: 'create-issue',
11183 action: 'create-issue',
11180 integration: vm.integrationName
11184 integration: vm.integrationName
11181 }, vm.form,
11185 }, vm.form,
11182 function (data) {
11186 function (data) {
11183 vm.loading = false;
11187 vm.loading = false;
11184 if (data.error_messages) {
11188 if (data.error_messages) {
11185 vm.error_messages = data.error_messages;
11189 vm.error_messages = data.error_messages;
11186 }
11190 }
11187 if (data !== false) {
11191 if (data !== false) {
11188 $uibModalInstance.dismiss('success');
11192 $uibModalInstance.dismiss('success');
11189 }
11193 }
11190 }, function (error_data) {
11194 }, function (error_data) {
11191 if (error_data.data.error_messages) {
11195 if (error_data.data.error_messages) {
11192 vm.error_messages = error_data.data.error_messages;
11196 vm.error_messages = error_data.data.error_messages;
11193 } else {
11197 } else {
11194 vm.error_messages = ['There was a problem processing your request'];
11198 vm.error_messages = ['There was a problem processing your request'];
11195 }
11199 }
11196 });
11200 });
11197 };
11201 };
11198 vm.cancel = function () {
11202 vm.cancel = function () {
11199 $uibModalInstance.dismiss('cancel');
11203 $uibModalInstance.dismiss('cancel');
11200 };
11204 };
11201 }
11205 }
11202
11206
11203 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11207 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11204 //
11208 //
11205 // Licensed under the Apache License, Version 2.0 (the "License");
11209 // Licensed under the Apache License, Version 2.0 (the "License");
11206 // you may not use this file except in compliance with the License.
11210 // you may not use this file except in compliance with the License.
11207 // You may obtain a copy of the License at
11211 // You may obtain a copy of the License at
11208 //
11212 //
11209 // http://www.apache.org/licenses/LICENSE-2.0
11213 // http://www.apache.org/licenses/LICENSE-2.0
11210 //
11214 //
11211 // Unless required by applicable law or agreed to in writing, software
11215 // Unless required by applicable law or agreed to in writing, software
11212 // distributed under the License is distributed on an "AS IS" BASIS,
11216 // distributed under the License is distributed on an "AS IS" BASIS,
11213 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11217 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11214 // See the License for the specific language governing permissions and
11218 // See the License for the specific language governing permissions and
11215 // limitations under the License.
11219 // limitations under the License.
11216
11220
11217 angular.module('appenlight.controllers').controller('AssignReportCtrl', AssignReportCtrl);
11221 angular.module('appenlight.controllers').controller('AssignReportCtrl', AssignReportCtrl);
11218 AssignReportCtrl.$inject = ['$uibModalInstance', 'reportGroupPropertyResource', 'report'];
11222 AssignReportCtrl.$inject = ['$uibModalInstance', 'reportGroupPropertyResource', 'report'];
11219
11223
11220 function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) {
11224 function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) {
11221 var vm = this;
11225 var vm = this;
11222 vm.$onInit = function () {
11226 vm.$onInit = function () {
11223 vm.loading = true;
11227 vm.loading = true;
11224 vm.assignedUsers = [];
11228 vm.assignedUsers = [];
11225 vm.unAssignedUsers = [];
11229 vm.unAssignedUsers = [];
11226 vm.report = report;
11230 vm.report = report;
11227 vm.fetchAssignments = function () {
11231 vm.fetchAssignments = function () {
11228 reportGroupPropertyResource.get({
11232 reportGroupPropertyResource.get({
11229 groupId: vm.report.group_id,
11233 groupId: vm.report.group_id,
11230 key: 'assigned_users'
11234 key: 'assigned_users'
11231 }, null,
11235 }, null,
11232 function (data) {
11236 function (data) {
11233 vm.assignedUsers = data.assigned;
11237 vm.assignedUsers = data.assigned;
11234 vm.unAssignedUsers = data.unassigned;
11238 vm.unAssignedUsers = data.unassigned;
11235 vm.loading = false;
11239 vm.loading = false;
11236 });
11240 });
11237 }
11241 }
11238 vm.fetchAssignments();
11242 vm.fetchAssignments();
11239 }
11243 }
11240 vm.reassignUser = function (user) {
11244 vm.reassignUser = function (user) {
11241 var is_assigned = vm.assignedUsers.indexOf(user);
11245 var is_assigned = vm.assignedUsers.indexOf(user);
11242 if (is_assigned != -1) {
11246 if (is_assigned != -1) {
11243 vm.assignedUsers.splice(is_assigned, 1);
11247 vm.assignedUsers.splice(is_assigned, 1);
11244 vm.unAssignedUsers.push(user);
11248 vm.unAssignedUsers.push(user);
11245 return
11249 return
11246 }
11250 }
11247 var is_unassigned = vm.unAssignedUsers.indexOf(user);
11251 var is_unassigned = vm.unAssignedUsers.indexOf(user);
11248 if (is_unassigned != -1) {
11252 if (is_unassigned != -1) {
11249 vm.unAssignedUsers.splice(is_unassigned, 1);
11253 vm.unAssignedUsers.splice(is_unassigned, 1);
11250 vm.assignedUsers.push(user);
11254 vm.assignedUsers.push(user);
11251 return
11255 return
11252 }
11256 }
11253 }
11257 }
11254 vm.updateAssignments = function () {
11258 vm.updateAssignments = function () {
11255 var post = {'unassigned': [], 'assigned': []};
11259 var post = {'unassigned': [], 'assigned': []};
11256 _.each(vm.assignedUsers, function (u) {
11260 _.each(vm.assignedUsers, function (u) {
11257 post['assigned'].push(u.user_name)
11261 post['assigned'].push(u.user_name)
11258 });
11262 });
11259 _.each(vm.unAssignedUsers, function (u) {
11263 _.each(vm.unAssignedUsers, function (u) {
11260 post['unassigned'].push(u.user_name)
11264 post['unassigned'].push(u.user_name)
11261 });
11265 });
11262 vm.loading = true;
11266 vm.loading = true;
11263 reportGroupPropertyResource.update({
11267 reportGroupPropertyResource.update({
11264 groupId: vm.report.group_id,
11268 groupId: vm.report.group_id,
11265 key: 'assigned_users'
11269 key: 'assigned_users'
11266 }, post,
11270 }, post,
11267 function (data) {
11271 function (data) {
11268 vm.loading = false;
11272 vm.loading = false;
11269 $uibModalInstance.close(vm.report);
11273 $uibModalInstance.close(vm.report);
11270 });
11274 });
11271 };
11275 };
11272
11276
11273
11277
11274 vm.ok = function () {
11278 vm.ok = function () {
11275 vm.updateAssignments();
11279 vm.updateAssignments();
11276 };
11280 };
11277
11281
11278 vm.cancel = function () {
11282 vm.cancel = function () {
11279 $uibModalInstance.dismiss('cancel');
11283 $uibModalInstance.dismiss('cancel');
11280 };
11284 };
11281 }
11285 }
11282
11286
11283 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11287 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11284 //
11288 //
11285 // Licensed under the Apache License, Version 2.0 (the "License");
11289 // Licensed under the Apache License, Version 2.0 (the "License");
11286 // you may not use this file except in compliance with the License.
11290 // you may not use this file except in compliance with the License.
11287 // You may obtain a copy of the License at
11291 // You may obtain a copy of the License at
11288 //
11292 //
11289 // http://www.apache.org/licenses/LICENSE-2.0
11293 // http://www.apache.org/licenses/LICENSE-2.0
11290 //
11294 //
11291 // Unless required by applicable law or agreed to in writing, software
11295 // Unless required by applicable law or agreed to in writing, software
11292 // distributed under the License is distributed on an "AS IS" BASIS,
11296 // distributed under the License is distributed on an "AS IS" BASIS,
11293 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11297 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11294 // See the License for the specific language governing permissions and
11298 // See the License for the specific language governing permissions and
11295 // limitations under the License.
11299 // limitations under the License.
11296
11300
11297 // This code is inspired by https://github.com/jettro/c3-angular-sample/tree/master/js
11301 // This code is inspired by https://github.com/jettro/c3-angular-sample/tree/master/js
11298 // License is MIT
11302 // License is MIT
11299
11303
11300
11304
11301 angular.module('appenlight.directives.c3chart', [])
11305 angular.module('appenlight.directives.c3chart', [])
11302 .controller('ChartCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
11306 .controller('ChartCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
11303 $scope.chart = null;
11307 $scope.chart = null;
11304 this.showGraph = function () {
11308 this.showGraph = function () {
11305 var config = angular.copy($scope.config);
11309 var config = angular.copy($scope.config);
11306 var firstLoad = true;
11310 var firstLoad = true;
11307 config.bindto = "#" + $scope.domid;
11311 config.bindto = "#" + $scope.domid;
11308 var originalXTickCount = null;
11312 var originalXTickCount = null;
11309 if ($scope.data && $scope.config) {
11313 if ($scope.data && $scope.config) {
11310 if (!_.isEmpty($scope.data)) {
11314 if (!_.isEmpty($scope.data)) {
11311 _.extend(config.data, angular.copy($scope.data));
11315 _.extend(config.data, angular.copy($scope.data));
11312 }
11316 }
11313
11317
11314 config.onresized = function () {
11318 config.onresized = function () {
11315 if (this.currentWidth < 400){
11319 if (this.currentWidth < 400){
11316 $scope.chart.internal.config.axis_x_tick_culling_max = 3;
11320 $scope.chart.internal.config.axis_x_tick_culling_max = 3;
11317 }
11321 }
11318 else if (this.currentWidth < 600){
11322 else if (this.currentWidth < 600){
11319 $scope.chart.internal.config.axis_x_tick_culling_max = 5;
11323 $scope.chart.internal.config.axis_x_tick_culling_max = 5;
11320 }
11324 }
11321 else{
11325 else{
11322 $scope.chart.internal.config.axis_x_tick_culling_max = originalXTickCount;
11326 $scope.chart.internal.config.axis_x_tick_culling_max = originalXTickCount;
11323 }
11327 }
11324 $scope.chart.flush();
11328 $scope.chart.flush();
11325 };
11329 };
11326
11330
11327
11331
11328 $scope.chart = c3.generate(config);
11332 $scope.chart = c3.generate(config);
11329 originalXTickCount = $scope.chart.internal.config.axis_x_tick_culling_max;
11333 originalXTickCount = $scope.chart.internal.config.axis_x_tick_culling_max;
11330 $scope.chart.internal.config.onresized.call($scope.chart.internal);
11334 $scope.chart.internal.config.onresized.call($scope.chart.internal);
11331 }
11335 }
11332
11336
11333 if ($scope.update) {
11337 if ($scope.update) {
11334
11338
11335 $scope.$watch('data', function () {
11339 $scope.$watch('data', function () {
11336 if (!firstLoad) {
11340 if (!firstLoad) {
11337
11341
11338 $scope.chart.load(angular.copy($scope.data), {unload: true});
11342 $scope.chart.load(angular.copy($scope.data), {unload: true});
11339 if (typeof $scope.data.groups != 'undefined') {
11343 if (typeof $scope.data.groups != 'undefined') {
11340
11344
11341 $scope.chart.groups($scope.data.groups);
11345 $scope.chart.groups($scope.data.groups);
11342 }
11346 }
11343 if (typeof $scope.data.names != 'undefined') {
11347 if (typeof $scope.data.names != 'undefined') {
11344
11348
11345 $scope.chart.data.names($scope.data.names);
11349 $scope.chart.data.names($scope.data.names);
11346 }
11350 }
11347 $scope.chart.flush();
11351 $scope.chart.flush();
11348 }
11352 }
11349 }, true);
11353 }, true);
11350 }
11354 }
11351 $scope.$watch('config.regions', function (newValue, oldValue) {
11355 $scope.$watch('config.regions', function (newValue, oldValue) {
11352 if (newValue === oldValue) {
11356 if (newValue === oldValue) {
11353 return
11357 return
11354 }
11358 }
11355 if (typeof $scope.config.regions != 'undefined') {
11359 if (typeof $scope.config.regions != 'undefined') {
11356
11360
11357 $scope.chart.regions($scope.config.regions);
11361 $scope.chart.regions($scope.config.regions);
11358 }
11362 }
11359 });
11363 });
11360
11364
11361 firstLoad = false;
11365 firstLoad = false;
11362 $scope.$watch('resizetrigger', function (newValue, oldValue) {
11366 $scope.$watch('resizetrigger', function (newValue, oldValue) {
11363 if (newValue !== oldValue) {
11367 if (newValue !== oldValue) {
11364 $timeout(function () {
11368 $timeout(function () {
11365 $scope.chart.resize();
11369 $scope.chart.resize();
11366 $scope.chart.internal.config.onresized.call($scope.chart.internal);
11370 $scope.chart.internal.config.onresized.call($scope.chart.internal);
11367 });
11371 });
11368 }
11372 }
11369 });
11373 });
11370 };
11374 };
11371 }])
11375 }])
11372 .directive('c3chart', function ($timeout) {
11376 .directive('c3chart', function ($timeout) {
11373 var chartLinker = function (scope, element, attrs, chartCtrl) {
11377 var chartLinker = function (scope, element, attrs, chartCtrl) {
11374 // Trick to wait for all rendering of the DOM to be finished.
11378 // Trick to wait for all rendering of the DOM to be finished.
11375 // then we can tell c3js to "connect" to our dom node
11379 // then we can tell c3js to "connect" to our dom node
11376 $timeout(function () {
11380 $timeout(function () {
11377 chartCtrl.showGraph()
11381 chartCtrl.showGraph()
11378 });
11382 });
11379
11383
11380 scope.$on("$destroy", function () {
11384 scope.$on("$destroy", function () {
11381 if (scope.chart !== null) {
11385 if (scope.chart !== null) {
11382 scope.chart = scope.chart.destroy();
11386 scope.chart = scope.chart.destroy();
11383 delete element;
11387 delete element;
11384 delete scope.chart;
11388 delete scope.chart;
11385 }
11389 }
11386 }
11390 }
11387 );
11391 );
11388 };
11392 };
11389 return {
11393 return {
11390 "restrict": "E",
11394 "restrict": "E",
11391 "controller": "ChartCtrl",
11395 "controller": "ChartCtrl",
11392 "scope": {
11396 "scope": {
11393 "domid": "@domid",
11397 "domid": "@domid",
11394 "config": "=config",
11398 "config": "=config",
11395 "data": "=data",
11399 "data": "=data",
11396 "resizetrigger": "=resizetrigger",
11400 "resizetrigger": "=resizetrigger",
11397 "update": "=update"
11401 "update": "=update"
11398 },
11402 },
11399 "template": "<div id='{{domid}}' class='chart'></div>",
11403 "template": "<div id='{{domid}}' class='chart'></div>",
11400 "replace": true,
11404 "replace": true,
11401 "link": chartLinker
11405 "link": chartLinker
11402 }
11406 }
11403 });
11407 });
11404
11408
11405 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11409 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11406 //
11410 //
11407 // Licensed under the Apache License, Version 2.0 (the "License");
11411 // Licensed under the Apache License, Version 2.0 (the "License");
11408 // you may not use this file except in compliance with the License.
11412 // you may not use this file except in compliance with the License.
11409 // You may obtain a copy of the License at
11413 // You may obtain a copy of the License at
11410 //
11414 //
11411 // http://www.apache.org/licenses/LICENSE-2.0
11415 // http://www.apache.org/licenses/LICENSE-2.0
11412 //
11416 //
11413 // Unless required by applicable law or agreed to in writing, software
11417 // Unless required by applicable law or agreed to in writing, software
11414 // distributed under the License is distributed on an "AS IS" BASIS,
11418 // distributed under the License is distributed on an "AS IS" BASIS,
11415 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11419 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11416 // See the License for the specific language governing permissions and
11420 // See the License for the specific language governing permissions and
11417 // limitations under the License.
11421 // limitations under the License.
11418
11422
11419 angular.module('appenlight.directives.confirmValidate', []).
11423 angular.module('appenlight.directives.confirmValidate', []).
11420 directive('confirmValidate', [function () {
11424 directive('confirmValidate', [function () {
11421 return {
11425 return {
11422 restrict: 'A',
11426 restrict: 'A',
11423 require: 'ngModel',
11427 require: 'ngModel',
11424 link: function ($scope, elem, attrs, ngModel) {
11428 link: function ($scope, elem, attrs, ngModel) {
11425 ngModel.$validators.confirm = function (modelValue, viewValue) {
11429 ngModel.$validators.confirm = function (modelValue, viewValue) {
11426 var value = modelValue || viewValue;
11430 var value = modelValue || viewValue;
11427
11431
11428 if (value.toLowerCase() == 'confirm') {
11432 if (value.toLowerCase() == 'confirm') {
11429 return true;
11433 return true;
11430 }
11434 }
11431 return false;
11435 return false;
11432 }
11436 }
11433 }
11437 }
11434 }
11438 }
11435 }])
11439 }])
11436
11440
11437 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11441 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11438 //
11442 //
11439 // Licensed under the Apache License, Version 2.0 (the "License");
11443 // Licensed under the Apache License, Version 2.0 (the "License");
11440 // you may not use this file except in compliance with the License.
11444 // you may not use this file except in compliance with the License.
11441 // You may obtain a copy of the License at
11445 // You may obtain a copy of the License at
11442 //
11446 //
11443 // http://www.apache.org/licenses/LICENSE-2.0
11447 // http://www.apache.org/licenses/LICENSE-2.0
11444 //
11448 //
11445 // Unless required by applicable law or agreed to in writing, software
11449 // Unless required by applicable law or agreed to in writing, software
11446 // distributed under the License is distributed on an "AS IS" BASIS,
11450 // distributed under the License is distributed on an "AS IS" BASIS,
11447 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11451 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11448 // See the License for the specific language governing permissions and
11452 // See the License for the specific language governing permissions and
11449 // limitations under the License.
11453 // limitations under the License.
11450
11454
11451 angular.module('appenlight.directives.focus', []).directive('focus', function () {
11455 angular.module('appenlight.directives.focus', []).directive('focus', function () {
11452 return function (scope, element, attrs) {
11456 return function (scope, element, attrs) {
11453 attrs.$observe('focus', function (newValue) {
11457 attrs.$observe('focus', function (newValue) {
11454 newValue === 'true' && element[0].focus();
11458 newValue === 'true' && element[0].focus();
11455 });
11459 });
11456 }
11460 }
11457 });
11461 });
11458
11462
11459 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11463 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11460 //
11464 //
11461 // Licensed under the Apache License, Version 2.0 (the "License");
11465 // Licensed under the Apache License, Version 2.0 (the "License");
11462 // you may not use this file except in compliance with the License.
11466 // you may not use this file except in compliance with the License.
11463 // You may obtain a copy of the License at
11467 // You may obtain a copy of the License at
11464 //
11468 //
11465 // http://www.apache.org/licenses/LICENSE-2.0
11469 // http://www.apache.org/licenses/LICENSE-2.0
11466 //
11470 //
11467 // Unless required by applicable law or agreed to in writing, software
11471 // Unless required by applicable law or agreed to in writing, software
11468 // distributed under the License is distributed on an "AS IS" BASIS,
11472 // distributed under the License is distributed on an "AS IS" BASIS,
11469 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11473 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11470 // See the License for the specific language governing permissions and
11474 // See the License for the specific language governing permissions and
11471 // limitations under the License.
11475 // limitations under the License.
11472
11476
11473 angular.module('appenlight.directives.formErrors', []).
11477 angular.module('appenlight.directives.formErrors', []).
11474 directive('formErrors', function() {
11478 directive('formErrors', function() {
11475 return {
11479 return {
11476 scope: {
11480 scope: {
11477 errors: '='
11481 errors: '='
11478 },
11482 },
11479 template: '<div ng-repeat="errorMessage in errors"><div class="form-error alert alert-error">{{ errorMessage }}</div></div>'
11483 template: '<div ng-repeat="errorMessage in errors"><div class="form-error alert alert-error">{{ errorMessage }}</div></div>'
11480 }
11484 }
11481 })
11485 })
11482
11486
11483 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11487 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11484 //
11488 //
11485 // Licensed under the Apache License, Version 2.0 (the "License");
11489 // Licensed under the Apache License, Version 2.0 (the "License");
11486 // you may not use this file except in compliance with the License.
11490 // you may not use this file except in compliance with the License.
11487 // You may obtain a copy of the License at
11491 // You may obtain a copy of the License at
11488 //
11492 //
11489 // http://www.apache.org/licenses/LICENSE-2.0
11493 // http://www.apache.org/licenses/LICENSE-2.0
11490 //
11494 //
11491 // Unless required by applicable law or agreed to in writing, software
11495 // Unless required by applicable law or agreed to in writing, software
11492 // distributed under the License is distributed on an "AS IS" BASIS,
11496 // distributed under the License is distributed on an "AS IS" BASIS,
11493 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11497 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11494 // See the License for the specific language governing permissions and
11498 // See the License for the specific language governing permissions and
11495 // limitations under the License.
11499 // limitations under the License.
11496
11500
11497 angular.module('appenlight.directives.humanFormat', []).
11501 angular.module('appenlight.directives.humanFormat', []).
11498 directive('humanFormat', [function () {
11502 directive('humanFormat', [function () {
11499 /* json inspector */
11503 /* json inspector */
11500 return {
11504 return {
11501 restrict: "A",
11505 restrict: "A",
11502 scope: {
11506 scope: {
11503 vars: '=',
11507 vars: '=',
11504 },
11508 },
11505 "link": function (scope, element, attrs) {
11509 "link": function (scope, element, attrs) {
11506 scope.$watch('vars', function (newValue, oldValue, scope) {
11510 scope.$watch('vars', function (newValue, oldValue, scope) {
11507 element.empty();
11511 element.empty();
11508 element.append(JsonHuman.format(scope.vars));
11512 element.append(JsonHuman.format(scope.vars));
11509 });
11513 });
11510
11514
11511 }
11515 }
11512 }
11516 }
11513 }])
11517 }])
11514
11518
11515 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11519 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11516 //
11520 //
11517 // Licensed under the Apache License, Version 2.0 (the "License");
11521 // Licensed under the Apache License, Version 2.0 (the "License");
11518 // you may not use this file except in compliance with the License.
11522 // you may not use this file except in compliance with the License.
11519 // You may obtain a copy of the License at
11523 // You may obtain a copy of the License at
11520 //
11524 //
11521 // http://www.apache.org/licenses/LICENSE-2.0
11525 // http://www.apache.org/licenses/LICENSE-2.0
11522 //
11526 //
11523 // Unless required by applicable law or agreed to in writing, software
11527 // Unless required by applicable law or agreed to in writing, software
11524 // distributed under the License is distributed on an "AS IS" BASIS,
11528 // distributed under the License is distributed on an "AS IS" BASIS,
11525 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11529 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11526 // See the License for the specific language governing permissions and
11530 // See the License for the specific language governing permissions and
11527 // limitations under the License.
11531 // limitations under the License.
11528
11532
11529 angular.module('appenlight.directives.isoToRelativeTime', []).
11533 angular.module('appenlight.directives.isoToRelativeTime', []).
11530 directive('isoToRelativeTime', function () {
11534 directive('isoToRelativeTime', function () {
11531 return {
11535 return {
11532 "restrict": "E",
11536 "restrict": "E",
11533 scope: {
11537 scope: {
11534 time: '@'
11538 time: '@'
11535 },
11539 },
11536 "link": function (scope, element) {
11540 "link": function (scope, element) {
11537 scope.$watch('time', function(newValue, oldValue, scope){
11541 scope.$watch('time', function(newValue, oldValue, scope){
11538 element.empty();
11542 element.empty();
11539 element.html(moment.utc(newValue).fromNow());
11543 element.html(moment.utc(newValue).fromNow());
11540 });
11544 });
11541 }
11545 }
11542 }
11546 }
11543 })
11547 })
11544
11548
11545 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11549 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11546 //
11550 //
11547 // Licensed under the Apache License, Version 2.0 (the "License");
11551 // Licensed under the Apache License, Version 2.0 (the "License");
11548 // you may not use this file except in compliance with the License.
11552 // you may not use this file except in compliance with the License.
11549 // You may obtain a copy of the License at
11553 // You may obtain a copy of the License at
11550 //
11554 //
11551 // http://www.apache.org/licenses/LICENSE-2.0
11555 // http://www.apache.org/licenses/LICENSE-2.0
11552 //
11556 //
11553 // Unless required by applicable law or agreed to in writing, software
11557 // Unless required by applicable law or agreed to in writing, software
11554 // distributed under the License is distributed on an "AS IS" BASIS,
11558 // distributed under the License is distributed on an "AS IS" BASIS,
11555 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11559 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11556 // See the License for the specific language governing permissions and
11560 // See the License for the specific language governing permissions and
11557 // limitations under the License.
11561 // limitations under the License.
11558
11562
11559 angular.module('appenlight.controllers')
11563 angular.module('appenlight.controllers')
11560 .controller('ApplicationPermissionsController', ApplicationPermissionsController);
11564 .controller('ApplicationPermissionsController', ApplicationPermissionsController);
11561
11565
11562 ApplicationPermissionsController.$inject = ['sectionViewResource',
11566 ApplicationPermissionsController.$inject = ['sectionViewResource',
11563 'applicationsPropertyResource', 'groupsResource']
11567 'applicationsPropertyResource', 'groupsResource']
11564
11568
11565
11569
11566 function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) {
11570 function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) {
11567 var vm = this;
11571 var vm = this;
11568 vm.$onInit = function () {
11572 vm.$onInit = function () {
11569 vm.form = {
11573 vm.form = {
11570 autocompleteUser: '',
11574 autocompleteUser: '',
11571 selectedGroup: null,
11575 selectedGroup: null,
11572 selectedUserPermissions: {},
11576 selectedUserPermissions: {},
11573 selectedGroupPermissions: {}
11577 selectedGroupPermissions: {}
11574 }
11578 }
11575 vm.possibleGroups = groupsResource.query(null, function () {
11579 vm.possibleGroups = groupsResource.query(null, function () {
11576 if (vm.possibleGroups.length > 0) {
11580 if (vm.possibleGroups.length > 0) {
11577 vm.form.selectedGroup = vm.possibleGroups[0].id;
11581 vm.form.selectedGroup = vm.possibleGroups[0].id;
11578 }
11582 }
11579 });
11583 });
11580
11584
11581 vm.possibleUsers = [];
11585 vm.possibleUsers = [];
11582 _.each(vm.resource.possible_permissions, function (perm) {
11586 _.each(vm.resource.possible_permissions, function (perm) {
11583 vm.form.selectedUserPermissions[perm] = false;
11587 vm.form.selectedUserPermissions[perm] = false;
11584 vm.form.selectedGroupPermissions[perm] = false;
11588 vm.form.selectedGroupPermissions[perm] = false;
11585 });
11589 });
11586
11590
11587 /**
11591 /**
11588 * Converts the permission list into {user, permission_list objects}
11592 * Converts the permission list into {user, permission_list objects}
11589 * for rendering in templates
11593 * for rendering in templates
11590 * **/
11594 * **/
11591 var tmpObj = {
11595 var tmpObj = {
11592 user: {},
11596 user: {},
11593 group: {}
11597 group: {}
11594 };
11598 };
11595 _.each(vm.currentPermissions, function (perm) {
11599 _.each(vm.currentPermissions, function (perm) {
11596
11600
11597 if (perm.type == 'user') {
11601 if (perm.type == 'user') {
11598 if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') {
11602 if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') {
11599 tmpObj[perm.type][perm.user_name] = {
11603 tmpObj[perm.type][perm.user_name] = {
11600 self: perm,
11604 self: perm,
11601 permissions: []
11605 permissions: []
11602 }
11606 }
11603 }
11607 }
11604 if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) {
11608 if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) {
11605 tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name);
11609 tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name);
11606 }
11610 }
11607 } else {
11611 } else {
11608 if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') {
11612 if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') {
11609 tmpObj[perm.type][perm.group_name] = {
11613 tmpObj[perm.type][perm.group_name] = {
11610 self: perm,
11614 self: perm,
11611 permissions: []
11615 permissions: []
11612 }
11616 }
11613 }
11617 }
11614 if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) {
11618 if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) {
11615 tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name);
11619 tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name);
11616 }
11620 }
11617
11621
11618 }
11622 }
11619 });
11623 });
11620 vm.currentPermissions = {
11624 vm.currentPermissions = {
11621 user: _.values(tmpObj.user),
11625 user: _.values(tmpObj.user),
11622 group: _.values(tmpObj.group),
11626 group: _.values(tmpObj.group),
11623 };
11627 };
11624
11628
11625 }
11629 }
11626
11630
11627
11631
11628 vm.searchUsers = function (searchPhrase) {
11632 vm.searchUsers = function (searchPhrase) {
11629
11633
11630 vm.searchingUsers = true;
11634 vm.searchingUsers = true;
11631 return sectionViewResource.query({
11635 return sectionViewResource.query({
11632 section: 'users_section',
11636 section: 'users_section',
11633 view: 'search_users',
11637 view: 'search_users',
11634 'user_name': searchPhrase
11638 'user_name': searchPhrase
11635 }).$promise.then(function (data) {
11639 }).$promise.then(function (data) {
11636 vm.searchingUsers = false;
11640 vm.searchingUsers = false;
11637 return _.map(data, function (item) {
11641 return _.map(data, function (item) {
11638 return item;
11642 return item;
11639 });
11643 });
11640 });
11644 });
11641 };
11645 };
11642
11646
11643
11647
11644 vm.setGroupPermission = function(){
11648 vm.setGroupPermission = function(){
11645 var POSTObj = {
11649 var POSTObj = {
11646 'group_id': vm.form.selectedGroup,
11650 'group_id': vm.form.selectedGroup,
11647 'permissions': []
11651 'permissions': []
11648 };
11652 };
11649 for (var key in vm.form.selectedGroupPermissions) {
11653 for (var key in vm.form.selectedGroupPermissions) {
11650 if (vm.form.selectedGroupPermissions[key]) {
11654 if (vm.form.selectedGroupPermissions[key]) {
11651 POSTObj.permissions.push(key)
11655 POSTObj.permissions.push(key)
11652 }
11656 }
11653 }
11657 }
11654 applicationsPropertyResource.save({
11658 applicationsPropertyResource.save({
11655 key: 'group_permissions',
11659 key: 'group_permissions',
11656 resourceId: vm.resource.resource_id
11660 resourceId: vm.resource.resource_id
11657 }, POSTObj,
11661 }, POSTObj,
11658 function (data) {
11662 function (data) {
11659 var found_row = false;
11663 var found_row = false;
11660 _.each(vm.currentPermissions.group, function (perm) {
11664 _.each(vm.currentPermissions.group, function (perm) {
11661 if (perm.self.group_id == data.group.id) {
11665 if (perm.self.group_id == data.group.id) {
11662 perm['permissions'] = data['permissions'];
11666 perm['permissions'] = data['permissions'];
11663 found_row = true;
11667 found_row = true;
11664 }
11668 }
11665 });
11669 });
11666 if (!found_row) {
11670 if (!found_row) {
11667 data.self = data.group;
11671 data.self = data.group;
11668 // normalize data format
11672 // normalize data format
11669 data.self.group_id = data.self.id;
11673 data.self.group_id = data.self.id;
11670 vm.currentPermissions.group.push(data);
11674 vm.currentPermissions.group.push(data);
11671 }
11675 }
11672 });
11676 });
11673
11677
11674 }
11678 }
11675
11679
11676
11680
11677 vm.setUserPermission = function () {
11681 vm.setUserPermission = function () {
11678
11682
11679 var POSTObj = {
11683 var POSTObj = {
11680 'user_name': vm.form.autocompleteUser,
11684 'user_name': vm.form.autocompleteUser,
11681 'permissions': []
11685 'permissions': []
11682 };
11686 };
11683 for (var key in vm.form.selectedUserPermissions) {
11687 for (var key in vm.form.selectedUserPermissions) {
11684 if (vm.form.selectedUserPermissions[key]) {
11688 if (vm.form.selectedUserPermissions[key]) {
11685 POSTObj.permissions.push(key)
11689 POSTObj.permissions.push(key)
11686 }
11690 }
11687 }
11691 }
11688 applicationsPropertyResource.save({
11692 applicationsPropertyResource.save({
11689 key: 'user_permissions',
11693 key: 'user_permissions',
11690 resourceId: vm.resource.resource_id
11694 resourceId: vm.resource.resource_id
11691 }, POSTObj,
11695 }, POSTObj,
11692 function (data) {
11696 function (data) {
11693 var found_row = false;
11697 var found_row = false;
11694 _.each(vm.currentPermissions.user, function (perm) {
11698 _.each(vm.currentPermissions.user, function (perm) {
11695 if (perm.self.user_name == data['user_name']) {
11699 if (perm.self.user_name == data['user_name']) {
11696 perm['permissions'] = data['permissions'];
11700 perm['permissions'] = data['permissions'];
11697 found_row = true;
11701 found_row = true;
11698 }
11702 }
11699 });
11703 });
11700 if (!found_row) {
11704 if (!found_row) {
11701 data.self = data;
11705 data.self = data;
11702 vm.currentPermissions.user.push(data);
11706 vm.currentPermissions.user.push(data);
11703 }
11707 }
11704 });
11708 });
11705 }
11709 }
11706
11710
11707 vm.removeUserPermission = function (perm_name, curr_perm) {
11711 vm.removeUserPermission = function (perm_name, curr_perm) {
11708
11712
11709
11713
11710 var POSTObj = {
11714 var POSTObj = {
11711 key: 'user_permissions',
11715 key: 'user_permissions',
11712 user_name: curr_perm.self.user_name,
11716 user_name: curr_perm.self.user_name,
11713 permissions: [perm_name],
11717 permissions: [perm_name],
11714 resourceId: vm.resource.resource_id
11718 resourceId: vm.resource.resource_id
11715 }
11719 }
11716 applicationsPropertyResource.delete(POSTObj, function (data) {
11720 applicationsPropertyResource.delete(POSTObj, function (data) {
11717 _.each(vm.currentPermissions.user, function (perm) {
11721 _.each(vm.currentPermissions.user, function (perm) {
11718 if (perm.self.user_name == data['user_name']) {
11722 if (perm.self.user_name == data['user_name']) {
11719 perm['permissions'] = data['permissions']
11723 perm['permissions'] = data['permissions']
11720 }
11724 }
11721 });
11725 });
11722 });
11726 });
11723 }
11727 }
11724
11728
11725 vm.removeGroupPermission = function (perm_name, curr_perm) {
11729 vm.removeGroupPermission = function (perm_name, curr_perm) {
11726
11730
11727 var POSTObj = {
11731 var POSTObj = {
11728 key: 'group_permissions',
11732 key: 'group_permissions',
11729 group_id: curr_perm.self.group_id,
11733 group_id: curr_perm.self.group_id,
11730 permissions: [perm_name],
11734 permissions: [perm_name],
11731 resourceId: vm.resource.resource_id
11735 resourceId: vm.resource.resource_id
11732 }
11736 }
11733 applicationsPropertyResource.delete(POSTObj, function (data) {
11737 applicationsPropertyResource.delete(POSTObj, function (data) {
11734 _.each(vm.currentPermissions.group, function (perm) {
11738 _.each(vm.currentPermissions.group, function (perm) {
11735 if (perm.self.group_id == data.group.id) {
11739 if (perm.self.group_id == data.group.id) {
11736 perm['permissions'] = data['permissions']
11740 perm['permissions'] = data['permissions']
11737 }
11741 }
11738 });
11742 });
11739 });
11743 });
11740 }
11744 }
11741 }
11745 }
11742
11746
11743 angular.module('appenlight.directives.permissionsForm',[])
11747 angular.module('appenlight.directives.permissionsForm',[])
11744 .directive('permissionsForm', function () {
11748 .directive('permissionsForm', function () {
11745 return {
11749 return {
11746 "restrict": "E",
11750 "restrict": "E",
11747 "controller": "ApplicationPermissionsController",
11751 "controller": "ApplicationPermissionsController",
11748 controllerAs: 'permissions',
11752 controllerAs: 'permissions',
11749 bindToController: true,
11753 bindToController: true,
11750 scope: {
11754 scope: {
11751 currentPermissions: '=',
11755 currentPermissions: '=',
11752 possiblePermissions: '=',
11756 possiblePermissions: '=',
11753 resource: '='
11757 resource: '='
11754 },
11758 },
11755 templateUrl: 'directives/permissions/permissions.html'
11759 templateUrl: 'directives/permissions/permissions.html'
11756 }
11760 }
11757 })
11761 })
11758
11762
11759 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11763 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11760 //
11764 //
11761 // Licensed under the Apache License, Version 2.0 (the "License");
11765 // Licensed under the Apache License, Version 2.0 (the "License");
11762 // you may not use this file except in compliance with the License.
11766 // you may not use this file except in compliance with the License.
11763 // You may obtain a copy of the License at
11767 // You may obtain a copy of the License at
11764 //
11768 //
11765 // http://www.apache.org/licenses/LICENSE-2.0
11769 // http://www.apache.org/licenses/LICENSE-2.0
11766 //
11770 //
11767 // Unless required by applicable law or agreed to in writing, software
11771 // Unless required by applicable law or agreed to in writing, software
11768 // distributed under the License is distributed on an "AS IS" BASIS,
11772 // distributed under the License is distributed on an "AS IS" BASIS,
11769 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11773 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11770 // See the License for the specific language governing permissions and
11774 // See the License for the specific language governing permissions and
11771 // limitations under the License.
11775 // limitations under the License.
11772
11776
11773 angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig', function () {
11777 angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig', function () {
11774 return {
11778 return {
11775 scope: {},
11779 scope: {},
11776 bindToController: {
11780 bindToController: {
11777 resource: '=',
11781 resource: '=',
11778 section: '='
11782 section: '='
11779 },
11783 },
11780 restrict: 'E',
11784 restrict: 'E',
11781 templateUrl: 'directives/plugin_config/plugin_config.html',
11785 templateUrl: 'directives/plugin_config/plugin_config.html',
11782 controller: PluginConfig,
11786 controller: PluginConfig,
11783 controllerAs: 'plugin_ctrlr'
11787 controllerAs: 'plugin_ctrlr'
11784 };
11788 };
11785
11789
11786 PluginConfig.$inject = ['stateHolder'];
11790 PluginConfig.$inject = ['stateHolder'];
11787
11791
11788 function PluginConfig(stateHolder) {
11792 function PluginConfig(stateHolder) {
11789 this.$onInit = function () {
11793 this.$onInit = function () {
11790 this.plugins = {};
11794 this.plugins = {};
11791 this.inclusions = stateHolder.plugins.inclusions[this.section];
11795 this.inclusions = stateHolder.plugins.inclusions[this.section];
11792 }
11796 }
11793 }
11797 }
11794 });
11798 });
11795
11799
11796 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11800 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11797 //
11801 //
11798 // Licensed under the Apache License, Version 2.0 (the "License");
11802 // Licensed under the Apache License, Version 2.0 (the "License");
11799 // you may not use this file except in compliance with the License.
11803 // you may not use this file except in compliance with the License.
11800 // You may obtain a copy of the License at
11804 // You may obtain a copy of the License at
11801 //
11805 //
11802 // http://www.apache.org/licenses/LICENSE-2.0
11806 // http://www.apache.org/licenses/LICENSE-2.0
11803 //
11807 //
11804 // Unless required by applicable law or agreed to in writing, software
11808 // Unless required by applicable law or agreed to in writing, software
11805 // distributed under the License is distributed on an "AS IS" BASIS,
11809 // distributed under the License is distributed on an "AS IS" BASIS,
11806 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11810 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11807 // See the License for the specific language governing permissions and
11811 // See the License for the specific language governing permissions and
11808 // limitations under the License.
11812 // limitations under the License.
11809
11813
11810 angular.module('appenlight.directives.postProcessAction', []).directive('postProcessAction', ['applicationsPropertyResource', function (applicationsPropertyResource) {
11814 angular.module('appenlight.directives.postProcessAction', []).directive('postProcessAction', ['applicationsPropertyResource', function (applicationsPropertyResource) {
11811 return {
11815 return {
11812 scope: {},
11816 scope: {},
11813 bindToController: {
11817 bindToController: {
11814 action: '=',
11818 action: '=',
11815 resource: '='
11819 resource: '='
11816 },
11820 },
11817 controller: postProcessActionController,
11821 controller: postProcessActionController,
11818 controllerAs: 'ctrl',
11822 controllerAs: 'ctrl',
11819 restrict: 'E',
11823 restrict: 'E',
11820 templateUrl: 'directives/postprocess_action/postprocess_action.html'
11824 templateUrl: 'directives/postprocess_action/postprocess_action.html'
11821 };
11825 };
11822
11826
11823 function postProcessActionController() {
11827 function postProcessActionController() {
11824 var vm = this;
11828 var vm = this;
11825 vm.$onInit = function () {
11829 vm.$onInit = function () {
11826
11830
11827 var allOps = {
11831 var allOps = {
11828 'eq': 'Equal',
11832 'eq': 'Equal',
11829 'ne': 'Not equal',
11833 'ne': 'Not equal',
11830 'ge': 'Greater or equal',
11834 'ge': 'Greater or equal',
11831 'gt': 'Greater than',
11835 'gt': 'Greater than',
11832 'le': 'Lesser or equal',
11836 'le': 'Lesser or equal',
11833 'lt': 'Lesser than',
11837 'lt': 'Lesser than',
11834 'startswith': 'Starts with',
11838 'startswith': 'Starts with',
11835 'endswith': 'Ends with',
11839 'endswith': 'Ends with',
11836 'contains': 'Contains'
11840 'contains': 'Contains'
11837 };
11841 };
11838
11842
11839 var fieldOps = {};
11843 var fieldOps = {};
11840 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
11844 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
11841 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
11845 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
11842 fieldOps['duration'] = ['ge', 'le'];
11846 fieldOps['duration'] = ['ge', 'le'];
11843 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
11847 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
11844 'contains'];
11848 'contains'];
11845 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
11849 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
11846 'contains'];
11850 'contains'];
11847 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
11851 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
11848 'contains'];
11852 'contains'];
11849 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
11853 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
11850 'contains'];
11854 'contains'];
11851 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
11855 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
11852
11856
11853 var possibleFields = {
11857 var possibleFields = {
11854 '__AND__': 'All met (composite rule)',
11858 '__AND__': 'All met (composite rule)',
11855 '__OR__': 'One met (composite rule)',
11859 '__OR__': 'One met (composite rule)',
11856 '__NOT__': 'Not met (composite rule)',
11860 '__NOT__': 'Not met (composite rule)',
11857 'http_status': 'HTTP Status',
11861 'http_status': 'HTTP Status',
11858 'duration': 'Request duration',
11862 'duration': 'Request duration',
11859 'group:priority': 'Group -> Priority',
11863 'group:priority': 'Group -> Priority',
11860 'url_domain': 'Domain',
11864 'url_domain': 'Domain',
11861 'url_path': 'URL Path',
11865 'url_path': 'URL Path',
11862 'error': 'Error',
11866 'error': 'Error',
11863 'tags:server_name': 'Tag -> Server name',
11867 'tags:server_name': 'Tag -> Server name',
11864 'group:occurences': 'Group -> Occurences'
11868 'group:occurences': 'Group -> Occurences'
11865 };
11869 };
11866
11870
11867 vm.ruleDefinitions = {
11871 vm.ruleDefinitions = {
11868 fieldOps: fieldOps,
11872 fieldOps: fieldOps,
11869 allOps: allOps,
11873 allOps: allOps,
11870 possibleFields: possibleFields
11874 possibleFields: possibleFields
11871 };
11875 };
11872
11876
11873 vm.possibleActions = [
11877 vm.possibleActions = [
11874 ['1', 'Priority +1'],
11878 ['1', 'Priority +1'],
11875 ['-1', 'Priority -1']
11879 ['-1', 'Priority -1']
11876 ];
11880 ];
11877 }
11881 }
11878 vm.deleteAction = function (action) {
11882 vm.deleteAction = function (action) {
11879 applicationsPropertyResource.remove({
11883 applicationsPropertyResource.remove({
11880 pkey: vm.action.pkey,
11884 pkey: vm.action.pkey,
11881 resourceId: vm.resource.resource_id,
11885 resourceId: vm.resource.resource_id,
11882 key: 'postprocessing_rules'
11886 key: 'postprocessing_rules'
11883 }, function () {
11887 }, function () {
11884 vm.resource.postprocessing_rules.splice(
11888 vm.resource.postprocessing_rules.splice(
11885 vm.resource.postprocessing_rules.indexOf(action), 1);
11889 vm.resource.postprocessing_rules.indexOf(action), 1);
11886 });
11890 });
11887 };
11891 };
11888
11892
11889
11893
11890 vm.saveAction = function () {
11894 vm.saveAction = function () {
11891 var params = {
11895 var params = {
11892 'pkey': vm.action.pkey,
11896 'pkey': vm.action.pkey,
11893 'resourceId': vm.resource.resource_id,
11897 'resourceId': vm.resource.resource_id,
11894 key: 'postprocessing_rules'
11898 key: 'postprocessing_rules'
11895 };
11899 };
11896 applicationsPropertyResource.update(params, vm.action,
11900 applicationsPropertyResource.update(params, vm.action,
11897 function (data) {
11901 function (data) {
11898 vm.action.dirty = false;
11902 vm.action.dirty = false;
11899 vm.errors = [];
11903 vm.errors = [];
11900 }, function (response) {
11904 }, function (response) {
11901 if (response.status == 422) {
11905 if (response.status == 422) {
11902 var errorDict = angular.fromJson(response.data);
11906 var errorDict = angular.fromJson(response.data);
11903 vm.errors = _.values(errorDict);
11907 vm.errors = _.values(errorDict);
11904 }
11908 }
11905 });
11909 });
11906 };
11910 };
11907
11911
11908 vm.setDirty = function () {
11912 vm.setDirty = function () {
11909 vm.action.dirty = true;
11913 vm.action.dirty = true;
11910
11914
11911 };
11915 };
11912 }
11916 }
11913
11917
11914 }]);
11918 }]);
11915
11919
11916 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11920 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11917 //
11921 //
11918 // Licensed under the Apache License, Version 2.0 (the "License");
11922 // Licensed under the Apache License, Version 2.0 (the "License");
11919 // you may not use this file except in compliance with the License.
11923 // you may not use this file except in compliance with the License.
11920 // You may obtain a copy of the License at
11924 // You may obtain a copy of the License at
11921 //
11925 //
11922 // http://www.apache.org/licenses/LICENSE-2.0
11926 // http://www.apache.org/licenses/LICENSE-2.0
11923 //
11927 //
11924 // Unless required by applicable law or agreed to in writing, software
11928 // Unless required by applicable law or agreed to in writing, software
11925 // distributed under the License is distributed on an "AS IS" BASIS,
11929 // distributed under the License is distributed on an "AS IS" BASIS,
11926 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11930 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11927 // See the License for the specific language governing permissions and
11931 // See the License for the specific language governing permissions and
11928 // limitations under the License.
11932 // limitations under the License.
11929
11933
11930 angular.module('appenlight.directives.recursive', []).directive("recursive", function ($compile) {
11934 angular.module('appenlight.directives.recursive', []).directive("recursive", function ($compile) {
11931 return {
11935 return {
11932 restrict: "EACM",
11936 restrict: "EACM",
11933 priority: 100000,
11937 priority: 100000,
11934 compile: function (tElement, tAttr) {
11938 compile: function (tElement, tAttr) {
11935 var contents = tElement.contents().remove();
11939 var contents = tElement.contents().remove();
11936 var compiledContents;
11940 var compiledContents;
11937 return function (scope, iElement, iAttr) {
11941 return function (scope, iElement, iAttr) {
11938 if (!compiledContents) {
11942 if (!compiledContents) {
11939 compiledContents = $compile(contents);
11943 compiledContents = $compile(contents);
11940 }
11944 }
11941 iElement.append(compiledContents(scope, function (clone) {
11945 iElement.append(compiledContents(scope, function (clone) {
11942 return clone;
11946 return clone;
11943 }));
11947 }));
11944 };
11948 };
11945 }
11949 }
11946 };
11950 };
11947 });
11951 });
11948
11952
11949 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11953 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11950 //
11954 //
11951 // Licensed under the Apache License, Version 2.0 (the "License");
11955 // Licensed under the Apache License, Version 2.0 (the "License");
11952 // you may not use this file except in compliance with the License.
11956 // you may not use this file except in compliance with the License.
11953 // You may obtain a copy of the License at
11957 // You may obtain a copy of the License at
11954 //
11958 //
11955 // http://www.apache.org/licenses/LICENSE-2.0
11959 // http://www.apache.org/licenses/LICENSE-2.0
11956 //
11960 //
11957 // Unless required by applicable law or agreed to in writing, software
11961 // Unless required by applicable law or agreed to in writing, software
11958 // distributed under the License is distributed on an "AS IS" BASIS,
11962 // distributed under the License is distributed on an "AS IS" BASIS,
11959 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11963 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11960 // See the License for the specific language governing permissions and
11964 // See the License for the specific language governing permissions and
11961 // limitations under the License.
11965 // limitations under the License.
11962
11966
11963 angular.module('appenlight.directives.reportAlertAction', []).directive('reportAlertAction', ['userSelfPropertyResource', function (userSelfPropertyResource) {
11967 angular.module('appenlight.directives.reportAlertAction', []).directive('reportAlertAction', ['userSelfPropertyResource', function (userSelfPropertyResource) {
11964 return {
11968 return {
11965 scope: {},
11969 scope: {},
11966 bindToController: {
11970 bindToController: {
11967 action: '=',
11971 action: '=',
11968 applications: '=',
11972 applications: '=',
11969 possibleChannels: '=',
11973 possibleChannels: '=',
11970 actions: '=',
11974 actions: '=',
11971 ruleDefinitions: '='
11975 ruleDefinitions: '='
11972 },
11976 },
11973 controller: reportAlertActionController,
11977 controller: reportAlertActionController,
11974 controllerAs: 'ctrl',
11978 controllerAs: 'ctrl',
11975 restrict: 'E',
11979 restrict: 'E',
11976 templateUrl: 'directives/report_alert_action/report_alert_action.html'
11980 templateUrl: 'directives/report_alert_action/report_alert_action.html'
11977 };
11981 };
11978
11982
11979 function reportAlertActionController() {
11983 function reportAlertActionController() {
11980 var vm = this;
11984 var vm = this;
11981 vm.$onInit = function () {
11985 vm.$onInit = function () {
11982 vm.possibleNotifications = [
11986 vm.possibleNotifications = [
11983 ['always', 'Always'],
11987 ['always', 'Always'],
11984 ['only_first', 'Only New'],
11988 ['only_first', 'Only New'],
11985 ];
11989 ];
11986
11990
11987 vm.possibleChannels = _.filter(vm.possibleChannels, function (c) {
11991 vm.possibleChannels = _.filter(vm.possibleChannels, function (c) {
11988 return c.supports_report_alerting
11992 return c.supports_report_alerting
11989 }
11993 }
11990 );
11994 );
11991
11995
11992 if (vm.possibleChannels.length > 0) {
11996 if (vm.possibleChannels.length > 0) {
11993 vm.channelToBind = vm.possibleChannels[0];
11997 vm.channelToBind = vm.possibleChannels[0];
11994 }
11998 }
11995 }
11999 }
11996 vm.deleteAction = function (actions, action) {
12000 vm.deleteAction = function (actions, action) {
11997 var get = {
12001 var get = {
11998 key: 'alert_channels_rules',
12002 key: 'alert_channels_rules',
11999 pkey: action.pkey
12003 pkey: action.pkey
12000 };
12004 };
12001 userSelfPropertyResource.remove(get, function (data) {
12005 userSelfPropertyResource.remove(get, function (data) {
12002 actions.splice(actions.indexOf(action), 1);
12006 actions.splice(actions.indexOf(action), 1);
12003 });
12007 });
12004
12008
12005 };
12009 };
12006
12010
12007 vm.bindChannel = function () {
12011 vm.bindChannel = function () {
12008 var post = {
12012 var post = {
12009 channel_pkey: vm.channelToBind.pkey,
12013 channel_pkey: vm.channelToBind.pkey,
12010 action_pkey: vm.action.pkey
12014 action_pkey: vm.action.pkey
12011 };
12015 };
12012
12016
12013 userSelfPropertyResource.save({key: 'alert_channels_actions_binds'}, post,
12017 userSelfPropertyResource.save({key: 'alert_channels_actions_binds'}, post,
12014 function (data) {
12018 function (data) {
12015 vm.action.channels = [];
12019 vm.action.channels = [];
12016 vm.action.channels = data.channels;
12020 vm.action.channels = data.channels;
12017 }, function (response) {
12021 }, function (response) {
12018 if (response.status == 422) {
12022 if (response.status == 422) {
12019
12023
12020 }
12024 }
12021 });
12025 });
12022 };
12026 };
12023
12027
12024 vm.unBindChannel = function (channel) {
12028 vm.unBindChannel = function (channel) {
12025 userSelfPropertyResource.delete({
12029 userSelfPropertyResource.delete({
12026 key: 'alert_channels_actions_binds',
12030 key: 'alert_channels_actions_binds',
12027 channel_pkey: channel.pkey,
12031 channel_pkey: channel.pkey,
12028 action_pkey: vm.action.pkey
12032 action_pkey: vm.action.pkey
12029 },
12033 },
12030 function (data) {
12034 function (data) {
12031 vm.action.channels = [];
12035 vm.action.channels = [];
12032 vm.action.channels = data.channels;
12036 vm.action.channels = data.channels;
12033 }, function (response) {
12037 }, function (response) {
12034 if (response.status == 422) {
12038 if (response.status == 422) {
12035
12039
12036 }
12040 }
12037 });
12041 });
12038 };
12042 };
12039
12043
12040 vm.saveAction = function () {
12044 vm.saveAction = function () {
12041 var params = {
12045 var params = {
12042 key: 'alert_channels_rules',
12046 key: 'alert_channels_rules',
12043 pkey: vm.action.pkey
12047 pkey: vm.action.pkey
12044 };
12048 };
12045 userSelfPropertyResource.update(params, vm.action,
12049 userSelfPropertyResource.update(params, vm.action,
12046 function (data) {
12050 function (data) {
12047 vm.action.dirty = false;
12051 vm.action.dirty = false;
12048 vm.errors = [];
12052 vm.errors = [];
12049 }, function (response) {
12053 }, function (response) {
12050 if (response.status == 422) {
12054 if (response.status == 422) {
12051 var errorDict = angular.fromJson(response.data);
12055 var errorDict = angular.fromJson(response.data);
12052 vm.errors = _.values(errorDict);
12056 vm.errors = _.values(errorDict);
12053 }
12057 }
12054 });
12058 });
12055 };
12059 };
12056
12060
12057 vm.setDirty = function () {
12061 vm.setDirty = function () {
12058 vm.action.dirty = true;
12062 vm.action.dirty = true;
12059
12063
12060 };
12064 };
12061 }
12065 }
12062
12066
12063 }]);
12067 }]);
12064
12068
12065 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12069 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12066 //
12070 //
12067 // Licensed under the Apache License, Version 2.0 (the "License");
12071 // Licensed under the Apache License, Version 2.0 (the "License");
12068 // you may not use this file except in compliance with the License.
12072 // you may not use this file except in compliance with the License.
12069 // You may obtain a copy of the License at
12073 // You may obtain a copy of the License at
12070 //
12074 //
12071 // http://www.apache.org/licenses/LICENSE-2.0
12075 // http://www.apache.org/licenses/LICENSE-2.0
12072 //
12076 //
12073 // Unless required by applicable law or agreed to in writing, software
12077 // Unless required by applicable law or agreed to in writing, software
12074 // distributed under the License is distributed on an "AS IS" BASIS,
12078 // distributed under the License is distributed on an "AS IS" BASIS,
12075 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12079 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12076 // See the License for the specific language governing permissions and
12080 // See the License for the specific language governing permissions and
12077 // limitations under the License.
12081 // limitations under the License.
12078
12082
12079 angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly', ['userSelfPropertyResource', function (userSelfPropertyResource) {
12083 angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly', ['userSelfPropertyResource', function (userSelfPropertyResource) {
12080 return {
12084 return {
12081 scope: {},
12085 scope: {},
12082 bindToController: {
12086 bindToController: {
12083 parentObj: '=',
12087 parentObj: '=',
12084 rule: '=',
12088 rule: '=',
12085 ruleDefinitions: '=',
12089 ruleDefinitions: '=',
12086 parentRule: "=",
12090 parentRule: "=",
12087 config: "="
12091 config: "="
12088 },
12092 },
12089 restrict: 'E',
12093 restrict: 'E',
12090 templateUrl: 'directives/rule_read_only/rule_read_only.html',
12094 templateUrl: 'directives/rule_read_only/rule_read_only.html',
12091 controller: RuleController,
12095 controller: RuleController,
12092 controllerAs: 'rule_ctrlr'
12096 controllerAs: 'rule_ctrlr'
12093 }
12097 }
12094
12098
12095 function RuleController() {
12099 function RuleController() {
12096 var vm = this;
12100 var vm = this;
12097 vm.$onInit = function () {
12101 vm.$onInit = function () {
12098 vm.readOnlyPossibleFields = {};
12102 vm.readOnlyPossibleFields = {};
12099 var labelPairs = _.pairs(vm.parentObj.config);
12103 var labelPairs = _.pairs(vm.parentObj.config);
12100 _.each(labelPairs, function (entry) {
12104 _.each(labelPairs, function (entry) {
12101 vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label;
12105 vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label;
12102 });
12106 });
12103 }
12107 }
12104 }
12108 }
12105 }]);
12109 }]);
12106
12110
12107 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12111 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12108 //
12112 //
12109 // Licensed under the Apache License, Version 2.0 (the "License");
12113 // Licensed under the Apache License, Version 2.0 (the "License");
12110 // you may not use this file except in compliance with the License.
12114 // you may not use this file except in compliance with the License.
12111 // You may obtain a copy of the License at
12115 // You may obtain a copy of the License at
12112 //
12116 //
12113 // http://www.apache.org/licenses/LICENSE-2.0
12117 // http://www.apache.org/licenses/LICENSE-2.0
12114 //
12118 //
12115 // Unless required by applicable law or agreed to in writing, software
12119 // Unless required by applicable law or agreed to in writing, software
12116 // distributed under the License is distributed on an "AS IS" BASIS,
12120 // distributed under the License is distributed on an "AS IS" BASIS,
12117 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12121 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12118 // See the License for the specific language governing permissions and
12122 // See the License for the specific language governing permissions and
12119 // limitations under the License.
12123 // limitations under the License.
12120
12124
12121 angular.module('appenlight.directives.rule', []).directive('rule', function () {
12125 angular.module('appenlight.directives.rule', []).directive('rule', function () {
12122 return {
12126 return {
12123 scope: {},
12127 scope: {},
12124 bindToController:{
12128 bindToController:{
12125 parentObj: '=',
12129 parentObj: '=',
12126 rule: '=',
12130 rule: '=',
12127 ruleDefinitions: '=',
12131 ruleDefinitions: '=',
12128 parentRule: "=",
12132 parentRule: "=",
12129 config: "="
12133 config: "="
12130 },
12134 },
12131 restrict: 'E',
12135 restrict: 'E',
12132 templateUrl: 'directives/rule/rule.html',
12136 templateUrl: 'directives/rule/rule.html',
12133 controller:RuleController,
12137 controller:RuleController,
12134 controllerAs:'rule_ctrlr'
12138 controllerAs:'rule_ctrlr'
12135 };
12139 };
12136 function RuleController(){
12140 function RuleController(){
12137 var vm = this;
12141 var vm = this;
12138 vm.$onInit = function () {
12142 vm.$onInit = function () {
12139 vm.rule.dirty = false;
12143 vm.rule.dirty = false;
12140 vm.oldField = vm.rule.field;
12144 vm.oldField = vm.rule.field;
12141 }
12145 }
12142 vm.add = function () {
12146 vm.add = function () {
12143 vm.rule.rules.push(
12147 vm.rule.rules.push(
12144 {op: "eq", field: 'http_status', value: ""}
12148 {op: "eq", field: 'http_status', value: ""}
12145 );
12149 );
12146 vm.setDirty();
12150 vm.setDirty();
12147 };
12151 };
12148
12152
12149 vm.setDirty = function() {
12153 vm.setDirty = function() {
12150 vm.rule.dirty = true;
12154 vm.rule.dirty = true;
12151
12155
12152 if (vm.parentObj){
12156 if (vm.parentObj){
12153
12157
12154
12158
12155 vm.parentObj.dirty = true;
12159 vm.parentObj.dirty = true;
12156 }
12160 }
12157 };
12161 };
12158
12162
12159 vm.fieldChange = function () {
12163 vm.fieldChange = function () {
12160 var compound_types = ['__AND__', '__OR__', '__NOT__'];
12164 var compound_types = ['__AND__', '__OR__', '__NOT__'];
12161 var new_is_compound = compound_types.indexOf(vm.rule.field) !== -1;
12165 var new_is_compound = compound_types.indexOf(vm.rule.field) !== -1;
12162 var old_was_compound = compound_types.indexOf(vm.oldField) !== -1;
12166 var old_was_compound = compound_types.indexOf(vm.oldField) !== -1;
12163
12167
12164 if (!new_is_compound) {
12168 if (!new_is_compound) {
12165 vm.rule.op = vm.ruleDefinitions.fieldOps[vm.rule.field][0];
12169 vm.rule.op = vm.ruleDefinitions.fieldOps[vm.rule.field][0];
12166 }
12170 }
12167 if ((new_is_compound && !old_was_compound)) {
12171 if ((new_is_compound && !old_was_compound)) {
12168
12172
12169 delete vm.rule.value;
12173 delete vm.rule.value;
12170 vm.rule.rules = [];
12174 vm.rule.rules = [];
12171 vm.add();
12175 vm.add();
12172 }
12176 }
12173 else if (!new_is_compound && old_was_compound) {
12177 else if (!new_is_compound && old_was_compound) {
12174
12178
12175 delete vm.rule.rules;
12179 delete vm.rule.rules;
12176 vm.rule.value = '';
12180 vm.rule.value = '';
12177 }
12181 }
12178 vm.oldField = vm.rule.field;
12182 vm.oldField = vm.rule.field;
12179 vm.setDirty();
12183 vm.setDirty();
12180 };
12184 };
12181
12185
12182 vm.deleteRule = function (parent, rule) {
12186 vm.deleteRule = function (parent, rule) {
12183 parent.rules.splice(parent.rules.indexOf(rule), 1);
12187 parent.rules.splice(parent.rules.indexOf(rule), 1);
12184 vm.setDirty();
12188 vm.setDirty();
12185 }
12189 }
12186 }
12190 }
12187 });
12191 });
12188
12192
12189 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12193 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12190 //
12194 //
12191 // Licensed under the Apache License, Version 2.0 (the "License");
12195 // Licensed under the Apache License, Version 2.0 (the "License");
12192 // you may not use this file except in compliance with the License.
12196 // you may not use this file except in compliance with the License.
12193 // You may obtain a copy of the License at
12197 // You may obtain a copy of the License at
12194 //
12198 //
12195 // http://www.apache.org/licenses/LICENSE-2.0
12199 // http://www.apache.org/licenses/LICENSE-2.0
12196 //
12200 //
12197 // Unless required by applicable law or agreed to in writing, software
12201 // Unless required by applicable law or agreed to in writing, software
12198 // distributed under the License is distributed on an "AS IS" BASIS,
12202 // distributed under the License is distributed on an "AS IS" BASIS,
12199 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12203 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12200 // See the License for the specific language governing permissions and
12204 // See the License for the specific language governing permissions and
12201 // limitations under the License.
12205 // limitations under the License.
12202
12206
12203 angular.module('appenlight.directives.smallReportGroupList',[]).
12207 angular.module('appenlight.directives.smallReportGroupList',[]).
12204 directive('smallReportGroupList', [function () {
12208 directive('smallReportGroupList', [function () {
12205 return {
12209 return {
12206 restrict: "A",
12210 restrict: "A",
12207 scope: {
12211 scope: {
12208 groups: '=',
12212 groups: '=',
12209 applications: '='
12213 applications: '='
12210 },
12214 },
12211 templateUrl: 'templates/reports/small_report_group_list.html'
12215 templateUrl: 'templates/reports/small_report_group_list.html'
12212 }
12216 }
12213 }])
12217 }])
12214
12218
12215 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12219 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12216 //
12220 //
12217 // Licensed under the Apache License, Version 2.0 (the "License");
12221 // Licensed under the Apache License, Version 2.0 (the "License");
12218 // you may not use this file except in compliance with the License.
12222 // you may not use this file except in compliance with the License.
12219 // You may obtain a copy of the License at
12223 // You may obtain a copy of the License at
12220 //
12224 //
12221 // http://www.apache.org/licenses/LICENSE-2.0
12225 // http://www.apache.org/licenses/LICENSE-2.0
12222 //
12226 //
12223 // Unless required by applicable law or agreed to in writing, software
12227 // Unless required by applicable law or agreed to in writing, software
12224 // distributed under the License is distributed on an "AS IS" BASIS,
12228 // distributed under the License is distributed on an "AS IS" BASIS,
12225 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12229 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12226 // See the License for the specific language governing permissions and
12230 // See the License for the specific language governing permissions and
12227 // limitations under the License.
12231 // limitations under the License.
12228
12232
12229 angular.module('appenlight.directives.smallReportList', []).
12233 angular.module('appenlight.directives.smallReportList', []).
12230 directive('smallReportList', [function () {
12234 directive('smallReportList', [function () {
12231 return {
12235 return {
12232 restrict: "A",
12236 restrict: "A",
12233 scope: {
12237 scope: {
12234 reports: '=',
12238 reports: '=',
12235 applications: '='
12239 applications: '='
12236 },
12240 },
12237 templateUrl: 'templates/reports/small_report_list.html'
12241 templateUrl: 'templates/reports/small_report_list.html'
12238 }
12242 }
12239 }])
12243 }])
12240
12244
12241 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12245 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12242 //
12246 //
12243 // Licensed under the Apache License, Version 2.0 (the "License");
12247 // Licensed under the Apache License, Version 2.0 (the "License");
12244 // you may not use this file except in compliance with the License.
12248 // you may not use this file except in compliance with the License.
12245 // You may obtain a copy of the License at
12249 // You may obtain a copy of the License at
12246 //
12250 //
12247 // http://www.apache.org/licenses/LICENSE-2.0
12251 // http://www.apache.org/licenses/LICENSE-2.0
12248 //
12252 //
12249 // Unless required by applicable law or agreed to in writing, software
12253 // Unless required by applicable law or agreed to in writing, software
12250 // distributed under the License is distributed on an "AS IS" BASIS,
12254 // distributed under the License is distributed on an "AS IS" BASIS,
12251 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12255 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12252 // See the License for the specific language governing permissions and
12256 // See the License for the specific language governing permissions and
12253 // limitations under the License.
12257 // limitations under the License.
12254
12258
12255 'use strict';
12259 'use strict';
12256
12260
12257 /* Filters */
12261 /* Filters */
12258
12262
12259 angular.module('appenlight.filters').
12263 angular.module('appenlight.filters').
12260 filter('interpolate', ['version', function (version) {
12264 filter('interpolate', ['version', function (version) {
12261 return function (text) {
12265 return function (text) {
12262 return String(text).replace(/\%VERSION\%/mg, version);
12266 return String(text).replace(/\%VERSION\%/mg, version);
12263 }
12267 }
12264 }])
12268 }])
12265 .filter('isoToRelativeTime', function () {
12269 .filter('isoToRelativeTime', function () {
12266 return function (input) {
12270 return function (input) {
12267 return moment.utc(input).fromNow();
12271 return moment.utc(input).fromNow();
12268 }
12272 }
12269 })
12273 })
12270
12274
12271 .filter('round', function () {
12275 .filter('round', function () {
12272 return function (input, precision) {
12276 return function (input, precision) {
12273 return input.toFixed(precision)
12277 return input.toFixed(precision)
12274 }
12278 }
12275 })
12279 })
12276
12280
12277 .filter('numberToThousands', function () {
12281 .filter('numberToThousands', function () {
12278 return function (input) {
12282 return function (input) {
12279 if (input > 1000000) {
12283 if (input > 1000000) {
12280 var i = input / 1000000;
12284 var i = input / 1000000;
12281 return i.toFixed(1).toString() + 'M'
12285 return i.toFixed(1).toString() + 'M'
12282 }
12286 }
12283 else if (input > 1000) {
12287 else if (input > 1000) {
12284 var i = input / 1000;
12288 var i = input / 1000;
12285 return i.toFixed(1).toString() + 'k'
12289 return i.toFixed(1).toString() + 'k'
12286 }
12290 }
12287 else {
12291 else {
12288 return input;
12292 return input;
12289 }
12293 }
12290 }
12294 }
12291 })
12295 })
12292 .filter('getOrdered', function () {
12296 .filter('getOrdered', function () {
12293 return function (input, filterOn) {
12297 return function (input, filterOn) {
12294 var ordered = {};
12298 var ordered = {};
12295 for (var key in input) {
12299 for (var key in input) {
12296 ordered[input[key][filterOn]] = input[key];
12300 ordered[input[key][filterOn]] = input[key];
12297 }
12301 }
12298 return ordered;
12302 return ordered;
12299 };
12303 };
12300 })
12304 })
12301 .filter('objectToOrderedArray', function(){
12305 .filter('objectToOrderedArray', function(){
12302 return function(items, field, reverse) {
12306 return function(items, field, reverse) {
12303 var filtered = [];
12307 var filtered = [];
12304 angular.forEach(items, function(item) {
12308 angular.forEach(items, function(item) {
12305 filtered.push(item);
12309 filtered.push(item);
12306 });
12310 });
12307 filtered.sort(function (a, b) {
12311 filtered.sort(function (a, b) {
12308 return (a[field] > b[field] ? 1 : -1);
12312 return (a[field] > b[field] ? 1 : -1);
12309 });
12313 });
12310 if(reverse) filtered.reverse();
12314 if(reverse) filtered.reverse();
12311 return filtered;
12315 return filtered;
12312 };
12316 };
12313 })
12317 })
12314 .filter('apdexValue', function () {
12318 .filter('apdexValue', function () {
12315 return function (input) {
12319 return function (input) {
12316 if (input.apdex >= 95) {
12320 if (input.apdex >= 95) {
12317 return 'satisfactory';
12321 return 'satisfactory';
12318 } else if (input.apdex >= 80) {
12322 } else if (input.apdex >= 80) {
12319 return 'tolerating';
12323 return 'tolerating';
12320 } else {
12324 } else {
12321 return 'frustrating';
12325 return 'frustrating';
12322 }
12326 }
12323 };
12327 };
12324 })
12328 })
12325 .filter('truncate', function(){
12329 .filter('truncate', function(){
12326 return function (text, length, end) {
12330 return function (text, length, end) {
12327 if (isNaN(length))
12331 if (isNaN(length))
12328 length = 10;
12332 length = 10;
12329
12333
12330 if (end === undefined)
12334 if (end === undefined)
12331 end = "...";
12335 end = "...";
12332
12336
12333 if (text.length <= length || text.length - end.length <= length) {
12337 if (text.length <= length || text.length - end.length <= length) {
12334 return text;
12338 return text;
12335 }
12339 }
12336 else {
12340 else {
12337 return String(text).substring(0, length-end.length) + end;
12341 return String(text).substring(0, length-end.length) + end;
12338 }
12342 }
12339
12343
12340 };
12344 };
12341 })
12345 })
12342
12346
12343 ;
12347 ;
12344
12348
12345 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12349 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12346 //
12350 //
12347 // Licensed under the Apache License, Version 2.0 (the "License");
12351 // Licensed under the Apache License, Version 2.0 (the "License");
12348 // you may not use this file except in compliance with the License.
12352 // you may not use this file except in compliance with the License.
12349 // You may obtain a copy of the License at
12353 // You may obtain a copy of the License at
12350 //
12354 //
12351 // http://www.apache.org/licenses/LICENSE-2.0
12355 // http://www.apache.org/licenses/LICENSE-2.0
12352 //
12356 //
12353 // Unless required by applicable law or agreed to in writing, software
12357 // Unless required by applicable law or agreed to in writing, software
12354 // distributed under the License is distributed on an "AS IS" BASIS,
12358 // distributed under the License is distributed on an "AS IS" BASIS,
12355 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12359 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12356 // See the License for the specific language governing permissions and
12360 // See the License for the specific language governing permissions and
12357 // limitations under the License.
12361 // limitations under the License.
12358
12362
12359 angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
12363 angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
12360
12364
12361 $urlRouterProvider.otherwise('/ui');
12365 $urlRouterProvider.otherwise('/ui');
12362
12366
12363 $stateProvider.state('logs', {
12367 $stateProvider.state('logs', {
12364 url: '/ui/logs?resource',
12368 url: '/ui/logs?resource',
12365 component: 'logsBrowserView'
12369 component: 'logsBrowserView'
12366 });
12370 });
12367
12371
12368 $stateProvider.state('front_dashboard', {
12372 $stateProvider.state('front_dashboard', {
12369 url: '/ui',
12373 url: '/ui',
12370 component: 'indexDashboardView'
12374 component: 'indexDashboardView'
12371 });
12375 });
12372
12376
12373 $stateProvider.state('report', {
12377 $stateProvider.state('report', {
12374 abstract: true,
12378 abstract: true,
12375 url: '/ui/report',
12379 url: '/ui/report',
12376 template: '<ui-view></ui-view>'
12380 template: '<ui-view></ui-view>'
12377 });
12381 });
12378
12382
12379 $stateProvider.state('report.list', {
12383 $stateProvider.state('report.list', {
12380 url: '/list?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource',
12384 url: '/list?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource',
12381 component: 'reportsBrowserView'
12385 component: 'reportsBrowserView'
12382 });
12386 });
12383
12387
12384 $stateProvider.state('report.list_slow', {
12388 $stateProvider.state('report.list_slow', {
12385 url: '/list_slow?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource',
12389 url: '/list_slow?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource',
12386 component: 'reportsSlowBrowserView'
12390 component: 'reportsSlowBrowserView'
12387 });
12391 });
12388
12392
12389 $stateProvider.state('report.view_detail', {
12393 $stateProvider.state('report.view_detail', {
12390 url: '/:groupId/:reportId',
12394 url: '/:groupId/:reportId',
12391 component: 'reportView'
12395 component: 'reportView'
12392 });
12396 });
12393 $stateProvider.state('report.view_group', {
12397 $stateProvider.state('report.view_group', {
12394 url: '/:groupId',
12398 url: '/:groupId',
12395 component: 'reportView'
12399 component: 'reportView'
12396 });
12400 });
12397 $stateProvider.state('events', {
12401 $stateProvider.state('events', {
12398 url: '/ui/events',
12402 url: '/ui/events',
12399 component: 'eventBrowserView'
12403 component: 'eventBrowserView'
12400 });
12404 });
12401 $stateProvider.state('admin', {
12405 $stateProvider.state('admin', {
12402 url: '/ui/admin',
12406 url: '/ui/admin',
12403 component: 'adminView'
12407 component: 'adminView'
12404 });
12408 });
12405 $stateProvider.state('admin.user', {
12409 $stateProvider.state('admin.user', {
12406 abstract: true,
12410 abstract: true,
12407 url: '/user',
12411 url: '/user',
12408 template: '<ui-view></ui-view>'
12412 template: '<ui-view></ui-view>'
12409 });
12413 });
12410 $stateProvider.state('admin.user.list', {
12414 $stateProvider.state('admin.user.list', {
12411 url: '/list',
12415 url: '/list',
12412 component: 'adminUsersListView'
12416 component: 'adminUsersListView'
12413 });
12417 });
12414 $stateProvider.state('admin.user.create', {
12418 $stateProvider.state('admin.user.create', {
12415 url: '/create',
12419 url: '/create',
12416 component: 'adminUsersCreateView'
12420 component: 'adminUsersCreateView'
12417 });
12421 });
12418 $stateProvider.state('admin.user.update', {
12422 $stateProvider.state('admin.user.update', {
12419 url: '/{userId}/update',
12423 url: '/{userId}/update',
12420 component: 'adminUsersCreateView'
12424 component: 'adminUsersCreateView'
12421 });
12425 });
12422
12426
12423
12427
12424 $stateProvider.state('admin.group', {
12428 $stateProvider.state('admin.group', {
12425 abstract: true,
12429 abstract: true,
12426 url: '/group',
12430 url: '/group',
12427 template: '<ui-view></ui-view>'
12431 template: '<ui-view></ui-view>'
12428 });
12432 });
12429 $stateProvider.state('admin.group.list', {
12433 $stateProvider.state('admin.group.list', {
12430 url: '/list',
12434 url: '/list',
12431 component: 'adminGroupsListView'
12435 component: 'adminGroupsListView'
12432 });
12436 });
12433 $stateProvider.state('admin.group.create', {
12437 $stateProvider.state('admin.group.create', {
12434 url: '/create',
12438 url: '/create',
12435 component: 'adminGroupsCreateView'
12439 component: 'adminGroupsCreateView'
12436 });
12440 });
12437 $stateProvider.state('admin.group.update', {
12441 $stateProvider.state('admin.group.update', {
12438 url: '/{groupId}/update',
12442 url: '/{groupId}/update',
12439 component: 'adminGroupsCreateView'
12443 component: 'adminGroupsCreateView'
12440 });
12444 });
12441
12445
12442 $stateProvider.state('admin.application', {
12446 $stateProvider.state('admin.application', {
12443 abstract: true,
12447 abstract: true,
12444 url: '/application',
12448 url: '/application',
12445 template: '<ui-view></ui-view>'
12449 template: '<ui-view></ui-view>'
12446 });
12450 });
12447
12451
12448 $stateProvider.state('admin.application.list', {
12452 $stateProvider.state('admin.application.list', {
12449 url: '/list',
12453 url: '/list',
12450 component: 'adminApplicationsListView'
12454 component: 'adminApplicationsListView'
12451 });
12455 });
12452
12456
12453 $stateProvider.state('admin.partitions', {
12457 $stateProvider.state('admin.partitions', {
12454 url: '/partitions',
12458 url: '/partitions',
12455 component: 'adminPartitionsView'
12459 component: 'adminPartitionsView'
12456 });
12460 });
12457 $stateProvider.state('admin.system', {
12461 $stateProvider.state('admin.system', {
12458 url: '/system',
12462 url: '/system',
12459 component: 'adminSystemView'
12463 component: 'adminSystemView'
12460 });
12464 });
12461
12465
12462 $stateProvider.state('admin.configs', {
12466 $stateProvider.state('admin.configs', {
12463 abstract: true,
12467 abstract: true,
12464 url: '/configs',
12468 url: '/configs',
12465 template: '<ui-view></ui-view>'
12469 template: '<ui-view></ui-view>'
12466 });
12470 });
12467
12471
12468 $stateProvider.state('admin.configs.list', {
12472 $stateProvider.state('admin.configs.list', {
12469 url: '/list',
12473 url: '/list',
12470 component: 'adminConfigurationView'
12474 component: 'adminConfigurationView'
12471 });
12475 });
12472
12476
12473 $stateProvider.state('user', {
12477 $stateProvider.state('user', {
12474 url: '/ui/user',
12478 url: '/ui/user',
12475 component: 'settingsView'
12479 component: 'settingsView'
12476 });
12480 });
12477
12481
12478 $stateProvider.state('user.profile', {
12482 $stateProvider.state('user.profile', {
12479 abstract: true,
12483 abstract: true,
12480 template: '<ui-view></ui-view>'
12484 template: '<ui-view></ui-view>'
12481 });
12485 });
12482 $stateProvider.state('user.profile.edit', {
12486 $stateProvider.state('user.profile.edit', {
12483 url: '/profile',
12487 url: '/profile',
12484 component: 'userProfileView'
12488 component: 'userProfileView'
12485 });
12489 });
12486
12490
12487
12491
12488 $stateProvider.state('user.profile.password', {
12492 $stateProvider.state('user.profile.password', {
12489 url: '/password',
12493 url: '/password',
12490 component: 'userPasswordView'
12494 component: 'userPasswordView'
12491 });
12495 });
12492
12496
12493 $stateProvider.state('user.profile.identities', {
12497 $stateProvider.state('user.profile.identities', {
12494 url: '/identities',
12498 url: '/identities',
12495 component: 'userIdentitiesView'
12499 component: 'userIdentitiesView'
12496 });
12500 });
12497
12501
12498 $stateProvider.state('user.profile.auth_tokens', {
12502 $stateProvider.state('user.profile.auth_tokens', {
12499 url: '/auth_tokens',
12503 url: '/auth_tokens',
12500 component: 'userAuthTokensView'
12504 component: 'userAuthTokensView'
12501 });
12505 });
12502
12506
12503 $stateProvider.state('user.alert_channels', {
12507 $stateProvider.state('user.alert_channels', {
12504 abstract: true,
12508 abstract: true,
12505 url: '/alert_channels',
12509 url: '/alert_channels',
12506 template: '<ui-view></ui-view>'
12510 template: '<ui-view></ui-view>'
12507 });
12511 });
12508
12512
12509 $stateProvider.state('user.alert_channels.list', {
12513 $stateProvider.state('user.alert_channels.list', {
12510 url: '/list',
12514 url: '/list',
12511 component: 'userAlertChannelsListView'
12515 component: 'userAlertChannelsListView'
12512 });
12516 });
12513
12517
12514 $stateProvider.state('user.alert_channels.email', {
12518 $stateProvider.state('user.alert_channels.email', {
12515 url: '/email',
12519 url: '/email',
12516 component: 'userAlertChannelsEmailNewView'
12520 component: 'userAlertChannelsEmailNewView'
12517 });
12521 });
12518
12522
12519 $stateProvider.state('applications', {
12523 $stateProvider.state('applications', {
12520 abstract: true,
12524 abstract: true,
12521 url: '/ui/applications',
12525 url: '/ui/applications',
12522 component: 'settingsView'
12526 component: 'settingsView'
12523 });
12527 });
12524
12528
12525 $stateProvider.state('applications.list', {
12529 $stateProvider.state('applications.list', {
12526 url: '/list',
12530 url: '/list',
12527 component: 'applicationsListView'
12531 component: 'applicationsListView'
12528 });
12532 });
12529 $stateProvider.state('applications.update', {
12533 $stateProvider.state('applications.update', {
12530 url: '/{resourceId}/update',
12534 url: '/{resourceId}/update',
12531 component: 'applicationsUpdateView'
12535 component: 'applicationsUpdateView'
12532 });
12536 });
12533
12537
12534 $stateProvider.state('applications.integrations', {
12538 $stateProvider.state('applications.integrations', {
12535 url: '/{resourceId}/integrations',
12539 url: '/{resourceId}/integrations',
12536 component: 'integrationsListView',
12540 component: 'integrationsListView',
12537 data: {
12541 data: {
12538 resource: null
12542 resource: null
12539 }
12543 }
12540 });
12544 });
12541
12545
12542 $stateProvider.state('applications.purge_logs', {
12546 $stateProvider.state('applications.purge_logs', {
12543 url: '/purge_logs',
12547 url: '/purge_logs',
12544 component: 'applicationsPurgeLogsView'
12548 component: 'applicationsPurgeLogsView'
12545 });
12549 });
12546
12550
12547 $stateProvider.state('applications.integrations.edit', {
12551 $stateProvider.state('applications.integrations.edit', {
12548 url: '/{integration}',
12552 url: '/{integration}',
12549 template: function ($stateParams) {
12553 template: function ($stateParams) {
12550 return '<'+ $stateParams.integration + '-integration-config-view>'
12554 return '<'+ $stateParams.integration + '-integration-config-view>'
12551 }
12555 }
12552 });
12556 });
12553
12557
12554 $stateProvider.state('tests', {
12558 $stateProvider.state('tests', {
12555 url: '/ui/tests',
12559 url: '/ui/tests',
12556 templateUrl: 'templates/user/alert_channels_test.html',
12560 templateUrl: 'templates/user/alert_channels_test.html',
12557 controller: 'AlertChannelsTestController as test_action'
12561 controller: 'AlertChannelsTestController as test_action'
12558 });
12562 });
12559
12563
12560 }]);
12564 }]);
12561
12565
12562 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12566 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12563 //
12567 //
12564 // Licensed under the Apache License, Version 2.0 (the "License");
12568 // Licensed under the Apache License, Version 2.0 (the "License");
12565 // you may not use this file except in compliance with the License.
12569 // you may not use this file except in compliance with the License.
12566 // You may obtain a copy of the License at
12570 // You may obtain a copy of the License at
12567 //
12571 //
12568 // http://www.apache.org/licenses/LICENSE-2.0
12572 // http://www.apache.org/licenses/LICENSE-2.0
12569 //
12573 //
12570 // Unless required by applicable law or agreed to in writing, software
12574 // Unless required by applicable law or agreed to in writing, software
12571 // distributed under the License is distributed on an "AS IS" BASIS,
12575 // distributed under the License is distributed on an "AS IS" BASIS,
12572 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12576 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12573 // See the License for the specific language governing permissions and
12577 // See the License for the specific language governing permissions and
12574 // limitations under the License.
12578 // limitations under the License.
12575
12579
12576 angular.module('appenlight.services.chartResultParser',[]).factory('chartResultParser', function () {
12580 angular.module('appenlight.services.chartResultParser',[]).factory('chartResultParser', function () {
12577
12581
12578 function transform(data) {
12582 function transform(data) {
12579
12583
12580 /** transform result to a format that is more friendly
12584 /** transform result to a format that is more friendly
12581 * to c3js we don't want to export this way as default
12585 * to c3js we don't want to export this way as default
12582 * as TSV stuff is less readable overall
12586 * as TSV stuff is less readable overall
12583 *
12587 *
12584 * we want format of:
12588 * we want format of:
12585 * {x: [unix_timestamps],
12589 * {x: [unix_timestamps],
12586 * key1: [val,list],
12590 * key1: [val,list],
12587 * key2: [val,list]...}
12591 * key2: [val,list]...}
12588 *
12592 *
12589 * OR
12593 * OR
12590 *
12594 *
12591 * handle special case where we want pie/donut for
12595 * handle special case where we want pie/donut for
12592 * aggregation with a single metric, we need to transform
12596 * aggregation with a single metric, we need to transform
12593 * the data from:
12597 * the data from:
12594 * [y:list, categories:[cat1,cat2,...]]
12598 * [y:list, categories:[cat1,cat2,...]]
12595 * to
12599 * to
12596 * [cat1: val, cat2:val...] format to render properly
12600 * [cat1: val, cat2:val...] format to render properly
12597 */
12601 */
12598 var chartC3Config = {
12602 var chartC3Config = {
12599 data: {
12603 data: {
12600 json: [],
12604 json: [],
12601 type: 'bar'
12605 type: 'bar'
12602 },
12606 },
12603 point: {
12607 point: {
12604 show: false
12608 show: false
12605 },
12609 },
12606 tooltip: {
12610 tooltip: {
12607 format: {
12611 format: {
12608 title: function (d) {
12612 title: function (d) {
12609 if (d) {
12613 if (d) {
12610 return '' + d;
12614 return '' + d;
12611 }
12615 }
12612 return '';
12616 return '';
12613 },
12617 },
12614 value: function (value, ratio, id, index) {
12618 value: function (value, ratio, id, index) {
12615 return d3.round(value, 3);
12619 return d3.round(value, 3);
12616 }
12620 }
12617 }
12621 }
12618 },
12622 },
12619 regions: data.rect_regions
12623 regions: data.rect_regions
12620 };
12624 };
12621 var labels = _.keys(data.system_labels);
12625 var labels = _.keys(data.system_labels);
12622 var specialCases = ['pie', 'donut', 'gauge'];
12626 var specialCases = ['pie', 'donut', 'gauge'];
12623 if (labels.length === 1 && _.contains(specialCases,
12627 if (labels.length === 1 && _.contains(specialCases,
12624 data.chart_type.type)) {
12628 data.chart_type.type)) {
12625 var transformedData = {};
12629 var transformedData = {};
12626
12630
12627 _.each(data.series, function (item) {
12631 _.each(data.series, function (item) {
12628 transformedData[item['key']] = item[labels[0]];
12632 transformedData[item['key']] = item[labels[0]];
12629 });
12633 });
12630 }
12634 }
12631 else {
12635 else {
12632 var transformedData = {'key': []};
12636 var transformedData = {'key': []};
12633
12637
12634 _.each(labels, function (label) {
12638 _.each(labels, function (label) {
12635 transformedData[label] = [];
12639 transformedData[label] = [];
12636 });
12640 });
12637
12641
12638 _.each(data.series, function (item) {
12642 _.each(data.series, function (item) {
12639 for (key in item) {
12643 for (key in item) {
12640 transformedData[key].push(item[key])
12644 transformedData[key].push(item[key])
12641 }
12645 }
12642 });
12646 });
12643 }
12647 }
12644
12648
12645
12649
12646 if (data.parent_agg.type === 'time_histogram') {
12650 if (data.parent_agg.type === 'time_histogram') {
12647 chartC3Config.axis = {
12651 chartC3Config.axis = {
12648 x: {
12652 x: {
12649 type: 'timeseries',
12653 type: 'timeseries',
12650 tick: {
12654 tick: {
12651 format: '%Y-%m-%d'
12655 format: '%Y-%m-%d'
12652 }
12656 }
12653 }
12657 }
12654 };
12658 };
12655 chartC3Config.data.xFormat = '%Y-%m-%dT%H:%M:%S';
12659 chartC3Config.data.xFormat = '%Y-%m-%dT%H:%M:%S';
12656 }
12660 }
12657 else if (data.categories) {
12661 else if (data.categories) {
12658 chartC3Config.axis = {
12662 chartC3Config.axis = {
12659 x: {
12663 x: {
12660 type: 'category',
12664 type: 'category',
12661 categories: data.categories
12665 categories: data.categories
12662 }
12666 }
12663 };
12667 };
12664 // we don't want to show key as label if it is being
12668 // we don't want to show key as label if it is being
12665 // used as a category instead
12669 // used as a category instead
12666 if (data.categories) {
12670 if (data.categories) {
12667 delete transformedData['key'];
12671 delete transformedData['key'];
12668 }
12672 }
12669 }
12673 }
12670
12674
12671 var human_labels = {};
12675 var human_labels = {};
12672 _.each(_.pairs(data.system_labels), function(entry){
12676 _.each(_.pairs(data.system_labels), function(entry){
12673 human_labels[entry[0]] = entry[1].human_label;
12677 human_labels[entry[0]] = entry[1].human_label;
12674 });
12678 });
12675 var chartC3Data = {
12679 var chartC3Data = {
12676 json: transformedData,
12680 json: transformedData,
12677 names: human_labels,
12681 names: human_labels,
12678 groups: data.groups,
12682 groups: data.groups,
12679 type: data.chart_type.type
12683 type: data.chart_type.type
12680 };
12684 };
12681
12685
12682 if (data.parent_agg.type == 'time_histogram') {
12686 if (data.parent_agg.type == 'time_histogram') {
12683 chartC3Data.x = 'key';
12687 chartC3Data.x = 'key';
12684 }
12688 }
12685 return {chartC3Data: chartC3Data, chartC3Config: chartC3Config}
12689 return {chartC3Data: chartC3Data, chartC3Config: chartC3Config}
12686 }
12690 }
12687
12691
12688 return transform
12692 return transform
12689 });
12693 });
12690
12694
12691 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12695 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12692 //
12696 //
12693 // Licensed under the Apache License, Version 2.0 (the "License");
12697 // Licensed under the Apache License, Version 2.0 (the "License");
12694 // you may not use this file except in compliance with the License.
12698 // you may not use this file except in compliance with the License.
12695 // You may obtain a copy of the License at
12699 // You may obtain a copy of the License at
12696 //
12700 //
12697 // http://www.apache.org/licenses/LICENSE-2.0
12701 // http://www.apache.org/licenses/LICENSE-2.0
12698 //
12702 //
12699 // Unless required by applicable law or agreed to in writing, software
12703 // Unless required by applicable law or agreed to in writing, software
12700 // distributed under the License is distributed on an "AS IS" BASIS,
12704 // distributed under the License is distributed on an "AS IS" BASIS,
12701 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12705 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12702 // See the License for the specific language governing permissions and
12706 // See the License for the specific language governing permissions and
12703 // limitations under the License.
12707 // limitations under the License.
12704
12708
12705 var DEFAULT_ACTIONS = {
12709 var DEFAULT_ACTIONS = {
12706 'get': {method: 'GET', timeout: 60000 * 2},
12710 'get': {method: 'GET', timeout: 60000 * 2},
12707 'save': {method: 'POST', timeout: 60000 * 2},
12711 'save': {method: 'POST', timeout: 60000 * 2},
12708 'query': {method: 'GET', isArray: true, timeout: 60000 * 2},
12712 'query': {method: 'GET', isArray: true, timeout: 60000 * 2},
12709 'remove': {method: 'DELETE', timeout: 30000},
12713 'remove': {method: 'DELETE', timeout: 30000},
12710 'update': {method: 'PATCH', timeout: 30000},
12714 'update': {method: 'PATCH', timeout: 30000},
12711 'delete': {method: 'DELETE', timeout: 30000}
12715 'delete': {method: 'DELETE', timeout: 30000}
12712 };
12716 };
12713
12717
12714 angular.module('appenlight.services.resources', []).factory('usersResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12718 angular.module('appenlight.services.resources', []).factory('usersResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12715 return $resource(AeConfig.urls.users, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12719 return $resource(AeConfig.urls.users, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12716 }]);
12720 }]);
12717
12721
12718 angular.module('appenlight.services.resources').factory('userResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12722 angular.module('appenlight.services.resources').factory('userResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12719 return $resource(AeConfig.urls.user, null, angular.copy(DEFAULT_ACTIONS));
12723 return $resource(AeConfig.urls.user, null, angular.copy(DEFAULT_ACTIONS));
12720 }]);
12724 }]);
12721
12725
12722 angular.module('appenlight.services.resources').factory('usersPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12726 angular.module('appenlight.services.resources').factory('usersPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12723 return $resource(AeConfig.urls.usersProperty, null, angular.copy(DEFAULT_ACTIONS));
12727 return $resource(AeConfig.urls.usersProperty, null, angular.copy(DEFAULT_ACTIONS));
12724 }]);
12728 }]);
12725
12729
12726 angular.module('appenlight.services.resources').factory('userSelfResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12730 angular.module('appenlight.services.resources').factory('userSelfResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12727 return $resource(AeConfig.urls.userSelf, null, angular.copy(DEFAULT_ACTIONS));
12731 return $resource(AeConfig.urls.userSelf, null, angular.copy(DEFAULT_ACTIONS));
12728 }]);
12732 }]);
12729
12733
12730 angular.module('appenlight.services.resources').factory('userSelfPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12734 angular.module('appenlight.services.resources').factory('userSelfPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12731 return $resource(AeConfig.urls.userSelfProperty, null, angular.copy(DEFAULT_ACTIONS));
12735 return $resource(AeConfig.urls.userSelfProperty, null, angular.copy(DEFAULT_ACTIONS));
12732 }]);
12736 }]);
12733
12737
12734 angular.module('appenlight.services.resources').factory('logsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12738 angular.module('appenlight.services.resources').factory('logsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12735 return $resource(AeConfig.urls.logsNoId, null, angular.copy(DEFAULT_ACTIONS));
12739 return $resource(AeConfig.urls.logsNoId, null, angular.copy(DEFAULT_ACTIONS));
12736 }]);
12740 }]);
12737
12741
12738 angular.module('appenlight.services.resources').factory('reportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12742 angular.module('appenlight.services.resources').factory('reportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12739 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12743 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12740 }]);
12744 }]);
12741
12745
12742 angular.module('appenlight.services.resources').factory('slowReportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12746 angular.module('appenlight.services.resources').factory('slowReportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12743 return $resource(AeConfig.urls.slowReports, null, angular.copy(DEFAULT_ACTIONS));
12747 return $resource(AeConfig.urls.slowReports, null, angular.copy(DEFAULT_ACTIONS));
12744 }]);
12748 }]);
12745
12749
12746 angular.module('appenlight.services.resources').factory('reportGroupResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12750 angular.module('appenlight.services.resources').factory('reportGroupResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12747 return $resource(AeConfig.urls.reportGroup, null, angular.copy(DEFAULT_ACTIONS));
12751 return $resource(AeConfig.urls.reportGroup, null, angular.copy(DEFAULT_ACTIONS));
12748 }]);
12752 }]);
12749
12753
12750 angular.module('appenlight.services.resources').factory('reportGroupPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12754 angular.module('appenlight.services.resources').factory('reportGroupPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12751 return $resource(AeConfig.urls.reportGroupProperty, null, angular.copy(DEFAULT_ACTIONS));
12755 return $resource(AeConfig.urls.reportGroupProperty, null, angular.copy(DEFAULT_ACTIONS));
12752 }]);
12756 }]);
12753
12757
12754
12758
12755 angular.module('appenlight.services.resources').factory('reportResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12759 angular.module('appenlight.services.resources').factory('reportResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12756 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12760 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12757 }]);
12761 }]);
12758
12762
12759 angular.module('appenlight.services.resources').factory('analyticsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12763 angular.module('appenlight.services.resources').factory('analyticsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12760 return $resource(AeConfig.urls.analyticsAction, null, angular.copy(DEFAULT_ACTIONS));
12764 return $resource(AeConfig.urls.analyticsAction, null, angular.copy(DEFAULT_ACTIONS));
12761 }]);
12765 }]);
12762
12766
12763 angular.module('appenlight.services.resources').factory('reportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12767 angular.module('appenlight.services.resources').factory('reportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12764 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12768 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12765 }]);
12769 }]);
12766
12770
12767 angular.module('appenlight.services.resources').factory('integrationResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12771 angular.module('appenlight.services.resources').factory('integrationResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12768 return $resource(AeConfig.urls.integrationAction, null, angular.copy(DEFAULT_ACTIONS));
12772 return $resource(AeConfig.urls.integrationAction, null, angular.copy(DEFAULT_ACTIONS));
12769 }]);
12773 }]);
12770
12774
12771
12775
12772 angular.module('appenlight.services.resources').factory('adminResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12776 angular.module('appenlight.services.resources').factory('adminResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12773 return $resource(AeConfig.urls.adminAction, null, angular.copy(DEFAULT_ACTIONS));
12777 return $resource(AeConfig.urls.adminAction, null, angular.copy(DEFAULT_ACTIONS));
12774 }]);
12778 }]);
12775
12779
12776 angular.module('appenlight.services.resources').factory('applicationsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12780 angular.module('appenlight.services.resources').factory('applicationsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12777 return $resource(AeConfig.urls.applicationsNoId, null, angular.copy(DEFAULT_ACTIONS));
12781 return $resource(AeConfig.urls.applicationsNoId, null, angular.copy(DEFAULT_ACTIONS));
12778 }]);
12782 }]);
12779
12783
12780 angular.module('appenlight.services.resources').factory('applicationsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12784 angular.module('appenlight.services.resources').factory('applicationsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12781 return $resource(AeConfig.urls.applicationsProperty, null, angular.copy(DEFAULT_ACTIONS));
12785 return $resource(AeConfig.urls.applicationsProperty, null, angular.copy(DEFAULT_ACTIONS));
12782 }]);
12786 }]);
12783 angular.module('appenlight.services.resources').factory('applicationsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12787 angular.module('appenlight.services.resources').factory('applicationsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12784 return $resource(AeConfig.urls.applications, null, angular.copy(DEFAULT_ACTIONS));
12788 return $resource(AeConfig.urls.applications, null, angular.copy(DEFAULT_ACTIONS));
12785 }]);
12789 }]);
12786
12790
12787 angular.module('appenlight.services.resources').factory('sectionViewResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12791 angular.module('appenlight.services.resources').factory('sectionViewResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12788 return $resource(AeConfig.urls.sectionView, null, angular.copy(DEFAULT_ACTIONS));
12792 return $resource(AeConfig.urls.sectionView, null, angular.copy(DEFAULT_ACTIONS));
12789 }]);
12793 }]);
12790
12794
12791 angular.module('appenlight.services.resources').factory('groupsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12795 angular.module('appenlight.services.resources').factory('groupsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12792 return $resource(AeConfig.urls.groupsNoId, null, angular.copy(DEFAULT_ACTIONS));
12796 return $resource(AeConfig.urls.groupsNoId, null, angular.copy(DEFAULT_ACTIONS));
12793 }]);
12797 }]);
12794
12798
12795
12799
12796 angular.module('appenlight.services.resources').factory('groupsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12800 angular.module('appenlight.services.resources').factory('groupsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12797 return $resource(AeConfig.urls.groups, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12801 return $resource(AeConfig.urls.groups, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12798 }]);
12802 }]);
12799
12803
12800 angular.module('appenlight.services.resources').factory('groupsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12804 angular.module('appenlight.services.resources').factory('groupsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12801 return $resource(AeConfig.urls.groupsProperty, null, angular.copy(DEFAULT_ACTIONS));
12805 return $resource(AeConfig.urls.groupsProperty, null, angular.copy(DEFAULT_ACTIONS));
12802 }]);
12806 }]);
12803
12807
12804
12808
12805 angular.module('appenlight.services.resources').factory('eventsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12809 angular.module('appenlight.services.resources').factory('eventsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12806 return $resource(AeConfig.urls.eventsNoId, null, angular.copy(DEFAULT_ACTIONS));
12810 return $resource(AeConfig.urls.eventsNoId, null, angular.copy(DEFAULT_ACTIONS));
12807 }]);
12811 }]);
12808
12812
12809
12813
12810 angular.module('appenlight.services.resources').factory('eventsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12814 angular.module('appenlight.services.resources').factory('eventsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12811 return $resource(AeConfig.urls.events, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12815 return $resource(AeConfig.urls.events, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12812 }]);
12816 }]);
12813
12817
12814 angular.module('appenlight.services.resources').factory('eventsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12818 angular.module('appenlight.services.resources').factory('eventsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12815 return $resource(AeConfig.urls.eventsProperty, null, angular.copy(DEFAULT_ACTIONS));
12819 return $resource(AeConfig.urls.eventsProperty, null, angular.copy(DEFAULT_ACTIONS));
12816 }]);
12820 }]);
12817
12821
12818 angular.module('appenlight.services.resources').factory('configsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12822 angular.module('appenlight.services.resources').factory('configsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12819 return $resource(AeConfig.urls.configsNoId, null, angular.copy(DEFAULT_ACTIONS));
12823 return $resource(AeConfig.urls.configsNoId, null, angular.copy(DEFAULT_ACTIONS));
12820 }]);
12824 }]);
12821
12825
12822 angular.module('appenlight.services.resources').factory('configsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12826 angular.module('appenlight.services.resources').factory('configsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12823 return $resource(AeConfig.urls.configs, {
12827 return $resource(AeConfig.urls.configs, {
12824 key: '@key',
12828 key: '@key',
12825 section: '@section'
12829 section: '@section'
12826 }, angular.copy(DEFAULT_ACTIONS));
12830 }, angular.copy(DEFAULT_ACTIONS));
12827 }]);
12831 }]);
12828
12832
12829 angular.module('appenlight.services.resources').factory('pluginConfigsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12833 angular.module('appenlight.services.resources').factory('pluginConfigsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12830 return $resource(AeConfig.urls.pluginConfigs, {
12834 return $resource(AeConfig.urls.pluginConfigs, {
12831 id: '@id',
12835 id: '@id',
12832 plugin_name: '@plugin_name'
12836 plugin_name: '@plugin_name'
12833 }, angular.copy(DEFAULT_ACTIONS));
12837 }, angular.copy(DEFAULT_ACTIONS));
12834 }]);
12838 }]);
12835
12839
12836 angular.module('appenlight.services.resources').factory('resourcesPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12840 angular.module('appenlight.services.resources').factory('resourcesPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12837 return $resource(AeConfig.urls.resourceProperty, null, angular.copy(DEFAULT_ACTIONS));
12841 return $resource(AeConfig.urls.resourceProperty, null, angular.copy(DEFAULT_ACTIONS));
12838 }]);
12842 }]);
12839
12843
12840 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12844 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12841 //
12845 //
12842 // Licensed under the Apache License, Version 2.0 (the "License");
12846 // Licensed under the Apache License, Version 2.0 (the "License");
12843 // you may not use this file except in compliance with the License.
12847 // you may not use this file except in compliance with the License.
12844 // You may obtain a copy of the License at
12848 // You may obtain a copy of the License at
12845 //
12849 //
12846 // http://www.apache.org/licenses/LICENSE-2.0
12850 // http://www.apache.org/licenses/LICENSE-2.0
12847 //
12851 //
12848 // Unless required by applicable law or agreed to in writing, software
12852 // Unless required by applicable law or agreed to in writing, software
12849 // distributed under the License is distributed on an "AS IS" BASIS,
12853 // distributed under the License is distributed on an "AS IS" BASIS,
12850 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12854 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12851 // See the License for the specific language governing permissions and
12855 // See the License for the specific language governing permissions and
12852 // limitations under the License.
12856 // limitations under the License.
12853
12857
12854 angular.module('appenlight.services.stateHolder', []).factory('stateHolder',
12858 angular.module('appenlight.services.stateHolder', []).factory('stateHolder',
12855 ['$timeout', 'AeConfig', function ($timeout, AeConfig) {
12859 ['$timeout', 'AeConfig', function ($timeout, AeConfig) {
12856
12860
12857 var AeUser = {"user_name": null, "id": null};
12861 var AeUser = {"user_name": null, "id": null};
12858 AeUser.update = function (jsonData) {
12862 AeUser.update = function (jsonData) {
12859 jsonData = jsonData || {};
12863 jsonData = jsonData || {};
12860 this.applications_map = {};
12864 this.applications_map = {};
12861 this.dashboards_map = {};
12865 this.dashboards_map = {};
12862 this.user_name = jsonData.user_name || null;
12866 this.user_name = jsonData.user_name || null;
12863 this.id = jsonData.id;
12867 this.id = jsonData.id;
12864 this.assigned_reports = jsonData.assigned_reports || null;
12868 this.assigned_reports = jsonData.assigned_reports || null;
12865 this.latest_events = jsonData.latest_events || null;
12869 this.latest_events = jsonData.latest_events || null;
12866 this.permissions = jsonData.permissions || null;
12870 this.permissions = jsonData.permissions || null;
12867 this.groups = jsonData.groups || null;
12871 this.groups = jsonData.groups || null;
12868 this.applications = [];
12872 this.applications = [];
12869 this.dashboards = [];
12873 this.dashboards = [];
12870 _.each(jsonData.applications, function (item) {
12874 _.each(jsonData.applications, function (item) {
12871 this.addApplication(item);
12875 this.addApplication(item);
12872 }.bind(this));
12876 }.bind(this));
12873 _.each(jsonData.dashboards, function (item) {
12877 _.each(jsonData.dashboards, function (item) {
12874 this.addDashboard(item);
12878 this.addDashboard(item);
12875 }.bind(this));
12879 }.bind(this));
12876 };
12880 };
12877 AeUser.addApplication = function (item) {
12881 AeUser.addApplication = function (item) {
12878 this.applications.push(item);
12882 this.applications.push(item);
12879 this.applications_map[item.resource_id] = item;
12883 this.applications_map[item.resource_id] = item;
12880 };
12884 };
12881 AeUser.addDashboard = function (item) {
12885 AeUser.addDashboard = function (item) {
12882 this.dashboards.push(item);
12886 this.dashboards.push(item);
12883 this.dashboards_map[item.resource_id] = item;
12887 this.dashboards_map[item.resource_id] = item;
12884 };
12888 };
12885
12889
12886 AeUser.removeApplicationById = function (applicationId) {
12890 AeUser.removeApplicationById = function (applicationId) {
12887 this.applications = _.filter(this.applications, function (item) {
12891 this.applications = _.filter(this.applications, function (item) {
12888 return item.resource_id != applicationId;
12892 return item.resource_id != applicationId;
12889 });
12893 });
12890 delete this.applications_map[applicationId];
12894 delete this.applications_map[applicationId];
12891 };
12895 };
12892 AeUser.removeDashboardById = function (dashboardId) {
12896 AeUser.removeDashboardById = function (dashboardId) {
12893 this.dashboards = _.filter(this.dashboards, function (item) {
12897 this.dashboards = _.filter(this.dashboards, function (item) {
12894 return item.resource_id != dashboardId;
12898 return item.resource_id != dashboardId;
12895 });
12899 });
12896 delete this.dashboards_map[dashboardId];
12900 delete this.dashboards_map[dashboardId];
12897 };
12901 };
12898
12902
12899 AeUser.hasAppPermission = function (perm_name) {
12903 AeUser.hasAppPermission = function (perm_name) {
12900 if (!this.permissions){
12904 if (!this.permissions){
12901 return false
12905 return false
12902 }
12906 }
12903 if (this.permissions.indexOf('root_administration') !== -1) {
12907 if (this.permissions.indexOf('root_administration') !== -1) {
12904 return true
12908 return true
12905 }
12909 }
12906 return this.permissions.indexOf(perm_name) !== -1;
12910 return this.permissions.indexOf(perm_name) !== -1;
12907 };
12911 };
12908
12912
12909 AeUser.hasContextPermission = function (permName, ACLList) {
12913 AeUser.hasContextPermission = function (permName, ACLList) {
12910 var hasPerm = false;
12914 var hasPerm = false;
12911 _.each(ACLList, function (ACL) {
12915 _.each(ACLList, function (ACL) {
12912 // is this the right perm?
12916 // is this the right perm?
12913 if (ACL.perm_name == permName ||
12917 if (ACL.perm_name == permName ||
12914 ACL.perm_name == '__all_permissions__') {
12918 ACL.perm_name == '__all_permissions__') {
12915 // perm for this user or a group user belongs to
12919 // perm for this user or a group user belongs to
12916 if (ACL.user_name === this.user_name ||
12920 if (ACL.user_name === this.user_name ||
12917 this.groups.indexOf(ACL.group_name) !== -1) {
12921 this.groups.indexOf(ACL.group_name) !== -1) {
12918 hasPerm = true
12922 hasPerm = true
12919 }
12923 }
12920 }
12924 }
12921 }.bind(this));
12925 }.bind(this));
12922
12926
12923 return hasPerm;
12927 return hasPerm;
12924 };
12928 };
12925
12929
12926 /**
12930 /**
12927 * Holds some common stuff like flash messages, but important part is
12931 * Holds some common stuff like flash messages, but important part is
12928 * plugins property that is a registry that holds all information about
12932 * plugins property that is a registry that holds all information about
12929 * loaded plugins, its mutated via .run() functions on inclusion
12933 * loaded plugins, its mutated via .run() functions on inclusion
12930 * @type {{list: Array, timeout: null, extend: flashMessages.extend, pop: flashMessages.pop, cancelTimeout: flashMessages.cancelTimeout, removeMessages: flashMessages.removeMessages}}
12934 * @type {{list: Array, timeout: null, extend: flashMessages.extend, pop: flashMessages.pop, cancelTimeout: flashMessages.cancelTimeout, removeMessages: flashMessages.removeMessages}}
12931 */
12935 */
12932 var flashMessages = {
12936 var flashMessages = {
12933 list: [],
12937 list: [],
12934 timeout: null,
12938 timeout: null,
12935 extend: function (values) {
12939 extend: function (values) {
12936
12940
12937 if (this.list.length > 2) {
12941 if (this.list.length > 2) {
12938 this.list.splice(0, this.list.length - 2);
12942 this.list.splice(0, this.list.length - 2);
12939 }
12943 }
12940 this.list.push.apply(this.list, values);
12944 this.list.push.apply(this.list, values);
12941 this.cancelTimeout();
12945 this.cancelTimeout();
12942 this.removeMessages();
12946 this.removeMessages();
12943 },
12947 },
12944 pop: function () {
12948 pop: function () {
12945
12949
12946 this.list.pop();
12950 this.list.pop();
12947 },
12951 },
12948 cancelTimeout: function () {
12952 cancelTimeout: function () {
12949 if (this.timeout) {
12953 if (this.timeout) {
12950 $timeout.cancel(this.timeout);
12954 $timeout.cancel(this.timeout);
12951 }
12955 }
12952 },
12956 },
12953 removeMessages: function () {
12957 removeMessages: function () {
12954 var self = this;
12958 var self = this;
12955 this.timeout = $timeout(function () {
12959 this.timeout = $timeout(function () {
12956 while (self.list.length > 0) {
12960 while (self.list.length > 0) {
12957 self.list.pop();
12961 self.list.pop();
12958 }
12962 }
12959 }, 10000);
12963 }, 10000);
12960 }
12964 }
12961 };
12965 };
12962 flashMessages.closeAlert = angular.bind(flashMessages, function (index) {
12966 flashMessages.closeAlert = angular.bind(flashMessages, function (index) {
12963 this.list.splice(index, 1);
12967 this.list.splice(index, 1);
12964 this.cancelTimeout();
12968 this.cancelTimeout();
12965 });
12969 });
12966 /* add flash messages from template generated on non-xhr request level */
12970 /* add flash messages from template generated on non-xhr request level */
12967 try {
12971 try {
12968 if (AeConfig.flashMessages.length > 0) {
12972 if (AeConfig.flashMessages.length > 0) {
12969 flashMessages.list = AeConfig.flashMessages;
12973 flashMessages.list = AeConfig.flashMessages;
12970 }
12974 }
12971 }
12975 }
12972 catch (exc) {
12976 catch (exc) {
12973
12977
12974 }
12978 }
12975
12979
12976 var Plugins = {
12980 var Plugins = {
12977 enabled: [],
12981 enabled: [],
12978 configs: {},
12982 configs: {},
12979 callables: [],
12983 callables: [],
12980 inclusions: {},
12984 inclusions: {},
12981 addInclusion: function (name, inclusion) {
12985 addInclusion: function (name, inclusion) {
12982 var self = this;
12986 var self = this;
12983 if (self.inclusions.hasOwnProperty(name) === false) {
12987 if (self.inclusions.hasOwnProperty(name) === false) {
12984 self.inclusions[name] = [];
12988 self.inclusions[name] = [];
12985 }
12989 }
12986 self.inclusions[name].push(inclusion);
12990 self.inclusions[name].push(inclusion);
12987 }
12991 }
12988 };
12992 };
12989
12993
12990 var stateHolder = {
12994 var stateHolder = {
12991 section: 'settings',
12995 section: 'settings',
12992 resource: null,
12996 resource: null,
12993 plugins: Plugins,
12997 plugins: Plugins,
12994 flashMessages: flashMessages,
12998 flashMessages: flashMessages,
12995 AeUser: AeUser,
12999 AeUser: AeUser,
12996 AeConfig: AeConfig
13000 AeConfig: AeConfig
12997 };
13001 };
12998 return stateHolder;
13002 return stateHolder;
12999 }]);
13003 }]);
13000
13004
13001 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13005 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13002 //
13006 //
13003 // Licensed under the Apache License, Version 2.0 (the "License");
13007 // Licensed under the Apache License, Version 2.0 (the "License");
13004 // you may not use this file except in compliance with the License.
13008 // you may not use this file except in compliance with the License.
13005 // You may obtain a copy of the License at
13009 // You may obtain a copy of the License at
13006 //
13010 //
13007 // http://www.apache.org/licenses/LICENSE-2.0
13011 // http://www.apache.org/licenses/LICENSE-2.0
13008 //
13012 //
13009 // Unless required by applicable law or agreed to in writing, software
13013 // Unless required by applicable law or agreed to in writing, software
13010 // distributed under the License is distributed on an "AS IS" BASIS,
13014 // distributed under the License is distributed on an "AS IS" BASIS,
13011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13015 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13012 // See the License for the specific language governing permissions and
13016 // See the License for the specific language governing permissions and
13013 // limitations under the License.
13017 // limitations under the License.
13014
13018
13015 angular.module('appenlight.services.typeAheadTagHelper', []).factory('typeAheadTagHelper', function () {
13019 angular.module('appenlight.services.typeAheadTagHelper', []).factory('typeAheadTagHelper', function () {
13016 var typeAheadTagHelper = {tags: []};
13020 var typeAheadTagHelper = {tags: []};
13017 typeAheadTagHelper.aheadFilter = function (item, viewValue) {
13021 typeAheadTagHelper.aheadFilter = function (item, viewValue) {
13018 //dont show "deeper" autocomplete like level:foo with exception of application ones
13022 //dont show "deeper" autocomplete like level:foo with exception of application ones
13019 var label_text = item.text || item;
13023 var label_text = item.text || item;
13020 if (label_text.charAt(label_text.length - 1) != ':' && viewValue.indexOf(':') === -1 && label_text.indexOf('resource:') !== 0) {
13024 if (label_text.charAt(label_text.length - 1) != ':' && viewValue.indexOf(':') === -1 && label_text.indexOf('resource:') !== 0) {
13021 return false;
13025 return false;
13022 }
13026 }
13023 if (viewValue.length > 2) {
13027 if (viewValue.length > 2) {
13024 // with apps we need to do it differently
13028 // with apps we need to do it differently
13025 if (viewValue.toLowerCase().indexOf('resource:') == 0) {
13029 if (viewValue.toLowerCase().indexOf('resource:') == 0) {
13026 viewValue = viewValue.split(':').pop();
13030 viewValue = viewValue.split(':').pop();
13027 }
13031 }
13028 // check if tags match
13032 // check if tags match
13029 if (label_text.toLowerCase().indexOf(viewValue.toLowerCase()) === -1) {
13033 if (label_text.toLowerCase().indexOf(viewValue.toLowerCase()) === -1) {
13030 return false;
13034 return false;
13031 }
13035 }
13032 }
13036 }
13033 return true;
13037 return true;
13034 };
13038 };
13035 typeAheadTagHelper.removeSearchTag = function (tag) {
13039 typeAheadTagHelper.removeSearchTag = function (tag) {
13036
13040
13037 var indexValue = _.indexOf(typeAheadTagHelper.tags, tag);
13041 var indexValue = _.indexOf(typeAheadTagHelper.tags, tag);
13038 typeAheadTagHelper.tags.splice(indexValue, 1);
13042 typeAheadTagHelper.tags.splice(indexValue, 1);
13039
13043
13040 };
13044 };
13041 typeAheadTagHelper.addSearchTag = function (tag) {
13045 typeAheadTagHelper.addSearchTag = function (tag) {
13042 // do not allow dupes - angular will complain
13046 // do not allow dupes - angular will complain
13043 var found = _.find(typeAheadTagHelper.tags, function (existingTag) {
13047 var found = _.find(typeAheadTagHelper.tags, function (existingTag) {
13044 return existingTag.type == tag.type && existingTag.value == tag.value
13048 return existingTag.type == tag.type && existingTag.value == tag.value
13045 });
13049 });
13046 if (!found) {
13050 if (!found) {
13047 typeAheadTagHelper.tags.push(tag);
13051 typeAheadTagHelper.tags.push(tag);
13048 }
13052 }
13049 };
13053 };
13050
13054
13051 return typeAheadTagHelper;
13055 return typeAheadTagHelper;
13052 });
13056 });
13053
13057
13054 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13058 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13055 //
13059 //
13056 // Licensed under the Apache License, Version 2.0 (the "License");
13060 // Licensed under the Apache License, Version 2.0 (the "License");
13057 // you may not use this file except in compliance with the License.
13061 // you may not use this file except in compliance with the License.
13058 // You may obtain a copy of the License at
13062 // You may obtain a copy of the License at
13059 //
13063 //
13060 // http://www.apache.org/licenses/LICENSE-2.0
13064 // http://www.apache.org/licenses/LICENSE-2.0
13061 //
13065 //
13062 // Unless required by applicable law or agreed to in writing, software
13066 // Unless required by applicable law or agreed to in writing, software
13063 // distributed under the License is distributed on an "AS IS" BASIS,
13067 // distributed under the License is distributed on an "AS IS" BASIS,
13064 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13068 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13065 // See the License for the specific language governing permissions and
13069 // See the License for the specific language governing permissions and
13066 // limitations under the License.
13070 // limitations under the License.
13067
13071
13068 angular.module('appenlight.services.UUIDProvider', []).factory('UUIDProvider', function () {
13072 angular.module('appenlight.services.UUIDProvider', []).factory('UUIDProvider', function () {
13069 var provider = {
13073 var provider = {
13070 genUUID4: function () {
13074 genUUID4: function () {
13071 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
13075 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
13072 /[xy]/g, function (c) {
13076 /[xy]/g, function (c) {
13073 var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;
13077 var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;
13074 return v.toString(16);
13078 return v.toString(16);
13075 }
13079 }
13076 );
13080 );
13077 }
13081 }
13078 };
13082 };
13079 return provider;
13083 return provider;
13080 });
13084 });
13081
13085
13082 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13086 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13083 //
13087 //
13084 // Licensed under the Apache License, Version 2.0 (the "License");
13088 // Licensed under the Apache License, Version 2.0 (the "License");
13085 // you may not use this file except in compliance with the License.
13089 // you may not use this file except in compliance with the License.
13086 // You may obtain a copy of the License at
13090 // You may obtain a copy of the License at
13087 //
13091 //
13088 // http://www.apache.org/licenses/LICENSE-2.0
13092 // http://www.apache.org/licenses/LICENSE-2.0
13089 //
13093 //
13090 // Unless required by applicable law or agreed to in writing, software
13094 // Unless required by applicable law or agreed to in writing, software
13091 // distributed under the License is distributed on an "AS IS" BASIS,
13095 // distributed under the License is distributed on an "AS IS" BASIS,
13092 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13096 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13093 // See the License for the specific language governing permissions and
13097 // See the License for the specific language governing permissions and
13094 // limitations under the License.
13098 // limitations under the License.
13095
13099
13096 var underscore = angular.module('underscore', []);
13100 var underscore = angular.module('underscore', []);
13097 underscore.factory('_', function () {
13101 underscore.factory('_', function () {
13098 return window._; // assumes underscore has already been loaded on the page
13102 return window._; // assumes underscore has already been loaded on the page
13099 });
13103 });
@@ -1,143 +1,146 b''
1 // Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
1 // Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2 //
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
5 // You may obtain a copy of the License at
6 //
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
8 //
9 // Unless required by applicable law or agreed to in writing, software
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
13 // limitations under the License.
14
14
15 angular.module('appenlight.components.adminGroupsCreateView', [])
15 angular.module('appenlight.components.adminGroupsCreateView', [])
16 .component('adminGroupsCreateView', {
16 .component('adminGroupsCreateView', {
17 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
17 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
18 controller: AdminGroupsCreateViewController
18 controller: AdminGroupsCreateViewController
19 });
19 });
20
20
21 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
21 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
22
22
23 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
23 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
24 console.debug('AdminGroupsCreateController');
24 console.debug('AdminGroupsCreateController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$onInit = function () {
27 vm.$state = $state;
27 vm.$state = $state;
28 vm.loading = {
28 vm.loading = {
29 group: false,
29 group: false,
30 resource_permissions: false,
30 resource_permissions: false,
31 users: false
31 users: false
32 };
32 };
33
33
34 vm.form = {
34 vm.form = {
35 autocompleteUser: '',
35 autocompleteUser: '',
36 }
36 }
37
37
38
38
39 if (typeof $state.params.groupId !== 'undefined') {
39 if (typeof $state.params.groupId !== 'undefined') {
40 vm.loading.group = true;
40 vm.loading.group = true;
41 var groupId = $state.params.groupId;
41 var groupId = $state.params.groupId;
42 vm.group = groupsResource.get({groupId: groupId}, function (data) {
42 vm.group = groupsResource.get({groupId: groupId}, function (data) {
43 vm.loading.group = false;
43 vm.loading.group = false;
44 });
44 });
45
45
46 vm.resource_permissions = groupsPropertyResource.query(
46 vm.resource_permissions = groupsPropertyResource.query(
47 {groupId: groupId, key: 'resource_permissions'}, function (data) {
47 {groupId: groupId, key: 'resource_permissions'}, function (data) {
48 vm.loading.resource_permissions = false;
48 vm.loading.resource_permissions = false;
49 var tmpObj = {
49 var tmpObj = {
50 'group': {
50 'group': {
51 'application': {},
51 'application': {},
52 'dashboard': {}
52 'dashboard': {}
53 }
53 }
54 };
54 };
55 _.each(data, function (item) {
55 _.each(data, function (item) {
56 console.log(item);
56 console.log(item);
57 var section = tmpObj[item.type][item.resource_type];
57 var section = tmpObj[item.type][item.resource_type];
58 if (typeof section[item.resource_id] == 'undefined') {
58 if (typeof section[item.resource_id] == 'undefined') {
59 section[item.resource_id] = {
59 section[item.resource_id] = {
60 self: item,
60 self: item,
61 permissions: []
61 permissions: []
62 }
62 }
63 }
63 }
64 section[item.resource_id].permissions.push(item.perm_name);
64 section[item.resource_id].permissions.push(item.perm_name);
65
65
66 });
66 });
67 console.log(tmpObj)
67 console.log(tmpObj)
68 vm.resourcePermissions = tmpObj;
68 vm.resourcePermissions = tmpObj;
69 });
69 });
70
70
71 vm.users = groupsPropertyResource.query(
71 vm.users = groupsPropertyResource.query(
72 {groupId: groupId, key: 'users'}, function (data) {
72 {groupId: groupId, key: 'users'}, function (data) {
73 vm.loading.users = false;
73 vm.loading.users = false;
74 }, function () {
74 }, function () {
75 vm.loading.users = false;
75 vm.loading.users = false;
76 });
76 });
77
77
78 } else {
78 } else {
79 var groupId = null;
79 var groupId = null;
80 }
80 }
81
81
82 }
82 }
83
83
84 var formResponse = function (response) {
84 var formResponse = function (response) {
85 if (response.status === 422) {
85 if (response.status === 422) {
86 setServerValidation(vm.groupForm, response.data);
86 setServerValidation(vm.groupForm, response.data);
87 }
87 }
88 vm.loading.group = false;
88 vm.loading.group = false;
89 };
89 };
90
90
91 vm.createGroup = function () {
91 vm.createGroup = function () {
92 vm.loading.group = true;
92 vm.loading.group = true;
93 var groupId = $state.params.groupId;
93 if (groupId) {
94 if (groupId) {
94 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
95 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
95 setServerValidation(vm.groupForm);
96 setServerValidation(vm.groupForm);
96 vm.loading.group = false;
97 vm.loading.group = false;
97 }, formResponse);
98 }, formResponse);
98 } else {
99 } else {
99 groupsResource.save(vm.group, function (data) {
100 groupsResource.save(vm.group, function (data) {
100 $state.go('admin.group.update', {groupId: data.id});
101 $state.go('admin.group.update', {groupId: data.id});
101 }, formResponse);
102 }, formResponse);
102 }
103 }
103 };
104 };
104
105
105 vm.removeUser = function (user) {
106 vm.removeUser = function (user) {
107 var groupId = $state.params.groupId;
106 groupsPropertyResource.delete(
108 groupsPropertyResource.delete(
107 {groupId: groupId, key: 'users', user_name: user.user_name},
109 {groupId: groupId, key: 'users', user_name: user.user_name},
108 function (data) {
110 function (data) {
109 vm.loading.users = false;
111 vm.loading.users = false;
110 vm.users = _.filter(vm.users, function (item) {
112 vm.users = _.filter(vm.users, function (item) {
111 return item != user;
113 return item != user;
112 });
114 });
113 }, function () {
115 }, function () {
114 vm.loading.users = false;
116 vm.loading.users = false;
115 });
117 });
116 };
118 };
117
119
118 vm.addUser = function () {
120 vm.addUser = function () {
121 var groupId = $state.params.groupId;
119 groupsPropertyResource.save(
122 groupsPropertyResource.save(
120 {groupId: groupId, key: 'users'},
123 {groupId: groupId, key: 'users'},
121 {user_name: vm.form.autocompleteUser},
124 {user_name: vm.form.autocompleteUser},
122 function (data) {
125 function (data) {
123 vm.loading.users = false;
126 vm.loading.users = false;
124 vm.users.push(data);
127 vm.users.push(data);
125 vm.form.autocompleteUser = '';
128 vm.form.autocompleteUser = '';
126 }, function () {
129 }, function () {
127 vm.loading.users = false;
130 vm.loading.users = false;
128 });
131 });
129 }
132 }
130
133
131 vm.searchUsers = function (searchPhrase) {
134 vm.searchUsers = function (searchPhrase) {
132 console.log(searchPhrase);
135 console.log(searchPhrase);
133 return sectionViewResource.query({
136 return sectionViewResource.query({
134 section: 'users_section',
137 section: 'users_section',
135 view: 'search_users',
138 view: 'search_users',
136 'user_name': searchPhrase
139 'user_name': searchPhrase
137 }).$promise.then(function (data) {
140 }).$promise.then(function (data) {
138 return _.map(data, function (item) {
141 return _.map(data, function (item) {
139 return item.user;
142 return item.user;
140 });
143 });
141 });
144 });
142 }
145 }
143 };
146 };
@@ -1,122 +1,123 b''
1 // Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
1 // Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2 //
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
5 // You may obtain a copy of the License at
6 //
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
8 //
9 // Unless required by applicable law or agreed to in writing, software
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
13 // limitations under the License.
14
14
15 angular.module('appenlight.components.adminUsersCreateView', [])
15 angular.module('appenlight.components.adminUsersCreateView', [])
16 .component('adminUsersCreateView', {
16 .component('adminUsersCreateView', {
17 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
17 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
18 controller: AdminUsersCreateViewController
18 controller: AdminUsersCreateViewController
19 });
19 });
20
20
21 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
21 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
22
22
23 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
23 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
24 console.debug('AdminUsersCreateViewController');
24 console.debug('AdminUsersCreateViewController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$onInit = function () {
27 vm.$state = $state;
27 vm.$state = $state;
28 vm.loading = {user: false};
28 vm.loading = {user: false};
29
29
30
30
31 if (typeof $state.params.userId !== 'undefined') {
31 if (typeof $state.params.userId !== 'undefined') {
32 vm.loading.user = true;
32 vm.loading.user = true;
33 var userId = $state.params.userId;
33 var userId = $state.params.userId;
34 vm.user = usersResource.get({userId: userId}, function (data) {
34 vm.user = usersResource.get({userId: userId}, function (data) {
35 vm.loading.user = false;
35 vm.loading.user = false;
36 // cast to true for angular checkbox
36 // cast to true for angular checkbox
37 if (vm.user.status === 1) {
37 if (vm.user.status === 1) {
38 vm.user.status = true;
38 vm.user.status = true;
39 }
39 }
40 });
40 });
41
41
42 vm.resource_permissions = usersPropertyResource.query(
42 vm.resource_permissions = usersPropertyResource.query(
43 {userId: userId, key: 'resource_permissions'}, function (data) {
43 {userId: userId, key: 'resource_permissions'}, function (data) {
44 vm.loading.resource_permissions = false;
44 vm.loading.resource_permissions = false;
45 var tmpObj = {
45 var tmpObj = {
46 'user': {
46 'user': {
47 'application': {},
47 'application': {},
48 'dashboard': {}
48 'dashboard': {}
49 },
49 },
50 'group': {
50 'group': {
51 'application': {},
51 'application': {},
52 'dashboard': {}
52 'dashboard': {}
53 }
53 }
54 };
54 };
55 _.each(data, function (item) {
55 _.each(data, function (item) {
56 console.log(item);
56 console.log(item);
57 var section = tmpObj[item.type][item.resource_type];
57 var section = tmpObj[item.type][item.resource_type];
58 if (typeof section[item.resource_id] == 'undefined') {
58 if (typeof section[item.resource_id] == 'undefined') {
59 section[item.resource_id] = {
59 section[item.resource_id] = {
60 self: item,
60 self: item,
61 permissions: []
61 permissions: []
62 }
62 }
63 }
63 }
64 section[item.resource_id].permissions.push(item.perm_name);
64 section[item.resource_id].permissions.push(item.perm_name);
65
65
66 });
66 });
67 console.log(tmpObj)
67 console.log(tmpObj)
68 vm.resourcePermissions = tmpObj;
68 vm.resourcePermissions = tmpObj;
69 });
69 });
70
70
71 } else {
71 } else {
72 var userId = null;
72 var userId = null;
73 vm.user = {
73 vm.user = {
74 status: true
74 status: true
75 }
75 }
76 }
76 }
77 }
77 }
78
78
79 var formResponse = function (response) {
79 var formResponse = function (response) {
80 if (response.status == 422) {
80 if (response.status == 422) {
81 setServerValidation(vm.profileForm, response.data);
81 setServerValidation(vm.profileForm, response.data);
82 }
82 }
83 vm.loading.user = false;
83 vm.loading.user = false;
84 }
84 }
85
85
86 vm.createUser = function () {
86 vm.createUser = function () {
87 vm.loading.user = true;
87 vm.loading.user = true;
88 console.log('updateProfile');
88 console.log('updateProfile');
89 var userId = $state.params.userId;
89 if (userId) {
90 if (userId) {
90 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
91 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
91 setServerValidation(vm.profileForm);
92 setServerValidation(vm.profileForm);
92 vm.loading.user = false;
93 vm.loading.user = false;
93 }, formResponse);
94 }, formResponse);
94 }
95 }
95 else {
96 else {
96 usersResource.save(vm.user, function (data) {
97 usersResource.save(vm.user, function (data) {
97 $state.go('admin.user.update', {userId: data.id});
98 $state.go('admin.user.update', {userId: data.id});
98 }, formResponse);
99 }, formResponse);
99 }
100 }
100 }
101 }
101
102
102 vm.generatePassword = function () {
103 vm.generatePassword = function () {
103 var length = 8;
104 var length = 8;
104 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
105 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
105 vm.gen_pass = "";
106 vm.gen_pass = "";
106 for (var i = 0, n = charset.length; i < length; ++i) {
107 for (var i = 0, n = charset.length; i < length; ++i) {
107 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
108 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
108 }
109 }
109 vm.user.user_password = '' + vm.gen_pass;
110 vm.user.user_password = '' + vm.gen_pass;
110 console.log('x', vm.gen_pass);
111 console.log('x', vm.gen_pass);
111 }
112 }
112
113
113 vm.reloginUser = function () {
114 vm.reloginUser = function () {
114 sectionViewResource.get({
115 sectionViewResource.get({
115 section: 'admin_section', view: 'relogin_user',
116 section: 'admin_section', view: 'relogin_user',
116 user_id: vm.user.id
117 user_id: vm.user.id
117 }, function () {
118 }, function () {
118 window.location = AeConfig.urls.baseUrl;
119 window.location = AeConfig.urls.baseUrl;
119 });
120 });
120
121
121 }
122 }
122 };
123 };
General Comments 0
You need to be logged in to leave comments. Login now