/**
 * kbApp - v1.1.6 - 2019-05-14
 * http://kostal.com
 *
 * Copyright (c) 2019 Guido Hartwig
 */

!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"!==c&&!_.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=na[a]={};return _.each(a.match(ma)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ta,"-$1").toLowerCase(),"string"==typeof(c=a.getAttribute(d))){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:sa.test(c)?_.parseJSON(c):c)}catch(e){}ra.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ja.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;c<d;c++)qa.set(a[c],"globalEval",!b||qa.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(qa.hasData(a)&&(f=qa.access(a),g=qa.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)_.event.add(b,e,j[e][c])}ra.hasData(a)&&(h=ra.access(a),i=_.extend({},h),ra.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&xa.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Na[a];return c||(c=t(a,b),"none"!==c&&c||(Ma=(Ma||_("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Ma[0].contentDocument,b.write(),b.close(),c=t(a,b),Ma.detach()),Na[a]=c),c}function v(a,b,c){var d,e,f,g,h=a.style;return c=c||Qa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||_.contains(a.ownerDocument,a)||(g=_.style(a,b)),Pa.test(g)&&Oa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function w(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function x(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Wa.length;e--;)if((b=Wa[e]+c)in a)return b;return d}function y(a,b,c){var d=Sa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function z(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=_.css(a,c+va[f],!0,e)),d?("content"===c&&(g-=_.css(a,"padding"+va[f],!0,e)),"margin"!==c&&(g-=_.css(a,"border"+va[f]+"Width",!0,e))):(g+=_.css(a,"padding"+va[f],!0,e),"padding"!==c&&(g+=_.css(a,"border"+va[f]+"Width",!0,e)));return g}function A(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Qa(a),g="border-box"===_.css(a,"boxSizing",!1,f);if(e<=0||null==e){if(e=v(a,b,f),(e<0||null==e)&&(e=a.style[b]),Pa.test(e))return e;d=g&&(Y.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+z(a,b,c||(g?"border":"content"),d,f)+"px"}function B(a,b){for(var c,d,e,f=[],g=0,h=a.length;g<h;g++)d=a[g],d.style&&(f[g]=qa.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&wa(d)&&(f[g]=qa.access(d,"olddisplay",u(d.nodeName)))):(e=wa(d),"none"===c&&e||qa.set(d,"olddisplay",e?c:_.css(d,"display"))));for(g=0;g<h;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function C(a,b,c,d,e){return new C.prototype.init(a,b,c,d,e)}function D(){return setTimeout(function(){Xa=void 0}),Xa=_.now()}function E(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=va[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function F(a,b,c){for(var d,e=(bb[b]||[]).concat(bb["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function G(a,b,c){var d,e,f,g,h,i,j,k=this,l={},m=a.style,n=a.nodeType&&wa(a),o=qa.get(a,"fxshow");c.queue||(h=_._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,k.always(function(){k.always(function(){h.unqueued--,_.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],j=_.css(a,"display"),"inline"===("none"===j?qa.get(a,"olddisplay")||u(a.nodeName):j)&&"none"===_.css(a,"float")&&(m.display="inline-block")),c.overflow&&(m.overflow="hidden",k.always(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Za.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(n?"hide":"show")){if("show"!==e||!o||void 0===o[d])continue;n=!0}l[d]=o&&o[d]||_.style(a,d)}else j=void 0;if(_.isEmptyObject(l))"inline"===("none"===j?u(a.nodeName):j)&&(m.display=j);else{o?"hidden"in o&&(n=o.hidden):o=qa.access(a,"fxshow",{}),f&&(o.hidden=!n),n?_(a).show():k.done(function(){_(a).hide()}),k.done(function(){var b;qa.remove(a,"fxshow");for(b in l)_.style(a,b,l[b])});for(d in l)g=F(n?o[d]:0,d,k),d in o||(o[d]=g.start,n&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function H(a,b){var c,d,e,f,g;for(c in a)if(d=_.camelCase(c),e=b[d],f=a[c],_.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),(g=_.cssHooks[d])&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function I(a,b,c){var d,e,f=0,g=ab.length,h=_.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Xa||D(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:_.extend({},b),opts:_.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Xa||D(),duration:c.duration,tweens:[],createTween:function(b,c){var d=_.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(H(k,j.opts.specialEasing);f<g;f++)if(d=ab[f].call(j,a,k,j.opts))return d;return _.map(k,F,j),_.isFunction(j.opts.start)&&j.opts.start.call(a,j),_.fx.timer(_.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function J(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(ma)||[];if(_.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function K(a,b,c,d){function e(h){var i;return f[h]=!0,_.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===sb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function L(a,b){var c,d,e=_.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&_.extend(!0,a,d),a}function M(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function N(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(!(g=j[i+" "+f]||j["* "+f]))for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){!0===g?g=j[e]:!0!==j[e]&&(f=h[0],k.unshift(h[1]));break}if(!0!==g)if(g&&a.throws)b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function O(a,b,c,d){var e;if(_.isArray(b))_.each(b,function(b,e){c||xb.test(a)?d(a,e):O(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==_.type(b))d(a,b);else for(e in b)O(a+"["+e+"]",b[e],c,d)}function P(a){return _.isWindow(a)?a:9===a.nodeType&&a.defaultView}var Q=[],R=Q.slice,S=Q.concat,T=Q.push,U=Q.indexOf,V={},W=V.toString,X=V.hasOwnProperty,Y={},Z=a.document,$="2.1.4",_=function(a,b){return new _.fn.init(a,b)},aa=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ba=/^-ms-/,ca=/-([\da-z])/gi,da=function(a,b){return b.toUpperCase()};_.fn=_.prototype={jquery:$,constructor:_,selector:"",length:0,toArray:function(){return R.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:R.call(this)},pushStack:function(a){var b=_.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return _.each(this,a,b)},map:function(a){return this.pushStack(_.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(R.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:T,sort:Q.sort,splice:Q.splice},_.extend=_.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||_.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(_.isPlainObject(d)||(e=_.isArray(d)))?(e?(e=!1,f=c&&_.isArray(c)?c:[]):f=c&&_.isPlainObject(c)?c:{},g[b]=_.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},_.extend({expando:"jQuery"+($+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===_.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!_.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"===_.type(a)&&!a.nodeType&&!_.isWindow(a)&&!(a.constructor&&!X.call(a.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?V[W.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;(a=_.trim(a))&&(1===a.indexOf("use strict")?(b=Z.createElement("script"),b.text=a,Z.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ba,"ms-").replace(ca,da)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e=0,f=a.length,g=c(a);if(d){if(g)for(;e<f&&!1!==b.apply(a[e],d);e++);else for(e in a)if(!1===b.apply(a[e],d))break}else if(g)for(;e<f&&!1!==b.call(a[e],e,a[e]);e++);else for(e in a)if(!1===b.call(a[e],e,a[e]))break;return a},trim:function(a){return null==a?"":(a+"").replace(aa,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?_.merge(d,"string"==typeof a?[a]:a):T.call(d,a)),d},inArray:function(a,b,c){return null==b?-1:U.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d=[],e=0,f=a.length,g=!c;e<f;e++)!b(a[e],e)!==g&&d.push(a[e]);return d},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;f<g;f++)null!=(e=b(a[f],f,d))&&i.push(e);else for(f in a)null!=(e=b(a[f],f,d))&&i.push(e);return S.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),_.isFunction(a))return d=R.call(arguments,2),e=function(){return a.apply(b||this,d.concat(R.call(arguments)))},e.guid=a.guid=a.guid||_.guid++,e},now:Date.now,support:Y}),_.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){V["[object "+b+"]"]=b.toLowerCase()});var ea=function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&I){if(11!==h&&(e=sa.exec(a)))if(g=e[1]){if(9===h){if(!(f=b.getElementById(g))||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return $.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&v.getElementsByClassName)return $.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return $.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&void 0!==a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;e<f;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h<e;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;d<e&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,h<d&&s(a.slice(h,d)),d<e&&s(a=a.slice(d)),d<e&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g!==G&&g);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=a[l++];)if(m(k,g,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Y.call(i));r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea=da.replace("w","w#"),fa="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ea+"))|)"+ca+"*\\]",ga=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fa+")*)|.*)\\)|)",ha=new RegExp(ca+"+","g"),ia=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ja=new RegExp("^"+ca+"*,"+ca+"*"),ka=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),la=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da.replace("w","w*")+")"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},xa=function(){F()};try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(ya){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",xa,!1):c.attachEvent&&c.attachEvent("onunload",xa)),I=!y(d),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(d.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!d.getElementsByName||!d.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if(void 0!==b.getElementById&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c=void 0!==a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return void 0!==b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){if(I)return b.getElementsByClassName(a)},K=[],J=[],(v.qsa=ra.test(d.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=d.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ga)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c||(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&M(O,a)?-1:b===d||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;var c,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!f||!h)return a===d?-1:b===d?1:f?-1:h?1:D?aa(D,a)-aa(D,b):0;if(f===h)return g(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},d):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),v.matchesSelector&&I&&(!K||!K.test(c))&&(!J||!J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(ya){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||void 0!==a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return(m-=e)===d||m%d==0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do{if(c=I?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return(c=c.toLowerCase())===a||0===c.indexOf(a+"-")}while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[c<0?c+b:c]}),even:j(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){d&&!(e=ja.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(!(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0]))return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),!(a=d.length&&m(f)))return $.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);_.find=ea,_.expr=ea.selectors,_.expr[":"]=_.expr.pseudos,_.unique=ea.uniqueSort,_.text=ea.getText,_.isXMLDoc=ea.isXML,_.contains=ea.contains;var fa=_.expr.match.needsContext,ga=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ha=/^.[^:#\[\.,]*$/;_.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?_.find.matchesSelector(d,a)?[d]:[]:_.find.matches(a,_.grep(b,function(a){return 1===a.nodeType}))},_.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(_(a).filter(function(){for(b=0;b<c;b++)if(_.contains(e[b],this))return!0}))
;for(b=0;b<c;b++)_.find(a,e[b],d);return d=this.pushStack(c>1?_.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&fa.test(a)?_(a):a||[],!1).length}});var ia,ja=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(_.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(!(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ja.exec(a))||!c[1]&&b)return!b||b.jquery?(b||ia).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof _?b[0]:b,_.merge(this,_.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:Z,!0)),ga.test(c[1])&&_.isPlainObject(b))for(c in b)_.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=Z.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=Z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):_.isFunction(a)?void 0!==ia.ready?ia.ready(a):a(_):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),_.makeArray(a,this))}).prototype=_.fn,ia=_(Z);var ka=/^(?:parents|prev(?:Until|All))/,la={children:!0,contents:!0,next:!0,prev:!0};_.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&_(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),_.fn.extend({has:function(a){var b=_(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(_.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=fa.test(a)||"string"!=typeof a?_(a,b||this.context):0;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&_.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?_.unique(f):f)},index:function(a){return a?"string"==typeof a?U.call(_(a),this[0]):U.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(_.unique(_.merge(this.get(),_(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),_.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return _.dir(a,"parentNode")},parentsUntil:function(a,b,c){return _.dir(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return _.dir(a,"nextSibling")},prevAll:function(a){return _.dir(a,"previousSibling")},nextUntil:function(a,b,c){return _.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return _.dir(a,"previousSibling",c)},siblings:function(a){return _.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return _.sibling(a.firstChild)},contents:function(a){return a.contentDocument||_.merge([],a.childNodes)}},function(a,b){_.fn[a]=function(c,d){var e=_.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=_.filter(d,e)),this.length>1&&(la[a]||_.unique(e),ka.test(a)&&e.reverse()),this.pushStack(e)}});var ma=/\S+/g,na={};_.Callbacks=function(a){a="string"==typeof a?na[a]||f(a):_.extend({},a);var b,c,d,e,g,h,i=[],j=!a.once&&[],k=function(f){for(b=a.memory&&f,c=!0,h=e||0,e=0,g=i.length,d=!0;i&&h<g;h++)if(!1===i[h].apply(f[0],f[1])&&a.stopOnFalse){b=!1;break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function b(c){_.each(c,function(c,d){var e=_.type(d);"function"===e?a.unique&&l.has(d)||i.push(d):d&&d.length&&"string"!==e&&b(d)})}(arguments),d?g=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&_.each(arguments,function(a,b){for(var c;(c=_.inArray(b,i,c))>-1;)i.splice(c,1),d&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return a?_.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],g=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!c}};return l},_.extend({Deferred:function(a){var b=[["resolve","done",_.Callbacks("once memory"),"resolved"],["reject","fail",_.Callbacks("once memory"),"rejected"],["notify","progress",_.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return _.Deferred(function(c){_.each(b,function(b,f){var g=_.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&_.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?_.extend(a,d):d}},e={};return d.pipe=d.then,_.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=R.call(arguments),g=f.length,h=1!==g||a&&_.isFunction(a.promise)?g:0,i=1===h?a:_.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?R.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e<g;e++)f[e]&&_.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}});var oa;_.fn.ready=function(a){return _.ready.promise().done(a),this},_.extend({isReady:!1,readyWait:1,holdReady:function(a){a?_.readyWait++:_.ready(!0)},ready:function(a){(!0===a?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==a&&--_.readyWait>0||(oa.resolveWith(Z,[_]),_.fn.triggerHandler&&(_(Z).triggerHandler("ready"),_(Z).off("ready"))))}}),_.ready.promise=function(b){return oa||(oa=_.Deferred(),"complete"===Z.readyState?setTimeout(_.ready):(Z.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1))),oa.promise(b)},_.ready.promise();var pa=_.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===_.type(c)){e=!0;for(h in c)_.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,_.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(_(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};_.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType},h.uid=1,h.accepts=_.acceptData,h.prototype={key:function(a){if(!h.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=h.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,_.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(_.isEmptyObject(f))_.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,_.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{_.isArray(b)?d=b.concat(b.map(_.camelCase)):(e=_.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(ma)||[])),c=d.length;for(;c--;)delete g[d[c]]}},hasData:function(a){return!_.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var qa=new h,ra=new h,sa=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ta=/([A-Z])/g;_.extend({hasData:function(a){return ra.hasData(a)||qa.hasData(a)},data:function(a,b,c){return ra.access(a,b,c)},removeData:function(a,b){ra.remove(a,b)},_data:function(a,b,c){return qa.access(a,b,c)},_removeData:function(a,b){qa.remove(a,b)}}),_.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=ra.get(f),1===f.nodeType&&!qa.get(f,"hasDataAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=_.camelCase(d.slice(5)),i(f,d,e[d])));qa.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){ra.set(this,a)}):pa(this,function(b){var c,d=_.camelCase(a);if(f&&void 0===b){if(void 0!==(c=ra.get(f,a)))return c;if(void 0!==(c=ra.get(f,d)))return c;if(void 0!==(c=i(f,d,void 0)))return c}else this.each(function(){var c=ra.get(this,d);ra.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&ra.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){ra.remove(this,a)})}}),_.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=qa.get(a,b),c&&(!d||_.isArray(c)?d=qa.access(a,b,_.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=_.queue(a,b),d=c.length,e=c.shift(),f=_._queueHooks(a,b),g=function(){_.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return qa.get(a,c)||qa.access(a,c,{empty:_.Callbacks("once memory").add(function(){qa.remove(a,[b+"queue",c])})})}}),_.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?_.queue(this[0],a):void 0===b?this:this.each(function(){var c=_.queue(this,a,b);_._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&_.dequeue(this,a)})},dequeue:function(a){return this.each(function(){_.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=_.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)(c=qa.get(f[g],a+"queueHooks"))&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var ua=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,va=["Top","Right","Bottom","Left"],wa=function(a,b){return a=b||a,"none"===_.css(a,"display")||!_.contains(a.ownerDocument,a)},xa=/^(?:checkbox|radio)$/i;!function(){var a=Z.createDocumentFragment(),b=a.appendChild(Z.createElement("div")),c=Z.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),Y.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",Y.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ya="undefined";Y.focusinBubbles="onfocusin"in a;var za=/^key/,Aa=/^(?:mouse|pointer|contextmenu)|click/,Ba=/^(?:focusinfocus|focusoutblur)$/,Ca=/^([^.]*)(?:\.(.+)|)$/;_.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=qa.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=_.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return typeof _!==ya&&_.event.triggered!==b.type?_.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(ma)||[""],j=b.length;j--;)h=Ca.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=_.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=_.event.special[n]||{},k=_.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&_.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&!1!==l.setup.call(a,d,o,g)||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),_.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=qa.hasData(a)&&qa.get(a);if(q&&(i=q.events)){for(b=(b||"").match(ma)||[""],j=b.length;j--;)if(h=Ca.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=_.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&!1!==l.teardown.call(a,o,q.handle)||_.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)_.event.remove(a,n+b[j],c,d,!0);_.isEmptyObject(i)&&(delete q.handle,qa.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||Z],n=X.call(b,"type")?b.type:b,o=X.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||Z,3!==d.nodeType&&8!==d.nodeType&&!Ba.test(n+_.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,b=b[_.expando]?b:new _.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:_.makeArray(c,[b]),l=_.event.special[n]||{},e||!l.trigger||!1!==l.trigger.apply(d,c))){if(!e&&!l.noBubble&&!_.isWindow(d)){for(i=l.delegateType||n,Ba.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||Z)&&m.push(h.defaultView||h.parentWindow||a)}for(f=0;(g=m[f++])&&!b.isPropagationStopped();)b.type=f>1?i:l.bindType||n,k=(qa.get(g,"events")||{})[b.type]&&qa.get(g,"handle"),k&&k.apply(g,c),(k=j&&g[j])&&k.apply&&_.acceptData(g)&&(b.result=k.apply(g,c),!1===b.result&&b.preventDefault());return b.type=n,e||b.isDefaultPrevented()||l._default&&!1!==l._default.apply(m.pop(),c)||!_.acceptData(d)||j&&_.isFunction(d[n])&&!_.isWindow(d)&&(h=d[j],h&&(d[j]=null),_.event.triggered=n,d[n](),_.event.triggered=void 0,h&&(d[j]=h)),b.result}},dispatch:function(a){a=_.event.fix(a);var b,c,d,e,f,g=[],h=R.call(arguments),i=(qa.get(this,"events")||{})[a.type]||[],j=_.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||!1!==j.preDispatch.call(this,a)){for(g=_.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(f.namespace)||(a.handleObj=f,a.data=f.data,void 0!==(d=((_.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h))&&!1===(a.result=d)&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(!0!==i.disabled||"click"!==a.type){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?_(e,this).index(i)>=0:_.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||Z,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[_.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Aa.test(e)?this.mouseHooks:za.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new _.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=Z),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==l()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===l()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&_.nodeName(this,"input"))return this.click(),!1},_default:function(a){return _.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=_.extend(new _.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?_.event.trigger(e,null,b):_.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},_.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},_.Event=function(a,b){if(!(this instanceof _.Event))return new _.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&!1===a.returnValue?j:k):this.type=a,b&&_.extend(this,b),this.timeStamp=a&&a.timeStamp||_.now(),this[_.expando]=!0},_.Event.prototype={isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=j,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=j,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=j,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){_.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||_.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),Y.focusinBubbles||_.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){_.event.simulate(b,a.target,_.event.fix(a),!0)};_.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=qa.access(d,b);e||d.addEventListener(a,c,!0),qa.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=qa.access(d,b)-1;e?qa.access(d,b,e):(d.removeEventListener(a,c,!0),qa.remove(d,b))}}}),_.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),!1===d)d=k;else if(!d)return this;return 1===e&&(f=d,d=function(a){return _().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=_.guid++)),this.each(function(){_.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,_(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return!1!==b&&"function"!=typeof b||(c=b,b=void 0),!1===c&&(c=k),this.each(function(){_.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){_.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return _.event.trigger(a,b,c,!0)}});var Da=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ea=/<([\w:]+)/,Fa=/<|&#?\w+;/,Ga=/<(?:script|style|link)/i,Ha=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=/^$|\/(?:java|ecma)script/i,Ja=/^true\/(.*)/,Ka=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,La={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>","</tr></tbody></table>"],_default:[0,"",""]};La.optgroup=La.option,La.tbody=La.tfoot=La.colgroup=La.caption=La.thead,La.th=La.td,_.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=_.contains(a.ownerDocument,a);if(!(Y.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||_.isXMLDoc(a)))for(g=r(h),f=r(a),d=0,e=f.length;d<e;d++)s(f[d],g[d]);if(b)if(c)for(f=f||r(a),g=g||r(h),d=0,e=f.length;d<e;d++)q(f[d],g[d]);else q(a,h);return g=r(h,"script"),g.length>0&&p(g,!i&&r(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;m<n;m++)if((e=a[m])||0===e)if("object"===_.type(e))_.merge(l,e.nodeType?[e]:e);else if(Fa.test(e)){for(f=f||k.appendChild(b.createElement("div")),g=(Ea.exec(e)||["",""])[1].toLowerCase(),h=La[g]||La._default,f.innerHTML=h[1]+e.replace(Da,"<$1></$2>")+h[2],j=h[0];j--;)f=f.lastChild;_.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));for(k.textContent="",m=0;e=l[m++];)if((!d||-1===_.inArray(e,d))&&(i=_.contains(e.ownerDocument,e),f=r(k.appendChild(e),"script"),i&&p(f),c))for(j=0;e=f[j++];)Ia.test(e.type||"")&&c.push(e);return k},cleanData:function(a){for(var b,c,d,e,f=_.event.special,g=0;void 0!==(c=a[g]);g++){if(_.acceptData(c)&&(e=c[qa.expando])&&(b=qa.cache[e])){if(b.events)for(d in b.events)f[d]?_.event.remove(c,d):_.removeEvent(c,d,b.handle);qa.cache[e]&&delete qa.cache[e]}delete ra.cache[c[ra.expando]]}}}),_.fn.extend({text:function(a){return pa(this,function(a){return void 0===a?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){m(this,a).appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=m(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?_.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||_.cleanData(r(c)),c.parentNode&&(b&&_.contains(c.ownerDocument,c)&&p(r(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(_.cleanData(r(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return _.clone(this,a,b)})},html:function(a){return pa(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Ga.test(a)&&!La[(Ea.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Da,"<$1></$2>");try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(_.cleanData(r(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,_.cleanData(r(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=S.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],p=_.isFunction(m);if(p||j>1&&"string"==typeof m&&!Y.checkClone&&Ha.test(m))return this.each(function(c){var d=k.eq(c);p&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(c=_.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(e=_.map(r(c,"script"),n),f=e.length;i<j;i++)g=c,i!==l&&(g=_.clone(g,!0,!0),f&&_.merge(e,r(g,"script"))),b.call(this[i],g,i);if(f)for(h=e[e.length-1].ownerDocument,_.map(e,o),i=0;i<f;i++)g=e[i],Ia.test(g.type||"")&&!qa.access(g,"globalEval")&&_.contains(h,g)&&(g.src?_._evalUrl&&_._evalUrl(g.src):_.globalEval(g.textContent.replace(Ka,"")))}return this}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){_.fn[a]=function(a){for(var c,d=[],e=_(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),_(e[g])[b](c),T.apply(d,c.get());return this.pushStack(d)}});var Ma,Na={},Oa=/^margin/,Pa=new RegExp("^("+ua+")(?!px)[a-z%]+$","i"),Qa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};!function(){function b(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",g.innerHTML="",e.appendChild(f);var b=a.getComputedStyle(g,null);c="1%"!==b.top,d="4px"===b.width,e.removeChild(f)}var c,d,e=Z.documentElement,f=Z.createElement("div"),g=Z.createElement("div");g.style&&(g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",Y.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",f.appendChild(g),a.getComputedStyle&&_.extend(Y,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return null==d&&b(),d},reliableMarginRight:function(){var b,c=g.appendChild(Z.createElement("div"));return c.style.cssText=g.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.removeChild(c),b}}))}(),_.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ra=/^(none|table(?!-c[ea]).+)/,Sa=new RegExp("^("+ua+")(.*)$","i"),Ta=new RegExp("^([+-])=("+ua+")","i"),Ua={position:"absolute",visibility:"hidden",display:"block"},Va={letterSpacing:"0",fontWeight:"400"},Wa=["Webkit","O","Moz","ms"];_.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=v(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=_.camelCase(b),i=a.style;if(b=_.cssProps[h]||(_.cssProps[h]=x(i,h)),g=_.cssHooks[b]||_.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];f=typeof c,"string"===f&&(e=Ta.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(_.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||_.cssNumber[h]||(c+="px"),Y.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c))}},css:function(a,b,c,d){var e,f,g,h=_.camelCase(b);return b=_.cssProps[h]||(_.cssProps[h]=x(a.style,h)),g=_.cssHooks[b]||_.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=v(a,b,d)),"normal"===e&&b in Va&&(e=Va[b]),""===c||c?(f=parseFloat(e),!0===c||_.isNumeric(f)?f||0:e):e}}),_.each(["height","width"],function(a,b){_.cssHooks[b]={get:function(a,c,d){if(c)return Ra.test(_.css(a,"display"))&&0===a.offsetWidth?_.swap(a,Ua,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&Qa(a);return y(a,c,d?z(a,b,d,"border-box"===_.css(a,"boxSizing",!1,e),e):0)}}}),_.cssHooks.marginRight=w(Y.reliableMarginRight,function(a,b){if(b)return _.swap(a,{display:"inline-block"},v,[a,"marginRight"])}),_.each({margin:"",padding:"",border:"Width"},function(a,b){_.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+va[d]+b]=f[d]||f[d-2]||f[0];return e}},Oa.test(a)||(_.cssHooks[a+b].set=y)}),_.fn.extend({css:function(a,b){return pa(this,function(a,b,c){var d,e,f={},g=0;if(_.isArray(b)){for(d=Qa(a),e=b.length;g<e;g++)f[b[g]]=_.css(a,b[g],!1,d);return f}return void 0!==c?_.style(a,b,c):_.css(a,b)},a,b,arguments.length>1)},show:function(){return B(this,!0)},hide:function(){return B(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){wa(this)?_(this).show():_(this).hide()})}}),_.Tween=C,C.prototype={constructor:C,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(_.cssNumber[c]?"":"px")},cur:function(){var a=C.propHooks[this.prop];return a&&a.get?a.get(this):C.propHooks._default.get(this)},run:function(a){var b,c=C.propHooks[this.prop];return this.options.duration?this.pos=b=_.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):C.propHooks._default.set(this),this}},C.prototype.init.prototype=C.prototype,C.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=_.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){_.fx.step[a.prop]?_.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[_.cssProps[a.prop]]||_.cssHooks[a.prop])?_.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},C.propHooks.scrollTop=C.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},_.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},_.fx=C.prototype.init,_.fx.step={};var Xa,Ya,Za=/^(?:toggle|show|hide)$/,$a=new RegExp("^(?:([+-])=|)("+ua+")([a-z%]*)$","i"),_a=/queueHooks$/,ab=[G],bb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=$a.exec(b),f=e&&e[3]||(_.cssNumber[a]?"":"px"),g=(_.cssNumber[a]||"px"!==f&&+d)&&$a.exec(_.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do{h=h||".5",g/=h,_.style(c.elem,a,g+f)}while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};_.Animation=_.extend(I,{tweener:function(a,b){_.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d<e;d++)c=a[d],bb[c]=bb[c]||[],bb[c].unshift(b)},prefilter:function(a,b){b?ab.unshift(a):ab.push(a)}}),_.speed=function(a,b,c){var d=a&&"object"==typeof a?_.extend({},a):{complete:c||!c&&b||_.isFunction(a)&&a,duration:a,easing:c&&b||b&&!_.isFunction(b)&&b};return d.duration=_.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in _.fx.speeds?_.fx.speeds[d.duration]:_.fx.speeds._default,null!=d.queue&&!0!==d.queue||(d.queue="fx"),d.old=d.complete,d.complete=function(){_.isFunction(d.old)&&d.old.call(this),d.queue&&_.dequeue(this,d.queue)},d},_.fn.extend({fadeTo:function(a,b,c,d){return this.filter(wa).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=_.isEmptyObject(a),f=_.speed(b,c,d),g=function(){var b=I(this,_.extend({},a),f);(e||qa.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||!1===f.queue?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&!1!==a&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=_.timers,g=qa.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||_.dequeue(this,a)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var b,c=qa.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=_.timers,g=d?d.length:0;for(c.finish=!0,_.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),
_.each(["toggle","show","hide"],function(a,b){var c=_.fn[b];_.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(E(b,!0),a,d,e)}}),_.each({slideDown:E("show"),slideUp:E("hide"),slideToggle:E("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){_.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),_.timers=[],_.fx.tick=function(){var a,b=0,c=_.timers;for(Xa=_.now();b<c.length;b++)(a=c[b])()||c[b]!==a||c.splice(b--,1);c.length||_.fx.stop(),Xa=void 0},_.fx.timer=function(a){_.timers.push(a),a()?_.fx.start():_.timers.pop()},_.fx.interval=13,_.fx.start=function(){Ya||(Ya=setInterval(_.fx.tick,_.fx.interval))},_.fx.stop=function(){clearInterval(Ya),Ya=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(a,b){return a=_.fx?_.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=Z.createElement("input"),b=Z.createElement("select"),c=b.appendChild(Z.createElement("option"));a.type="checkbox",Y.checkOn=""!==a.value,Y.optSelected=c.selected,b.disabled=!0,Y.optDisabled=!c.disabled,a=Z.createElement("input"),a.value="t",a.type="radio",Y.radioValue="t"===a.value}();var cb,db,eb=_.expr.attrHandle;_.fn.extend({attr:function(a,b){return pa(this,_.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){_.removeAttr(this,a)})}}),_.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===ya?_.prop(a,b,c):(1===f&&_.isXMLDoc(a)||(b=b.toLowerCase(),d=_.attrHooks[b]||(_.expr.match.bool.test(b)?db:cb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=_.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void _.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(ma);if(f&&1===a.nodeType)for(;c=f[e++];)d=_.propFix[c]||c,_.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Y.radioValue&&"radio"===b&&_.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),db={set:function(a,b,c){return!1===b?_.removeAttr(a,c):a.setAttribute(c,c),c}},_.each(_.expr.match.bool.source.match(/\w+/g),function(a,b){var c=eb[b]||_.find.attr;eb[b]=function(a,b,d){var e,f;return d||(f=eb[b],eb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,eb[b]=f),e}});var fb=/^(?:input|select|textarea|button)$/i;_.fn.extend({prop:function(a,b){return pa(this,_.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[_.propFix[a]||a]})}}),_.extend({propFix:{for:"htmlFor",class:"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!_.isXMLDoc(a),f&&(b=_.propFix[b]||b,e=_.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||fb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Y.optSelected||(_.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this});var gb=/[\t\r\n\f]/g;_.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(ma)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(gb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=_.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(ma)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(gb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?_.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):_.isFunction(a)?this.each(function(c){_(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=_(this),f=a.match(ma)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else c!==ya&&"boolean"!==c||(this.className&&qa.set(this,"__className__",this.className),this.className=this.className||!1===a?"":qa.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c<d;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(gb," ").indexOf(b)>=0)return!0;return!1}});var hb=/\r/g;_.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=_.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,_(this).val()):a,null==e?e="":"number"==typeof e?e+="":_.isArray(e)&&(e=_.map(e,function(a){return null==a?"":a+""})),(b=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return(b=_.valHooks[e.type]||_.valHooks[e.nodeName.toLowerCase()])&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(hb,""):null==c?"":c)}}}),_.extend({valHooks:{option:{get:function(a){var b=_.find.attr(a,"value");return null!=b?b:_.trim(_.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&(Y.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!_.nodeName(c.parentNode,"optgroup"))){if(b=_(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=_.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=_.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(a,b){if(_.isArray(b))return a.checked=_.inArray(_(a).val(),b)>=0}},Y.checkOn||(_.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),_.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){_.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),_.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var ib=_.now(),jb=/\?/;_.parseJSON=function(a){return JSON.parse(a+"")},_.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return b&&!b.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+a),b};var kb=/#.*$/,lb=/([?&])_=[^&]*/,mb=/^(.*?):[ \t]*([^\r\n]*)$/gm,nb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ob=/^(?:GET|HEAD)$/,pb=/^\/\//,qb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,rb={},sb={},tb="*/".concat("*"),ub=a.location.href,vb=qb.exec(ub.toLowerCase())||[];_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ub,type:"GET",isLocal:nb.test(vb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":tb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":_.parseJSON,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?L(L(a,_.ajaxSettings),b):L(_.ajaxSettings,a)},ajaxPrefilter:J(rb),ajaxTransport:J(sb),ajax:function(a,b){function c(a,b,c,g){var i,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),d=void 0,f=g||"",v.readyState=a>0?4:0,i=a>=200&&a<300||304===a,c&&(s=M(l,v,c)),s=N(l,s,v,i),i?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(_.lastModified[e]=u),(u=v.getResponseHeader("etag"))&&(_.etag[e]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,i=!r)):(r=w,!a&&w||(w="error",a<0&&(a=0))),v.status=a,v.statusText=(b||w)+"",i?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,j&&n.trigger(i?"ajaxSuccess":"ajaxError",[v,l,i?k:r]),p.fireWith(m,[v,w]),j&&(n.trigger("ajaxComplete",[v,l]),--_.active||_.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=_.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?_(m):_.event,o=_.Deferred(),p=_.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!g)for(g={};b=mb.exec(f);)g[b[1].toLowerCase()]=b[2];b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(t<2)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return d&&d.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||ub)+"").replace(kb,"").replace(pb,vb[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=_.trim(l.dataType||"*").toLowerCase().match(ma)||[""],null==l.crossDomain&&(i=qb.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===vb[1]&&i[2]===vb[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(vb[3]||("http:"===vb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=_.param(l.data,l.traditional)),K(rb,l,b,v),2===t)return v;j=_.event&&l.global,j&&0==_.active++&&_.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!ob.test(l.type),e=l.url,l.hasContent||(l.data&&(e=l.url+=(jb.test(e)?"&":"?")+l.data,delete l.data),!1===l.cache&&(l.url=lb.test(e)?e.replace(lb,"$1_="+ib++):e+(jb.test(e)?"&":"?")+"_="+ib++)),l.ifModified&&(_.lastModified[e]&&v.setRequestHeader("If-Modified-Since",_.lastModified[e]),_.etag[e]&&v.setRequestHeader("If-None-Match",_.etag[e])),(l.data&&l.hasContent&&!1!==l.contentType||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+tb+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)v.setRequestHeader(k,l.headers[k]);if(l.beforeSend&&(!1===l.beforeSend.call(m,v,l)||2===t))return v.abort();u="abort";for(k in{success:1,error:1,complete:1})v[k](l[k]);if(d=K(sb,l,b,v)){v.readyState=1,j&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,d.send(r,c)}catch(w){if(!(t<2))throw w;c(-1,w)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return _.get(a,b,c,"json")},getScript:function(a,b){return _.get(a,void 0,b,"script")}}),_.each(["get","post"],function(a,b){_[b]=function(a,c,d,e){return _.isFunction(c)&&(e=e||d,d=c,c=void 0),_.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),_._evalUrl=function(a){return _.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},_.fn.extend({wrapAll:function(a){var b;return _.isFunction(a)?this.each(function(b){_(this).wrapAll(a.call(this,b))}):(this[0]&&(b=_(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return _.isFunction(a)?this.each(function(b){_(this).wrapInner(a.call(this,b))}):this.each(function(){var b=_(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=_.isFunction(a);return this.each(function(c){_(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){_.nodeName(this,"body")||_(this).replaceWith(this.childNodes)}).end()}}),_.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},_.expr.filters.visible=function(a){return!_.expr.filters.hidden(a)};var wb=/%20/g,xb=/\[\]$/,yb=/\r?\n/g,zb=/^(?:submit|button|image|reset|file)$/i,Ab=/^(?:input|select|textarea|keygen)/i;_.param=function(a,b){var c,d=[],e=function(a,b){b=_.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=_.ajaxSettings&&_.ajaxSettings.traditional),_.isArray(a)||a.jquery&&!_.isPlainObject(a))_.each(a,function(){e(this.name,this.value)});else for(c in a)O(c,a[c],b,e);return d.join("&").replace(wb,"+")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=_.prop(this,"elements");return a?_.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!_(this).is(":disabled")&&Ab.test(this.nodeName)&&!zb.test(a)&&(this.checked||!xa.test(a))}).map(function(a,b){var c=_(this).val();return null==c?null:_.isArray(c)?_.map(c,function(a){return{name:b.name,value:a.replace(yb,"\r\n")}}):{name:b.name,value:c.replace(yb,"\r\n")}}).get()}}),_.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=_.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),Y.cors=!!Eb&&"withCredentials"in Eb,Y.ajax=Eb=!!Eb,_.ajaxTransport(function(a){var b;if(Y.cors||Eb&&!a.crossDomain)return{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return _.globalEval(a),a}}}),_.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),_.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=_("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),Z.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||_.expando+"_"+ib++;return this[a]=!0,a}}),_.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=!1!==b.jsonp&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=_.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):!1!==b.jsonp&&(b.url+=(jb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||_.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&_.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),_.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Z;var d=ga.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=_.buildFragment([a],b,e),e&&e.length&&_(e).remove(),_.merge([],d.childNodes))};var Hb=_.fn.load;_.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=_.trim(a.slice(h)),a=a.slice(0,h)),_.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&_.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?_("<div>").append(_.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){_.fn[b]=function(a){return this.on(b,a)}}),_.expr.filters.animated=function(a){return _.grep(_.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;_.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=_.css(a,"position"),l=_(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=_.css(a,"top"),i=_.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),_.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},_.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){_.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,_.contains(b,d)?(typeof d.getBoundingClientRect!==ya&&(e=d.getBoundingClientRect()),c=P(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===_.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),_.nodeName(a[0],"html")||(d=a.offset()),d.top+=_.css(a[0],"borderTopWidth",!0),d.left+=_.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-_.css(c,"marginTop",!0),left:b.left-d.left-_.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Ib;a&&!_.nodeName(a,"html")&&"static"===_.css(a,"position");)a=a.offsetParent;return a||Ib})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;_.fn[b]=function(e){return pa(this,function(b,e,f){var g=P(b);if(void 0===f)return g?g[c]:b[e];g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f},b,e,arguments.length,null)}}),_.each(["top","left"],function(a,b){_.cssHooks[b]=w(Y.pixelPosition,function(a,c){if(c)return c=v(a,b),Pa.test(c)?_(a).position()[b]+"px":c})}),_.each({Height:"height",Width:"width"},function(a,b){_.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){_.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(!0===d||!0===e?"margin":"border");return pa(this,function(b,c,d){var e;return _.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?_.css(b,c,g):_.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),_.fn.size=function(){return this.length},_.fn.andSelf=_.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return _});var Jb=a.jQuery,Kb=a.$;return _.noConflict=function(b){return a.$===_&&(a.$=Kb),b&&a.jQuery===_&&(a.jQuery=Jb),_},typeof b===ya&&(a.jQuery=a.$=_),_}),function(a,b,c){"use strict";function d(a,b){return b=b||Error,function(){var c,d,e=2,f=arguments,g=f[0],h="["+(a?a+":":"")+g+"] ",i=f[1];for(h+=i.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c=b+e;return c<f.length?ta(f[c]):a}),h+="\nhttp://errors.angularjs.org/1.4.14/"+(a?a+"/":"")+g,d=e,c="?";d<f.length;d++,c="&")h+=c+"p"+(d-e)+"="+encodeURIComponent(ta(f[d]));return new b(h)}}function e(a){if(null==a||C(a))return!1;if(Rd(a)||x(a)||Fd&&a instanceof Fd)return!0;var b="length"in Object(a)&&a.length;return y(b)&&(b>=0&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function f(a,b,c){var d,g;if(a)if(A(a))for(d in a)"prototype"==d||"length"==d||"name"==d||a.hasOwnProperty&&!a.hasOwnProperty(d)||b.call(c,a[d],d,a);else if(Rd(a)||e(a)){var h="object"!=typeof a;for(d=0,g=a.length;d<g;d++)(h||d in a)&&b.call(c,a[d],d,a)}else if(a.forEach&&a.forEach!==f)a.forEach(b,c,a);else if(w(a))for(d in a)b.call(c,a[d],d,a);else if("function"==typeof a.hasOwnProperty)for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a);else for(d in a)Ad.call(a,d)&&b.call(c,a[d],d,a);return a}function g(a,b,c){for(var d=Object.keys(a).sort(),e=0;e<d.length;e++)b.call(c,a[d[e]],d[e]);return d}function h(a){return function(b,c){a(c,b)}}function i(){return++Pd}function j(a,b){b?a.$$hashKey=b:delete a.$$hashKey}function k(a,b,c){for(var d=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(v(g)||A(g))for(var h=Object.keys(g),i=0,l=h.length;i<l;i++){var m=h[i],n=g[m];c&&v(n)?z(n)?a[m]=new Date(n.valueOf()):B(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):K(n)?a[m]=n.clone():(v(a[m])||(a[m]=Rd(n)?[]:{}),k(a[m],[n],!0)):a[m]=n}}return j(a,d),a}function l(a){return k(a,Id.call(arguments,1),!1)}function m(a){return k(a,Id.call(arguments,1),!0)}function n(a){return parseInt(a,10)}function o(a,b){return l(Object.create(a),b)}function p(){}function q(a){return a}function r(a){return function(){return a}}function s(a){return A(a.toString)&&a.toString!==Ld}function t(a){return void 0===a}function u(a){return void 0!==a}function v(a){return null!==a&&"object"==typeof a}function w(a){return null!==a&&"object"==typeof a&&!Md(a)}function x(a){return"string"==typeof a}function y(a){return"number"==typeof a}function z(a){return"[object Date]"===Ld.call(a)}function A(a){return"function"==typeof a}function B(a){return"[object RegExp]"===Ld.call(a)}function C(a){return a&&a.window===a}function D(a){return a&&a.$evalAsync&&a.$watch}function E(a){return"[object File]"===Ld.call(a)}function F(a){return"[object FormData]"===Ld.call(a)}function G(a){return"[object Blob]"===Ld.call(a)}function H(a){return"boolean"==typeof a}function I(a){return a&&A(a.then)}function J(a){return a&&y(a.length)&&Sd.test(Ld.call(a))}function K(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function L(a){var b,c={},d=a.split(",");for(b=0;b<d.length;b++)c[d[b]]=!0;return c}function M(a){return zd(a.nodeName||a[0]&&a[0].nodeName)}function N(a,b){var c=a.indexOf(b);return c>=0&&a.splice(c,1),c}function O(a,b){function c(a,b){var c,e=b.$$hashKey;if(Rd(a))for(var f=0,g=a.length;f<g;f++)b.push(d(a[f]));else if(w(a))for(c in a)b[c]=d(a[c]);else if(a&&"function"==typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&(b[c]=d(a[c]));else for(c in a)Ad.call(a,c)&&(b[c]=d(a[c]));return j(b,e),b}function d(a){if(!v(a))return a;var b=e.indexOf(a);if(-1!==b)return g[b];if(C(a)||D(a))throw Nd("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var d,f=!1;return Rd(a)?(d=[],f=!0):J(a)?d=new a.constructor(a):z(a)?d=new Date(a.getTime()):B(a)?(d=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),d.lastIndex=a.lastIndex):G(a)?d=new a.constructor([a],{type:a.type}):A(a.cloneNode)?d=a.cloneNode(!0):(d=Object.create(Md(a)),f=!0),e.push(a),g.push(d),f?c(a,d):d}var e=[],g=[];if(b){if(J(b))throw Nd("cpta","Can't copy! TypedArray destination cannot be mutated.");if(a===b)throw Nd("cpi","Can't copy! Source and destination are identical.");return Rd(b)?b.length=0:f(b,function(a,c){"$$hashKey"!==c&&delete b[c]}),e.push(a),g.push(b),c(a,b)}return d(a)}function P(a,b){if(Rd(a)){b=b||[];for(var c=0,d=a.length;c<d;c++)b[c]=a[c]}else if(v(a)){b=b||{};for(var e in a)"$"===e.charAt(0)&&"$"===e.charAt(1)||(b[e]=a[e])}return b||a}function Q(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var c,d,e,f=typeof a,g=typeof b;if(f==g&&"object"==f){if(!Rd(a)){if(z(a))return!!z(b)&&Q(a.getTime(),b.getTime());if(B(a))return!!B(b)&&a.toString()==b.toString();if(D(a)||D(b)||C(a)||C(b)||Rd(b)||z(b)||B(b))return!1;e=qa();for(d in a)if("$"!==d.charAt(0)&&!A(a[d])){if(!Q(a[d],b[d]))return!1;e[d]=!0}for(d in b)if(!(d in e)&&"$"!==d.charAt(0)&&u(b[d])&&!A(b[d]))return!1;return!0}if(!Rd(b))return!1;if((c=a.length)==b.length){for(d=0;d<c;d++)if(!Q(a[d],b[d]))return!1;return!0}}return!1}function R(a,b,c){return a.concat(Id.call(b,c))}function S(a,b){return Id.call(a,b||0)}function T(a,b){var c=arguments.length>2?S(arguments,2):[];return!A(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,R(c,arguments,0)):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function U(a,d){var e=d;return"string"==typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?e=c:C(d)?e="$WINDOW":d&&b===d?e="$DOCUMENT":D(d)&&(e="$SCOPE"),e}function V(a,b){return t(a)?c:(y(b)||(b=b?2:null),JSON.stringify(a,U,b))}function W(a){return x(a)?JSON.parse(a):a}function X(a,b){a=a.replace(Xd,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function Y(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function Z(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset();return Y(a,c*(X(b,d)-d))}function $(a){a=Fd(a).clone();try{a.empty()}catch(c){}var b=Fd("<div>").append(a).html();try{return a[0].nodeType===be?zd(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+zd(b)})}catch(c){return zd(b)}}function _(a){try{return decodeURIComponent(a)}catch(b){}}function aa(a){var b={};return f((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=_(d),u(d)&&(e=!u(e)||_(e),Ad.call(b,d)?Rd(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function ba(a){var b=[];return f(a,function(a,c){Rd(a)?f(a,function(a){b.push(da(c,!0)+(!0===a?"":"="+da(a,!0)))}):b.push(da(c,!0)+(!0===a?"":"="+da(a,!0)))}),b.length?b.join("&"):""}function ca(a){return da(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function da(a,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 ea(a,b){var c,d,e=Yd.length;for(d=0;d<e;++d)if(c=Yd[d]+b,x(c=a.getAttribute(c)))return c;return null}function fa(a,b){var c,d,e={};f(Yd,function(b){var e=b+"app";!c&&a.hasAttribute&&a.hasAttribute(e)&&(c=a,d=a.getAttribute(e))}),f(Yd,function(b){var e,f=b+"app";!c&&(e=a.querySelector("["+f.replace(":","\\:")+"]"))&&(c=e,d=e.getAttribute(f))}),c&&(e.strictDi=null!==ea(c,"strict-di"),b(c,d?[d]:[],e))}function ga(c,d,e){v(e)||(e={}),e=l({strictDi:!1},e);var g=function(){if(c=Fd(c),c.injector()){var a=c[0]===b?"document":$(c);throw Nd("btstrpd","App already bootstrapped with this element '{0}'",a.replace(/</,"&lt;").replace(/>/,"&gt;"))}d=d||[],d.unshift(["$provide",function(a){a.value("$rootElement",c)}]),e.debugInfoEnabled&&d.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),d.unshift("ng");var f=bb(d,e.strictDi);return f.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),f},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;if(a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name))return g();a.name=a.name.replace(i,""),Od.resumeBootstrap=function(a){return f(a,function(a){d.push(a)}),g()},A(Od.resumeDeferredBootstrap)&&Od.resumeDeferredBootstrap()}function ha(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ia(a){var b=Od.element(a).injector();if(!b)throw Nd("test","no injector found for element argument to getTestability");return b.get("$$testability")}function ja(a,b){return b=b||"_",a.replace(Zd,function(a,c){return(c?b:"")+a.toLowerCase()})}function ka(){var b;if(!$d){var d=Wd();Gd=t(d)?a.jQuery:d?a[d]:c,Gd&&Gd.fn.on?(Fd=Gd,l(Gd.fn,{scope:ue.scope,isolateScope:ue.isolateScope,controller:ue.controller,injector:ue.injector,inheritedData:ue.inheritedData}),b=Gd.cleanData,Gd.cleanData=function(a){var c;if(Qd)Qd=!1;else for(var d,e=0;null!=(d=a[e]);e++)(c=Gd._data(d,"events"))&&c.$destroy&&Gd(d).triggerHandler("$destroy");b(a)}):Fd=Da,Od.element=Fd,$d=!0}}function la(a,b,c){if(!a)throw Nd("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function ma(a,b,c){return c&&Rd(a)&&(a=a[a.length-1]),la(A(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function na(a,b){if("hasOwnProperty"===a)throw Nd("badname","hasOwnProperty is not a valid {0} name",b)}function oa(a,b,c){if(!b)return a;for(var d,e=b.split("."),f=a,g=e.length,h=0;h<g;h++)d=e[h],a&&(a=(f=a)[d]);return!c&&A(a)?T(f,a):a}function pa(a){for(var b,c=a[0],d=a[a.length-1],e=1;c!==d&&(c=c.nextSibling);e++)(b||a[e]!==c)&&(b||(b=Fd(Id.call(a,0,e))),b.push(c));return b||a}function qa(){return Object.create(null)}function ra(a){function b(a,b,c){return a[b]||(a[b]=c())}var c=d("$injector"),e=d("ng"),f=b(a,"angular",Object);return f.$$minErr=f.$$minErr||d,b(f,"module",function(){var a={};return function(d,f,g){return function(a,b){if("hasOwnProperty"===a)throw e("badname","hasOwnProperty is not a valid {0} name",b)}(d,"module"),f&&a.hasOwnProperty(d)&&(a[d]=null),b(a,d,function(){function a(a,b,c,d){return d||(d=e),function(){return d[c||"push"]([a,b,arguments]),k}}function b(a,b){return function(c,f){return f&&A(f)&&(f.$$moduleName=d),e.push([a,b,arguments]),k}}if(!f)throw c("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",d);var e=[],h=[],i=[],j=a("$injector","invoke","push",h),k={_invokeQueue:e,_configBlocks:h,_runBlocks:i,requires:f,name:d,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"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:j,run:function(a){return i.push(a),this}};return g&&j(g),k})}})}function sa(a){var b=[];return JSON.stringify(a,function(a,c){if(c=U(a,c),v(c)){if(b.indexOf(c)>=0)return"...";b.push(c)}return c})}function ta(a){return"function"==typeof a?a.toString().replace(/ \{[\s\S]*$/,""):t(a)?"undefined":"string"!=typeof a?sa(a):a}function ua(b){l(b,{bootstrap:ga,copy:O,extend:l,merge:m,equals:Q,element:Fd,forEach:f,injector:bb,noop:p,bind:T,toJson:V,fromJson:W,identity:q,isUndefined:t,isDefined:u,isString:x,isFunction:A,isObject:v,isNumber:y,isElement:K,isArray:Rd,version:fe,isDate:z,lowercase:zd,uppercase:Bd,callbacks:{counter:0},getTestability:ia,$$minErr:d,$$csp:Vd,reloadWithDebugInfo:ha}),(Hd=ra(a))("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:tc}),a.provider("$compile",lb).directive({a:zf,input:Sf,textarea:Sf,form:Ef,script:Kg,select:Ng,style:Pg,option:Og,ngBind:Vf,ngBindHtml:Xf,ngBindTemplate:Wf,ngClass:Zf,ngClassEven:_f,ngClassOdd:$f,ngCloak:ag,ngController:bg,ngForm:Ff,ngHide:Eg,ngIf:eg,ngInclude:fg,ngInit:hg,ngNonBindable:vg,ngPluralize:zg,ngRepeat:Ag,ngShow:Dg,ngStyle:Fg,ngSwitch:Gg,ngSwitchWhen:Hg,ngSwitchDefault:Ig,ngOptions:yg,ngTransclude:Jg,ngModel:sg,ngList:ig,ngChange:Yf,pattern:Rg,ngPattern:Rg,required:Qg,ngRequired:Qg,minlength:Tg,ngMinlength:Tg,maxlength:Sg,
ngMaxlength:Sg,ngValue:Uf,ngModelOptions:ug}).directive({ngInclude:gg}).directive(Af).directive(cg),a.provider({$anchorScroll:cb,$animate:Je,$animateCss:Me,$$animateJs:He,$$animateQueue:Ie,$$AnimateRunner:Le,$$animateAsyncRun:Ke,$browser:ib,$cacheFactory:jb,$controller:qb,$document:rb,$exceptionHandler:sb,$filter:Hc,$$forceReflow:Re,$interpolate:Gb,$interval:Hb,$http:Cb,$httpParamSerializer:ub,$httpParamSerializerJQLike:vb,$httpBackend:Eb,$xhrFactory:Db,$location:Vb,$log:Wb,$parse:nc,$rootScope:sc,$q:oc,$$q:pc,$sce:xc,$sceDelegate:wc,$sniffer:yc,$templateCache:kb,$templateRequest:zc,$$testability:Ac,$timeout:Bc,$window:Ec,$$rAF:rc,$$jqLite:Ya,$$HashMap:ye,$$cookieReader:Gc})}])}function va(){return++he}function wa(a){return a.replace(ke,function(a,b,c,d){return d?c.toUpperCase():c}).replace(le,"Moz$1")}function xa(a){return!pe.test(a)}function ya(a){var b=a.nodeType;return b===_d||!b||b===de}function za(a){for(var b in ge[a.ng339])return!0;return!1}function Aa(a,b){var c,d,e,g,h=b.createDocumentFragment(),i=[];if(xa(a))i.push(b.createTextNode(a));else{for(c=c||h.appendChild(b.createElement("div")),d=(qe.exec(a)||["",""])[1].toLowerCase(),e=se[d]||se._default,c.innerHTML=e[1]+a.replace(re,"<$1></$2>")+e[2],g=e[0];g--;)c=c.lastChild;i=R(i,c.childNodes),c=h.firstChild,c.textContent=""}return h.textContent="",h.innerHTML="",f(i,function(a){h.appendChild(a)}),h}function Ba(a,c){c=c||b;var d;return(d=oe.exec(a))?[c.createElement(d[1])]:(d=Aa(a,c))?d.childNodes:[]}function Ca(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function Da(a){if(a instanceof Da)return a;var b;if(x(a)&&(a=Td(a),b=!0),!(this instanceof Da)){if(b&&"<"!=a.charAt(0))throw ne("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Da(a)}b?Na(this,Ba(a)):Na(this,a)}function Ea(a){return a.cloneNode(!0)}function Fa(a,b){if(b||Ha(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;d<e;d++)Ha(c[d])}function Ga(a,b,c,d){if(u(d))throw ne("offargs","jqLite#off() does not support the `selector` argument");var e=Ia(a),g=e&&e.events,h=e&&e.handle;if(h)if(b){var i=function(b){var d=g[b];u(c)&&N(d||[],c),u(c)&&d&&d.length>0||(je(a,b,h),delete g[b])};f(b.split(" "),function(a){i(a),me[a]&&i(me[a])})}else for(b in g)"$destroy"!==b&&je(a,b,h),delete g[b]}function Ha(a,b){var d=a.ng339,e=d&&ge[d];if(e){if(b)return void delete e.data[b];e.handle&&(e.events.$destroy&&e.handle({},"$destroy"),Ga(a)),delete ge[d],a.ng339=c}}function Ia(a,b){var d=a.ng339,e=d&&ge[d];return b&&!e&&(a.ng339=d=va(),e=ge[d]={events:{},data:{},handle:c}),e}function Ja(a,b,c){if(ya(a)){var d=u(c),e=!d&&b&&!v(b),f=!b,g=Ia(a,!e),h=g&&g.data;if(d)h[b]=c;else{if(f)return h;if(e)return h&&h[b];l(h,b)}}}function Ka(a,b){return!!a.getAttribute&&(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1}function La(a,b){b&&a.setAttribute&&f(b.split(" "),function(b){a.setAttribute("class",Td((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Td(b)+" "," ")))})}function Ma(a,b){if(b&&a.setAttribute){var c=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");f(b.split(" "),function(a){a=Td(a),-1===c.indexOf(" "+a+" ")&&(c+=a+" ")}),a.setAttribute("class",Td(c))}}function Na(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var c=b.length;if("number"==typeof c&&b.window!==b){if(c)for(var d=0;d<c;d++)a[a.length++]=b[d]}else a[a.length++]=b}}function Oa(a,b){return Pa(a,"$"+(b||"ngController")+"Controller")}function Pa(a,b,c){a.nodeType==de&&(a=a.documentElement);for(var d=Rd(b)?b:[b];a;){for(var e=0,f=d.length;e<f;e++)if(u(c=Fd.data(a,d[e])))return c;a=a.parentNode||a.nodeType===ee&&a.host}}function Qa(a){for(Fa(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Ra(a,b){b||Fa(a);var c=a.parentNode;c&&c.removeChild(a)}function Sa(b,c){c=c||a,"complete"===c.document.readyState?c.setTimeout(b):Fd(c).on("load",b)}function Ta(a,b){var c=ve[b.toLowerCase()];return c&&we[M(a)]&&c}function Ua(a){return xe[a]}function Va(a,b){var c=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var e=b[d||c.type],f=e?e.length:0;if(f){if(t(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0,c.stopPropagation&&c.stopPropagation(),g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var h=e.specialHandlerWrapper||Wa;f>1&&(e=P(e));for(var i=0;i<f;i++)c.isImmediatePropagationStopped()||h(a,c,e[i])}};return c.elem=a,c}function Wa(a,b,c){c.call(a,b)}function Xa(a,b,c){var d=b.relatedTarget;d&&(d===a||te.call(a,d))||c.call(a,b)}function Ya(){this.$get=function(){return l(Da,{hasClass:function(a,b){return a.attr&&(a=a[0]),Ka(a,b)},addClass:function(a,b){return a.attr&&(a=a[0]),Ma(a,b)},removeClass:function(a,b){return a.attr&&(a=a[0]),La(a,b)}})}}function Za(a,b){var c=a&&a.$$hashKey;if(c)return"function"==typeof c&&(c=a.$$hashKey()),c;var d=typeof a;return c="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||i)():d+":"+a}function $a(a,b){if(b){var c=0;this.nextUid=function(){return++c}}f(a,this.put,this)}function _a(a){var b=a.toString().replace(Ce,""),c=b.match(ze);return c?"function("+(c[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function ab(a,b,c){var d,e,g,h;if("function"==typeof a){if(!(d=a.$inject)){if(d=[],a.length){if(b)throw x(c)&&c||(c=a.name||_a(a)),De("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",c);e=a.toString().replace(Ce,""),g=e.match(ze),f(g[1].split(Ae),function(a){a.replace(Be,function(a,b,c){d.push(c)})})}a.$inject=d}}else Rd(a)?(h=a.length-1,ma(a[h],"fn"),d=a.slice(0,h)):ma(a,"fn",!0);return d}function bb(a,b){function d(a){return function(b,c){if(!v(b))return a(b,c);f(b,h(a))}}function e(a,b){if(na(a,"service"),(A(b)||Rd(b))&&(b=y.instantiate(b)),!b.$get)throw De("pget","Provider '{0}' must define $get factory method.",a);return w[a+q]=b}function g(a,b){return function(){var c=B.invoke(b,this);if(t(c))throw De("undef","Provider '{0}' must return a value from $get factory method.",a);return c}}function i(a,b,c){return e(a,{$get:!1!==c?g(a,b):b})}function j(a,b){return i(a,["$injector",function(a){return a.instantiate(b)}])}function k(a,b){return i(a,r(b),!1)}function l(a,b){na(a,"constant"),w[a]=b,z[a]=b}function m(a,b){var c=y.get(a+q),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}function n(a){la(t(a)||Rd(a),"modulesToLoad","not an array");var b,c=[];return f(a,function(a){function d(a){var b,c;for(b=0,c=a.length;b<c;b++){var d=a[b],e=y.get(d[0]);e[d[1]].apply(e,d[2])}}if(!u.get(a)){u.put(a,!0);try{x(a)?(b=Hd(a),c=c.concat(n(b.requires)).concat(b._runBlocks),d(b._invokeQueue),d(b._configBlocks)):A(a)?c.push(y.invoke(a)):Rd(a)?c.push(y.invoke(a)):ma(a,"module")}catch(e){throw Rd(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),De("modulerr","Failed to instantiate module {0} due to:\n{1}",a,e.stack||e.message||e)}}}),c}function o(a,c){function d(b,d){if(a.hasOwnProperty(b)){if(a[b]===p)throw De("cdep","Circular dependency found: {0}",b+" <- "+s.join(" <- "));return a[b]}try{return s.unshift(b),a[b]=p,a[b]=c(b,d)}catch(e){throw a[b]===p&&delete a[b],e}finally{s.shift()}}function e(a,c,e,f){"string"==typeof e&&(f=e,e=null);var g,h,i,j=[],k=bb.$$annotate(a,b,f);for(h=0,g=k.length;h<g;h++){if("string"!=typeof(i=k[h]))throw De("itkn","Incorrect injection token! Expected service name as string, got {0}",i);j.push(e&&e.hasOwnProperty(i)?e[i]:d(i,f))}return Rd(a)&&(a=a[g]),a.apply(c,j)}function f(a,b,c){var d=Object.create((Rd(a)?a[a.length-1]:a).prototype||null),f=e(a,d,b,c);return v(f)||A(f)?f:d}return{invoke:e,instantiate:f,get:d,annotate:bb.$$annotate,has:function(b){return w.hasOwnProperty(b+q)||a.hasOwnProperty(b)}}}b=!0===b;var p={},q="Provider",s=[],u=new $a([],!0),w={$provide:{provider:d(e),factory:d(i),service:d(j),value:d(k),constant:d(l),decorator:m}},y=w.$injector=o(w,function(a,b){throw Od.isString(b)&&s.push(b),De("unpr","Unknown provider: {0}",s.join(" <- "))}),z={},B=z.$injector=o(z,function(a,b){var d=y.get(a+q,b);return B.invoke(d.$get,d,c,a)});return f(n(a),function(a){a&&B.invoke(a)}),B}function cb(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function e(a){var b=null;return Array.prototype.some.call(a,function(a){if("a"===M(a))return b=a,!0}),b}function f(){var a=h.yOffset;if(A(a))a=a();else if(K(a)){var c=a[0],d=b.getComputedStyle(c);a="fixed"!==d.position?0:c.getBoundingClientRect().bottom}else y(a)||(a=0);return a}function g(a){if(a){a.scrollIntoView();var c=f();if(c){var d=a.getBoundingClientRect().top;b.scrollBy(0,d-c)}}else b.scrollTo(0,0)}function h(a){a=x(a)?a:c.hash();var b;a?(b=i.getElementById(a))?g(b):(b=e(i.getElementsByName(a)))?g(b):"top"===a&&g(null):g(null)}var i=b.document;return a&&d.$watch(function(){return c.hash()},function(a,b){a===b&&""===a||Sa(function(){d.$evalAsync(h)})}),h}]}function db(a,b){return a||b?a?b?(Rd(a)&&(a=a.join(" ")),Rd(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function eb(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.nodeType===Fe)return c}}function fb(a){x(a)&&(a=a.split(" "));var b=qa();return f(a,function(a){a.length&&(b[a]=!0)}),b}function gb(a){return v(a)?a:{}}function hb(a,b,c,d){function e(a){try{a.apply(null,S(arguments,1))}finally{if(0===--s)for(;u.length;)try{u.pop()()}catch(b){c.error(b)}}}function g(a){var b=a.indexOf("#");return-1===b?"":a.substr(b)}function h(){z=null,j(),k()}function i(){try{return n.state}catch(a){}}function j(){v=i(),v=t(v)?null:v,Q(v,C)&&(v=C),C=v}function k(){x===l.url()&&w===v||(x=l.url(),w=v,f(A,function(a){a(l.url(),v)}))}var l=this,m=(b[0],a.location),n=a.history,o=a.setTimeout,q=a.clearTimeout,r={};l.isMock=!1;var s=0,u=[];l.$$completeOutstandingRequest=e,l.$$incOutstandingRequestCount=function(){s++},l.notifyWhenNoOutstandingRequests=function(a){0===s?a():u.push(a)};var v,w,x=m.href,y=b.find("base"),z=null;j(),w=v,l.url=function(b,c,e){if(t(e)&&(e=null),m!==a.location&&(m=a.location),n!==a.history&&(n=a.history),b){var f=w===e;if(x===b&&(!d.history||f))return l;var h=x&&Mb(x)===Mb(b);return x=b,w=e,!d.history||h&&f?(h&&!z||(z=b),c?m.replace(b):h?m.hash=g(b):m.href=b,m.href!==b&&(z=b)):(n[c?"replaceState":"pushState"](e,"",b),j(),w=v),l}return z||m.href.replace(/%27/g,"'")},l.state=function(){return v};var A=[],B=!1,C=null;l.onUrlChange=function(b){return B||(d.history&&Fd(a).on("popstate",h),Fd(a).on("hashchange",h),B=!0),A.push(b),b},l.$$applicationDestroyed=function(){Fd(a).off("hashchange popstate",h)},l.$$checkUrlChange=k,l.baseHref=function(){var a=y.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""},l.defer=function(a,b){var c;return s++,c=o(function(){delete r[c],e(a)},b||0),r[c]=!0,c},l.defer.cancel=function(a){return!!r[a]&&(delete r[a],q(a),e(p),!0)}}function ib(){this.$get=["$window","$log","$sniffer","$document",function(a,b,c,d){return new hb(a,d,b,c)}]}function jb(){this.$get=function(){function a(a,c){function e(a){a!=m&&(n?n==a&&(n=a.n):n=a,f(a.n,a.p),f(a,m),m=a,m.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw d("$cacheFactory")("iid","CacheId '{0}' is already taken!",a);var g=0,h=l({},c,{id:a}),i=qa(),j=c&&c.capacity||Number.MAX_VALUE,k=qa(),m=null,n=null;return b[a]={put:function(a,b){if(!t(b)){if(j<Number.MAX_VALUE){e(k[a]||(k[a]={key:a}))}return a in i||g++,i[a]=b,g>j&&this.remove(n.key),b}},get:function(a){if(j<Number.MAX_VALUE){var b=k[a];if(!b)return;e(b)}return i[a]},remove:function(a){if(j<Number.MAX_VALUE){var b=k[a];if(!b)return;b==m&&(m=b.p),b==n&&(n=b.n),f(b.n,b.p),delete k[a]}a in i&&(delete i[a],g--)},removeAll:function(){i=qa(),g=0,k=qa(),m=n=null},destroy:function(){i=null,h=null,k=null,delete b[a]},info:function(){return l({},h,{size:g})}}}var b={};return a.info=function(){var a={};return f(b,function(b,c){a[c]=b.info()}),a},a.get=function(a){return b[a]},a}}function kb(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function lb(a,d){function e(a,b,c){var d=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,e=qa();return f(a,function(a,f){if(a in z)return void(e[f]=z[a]);var g=a.match(d);if(!g)throw Ne("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f},g[4]&&(z[a]=e[f])}),e}function g(a,b){var c={isolateScope:null,bindToController:null};if(v(a.scope)&&(!0===a.bindToController?(c.bindToController=e(a.scope,b,!0),c.isolateScope={}):c.isolateScope=e(a.scope,b,!1)),v(a.bindToController)&&(c.bindToController=e(a.bindToController,b,!0)),v(c.bindToController)){var d=a.controller,f=a.controllerAs;if(!d)throw Ne("noctrl","Cannot bind to controller without directive '{0}'s controller.",b);if(!pb(d,f))throw Ne("noident","Cannot bind to controller without identifier for directive '{0}'.",b)}return c}function i(a){var b=a.charAt(0);if(!b||b!==zd(b))throw Ne("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",a);if(a!==a.trim())throw Ne("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",a)}var j={},k="Directive",m=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,n=/(([\w\-]+)(?:\:([^;]+))?;?)/,s=L("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,y=/^(on[a-z]+|formaction)$/,z=qa();this.directive=function b(c,d){return na(c,"directive"),x(c)?(i(c),la(d,"directiveFactory"),j.hasOwnProperty(c)||(j[c]=[],a.factory(c+k,["$injector","$exceptionHandler",function(a,b){var d=[];return f(j[c],function(e,f){try{var g=a.invoke(e);A(g)?g={compile:r(g)}:!g.compile&&g.link&&(g.compile=r(g.link)),g.priority=g.priority||0,g.index=f,g.name=g.name||c,g.require=g.require||g.controller&&g.name,g.restrict=g.restrict||"EA",g.$$moduleName=e.$$moduleName,d.push(g)}catch(h){b(h)}}),d}])),j[c].push(d)):f(c,h(b)),this},this.aHrefSanitizationWhitelist=function(a){return u(a)?(d.aHrefSanitizationWhitelist(a),this):d.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(a){return u(a)?(d.imgSrcSanitizationWhitelist(a),this):d.imgSrcSanitizationWhitelist()};var B=!0;this.debugInfoEnabled=function(a){return u(a)?(B=a,this):B},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(a,d,e,h,i,r,z,C,E,F){function G(a,b){try{a.addClass(b)}catch(c){}}function I(a,c,d,e,f){a instanceof Fd||(a=Fd(a));for(var g=/\S+/,h=0,i=a.length;h<i;h++){var j=a[h];j.nodeType===be&&j.nodeValue.match(g)&&Ca(j,a[h]=b.createElement("span"))}var k=K(a,c,a,d,e,f);I.$$addScopeClass(a);var l=null;return function(b,c,d){la(b,"scope"),f&&f.needsNewScope&&(b=b.$parent.$new()),d=d||{};var e=d.parentBoundTranscludeFn,g=d.transcludeControllers,h=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude),l||(l=J(h));var i;if(i="html"!==l?Fd(ba(l,Fd("<div>").append(a).html())):c?ue.clone.call(a):a,g)for(var j in g)i.data("$"+j+"Controller",g[j].instance);return I.$$addScopeInfo(i,b),c&&c(i,b),k&&k(b,i,i,e),i}}function J(a){var b=a&&a[0];return b&&"foreignobject"!==M(b)&&b.toString().match(/SVG/)?"svg":"html"}function K(a,b,d,e,f,g){function h(a,d,e,f){var g,h,i,j,k,l,m,n,q;if(o){var r=d.length;for(q=new Array(r),k=0;k<p.length;k+=3)m=p[k],q[m]=d[m]}else q=d;for(k=0,l=p.length;k<l;)i=q[p[k++]],g=p[k++],h=p[k++],g?(g.scope?(j=a.$new(),I.$$addScopeInfo(Fd(i),j)):j=a,n=g.transcludeOnThisElement?L(a,g.transclude,f):!g.templateOnThisElement&&f?f:!f&&b?L(a,b):null,g(h,j,i,e,n)):h&&h(a,i.childNodes,c,f)}for(var i,j,k,l,m,n,o,p=[],q=0;q<a.length;q++)i=new ia,j=O(a[q],[],i,0===q?e:c,f),k=j.length?T(j,a[q],i,b,d,null,[],[],g):null,k&&k.scope&&I.$$addScopeClass(i.$$element),m=k&&k.terminal||!(l=a[q].childNodes)||!l.length?null:K(l,k?(k.transcludeOnThisElement||!k.templateOnThisElement)&&k.transclude:b),(k||m)&&(p.push(q,k,m),n=!0,o=o||k),g=null;return n?h:null}function L(a,b,c){return function(d,e,f,g,h){return d||(d=a.$new(!1,h),d.$$transcluded=!0),b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function O(a,b,c,d,e){var f,g,h,i=a.nodeType,j=c.$attr;switch(i){case _d:g=M(a),V(b,mb(g),"E",d,e);for(var k,l,o,p,q,r,s=a.attributes,t=0,u=s&&s.length;t<u;t++){var w=!1,y=!1;k=s[t],l=k.name,q=Td(k.value),p=mb(l),(r=oa.test(p))&&(l=l.replace(Oe,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()}));var z=p.match(pa);z&&W(z[1])&&(w=l,y=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6)),o=mb(l.toLowerCase()),j[o]=l,!r&&c.hasOwnProperty(o)||(c[o]=q,Ta(a,o)&&(c[o]=!0)),da(a,b,q,o,r),V(b,o,"A",d,e,w,y)}if("input"===g&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off"),h=a.className,v(h)&&(h=h.animVal),x(h)&&""!==h)for(;f=n.exec(h);)o=mb(f[2]),V(b,o,"C",d,e)&&(c[o]=Td(f[3])),h=h.substr(f.index+f[0].length);break;case be:if(11===Ed)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===be;)a.nodeValue=a.nodeValue+a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);aa(b,a.nodeValue);break;case ce:try{f=m.exec(a.nodeValue),f&&(o=mb(f[1]),V(b,o,"M",d,e)&&(c[o]=Td(f[2])))}catch(A){}}return b.sort(Z),b}function P(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b))do{if(!a)throw Ne("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==_d&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0);else d.push(a);return Fd(d)}function R(a,b,c){return function(d,e,f,g,h){return e=P(e[0],b,c),a(d,e,f,g,h)}}function T(a,d,f,g,h,i,j,k,l){function m(a,b,c,d){a&&(c&&(a=R(a,c,d)),a.require=q.require,a.directiveName=s,(E===q||q.$$isolateScope)&&(a=fa(a,{isolateScope:!0})),j.push(a)),b&&(c&&(b=R(b,c,d)),b.require=q.require,b.directiveName=s,(E===q||q.$$isolateScope)&&(b=fa(b,{isolateScope:!0})),k.push(b))}function n(a,b,c,d){var e;if(x(b)){var f=b.match(w),g=b.substring(f[0].length),h=f[1]||f[3],i="?"===f[2];if("^^"===h?c=c.parent():(e=d&&d[g],e=e&&e.instance),!e){var j="$"+g+"Controller";e=h?c.inheritedData(j):c.data(j)}if(!e&&!i)throw Ne("ctreq","Controller '{0}', required by directive '{1}', can't be found!",g,a)}else if(Rd(b)){e=[];for(var k=0,l=b.length;k<l;k++)e[k]=n(a,b[k],c,d)}return e||null}function o(a,b,c,d,e,f){var g=qa();for(var h in d){var i=d[h],j={$scope:i===E||i.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},k=i.controller;"@"==k&&(k=b[i.name]);var l=r(k,j,!0,i.controllerAs);g[i.name]=l,a.data("$"+i.name+"Controller",l.instance)}return g}function p(a,b,e,g,h){function i(a,b,d){var e;return D(a)||(d=b,b=a,a=c),K&&(e=q),d||(d=K?s.parent():s),h(a,b,e,d,G)}var l,m,p,q,r,s,t,u,v;d===e?(t=f,s=f.$$element):(s=Fd(e),t=new ia(s,f)),p=b,E?m=b.$new(!0):B&&(p=b.$parent),h&&(r=i,r.$$boundTransclude=h),C&&(q=o(s,t,r,C,m,b)),E&&(I.$$addScopeInfo(s,m,!0,!(F&&(F===E||F===E.$$originalDirective))),I.$$addScopeClass(s,!0),m.$$isolateBindings=E.$$isolateBindings,(u=ha(b,t,m,m.$$isolateBindings,E))&&m.$on("$destroy",u));for(var w in q){var x=C[w],y=q[w],z=x.$$bindings.bindToController;y.identifier&&z&&(v=ha(p,t,y.instance,z,x));var A=y();A!==y.instance&&(y.instance=A,s.data("$"+x.name+"Controller",A),v&&v(),v=ha(p,t,y.instance,z,x))}for(Q=0,T=j.length;Q<T;Q++)l=j[Q],ga(l,l.isolateScope?m:b,s,t,l.require&&n(l.directiveName,l.require,s,q),r);var G=b;for(E&&(E.template||null===E.templateUrl)&&(G=m),a&&a(G,e.childNodes,c,h),Q=k.length-1;Q>=0;Q--)l=k[Q],ga(l,l.isolateScope?m:b,s,t,l.require&&n(l.directiveName,l.require,s,q),r)}l=l||{};for(var q,s,t,u,y,z=-Number.MAX_VALUE,B=l.newScopeDirective,C=l.controllerDirectives,E=l.newIsolateScopeDirective,F=l.templateDirective,G=l.nonTlbTranscludeDirective,H=!1,J=!1,K=l.hasElementTranscludeDirective,L=f.$$element=Fd(d),M=i,N=g,Q=0,T=a.length;Q<T;Q++){q=a[Q];var V=q.$$start,W=q.$$end;if(V&&(L=P(d,V,W)),t=c,z>q.priority)break;if((y=q.scope)&&(q.templateUrl||(v(y)?(_("new/isolated scope",E||B,q,L),E=q):_("new/isolated scope",E,q,L)),B=B||q),s=q.name,!q.templateUrl&&q.controller&&(y=q.controller,C=C||qa(),_("'"+s+"' controller",C[s],q,L),C[s]=q),(y=q.transclude)&&(H=!0,q.$$tlb||(_("transclusion",G,q,L),G=q),"element"==y?(K=!0,z=q.priority,t=L,L=f.$$element=Fd(b.createComment(" "+s+": "+f[s]+" ")),d=L[0],ea(h,S(t),d),N=I(t,g,z,M&&M.name,{nonTlbTranscludeDirective:G})):(t=Fd(Ea(d)).contents(),L.empty(),N=I(t,g,c,c,{needsNewScope:q.$$isolateScope||q.$$newScope}))),q.template)if(J=!0,_("template",F,q,L),F=q,y=A(q.template)?q.template(L,f):q.template,y=na(y),q.replace){if(M=q,t=xa(y)?[]:ob(ba(q.templateNamespace,Td(y))),d=t[0],1!=t.length||d.nodeType!==_d)throw Ne("tplrt","Template for directive '{0}' must have exactly one root element. {1}",s,"");ea(h,L,d);var Z={$attr:{}},aa=O(d,[],Z),ca=a.splice(Q+1,a.length-(Q+1));(E||B)&&U(aa,E,B),a=a.concat(aa).concat(ca),X(f,Z),T=a.length}else L.html(y);if(q.templateUrl)J=!0,_("template",F,q,L),F=q,q.replace&&(M=q),p=Y(a.splice(Q,a.length-Q),L,f,h,H&&N,j,k,{controllerDirectives:C,newScopeDirective:B!==q&&B,newIsolateScopeDirective:E,templateDirective:F,nonTlbTranscludeDirective:G}),T=a.length;else if(q.compile)try{u=q.compile(L,f,N),A(u)?m(null,u,V,W):u&&m(u.pre,u.post,V,W)}catch(da){e(da,$(L))}q.terminal&&(p.terminal=!0,z=Math.max(z,q.priority))}return p.scope=B&&!0===B.scope,p.transcludeOnThisElement=H,p.templateOnThisElement=J,p.transclude=N,l.hasElementTranscludeDirective=K,p}function U(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=o(a[d],{$$isolateScope:b,$$newScope:c})}function V(b,c,d,f,h,i,l){if(c===h)return null;var m=null;if(j.hasOwnProperty(c))for(var n,p=a.get(c+k),q=0,r=p.length;q<r;q++)try{if(n=p[q],(t(f)||f>n.priority)&&-1!=n.restrict.indexOf(d)){if(i&&(n=o(n,{$$start:i,$$end:l})),!n.$$bindings){var s=n.$$bindings=g(n,n.name);v(s.isolateScope)&&(n.$$isolateBindings=s.isolateScope)}b.push(n),m=n}}catch(u){e(u)}return m}function W(b){if(j.hasOwnProperty(b))for(var c,d=a.get(b+k),e=0,f=d.length;e<f;e++)if(c=d[e],c.multiElement)return!0;return!1}function X(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;f(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),f(b,function(b,f){"class"==f?(G(e,b),a.class=(a.class?a.class+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Y(a,b,c,d,e,g,i,j){var k,l,m=[],n=b[0],p=a.shift(),q=o(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),r=A(p.templateUrl)?p.templateUrl(b,c):p.templateUrl,s=p.templateNamespace;return b.empty(),h(r).then(function(h){var o,t,u,w;if(h=na(h),p.replace){if(u=xa(h)?[]:ob(ba(s,Td(h))),o=u[0],1!=u.length||o.nodeType!==_d)throw Ne("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,r);t={$attr:{}},ea(d,b,o);var x=O(o,[],t);v(p.scope)&&U(x,!0),a=x.concat(a),X(c,t)}else o=n,b.html(h);for(a.unshift(q),k=T(a,o,c,e,b,p,g,i,j),f(d,function(a,c){a==o&&(d[c]=b[0])}),l=K(b[0].childNodes,e);m.length;){var y=m.shift(),z=m.shift(),A=m.shift(),B=m.shift(),C=b[0];if(!y.$$destroyed){if(z!==n){var D=z.className;j.hasElementTranscludeDirective&&p.replace||(C=Ea(o)),ea(A,Fd(z),C),G(Fd(C),D)}w=k.transcludeOnThisElement?L(y,k.transclude,B):B,k(l,y,C,d,w)}}m=null}),function(a,b,c,d,e){var f=e;b.$$destroyed||(m?m.push(b,c,d,f):(k.transcludeOnThisElement&&(f=L(b,k.transclude,e)),k(l,b,c,d,f)))}}function Z(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 _(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw Ne("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,$(d))}function aa(a,b){var c=d(b,!0);c&&a.push({priority:0,compile:function(a){var b=a.parent(),d=!!b.length;return d&&I.$$addBindingClass(b),function(a,b){var e=b.parent();d||I.$$addBindingClass(e),I.$$addBindingInfo(e,c.expressions),a.$watch(c,function(a){b[0].nodeValue=a})}}})}function ba(a,c){switch(a=zd(a||"html")){case"svg":case"math":var d=b.createElement("div");return d.innerHTML="<"+a+">"+c+"</"+a+">",d.childNodes[0].childNodes;default:return c}}function ca(a,b){if("srcdoc"==b)return C.HTML;var c=M(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?C.RESOURCE_URL:void 0}function da(a,b,c,e,f){var g=ca(a,e);f=s[e]||f;var h=d(c,!0,g,f);if(h){if("multiple"===e&&"select"===M(a))throw Ne("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",$(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){var j=i.$$observers||(i.$$observers=qa());if(y.test(e))throw Ne("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var k=i[e];k!==c&&(h=k&&d(k,!0,g,f),c=k),h&&(i[e]=h(a),(j[e]||(j[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function ea(a,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(a)for(e=0,f=a.length;e<f;e++)if(a[e]==g){a[e++]=d;for(var j=e,k=j+h-1,l=a.length;j<l;j++,k++)k<l?a[j]=a[k]:delete a[j];a.length-=h-1,a.context===g&&(a.context=d);break}i&&i.replaceChild(d,g);var m=b.createDocumentFragment();m.appendChild(g),Fd.hasData(g)&&(Fd.data(d,Fd.data(g)),Gd?(Qd=!0,Gd.cleanData([g])):delete Fd.cache[g[Fd.expando]]);for(var n=1,o=c.length;n<o;n++){var p=c[n];Fd(p).remove(),m.appendChild(p),delete c[n]}c[0]=d,c.length=1}function fa(a,b){return l(function(){return a.apply(null,arguments)},a,b)}function ga(a,b,c,d,f,g){try{a(b,c,d,f,g)}catch(h){e(h,$(c))}}function ha(a,b,c,e,g){var h=[];return f(e,function(e,f){var j,k,l,m,n=e.attrName,o=e.optional,q=e.mode;switch(q){case"@":o||Ad.call(b,n)||(c[f]=b[n]=void 0),b.$observe(n,function(a){x(a)&&(c[f]=a)}),b.$$observers[n].$$scope=a,j=b[n],x(j)?c[f]=d(j)(a):H(j)&&(c[f]=j);break;case"=":if(!Ad.call(b,n)){if(o)break;b[n]=void 0}if(o&&!b[n])break;k=i(b[n]),m=k.literal?Q:function(a,b){return a===b||a!==a&&b!==b},l=k.assign||function(){throw j=c[f]=k(a),Ne("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",b[n],n,g.name)},j=c[f]=k(a);var r=function(b){return m(b,c[f])||(m(b,j)?l(a,b=c[f]):c[f]=b),j=b};r.$stateful=!0;var s;s=e.collection?a.$watchCollection(b[n],r):a.$watch(i(b[n],r),null,k.literal),h.push(s);break;case"&":if((k=b.hasOwnProperty(n)?i(b[n]):p)===p&&o)break;c[f]=function(b){return k(a,b)}}}),h.length&&function(){for(var a=0,b=h.length;a<b;++a)h[a]()}}var ia=function(a,b){if(b){var c,d,e,f=Object.keys(b);for(c=0,d=f.length;c<d;c++)e=f[c],this[e]=b[e]}else this.$attr={};this.$$element=a};ia.prototype={$normalize:mb,$addClass:function(a){a&&a.length>0&&E.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&E.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=nb(a,b);c&&c.length&&E.addClass(this.$$element,c);var d=nb(b,a);d&&d.length&&E.removeClass(this.$$element,d)},$set:function(a,b,c,d){var g,h=this.$$element[0],i=Ta(h,a),j=Ua(a),k=a;if(i?(this.$$element.prop(a,b),d=i):j&&(this[j]=b,k=j),this[a]=b,d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=ja(a,"-")),"a"===(g=M(this.$$element))&&"href"===a||"img"===g&&"src"===a)this[a]=b=F(b,"src"===a);else if("img"===g&&"srcset"===a&&u(b)){for(var l="",m=Td(b),n=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,o=/\s/.test(m)?n:/(,)/,p=m.split(o),q=Math.floor(p.length/2),r=0;r<q;r++){var s=2*r;l+=F(Td(p[s]),!0),l+=" "+Td(p[s+1])}var v=Td(p[2*r]).split(/\s/);l+=F(Td(v[0]),!0),2===v.length&&(l+=" "+Td(v[1])),this[a]=b=l}!1!==c&&(null===b||t(b)?this.$$element.removeAttr(d):this.$$element.attr(d,b));var w=this.$$observers;w&&f(w[k],function(a){try{a(b)}catch(c){e(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=qa()),e=d[a]||(d[a]=[]);return e.push(b),z.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||t(c[a])||b(c[a])}),function(){N(e,b)}}};var ka=d.startSymbol(),ma=d.endSymbol(),na="{{"==ka&&"}}"==ma?q:function(a){return a.replace(/\{\{/g,ka).replace(/}}/g,ma)},oa=/^ngAttr[A-Z]/,pa=/^(.+)Start$/;return I.$$addBindingInfo=B?function(a,b){var c=a.data("$binding")||[];Rd(b)?c=c.concat(b):c.push(b),a.data("$binding",c)}:p,I.$$addBindingClass=B?function(a){G(a,"ng-binding")}:p,I.$$addScopeInfo=B?function(a,b,c,d){var e=c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope";a.data(e,b)}:p,I.$$addScopeClass=B?function(a,b){G(a,b?"ng-isolate-scope":"ng-scope")}:p,I}]}function mb(a){return wa(a.replace(Oe,""))}function nb(a,b){var c="",d=a.split(/\s+/),e=b.split(/\s+/);a:for(var f=0;f<d.length;f++){for(var g=d[f],h=0;h<e.length;h++)if(g==e[h])continue a;c+=(c.length>0?" ":"")+g}return c}function ob(a){a=Fd(a);var b=a.length;if(b<=1)return a;for(;b--;){a[b].nodeType===ce&&Jd.call(a,b,1)}return a}function pb(a,b){if(b&&x(b))return b;if(x(a)){var c=Qe.exec(a);if(c)return c[3]}}function qb(){var a={},b=!1;this.register=function(b,c){na(b,"controller"),v(b)?l(a,b):a[b]=c},this.allowGlobals=function(){b=!0},this.$get=["$injector","$window",function(e,f){function g(a,b,c,e){if(!a||!v(a.$scope))throw d("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",e,b);a.$scope[b]=c}return function(d,h,i,j){var k,m,n,o;if(i=!0===i,j&&x(j)&&(o=j),x(d)){if(!(m=d.match(Qe)))throw Pe("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",d);n=m[1],o=o||m[3],d=a.hasOwnProperty(n)?a[n]:oa(h.$scope,n,!0)||(b?oa(f,n,!0):c),ma(d,n,!0)}if(i){var p=(Rd(d)?d[d.length-1]:d).prototype;k=Object.create(p||null),o&&g(h,o,k,n||d.name);return l(function(){var a=e.invoke(d,k,h,n);return a!==k&&(v(a)||A(a))&&(k=a,o&&g(h,o,k,n||d.name)),k},{instance:k,identifier:o})}return k=e.instantiate(d,h,n),o&&g(h,o,k,n||d.name),k}}]}function rb(){this.$get=["$window",function(a){return Fd(a.document)}]}function sb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function tb(a){return v(a)?z(a)?a.toISOString():V(a):a}function ub(){this.$get=function(){return function(a){if(!a)return"";var b=[];return g(a,function(a,c){null===a||t(a)||(Rd(a)?f(a,function(a,d){b.push(da(c)+"="+da(tb(a)))}):b.push(da(c)+"="+da(tb(a))))}),b.join("&")}}}function vb(){this.$get=function(){return function(a){function b(a,d,e){null===a||t(a)||(Rd(a)?f(a,function(a,c){b(a,d+"["+(v(a)?c:"")+"]")}):v(a)&&!z(a)?g(a,function(a,c){b(a,d+(e?"":"[")+c+(e?"":"]"))}):c.push(da(d)+"="+da(tb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function wb(a,b){if(x(a)){var c=a.replace(We,"").trim();if(c){var d=b("Content-Type");(d&&0===d.indexOf(Se)||xb(c))&&(a=W(c))}}return a}function xb(a){var b=a.match(Ue);return b&&Ve[b[0]].test(a)}function yb(a){function b(a,b){a&&(d[a]=d[a]?d[a]+", "+b:b)}var c,d=qa();return x(a)?f(a.split("\n"),function(a){c=a.indexOf(":"),b(zd(Td(a.substr(0,c))),Td(a.substr(c+1)))}):v(a)&&f(a,function(a,c){b(zd(c),Td(a))}),d}function zb(a){var b;return function(c){if(b||(b=yb(a)),c){var d=b[zd(c)];return void 0===d&&(d=null),d}return b}}function Ab(a,b,c,d){return A(d)?d(a,b,c):(f(d,function(d){a=d(a,b,c)}),a)}function Bb(a){return 200<=a&&a<300}function Cb(){var a=this.defaults={transformResponse:[wb],transformRequest:[function(a){return!v(a)||E(a)||G(a)||F(a)?a:V(a)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:P(Te),put:P(Te),patch:P(Te)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return u(a)?(b=!!a,this):b};var e=!0;this.useLegacyPromiseExtensions=function(a){return u(a)?(e=!!a,this):e};var g=this.interceptors=[]
;this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,i,j,k,m,n){function o(b){function g(a){var b=l({},a);return b.data=Ab(a.data,a.headers,a.status,j.transformResponse),Bb(a.status)?b:m.reject(b)}function h(a,b){var c,d={};return f(a,function(a,e){A(a)?null!=(c=a(b))&&(d[e]=c):d[e]=a}),d}function i(b){var c,d,e,f=a.headers,g=l({},b.headers);f=l({},f.common,f[zd(b.method)]);a:for(c in f){d=zd(c);for(e in g)if(zd(e)===d)continue a;g[c]=f[c]}return h(g,P(b))}if(!Od.isObject(b))throw d("$http")("badreq","Http request configuration must be an object.  Received: {0}",b);if(!x(b.url))throw d("$http")("badreq","Http request configuration url must be a string.  Received: {0}",b.url);var j=l({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);j.headers=i(b),j.method=Bd(j.method),j.paramSerializer=x(j.paramSerializer)?n.get(j.paramSerializer):j.paramSerializer;var k=function(b){var d=b.headers,e=Ab(b.data,zb(d),c,b.transformRequest);return t(e)&&f(d,function(a,b){"content-type"===zd(b)&&delete d[b]}),t(b.withCredentials)&&!t(a.withCredentials)&&(b.withCredentials=a.withCredentials),r(b,e).then(g,g)},o=[k,c],p=m.when(j);for(f(y,function(a){(a.request||a.requestError)&&o.unshift(a.request,a.requestError),(a.response||a.responseError)&&o.push(a.response,a.responseError)});o.length;){var q=o.shift(),s=o.shift();p=p.then(q,s)}return e?(p.success=function(a){return ma(a,"fn"),p.then(function(b){a(b.data,b.status,b.headers,j)}),p},p.error=function(a){return ma(a,"fn"),p.then(null,function(b){a(b.data,b.status,b.headers,j)}),p}):(p.success=Ye("success"),p.error=Ye("error")),p}function p(a){f(arguments,function(a){o[a]=function(b,c){return o(l({},c||{},{method:a,url:b}))}})}function q(a){f(arguments,function(a){o[a]=function(b,c,d){return o(l({},d||{},{method:a,url:b,data:c}))}})}function r(d,e){function f(a,c,d,e){function f(){g(c,a,d,e)}n&&(Bb(a)?n.put(y,[a,c,yb(d),e]):n.remove(y)),b?k.$applyAsync(f):(f(),k.$$phase||k.$apply())}function g(a,b,c,e){b=b>=-1?b:0,(Bb(b)?q.resolve:q.reject)({data:a,status:b,headers:zb(c),config:d,statusText:e})}function j(a){g(a.data,a.status,P(a.headers()),a.statusText)}function l(){var a=o.pendingRequests.indexOf(d);-1!==a&&o.pendingRequests.splice(a,1)}var n,p,q=m.defer(),r=q.promise,x=d.headers,y=s(d.url,d.paramSerializer(d.params));if(o.pendingRequests.push(d),r.then(l,l),!d.cache&&!a.cache||!1===d.cache||"GET"!==d.method&&"JSONP"!==d.method||(n=v(d.cache)?d.cache:v(a.cache)?a.cache:w),n&&(p=n.get(y),u(p)?I(p)?p.then(j,j):Rd(p)?g(p[1],p[0],P(p[2]),p[3]):g(p,200,{},"OK"):n.put(y,r)),t(p)){var z=Dc(d.url)?i()[d.xsrfCookieName||a.xsrfCookieName]:c;z&&(x[d.xsrfHeaderName||a.xsrfHeaderName]=z),h(d.method,y,e,f,x,d.timeout,d.withCredentials,d.responseType)}return r}function s(a,b){return b.length>0&&(a+=(-1==a.indexOf("?")?"?":"&")+b),a}var w=j("$http");a.paramSerializer=x(a.paramSerializer)?n.get(a.paramSerializer):a.paramSerializer;var y=[];return f(g,function(a){y.unshift(x(a)?n.get(a):n.invoke(a))}),o.pendingRequests=[],p("get","delete","head","jsonp"),q("post","put","patch"),o.defaults=a,o}]}function Db(){this.$get=function(){return function(){return new a.XMLHttpRequest}}}function Eb(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,c,d){return Fb(a,d,a.defer,b.angular.callbacks,c[0])}]}function Fb(a,b,c,d,e){function g(a,b,c){var f=e.createElement("script"),g=null;return f.type="text/javascript",f.src=a,f.async=!0,g=function(a){je(f,"load",g),je(f,"error",g),e.body.removeChild(f),f=null;var h=-1,i="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),i=a.type,h="error"===a.type?404:200),c&&c(h,i)},ie(f,"load",g),ie(f,"error",g),e.body.appendChild(f),g}return function(e,h,i,j,k,l,m,n){function o(){s&&s(),v&&v.abort()}function q(b,d,e,f,g){u(x)&&c.cancel(x),s=v=null,b(d,e,f,g),a.$$completeOutstandingRequest(p)}if(a.$$incOutstandingRequestCount(),h=h||a.url(),"jsonp"==zd(e)){var r="_"+(d.counter++).toString(36);d[r]=function(a){d[r].data=a,d[r].called=!0};var s=g(h.replace("JSON_CALLBACK","angular.callbacks."+r),r,function(a,b){q(j,a,d[r].data,"",b),d[r]=p})}else{var v=b(e,h);v.open(e,h,!0),f(k,function(a,b){u(a)&&v.setRequestHeader(b,a)}),v.onload=function(){var a=v.statusText||"",b="response"in v?v.response:v.responseText,c=1223===v.status?204:v.status;0===c&&(c=b?200:"file"==Cc(h).protocol?404:0),q(j,c,b,v.getAllResponseHeaders(),a)};var w=function(){q(j,-1,null,null,"")};if(v.onerror=w,v.onabort=w,m&&(v.withCredentials=!0),n)try{v.responseType=n}catch(y){if("json"!==n)throw y}v.send(t(i)?null:i)}if(l>0)var x=c(o,l);else I(l)&&l.then(o)}}function Gb(){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(c,d,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(m,a).replace(n,b)}function h(a){if(null==a)return"";switch(typeof a){case"string":break;case"number":a=""+a;break;default:a=V(a)}return a}function i(f,i,m,n){function o(a){try{return a=C(a),n&&!u(a)?a:h(a)}catch(b){d(Ze.interr(f,b))}}n=!!n;for(var p,q,r,s=0,v=[],w=[],x=f.length,y=[],z=[];s<x;){if(-1==(p=f.indexOf(a,s))||-1==(q=f.indexOf(b,p+j))){s!==x&&y.push(g(f.substring(s)));break}s!==p&&y.push(g(f.substring(s,p))),r=f.substring(p+j,q),v.push(r),w.push(c(r,o)),s=q+k,z.push(y.length),y.push("")}if(m&&y.length>1&&Ze.throwNoconcat(f),!i||v.length){var B=function(a){for(var b=0,c=v.length;b<c;b++){if(n&&t(a[b]))return;y[z[b]]=a[b]}return y.join("")},C=function(a){return m?e.getTrusted(m,a):e.valueOf(a)};return l(function(a){var b=0,c=v.length,e=new Array(c);try{for(;b<c;b++)e[b]=w[b](a);return B(e)}catch(g){d(Ze.interr(f,g))}},{exp:f,expressions:v,$$watchDelegate:function(a,b){var c;return a.$watchGroup(w,function(d,e){var f=B(d);A(b)&&b.call(this,f,d!==e?c:f,a),c=f})}})}}var j=a.length,k=b.length,m=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g,f),"g");return i.startSymbol=function(){return a},i.endSymbol=function(){return b},i}]}function Hb(){this.$get=["$rootScope","$window","$q","$$q",function(a,b,c,d){function e(e,g,h,i){var j=arguments.length>4,k=j?S(arguments,4):[],l=b.setInterval,m=b.clearInterval,n=0,o=u(i)&&!i,p=(o?d:c).defer(),q=p.promise;return h=u(h)?h:0,q.then(null,null,j?function(){e.apply(null,k)}:e),q.$$intervalId=l(function(){p.notify(n++),h>0&&n>=h&&(p.resolve(n),m(q.$$intervalId),delete f[q.$$intervalId]),o||a.$apply()},g),f[q.$$intervalId]=p,q}var f={};return e.cancel=function(a){return!!(a&&a.$$intervalId in f)&&(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0)},e}]}function Ib(a){for(var b=a.split("/"),c=b.length;c--;)b[c]=ca(b[c]);return b.join("/")}function Jb(a,b){var c=Cc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=n(c.port)||_e[c.protocol]||null}function Kb(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=Cc(a);b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=aa(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function Lb(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Mb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function Nb(a){return a.replace(/(#.+)|#$/,"$1")}function Ob(a){return a.substr(0,Mb(a).lastIndexOf("/")+1)}function Pb(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function Qb(a,b,c){this.$$html5=!0,c=c||"",Jb(a,this),this.$$parse=function(a){var c=Lb(b,a);if(!x(c))throw af("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,b);Kb(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=ba(this.$$search),c=this.$$hash?"#"+ca(this.$$hash):"";this.$$url=Ib(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g,h;return u(f=Lb(a,d))?(g=f,h=u(f=Lb(c,f))?b+(Lb("/",f)||f):a+g):u(f=Lb(b,d))?h=b+f:b==d+"/"&&(h=b),h&&this.$$parse(h),!!h}}function Rb(a,b,c){Jb(a,this),this.$$parse=function(d){function e(a,b,c){var d,e=/^\/[A-Z]:(\/.*)/;return 0===b.indexOf(c)&&(b=b.replace(c,"")),e.exec(b)?a:(d=e.exec(a),d?d[1]:a)}var f,g=Lb(a,d)||Lb(b,d);t(g)||"#"!==g.charAt(0)?this.$$html5?f=g:(f="",t(g)&&(a=d,this.replace())):(f=Lb(c,g),t(f)&&(f=g)),Kb(f,this),this.$$path=e(this.$$path,f,a),this.$$compose()},this.$$compose=function(){var b=ba(this.$$search),d=this.$$hash?"#"+ca(this.$$hash):"";this.$$url=Ib(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return Mb(a)==Mb(b)&&(this.$$parse(b),!0)}}function Sb(a,b,c){this.$$html5=!0,Rb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==Mb(d)?f=d:(g=Lb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=ba(this.$$search),d=this.$$hash?"#"+ca(this.$$hash):"";this.$$url=Ib(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function Tb(a){return function(){return this[a]}}function Ub(a,b){return function(c){return t(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function Vb(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return u(b)?(a=b,this):a},this.html5Mode=function(a){return H(a)?(b.enabled=a,this):v(a)?(H(a.enabled)&&(b.enabled=a.enabled),H(a.requireBase)&&(b.requireBase=a.requireBase),H(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k,l,m=d.baseHref(),n=d.url();if(b.enabled){if(!m&&b.requireBase)throw af("nobase","$location in HTML5 mode requires a <base> tag to be present!");l=Pb(n)+(m||"/"),k=e.history?Qb:Sb}else l=Mb(n),k=Rb;var o=Ob(l);j=new k(l,o,"#"+a),j.$$parseLinkUrl(n,n),j.$$state=d.state();var p=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Fd(a.target);"a"!==M(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");v(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Cc(h.animVal).href),p.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||j.$$parseLinkUrl(h,i)&&(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),Nb(j.absUrl())!=Nb(n)&&d.url(j.absUrl(),!0);var q=!0;return d.onUrlChange(function(a,b){if(t(Lb(o,a)))return void(g.location.href=a);c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=Nb(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(q=!1,i(e,f)))}),c.$$phase||c.$digest()}),c.$watch(function(){var a=Nb(d.url()),b=Nb(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(q||k)&&(q=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function Wb(){var a=!0,b=this;this.debugEnabled=function(b){return u(b)?(a=b,this):a},this.$get=["$window",function(c){function d(a){return a instanceof Error&&(a.stack?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)),a}function e(a){var b=c.console||{},e=b[a]||b.log||p,g=!1;try{g=!!e.apply}catch(h){}return g?function(){var a=[];return f(arguments,function(b){a.push(d(b))}),e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}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,arguments)}}()}}]}function Xb(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw cf("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",b);return a}function Yb(a,b){if(a+="",!x(a))throw cf("iseccst","Cannot convert object to primitive value! Expression: {0}",b);return a}function Zb(a,b){if(a){if(a.constructor===a)throw cf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a.window===a)throw cf("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw cf("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",b);if(a===Object)throw cf("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",b)}return a}function $b(a,b){if(a){if(a.constructor===a)throw cf("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);if(a===df||a===ef||a===ff)throw cf("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",b)}}function _b(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw cf("isecaf","Assigning to a constructor is disallowed! Expression: {0}",b)}function ac(a,b){return void 0!==a?a:b}function bc(a,b){return void 0===a?b:void 0===b?a:a+b}function cc(a,b){return!a(b).$stateful}function dc(a,b){var c,d;switch(a.type){case kf.Program:c=!0,f(a.body,function(a){dc(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case kf.Literal:a.constant=!0,a.toWatch=[];break;case kf.UnaryExpression:dc(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case kf.BinaryExpression:dc(a.left,b),dc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case kf.LogicalExpression:dc(a.left,b),dc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case kf.ConditionalExpression:dc(a.test,b),dc(a.alternate,b),dc(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case kf.Identifier:a.constant=!1,a.toWatch=[a];break;case kf.MemberExpression:dc(a.object,b),a.computed&&dc(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case kf.CallExpression:c=!!a.filter&&cc(b,a.callee.name),d=[],f(a.arguments,function(a){dc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&cc(b,a.callee.name)?d:[a];break;case kf.AssignmentExpression:dc(a.left,b),dc(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case kf.ArrayExpression:c=!0,d=[],f(a.elements,function(a){dc(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=d;break;case kf.ObjectExpression:c=!0,d=[],f(a.properties,function(a){dc(a.value,b),c=c&&a.value.constant,a.value.constant||d.push.apply(d,a.value.toWatch)}),a.constant=c,a.toWatch=d;break;case kf.ThisExpression:a.constant=!1,a.toWatch=[]}}function ec(a){if(1==a.length){var b=a[0].expression,d=b.toWatch;return 1!==d.length?d:d[0]!==b?d:c}}function fc(a){return a.type===kf.Identifier||a.type===kf.MemberExpression}function gc(a){if(1===a.body.length&&fc(a.body[0].expression))return{type:kf.AssignmentExpression,left:a.body[0].expression,right:{type:kf.NGValueParameter},operator:"="}}function hc(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===kf.Literal||a.body[0].expression.type===kf.ArrayExpression||a.body[0].expression.type===kf.ObjectExpression)}function ic(a){return a.constant}function jc(a,b){this.astBuilder=a,this.$filter=b}function kc(a,b){this.astBuilder=a,this.$filter=b}function lc(a){return"constructor"==a}function mc(a){return A(a.valueOf)?a.valueOf():mf.call(a)}function nc(){var a=qa(),b=qa();this.$get=["$filter",function(d){function e(c,e,f){var h,n,s;switch(f=f||r,typeof c){case"string":c=c.trim(),s=c;var t=f?b:a;if(!(h=t[s])){":"===c.charAt(0)&&":"===c.charAt(1)&&(n=!0,c=c.substring(2));var u=f?q:o,v=new jf(u);h=new lf(v,d,u).parse(c),h.constant?h.$$watchDelegate=l:n?h.$$watchDelegate=h.literal?k:j:h.inputs&&(h.$$watchDelegate=i),f&&(h=g(h)),t[s]=h}return m(h,e);case"function":return m(c,e);default:return m(p,e)}}function g(a){function b(b,c,d,e){var f=r;r=!0;try{return a(b,c,d,e)}finally{r=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=g(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&c<a.inputs.length;++c)a.inputs[c]=g(a.inputs[c]);return b.inputs=a.inputs,b}function h(a,b){return null==a||null==b?a===b:("object"!=typeof a||"object"!=typeof(a=mc(a)))&&(a===b||a!==a&&b!==b)}function i(a,b,d,e,f){var g,i=e.inputs;if(1===i.length){var j=h;return i=i[0],a.$watch(function(a){var b=i(a);return h(b,j)||(g=e(a,c,c,[b]),j=b&&mc(b)),g},b,d,f)}for(var k=[],l=[],m=0,n=i.length;m<n;m++)k[m]=h,l[m]=null;return a.$watch(function(a){for(var b=!1,d=0,f=i.length;d<f;d++){var j=i[d](a);(b||(b=!h(j,k[d])))&&(l[d]=j,k[d]=j&&mc(j))}return b&&(g=e(a,c,c,l)),g},b,d,f)}function j(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a,A(b)&&b.apply(this,arguments),u(a)&&d.$$postDigest(function(){u(f)&&e()})},c)}function k(a,b,c,d){function e(a){var b=!0;return f(a,function(a){u(a)||(b=!1)}),b}var g,h;return g=a.$watch(function(a){return d(a)},function(a,c,d){h=a,A(b)&&b.call(this,a,c,d),e(a)&&d.$$postDigest(function(){e(h)&&g()})},c)}function l(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){A(b)&&b.apply(this,arguments),e()},c)}function m(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,e=c!==k&&c!==j,f=e?function(c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}:function(c,d,e,f){var g=a(c,d,e,f),h=b(g,c,d);return u(g)?h:g};return a.$$watchDelegate&&a.$$watchDelegate!==i?f.$$watchDelegate=a.$$watchDelegate:b.$stateful||(f.$$watchDelegate=i,d=!a.inputs,f.inputs=a.inputs?a.inputs:[a]),f}var n=Vd().noUnsafeEval,o={csp:n,expensiveChecks:!1},q={csp:n,expensiveChecks:!0},r=!1;return e.$$runningExpensiveChecks=function(){return r},e}]}function oc(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return qc(function(b){a.$evalAsync(b)},b)}]}function pc(){this.$get=["$browser","$exceptionHandler",function(a,b){return qc(function(b){a.defer(b)},b)}]}function qc(a,b){function e(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function g(){this.$$state={status:0}}function h(a,b){return function(c){b.call(a,c)}}function i(a){var d,e,f;f=a.pending,a.processScheduled=!1,a.pending=c;for(var g=0,h=f.length;g<h;++g){e=f[g][0],d=f[g][a.status];try{A(d)?e.resolve(d(a.value)):1===a.status?e.resolve(a.value):e.reject(a.value)}catch(i){e.reject(i),b(i)}}}function j(b){!b.processScheduled&&b.pending&&(b.processScheduled=!0,a(function(){i(b)}))}function k(){this.promise=new g,this.resolve=h(this,this.resolve),this.reject=h(this,this.reject),this.notify=h(this,this.notify)}function m(a){var b=new k,c=0,d=Rd(a)?[]:{};return f(a,function(a,e){c++,s(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})}),0===c&&b.resolve(d),b.promise}var n=d("$q",TypeError),o=function(){return new k};l(g.prototype,{then:function(a,b,c){if(t(a)&&t(b)&&t(c))return this;var d=new k;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([d,a,b,c]),this.$$state.status>0&&j(this.$$state),d.promise},catch:function(a){return this.then(null,a)},finally:function(a,b){return this.then(function(b){return r(b,!0,a)},function(b){return r(b,!1,a)},b)}}),l(k.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(n("qcycle","Expected promise to be resolved with value other than itself '{0}'",a)):this.$$resolve(a))},$$resolve:function(a){var c,d;d=e(this,this.$$resolve,this.$$reject);try{(v(a)||A(a))&&(c=a&&a.then),A(c)?(this.promise.$$state.status=-1,c.call(a,d[0],d[1],this.notify)):(this.promise.$$state.value=a,this.promise.$$state.status=1,j(this.promise.$$state))}catch(f){d[1](f),b(f)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a,this.promise.$$state.status=2,j(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;this.promise.$$state.status<=0&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0],a=d[f][3];try{e.notify(A(a)?a(c):c)}catch(h){b(h)}}})}});var p=function(a){var b=new k;return b.reject(a),b.promise},q=function(a,b){var c=new k;return b?c.resolve(a):c.reject(a),c.promise},r=function(a,b,c){var d=null;try{A(c)&&(d=c())}catch(e){return q(e,!1)}return I(d)?d.then(function(){return q(a,b)},function(a){return q(a,!1)}):q(a,b)},s=function(a,b,c,d){var e=new k;return e.resolve(a),e.promise.then(b,c,d)},u=s,w=function a(b){function c(a){e.resolve(a)}function d(a){e.reject(a)}if(!A(b))throw n("norslvr","Expected resolverFn, got '{0}'",b);if(!(this instanceof a))return new a(b);var e=new k;return b(c,d),e.promise};return w.defer=o,w.reject=p,w.when=s,w.resolve=u,w.all=m,w}function rc(){this.$get=["$window","$timeout",function(a,b){var c=a.requestAnimationFrame||a.webkitRequestAnimationFrame,d=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};return f.supported=e,f}]}function sc(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=i(),this.$$ChildScope=null}return b.prototype=a,b}var b=10,c=d("$rootScope"),g=null,h=null;this.digestTtl=function(a){return arguments.length&&(b=a),b},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,j,k,l){function m(a){a.currentScope.$$destroyed=!0}function n(a){9===Ed&&(a.$$childHead&&n(a.$$childHead),a.$$nextSibling&&n(a.$$nextSibling)),a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function o(){this.$id=i(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function q(a){if(z.$$phase)throw c("inprog","{0} already in progress",z.$$phase);z.$$phase=a}function r(){z.$$phase=null}function s(a,b){do{a.$$watchersCount+=b}while(a=a.$parent)}function u(a,b,c){do{a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c]}while(a=a.$parent)}function w(){}function x(){for(;D.length;)try{D.shift()()}catch(a){j(a)}h=null}function y(){null===h&&(h=l.defer(function(){z.$apply(x)}))}o.prototype={constructor:o,$new:function(b,c){var d;return c=c||this,b?(d=new o,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",m),d},$watch:function(a,b,c,d){var e=k(a);if(e.$$watchDelegate)return e.$$watchDelegate(this,b,c,e,a);var f=this,h=f.$$watchers,i={fn:b,last:w,get:e,exp:d||a,eq:!!c};return g=null,A(b)||(i.fn=p),h||(h=f.$$watchers=[]),h.unshift(i),s(this,1),function(){N(h,i)>=0&&s(f,-1),g=null}},$watchGroup:function(a,b){function c(){i=!1,j?(j=!1,b(e,e,h)):b(e,d,h)}var d=new Array(a.length),e=new Array(a.length),g=[],h=this,i=!1,j=!0;if(!a.length){var k=!0;return h.$evalAsync(function(){k&&b(e,e,h)}),function(){k=!1}}return 1===a.length?this.$watch(a[0],function(a,c,f){e[0]=a,d[0]=c,b(e,a===c?e:d,f)}):(f(a,function(a,b){var f=h.$watch(a,function(a,f){e[b]=a,d[b]=f,i||(i=!0,h.$evalAsync(c))});g.push(f)}),function(){for(;g.length;)g.shift()()})},$watchCollection:function(a,b){function c(a){f=a;var b,c,d,h;if(!t(f)){if(v(f))if(e(f)){g!==n&&(g=n,q=g.length=0,l++),b=f.length,q!==b&&(l++,g.length=q=b);for(var i=0;i<b;i++)h=g[i],d=f[i],h!==h&&d!==d||h===d||(l++,g[i]=d)}else{g!==o&&(g=o={},q=0,l++),b=0;for(c in f)Ad.call(f,c)&&(b++,d=f[c],h=g[c],c in g?h!==h&&d!==d||h===d||(l++,g[c]=d):(q++,g[c]=d,l++));if(q>b){l++;for(c in g)Ad.call(f,c)||(q--,delete g[c])}}else g!==f&&(g=f,l++);return l}}function d(){if(p?(p=!1,b(f,f,i)):b(f,h,i),j)if(v(f))if(e(f)){h=new Array(f.length);for(var a=0;a<f.length;a++)h[a]=f[a]}else{h={};for(var c in f)Ad.call(f,c)&&(h[c]=f[c])}else h=f}c.$stateful=!0;var f,g,h,i=this,j=b.length>1,l=0,m=k(a,c),n=[],o={},p=!0,q=0;return this.$watch(m,d)},$digest:function(){var a,d,e,f,i,k,m,n,o,p,s,t,u=b,v=this,y=[];q("$digest"),l.$$checkUrlChange(),this===z&&null!==h&&(l.defer.cancel(h),x()),g=null;do{for(n=!1,p=v;B.length;){try{t=B.shift(),t.scope.$eval(t.expression,t.locals)}catch(D){j(D)}g=null}a:do{if(k=p.$$watchers)for(m=k.length;m--;)try{if(a=k[m])if(i=a.get,(d=i(p))===(e=a.last)||(a.eq?Q(d,e):"number"==typeof d&&"number"==typeof e&&isNaN(d)&&isNaN(e))){if(a===g){n=!1;break a}}else n=!0,g=a,a.last=a.eq?O(d,null):d,f=a.fn,f(d,e===w?d:e,p),u<5&&(s=4-u,y[s]||(y[s]=[]),y[s].push({msg:A(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:d,oldVal:e}))}catch(D){j(D)}if(!(o=p.$$watchersCount&&p.$$childHead||p!==v&&p.$$nextSibling))for(;p!==v&&!(o=p.$$nextSibling);)p=p.$parent}while(p=o);if((n||B.length)&&!u--)throw r(),c("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",b,y)}while(n||B.length);for(r();C.length;)try{C.shift()()}catch(D){j(D)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===z&&l.$$applicationDestroyed(),s(this,-this.$$watchersCount);for(var b in this.$$listenerCount)u(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=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,n(this)}},$eval:function(a,b){return k(a)(this,b)},$evalAsync:function(a,b){z.$$phase||B.length||l.defer(function(){B.length&&z.$digest()}),B.push({scope:this,expression:k(a),locals:b})},$$postDigest:function(a){C.push(a)},$apply:function(a){try{q("$apply");try{return this.$eval(a)}finally{r()}}catch(b){j(b)}finally{try{z.$digest()}catch(b){throw j(b),b}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&D.push(b),a=k(a),y()},$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&&(c[d]=null,u(e,1,a))}},$emit:function(a,b){var c,d,e,f=[],g=this,h=!1,i={name:a,targetScope:g,stopPropagation:function(){h=!0},preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1},k=R([i],arguments,1);do{for(c=g.$$listeners[a]||f,i.currentScope=g,d=0,e=c.length;d<e;d++)if(c[d])try{c[d].apply(null,k)}catch(l){j(l)}else c.splice(d,1),d--,e--;if(h)return i.currentScope=null,i;g=g.$parent}while(g);return i.currentScope=null,i},$broadcast:function(a,b){var c=this,d=c,e=c,f={name:a,targetScope:c,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1};if(!c.$$listenerCount[a])return f;for(var g,h,i,k=R([f],arguments,1);d=e;){for(f.currentScope=d,g=d.$$listeners[a]||[],h=0,i=g.length;h<i;h++)if(g[h])try{g[h].apply(null,k)}catch(l){j(l)}else g.splice(h,1),h--,i--;if(!(e=d.$$listenerCount[a]&&d.$$childHead||d!==c&&d.$$nextSibling))for(;d!==c&&!(e=d.$$nextSibling);)d=d.$parent}return f.currentScope=null,f}};var z=new o,B=z.$$asyncQueue=[],C=z.$$postDigestQueue=[],D=z.$$applyAsyncQueue=[];return z}]}function tc(){var a=/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return u(b)?(a=b,this):a},this.imgSrcSanitizationWhitelist=function(a){return u(a)?(b=a,this):b},this.$get=function(){return function(c,d){var e,f=d?b:a;return e=Cc(c).href,""===e||e.match(f)?c:"unsafe:"+e}}}function uc(a){if("self"===a)return a;if(x(a)){if(a.indexOf("***")>-1)throw nf("iwcard","Illegal sequence *** in string matcher.  String: {0}",a);return a=Ud(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+a+"$")}if(B(a))return new RegExp("^"+a.source+"$");throw nf("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function vc(a){var b=[];return u(a)&&f(a,function(a){b.push(uc(a))}),b}function wc(){this.SCE_CONTEXTS=of;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=vc(b)),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=vc(a)),b},this.$get=["$injector",function(c){function d(a,b){return"self"===a?Dc(b):!!a.exec(b.href)}function e(c){var e,f,g=Cc(c.toString()),h=!1;for(e=0,f=a.length;e<f;e++)if(d(a[e],g)){h=!0;break}if(h)for(e=0,f=b.length;e<f;e++)if(d(b[e],g)){h=!1;break}return h}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function g(a,b){var c=l.hasOwnProperty(a)?l[a]:null;if(!c)throw nf("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(null===b||t(b)||""===b)return b;if("string"!=typeof b)throw nf("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new c(b)}function h(a){return a instanceof k?a.$$unwrapTrustedValue():a}function i(a,b){if(null===b||t(b)||""===b)return b;var c=l.hasOwnProperty(a)?l[a]:null;if(c&&b instanceof c)return b.$$unwrapTrustedValue();if(a===of.RESOURCE_URL){if(e(b))return b;throw nf("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",b.toString())}if(a===of.HTML)return j(b);throw nf("unsafe","Attempting to use an unsafe value in a safe context.")}var j=function(a){throw nf("unsafe","Attempting to use an unsafe value in a safe context.")};c.has("$sanitize")&&(j=c.get("$sanitize"));var k=f(),l={};return l[of.HTML]=f(k),l[of.CSS]=f(k),l[of.URL]=f(k),l[of.JS]=f(k),l[of.RESOURCE_URL]=f(l[of.URL]),{trustAs:g,getTrusted:i,valueOf:h}}]}function xc(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$sceDelegate",function(b,c){if(a&&Ed<8)throw nf("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var d=P(of);d.isEnabled=function(){return a},d.trustAs=c.trustAs,d.getTrusted=c.getTrusted,d.valueOf=c.valueOf,a||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=q),d.parseAs=function(a,c){var e=b(c);return e.literal&&e.constant?e:b(c,function(b){return d.getTrusted(a,b)})};var e=d.parseAs,g=d.getTrusted,h=d.trustAs;return f(of,function(a,b){var c=zd(b);d[wa("parse_as_"+c)]=function(b){return e(a,b)},d[wa("get_trusted_"+c)]=function(b){return g(a,b)},d[wa("trust_as_"+c)]=function(b){return h(a,b)}}),d}]}function yc(){this.$get=["$window","$document",function(a,b){
var c,d,e={},f=n((/android (\d+)/.exec(zd((a.navigator||{}).userAgent))||[])[1]),g=/Boxee/i.test((a.navigator||{}).userAgent),h=b[0]||{},i=/^(Moz|webkit|ms)(?=[A-Z])/,j=h.body&&h.body.style,k=!1,l=!1;if(j){for(var m in j)if(d=i.exec(m)){c=d[0],c=c.substr(0,1).toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in j&&"webkit"),k=!!("transition"in j||c+"Transition"in j),l=!!("animation"in j||c+"Animation"in j),!f||k&&l||(k=x(j.webkitTransition),l=x(j.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||f<4||g),hasEvent:function(a){if("input"===a&&Ed<=11)return!1;if(t(e[a])){var b=h.createElement("div");e[a]="on"+a in b}return e[a]},csp:Vd(),vendorPrefix:c,transitions:k,animations:l,android:f}}]}function zc(){this.$get=["$templateCache","$http","$q","$sce",function(a,b,c,d){function e(f,g){function h(a){if(!g)throw Ne("tpload","Failed to load template: {0} (HTTP status: {1} {2})",f,a.status,a.statusText);return c.reject(a)}e.totalPendingRequests++,x(f)&&!t(a.get(f))||(f=d.getTrustedResourceUrl(f));var i=b.defaults&&b.defaults.transformResponse;Rd(i)?i=i.filter(function(a){return a!==wb}):i===wb&&(i=null);var j={cache:a,transformResponse:i};return b.get(f,j).finally(function(){e.totalPendingRequests--}).then(function(b){return a.put(f,b.data),b.data},h)}return e.totalPendingRequests=0,e}]}function Ac(){this.$get=["$rootScope","$browser","$location",function(a,b,c){var d={};return d.findBindings=function(a,b,c){var d=a.getElementsByClassName("ng-binding"),e=[];return f(d,function(a){var d=Od.element(a).data("$binding");d&&f(d,function(d){if(c){new RegExp("(^|\\s)"+Ud(b)+"(\\s|\\||$)").test(d)&&e.push(a)}else-1!=d.indexOf(b)&&e.push(a)})}),e},d.findModels=function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;e<d.length;++e){var f=c?"=":"*=",g="["+d[e]+"model"+f+'"'+b+'"]',h=a.querySelectorAll(g);if(h.length)return h}},d.getLocation=function(){return c.url()},d.setLocation=function(b){b!==c.url()&&(c.url(b),a.$digest())},d.whenStable=function(a){b.notifyWhenNoOutstandingRequests(a)},d}]}function Bc(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,c,d,e){function f(f,h,i){A(f)||(i=h,h=f,f=p);var j,k=S(arguments,3),l=u(i)&&!i,m=(l?d:c).defer(),n=m.promise;return j=b.defer(function(){try{m.resolve(f.apply(null,k))}catch(b){m.reject(b),e(b)}finally{delete g[n.$$timeoutId]}l||a.$apply()},h),n.$$timeoutId=j,g[j]=m,n}var g={};return f.cancel=function(a){return!!(a&&a.$$timeoutId in g)&&(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId))},f}]}function Cc(a){var b=a;return Ed&&(pf.setAttribute("href",b),b=pf.href),pf.setAttribute("href",b),{href:pf.href,protocol:pf.protocol?pf.protocol.replace(/:$/,""):"",host:pf.host,search:pf.search?pf.search.replace(/^\?/,""):"",hash:pf.hash?pf.hash.replace(/^#/,""):"",hostname:pf.hostname,port:pf.port,pathname:"/"===pf.pathname.charAt(0)?pf.pathname:"/"+pf.pathname}}function Dc(a){var b=x(a)?Cc(a):a;return b.protocol===qf.protocol&&b.host===qf.host}function Ec(){this.$get=r(a)}function Fc(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var c=a[0]||{},d={},e="";return function(){var a,f,g,h,i,j=c.cookie||"";if(j!==e)for(e=j,a=e.split("; "),d={},g=0;g<a.length;g++)f=a[g],(h=f.indexOf("="))>0&&(i=b(f.substring(0,h)),t(d[i])&&(d[i]=b(f.substring(h+1))));return d}}function Gc(){this.$get=Fc}function Hc(a){function b(d,e){if(v(d)){var g={};return f(d,function(a,c){g[c]=b(c,a)}),g}return a.factory(d+c,e)}var c="Filter";this.register=b,this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}],b("currency",Mc),b("date",_c),b("filter",Ic),b("json",ad),b("limitTo",bd),b("lowercase",xf),b("number",Nc),b("orderBy",cd),b("uppercase",yf)}function Ic(){return function(a,b,c){if(!e(a)){if(null==a)return a;throw d("filter")("notarray","Expected array but received: {0}",a)}var f,g,h=Lc(b);switch(h){case"function":f=b;break;case"boolean":case"null":case"number":case"string":g=!0;case"object":f=Jc(b,c,g);break;default:return a}return Array.prototype.filter.call(a,f)}}function Jc(a,b,c){var d=v(a)&&"$"in a;return!0===b?b=Q:A(b)||(b=function(a,b){return!t(a)&&(null===a||null===b?a===b:!(v(b)||v(a)&&!s(a))&&(a=zd(""+a),b=zd(""+b),-1!==a.indexOf(b)))}),function(e){return d&&!v(e)?Kc(e,a.$,b,!1):Kc(e,a,b,c)}}function Kc(a,b,c,d,e){var f=Lc(a),g=Lc(b);if("string"===g&&"!"===b.charAt(0))return!Kc(a,b.substring(1),c,d);if(Rd(a))return a.some(function(a){return Kc(a,b,c,d)});switch(f){case"object":var h;if(d){for(h in a)if("$"!==h.charAt(0)&&Kc(a[h],b,c,!0))return!0;return!e&&Kc(a,b,c,!1)}if("object"===g){for(h in b){var i=b[h];if(!A(i)&&!t(i)){var j="$"===h;if(!Kc(j?a:a[h],i,c,j,j))return!1}}return!0}return c(a,b);case"function":return!1;default:return c(a,b)}}function Lc(a){return null===a?"null":typeof a}function Mc(a){var b=a.NUMBER_FORMATS;return function(a,c,d){return t(c)&&(c=b.CURRENCY_SYM),t(d)&&(d=b.PATTERNS[1].maxFrac),null==a?a:Qc(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,d).replace(/\u00A4/g,c)}}function Nc(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Qc(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Oc(a){var b,c,d,e,f,g=0;for((c=a.indexOf(sf))>-1&&(a=a.replace(sf,"")),(d=a.search(/e/i))>0?(c<0&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):c<0&&(c=a.length),d=0;a.charAt(d)==tf;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==tf;)f--;for(c-=d,b=[],e=0;d<=f;d++,e++)b[e]=+a.charAt(d)}return c>rf&&(b=b.splice(0,rf-1),g=c-1,c=1),{d:b,e:g,i:c}}function Pc(a,b,c,d){var e=a.d,f=e.length-a.i;b=t(b)?Math.min(Math.max(c,f),d):+b;var g=b+a.i,h=e[g];if(g>0)e.splice(g);else{a.i=1,e.length=g=b+1;for(var i=0;i<g;i++)e[i]=0}for(h>=5&&e[g-1]++;f<b;f++)e.push(0);var j=e.reduceRight(function(a,b,c,d){return b+=a,d[c]=b%10,Math.floor(b/10)},0);j&&(e.unshift(j),a.i++)}function Qc(a,b,c,d,e){if(!x(a)&&!y(a)||isNaN(a))return"";var f,g=!isFinite(a),h=!1,i=Math.abs(a)+"",j="";if(g)j="∞";else{f=Oc(i),Pc(f,e,b.minFrac,b.maxFrac);var k=f.d,l=f.i,m=f.e,n=[];for(h=k.reduce(function(a,b){return a&&!b},!0);l<0;)k.unshift(0),l++;l>0?n=k.splice(l,k.length):(n=k,k=[0]);var o=[];for(k.length>=b.lgSize&&o.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)o.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&o.unshift(k.join("")),j=o.join(c),n.length&&(j+=d+n.join("")),m&&(j+="e+"+m)}return a<0&&!h?b.negPre+j+b.negSuf:b.posPre+j+b.posSuf}function Rc(a,b,c){var d="";for(a<0&&(d="-",a=-a),a=""+a;a.length<b;)a=tf+a;return c&&(a=a.substr(a.length-b)),d+a}function Sc(a,b,c,d){return c=c||0,function(e){var f=e["get"+a]();return(c>0||f>-c)&&(f+=c),0===f&&-12==c&&(f=12),Rc(f,b,d)}}function Tc(a,b){return function(c,d){var e=c["get"+a]();return d[Bd(b?"SHORT"+a:a)][e]}}function Uc(a,b,c){var d=-1*c,e=d>=0?"+":"";return e+=Rc(Math[d>0?"floor":"ceil"](d/60),2)+Rc(Math.abs(d%60),2)}function Vc(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(b<=4?5:12)-b)}function Wc(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))}function Xc(a){return function(b){var c=Vc(b.getFullYear()),d=Wc(b),e=+d-+c;return Rc(1+Math.round(e/6048e5),a)}}function Yc(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function Zc(a,b){return a.getFullYear()<=0?b.ERAS[0]:b.ERAS[1]}function $c(a,b){return a.getFullYear()<=0?b.ERANAMES[0]:b.ERANAMES[1]}function _c(a){function b(a){var b;if(b=a.match(c)){var d=new Date(0),e=0,f=0,g=b[8]?d.setUTCFullYear:d.setFullYear,h=b[8]?d.setUTCHours:d.setHours;b[9]&&(e=n(b[9]+b[10]),f=n(b[9]+b[11])),g.call(d,n(b[1]),n(b[2])-1,n(b[3]));var i=n(b[4]||0)-e,j=n(b[5]||0)-f,k=n(b[6]||0),l=Math.round(1e3*parseFloat("0."+(b[7]||0)));return h.call(d,i,j,k,l),d}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,e){var g,h,i="",j=[];if(d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,x(c)&&(c=wf.test(c)?n(c):b(c)),y(c)&&(c=new Date(c)),!z(c)||!isFinite(c.getTime()))return c;for(;d;)h=vf.exec(d),h?(j=R(j,h,1),d=j.pop()):(j.push(d),d=null);var k=c.getTimezoneOffset();return e&&(k=X(e,k),c=Z(c,e,!0)),f(j,function(b){g=uf[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function ad(){return function(a,b){return t(b)&&(b=2),V(a,b)}}function bd(){return function(a,b,c){return b=Math.abs(Number(b))===1/0?Number(b):n(b),isNaN(b)?a:(y(a)&&(a=a.toString()),Rd(a)||x(a)?(c=!c||isNaN(c)?0:n(c),c=c<0?Math.max(0,a.length+c):c,b>=0?a.slice(c,c+b):0===c?a.slice(b,a.length):a.slice(Math.max(0,c+b),c)):a)}}function cd(a){function b(b,c){return c=c?-1:1,b.map(function(b){var d=1,e=q;if(A(b))e=b;else if(x(b)&&("+"!=b.charAt(0)&&"-"!=b.charAt(0)||(d="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(e=a(b),e.constant))){var f=e();e=function(a){return a[f]}}return{get:e,descending:d*c}})}function c(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}function d(a,b){return"function"==typeof a.valueOf&&(a=a.valueOf(),c(a))?a:s(a)&&(a=a.toString(),c(a))?a:b}function f(a,b){var c=typeof a;return null===a?(c="string",a="null"):"string"===c?a=a.toLowerCase():"object"===c&&(a=d(a,b)),{value:a,type:c}}function g(a,b){var c=0;return a.type===b.type?a.value!==b.value&&(c=a.value<b.value?-1:1):c=a.type<b.type?-1:1,c}return function(a,c,d){function h(a,b){return{value:a,predicateValues:j.map(function(c){return f(c.get(a),b)})}}function i(a,b){for(var c=0,d=0,e=j.length;d<e&&!(c=g(a.predicateValues[d],b.predicateValues[d])*j[d].descending);++d);return c}if(!e(a))return a;Rd(c)||(c=[c]),0===c.length&&(c=["+"]);var j=b(c,d);j.push({get:function(){return{}},descending:d?-1:1});var k=Array.prototype.map.call(a,h);return k.sort(i),a=k.map(function(a){return a.value})}}function dd(a){return A(a)&&(a={link:a}),a.restrict=a.restrict||"AC",r(a)}function ed(a,b){a.$name=b}function fd(a,b,d,e,g){var h=this,i=[];h.$error={},h.$$success={},h.$pending=c,h.$name=g(b.name||b.ngForm||"")(d),h.$dirty=!1,h.$pristine=!0,h.$valid=!0,h.$invalid=!1,h.$submitted=!1,h.$$parentForm=Bf,h.$rollbackViewValue=function(){f(i,function(a){a.$rollbackViewValue()})},h.$commitViewValue=function(){f(i,function(a){a.$commitViewValue()})},h.$addControl=function(a){na(a.$name,"input"),i.push(a),a.$name&&(h[a.$name]=a),a.$$parentForm=h},h.$$renameControl=function(a,b){var c=a.$name;h[c]===a&&delete h[c],h[b]=a,a.$name=b},h.$removeControl=function(a){a.$name&&h[a.$name]===a&&delete h[a.$name],f(h.$pending,function(b,c){h.$setValidity(c,null,a)}),f(h.$error,function(b,c){h.$setValidity(c,null,a)}),f(h.$$success,function(b,c){h.$setValidity(c,null,a)}),N(i,a),a.$$parentForm=Bf},ud({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];if(d){-1===d.indexOf(c)&&d.push(c)}else a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(N(d,c),0===d.length&&delete a[b])},$animate:e}),h.$setDirty=function(){e.removeClass(a,lg),e.addClass(a,mg),h.$dirty=!0,h.$pristine=!1,h.$$parentForm.$setDirty()},h.$setPristine=function(){e.setClass(a,lg,mg+" "+Cf),h.$dirty=!1,h.$pristine=!0,h.$submitted=!1,f(i,function(a){a.$setPristine()})},h.$setUntouched=function(){f(i,function(a){a.$setUntouched()})},h.$setSubmitted=function(){e.addClass(a,Cf),h.$submitted=!0,h.$$parentForm.$setSubmitted()}}function gd(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function hd(a,b,c,d,e,f){id(a,b,c,d,e,f),gd(d)}function id(a,b,c,d,e,f){var g=zd(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0}),b.on("compositionend",function(){h=!1,j()})}var i,j=function(a){if(i&&(f.defer.cancel(i),i=null),!h){var e=b.val(),j=a&&a.type;"password"===g||c.ngTrim&&"false"===c.ngTrim||(e=Td(e)),(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,j)}};if(e.hasEvent("input"))b.on("input",j);else{var k=function(a,b,c){i||(i=f.defer(function(){i=null,b&&b.value===c||j(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&b<19||37<=b&&b<=40||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Qf[g]&&d.$$hasNativeValidators&&g===c.type&&b.on(Pf,function(a){if(!i){var b=this[yd],c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,b.badInput===c&&b.typeMismatch===d||j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function jd(a,b){if(z(a))return a;if(x(a)){Mf.lastIndex=0;var c=Mf.exec(a);if(c){var d=+c[1],e=+c[2],f=0,g=0,h=0,i=0,j=Vc(d),k=7*(e-1);return b&&(f=b.getHours(),g=b.getMinutes(),h=b.getSeconds(),i=b.getMilliseconds()),new Date(d,0,j.getDate()+k,f,g,h,i)}}return NaN}function kd(a,b){return function(c,d){var e,g;if(z(c))return c;if(x(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Gf.test(c))return new Date(c);if(a.lastIndex=0,e=a.exec(c))return e.shift(),g=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},f(e,function(a,c){c<b.length&&(g[b[c]]=+a)}),new Date(g.yyyy,g.MM-1,g.dd,g.HH,g.mm,g.ss||0,1e3*g.sss||0)}return NaN}}function ld(a,b,d,e){return function(f,g,h,i,j,k,l){function m(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function n(a){return u(a)&&!z(a)?d(a)||c:a}md(f,g,h,i),id(f,g,h,i,j,k);var o,p=i&&i.$options&&i.$options.timezone;if(i.$$parserName=a,i.$parsers.push(function(a){if(i.$isEmpty(a))return null;if(b.test(a)){var e=d(a,o);return p&&(e=Z(e,p)),e}return c}),i.$formatters.push(function(a){if(a&&!z(a))throw qg("datefmt","Expected `{0}` to be a date",a);return m(a)?(o=a,o&&p&&(o=Z(o,p,!0)),l("date")(a,e,p)):(o=null,"")}),u(h.min)||h.ngMin){var q;i.$validators.min=function(a){return!m(a)||t(q)||d(a)>=q},h.$observe("min",function(a){q=n(a),i.$validate()})}if(u(h.max)||h.ngMax){var r;i.$validators.max=function(a){return!m(a)||t(r)||d(a)<=r},h.$observe("max",function(a){r=n(a),i.$validate()})}}}function md(a,b,d,e){var f=b[0];(e.$$hasNativeValidators=v(f.validity))&&e.$parsers.push(function(a){var d=b.prop(yd)||{};return d.badInput&&!d.typeMismatch?c:a})}function nd(a,b,d,e,f,g){if(md(a,b,d,e),id(a,b,d,e,f,g),e.$$parserName="number",e.$parsers.push(function(a){return e.$isEmpty(a)?null:Jf.test(a)?parseFloat(a):c}),e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!y(a))throw qg("numfmt","Expected `{0}` to be a number",a);a=a.toString()}return a}),u(d.min)||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||t(h)||a>=h},d.$observe("min",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),h=y(a)&&!isNaN(a)?a:c,e.$validate()})}if(u(d.max)||d.ngMax){var i;e.$validators.max=function(a){return e.$isEmpty(a)||t(i)||a<=i},d.$observe("max",function(a){u(a)&&!y(a)&&(a=parseFloat(a,10)),i=y(a)&&!isNaN(a)?a:c,e.$validate()})}}function od(a,b,c,d,e,f){id(a,b,c,d,e,f),gd(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Hf.test(c)}}function pd(a,b,c,d,e,f){id(a,b,c,d,e,f),gd(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||If.test(c)}}function qd(a,b,c,d){t(c.name)&&b.attr("name",i());var e=function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)};b.on("click",e),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function rd(a,b,c,d,e){var f;if(u(d)){if(f=a(d),!f.constant)throw qg("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",c,d);return f(b)}return e}function sd(a,b,c,d,e,f,g,h){var i=rd(h,a,"ngTrueValue",c.ngTrueValue,!0),j=rd(h,a,"ngFalseValue",c.ngFalseValue,!1),k=function(a){d.$setViewValue(b[0].checked,a&&a.type)};b.on("click",k),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return!1===a},d.$formatters.push(function(a){return Q(a,i)}),d.$parsers.push(function(a){return a?i:j})}function td(a,b){return a="ngClass"+a,["$animate",function(c){function d(a,b){var c=[];a:for(var d=0;d<a.length;d++){for(var e=a[d],f=0;f<b.length;f++)if(e==b[f])continue a;c.push(e)}return c}function e(a){var b=[];return Rd(a)?(f(a,function(a){b=b.concat(e(a))}),b):x(a)?a.split(" "):v(a)?(f(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",link:function(g,h,i){function j(a){var b=l(a,1);i.$addClass(b)}function k(a){var b=l(a,-1);i.$removeClass(b)}function l(a,b){var c=h.data("$classCounts")||qa(),d=[];return f(a,function(a){(b>0||c[a])&&(c[a]=(c[a]||0)+b,c[a]===+(b>0)&&d.push(a))}),h.data("$classCounts",c),d.join(" ")}function m(a,b){var e=d(b,a),f=d(a,b);e=l(e,1),f=l(f,-1),e&&e.length&&c.addClass(h,e),f&&f.length&&c.removeClass(h,f)}function n(a){if(!0===b||g.$index%2===b){var c=e(a||[]);if(o){if(!Q(a,o)){var d=e(o);m(d,c)}}else j(c)}o=Rd(a)?a.map(function(a){return P(a)}):P(a)}var o;g.$watch(i[a],n,!0),i.$observe("class",function(b){n(g.$eval(i[a]))}),"ngClass"!==a&&g.$watch("$index",function(c,d){var f=1&c;if(f!==(1&d)){var h=e(g.$eval(i[a]));f===b?j(h):k(h)}})}}}]}function ud(a){function b(a,b,i){t(b)?d("$pending",a,i):e("$pending",a,i),H(b)?b?(l(h.$error,a,i),k(h.$$success,a,i)):(k(h.$error,a,i),l(h.$$success,a,i)):(l(h.$error,a,i),l(h.$$success,a,i)),h.$pending?(f(pg,!0),h.$valid=h.$invalid=c,g("",null)):(f(pg,!1),h.$valid=vd(h.$error),h.$invalid=!h.$valid,g("",h.$valid));var j;j=h.$pending&&h.$pending[a]?c:!h.$error[a]&&(!!h.$$success[a]||null),g(a,j),h.$$parentForm.$setValidity(a,j,h)}function d(a,b,c){h[a]||(h[a]={}),k(h[a],b,c)}function e(a,b,d){h[a]&&l(h[a],b,d),vd(h[a])&&(h[a]=c)}function f(a,b){b&&!j[a]?(m.addClass(i,a),j[a]=!0):!b&&j[a]&&(m.removeClass(i,a),j[a]=!1)}function g(a,b){a=a?"-"+ja(a,"-"):"",f(jg+a,!0===b),f(kg+a,!1===b)}var h=a.ctrl,i=a.$element,j={},k=a.set,l=a.unset,m=a.$animate;j[kg]=!(j[jg]=i.hasClass(jg)),h.$setValidity=b}function vd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function wd(a){a[0].hasAttribute("selected")&&(a[0].selected=!0)}var xd=/^\/(.+)\/([a-z]*)$/,yd="validity",zd=function(a){return x(a)?a.toLowerCase():a},Ad=Object.prototype.hasOwnProperty,Bd=function(a){return x(a)?a.toUpperCase():a},Cd=function(a){return x(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(32|a.charCodeAt(0))}):a},Dd=function(a){return x(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(-33&a.charCodeAt(0))}):a};"i"!=="I".toLowerCase()&&(zd=Cd,Bd=Dd);var Ed,Fd,Gd,Hd,Id=[].slice,Jd=[].splice,Kd=[].push,Ld=Object.prototype.toString,Md=Object.getPrototypeOf,Nd=d("ng"),Od=a.angular||(a.angular={}),Pd=0;Ed=b.documentMode,p.$inject=[],q.$inject=[];var Qd,Rd=Array.isArray,Sd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Td=function(a){return x(a)?a.trim():a},Ud=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Vd=function(){function a(){try{return new Function(""),!1}catch(a){return!0}}if(!u(Vd.rules)){var c=b.querySelector("[ng-csp]")||b.querySelector("[data-ng-csp]");if(c){var d=c.getAttribute("ng-csp")||c.getAttribute("data-ng-csp");Vd.rules={noUnsafeEval:!d||-1!==d.indexOf("no-unsafe-eval"),noInlineStyle:!d||-1!==d.indexOf("no-inline-style")}}else Vd.rules={noUnsafeEval:a(),noInlineStyle:!1}}return Vd.rules},Wd=function(){if(u(Wd.name_))return Wd.name_;var a,c,d,e,f=Yd.length;for(c=0;c<f;++c)if(d=Yd[c],a=b.querySelector("["+d.replace(":","\\:")+"jq]")){e=a.getAttribute(d+"jq");break}return Wd.name_=e},Xd=/:/g,Yd=["ng-","data-ng-","ng:","x-ng-"],Zd=/[A-Z]/g,$d=!1,_d=1,ae=2,be=3,ce=8,de=9,ee=11,fe={full:"1.4.14",major:1,minor:4,dot:14,codeName:"material-distinction"};Da.expando="ng339";var ge=Da.cache={},he=1,ie=function(a,b,c){a.addEventListener(b,c,!1)},je=function(a,b,c){a.removeEventListener(b,c,!1)};Da._data=function(a){return this.cache[a[this.expando]]||{}};var ke=/([\:\-\_]+(.))/g,le=/^moz([A-Z])/,me={mouseleave:"mouseout",mouseenter:"mouseover"},ne=d("jqLite"),oe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,pe=/<|&#?\w+;/,qe=/<([\w:-]+)/,re=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,se={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>","</tr></tbody></table>"],_default:[0,"",""]};se.optgroup=se.option,se.tbody=se.tfoot=se.colgroup=se.caption=se.thead,se.th=se.td;var te=Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},ue=Da.prototype={ready:function(c){function d(){e||(e=!0,c())}var e=!1;"complete"===b.readyState?setTimeout(d):(this.on("DOMContentLoaded",d),Da(a).on("load",d))},toString:function(){var a=[];return f(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Fd(a>=0?this[a]:this[this.length+a])},length:0,push:Kd,sort:[].sort,splice:[].splice},ve={};f("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){ve[zd(a)]=a});var we={};f("input,select,option,textarea,button,form,details".split(","),function(a){we[a]=!0});var xe={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};f({data:Ja,removeData:Ha,hasData:za},function(a,b){Da[b]=a}),f({data:Ja,inheritedData:Pa,scope:function(a){return Fd.data(a,"$scope")||Pa(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Fd.data(a,"$isolateScope")||Fd.data(a,"$isolateScopeNoTemplate")},controller:Oa,injector:function(a){return Pa(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Ka,css:function(a,b,c){if(b=wa(b),!u(c))return a.style[b];a.style[b]=c},attr:function(a,b,d){var e=a.nodeType;if(e!==be&&e!==ae&&e!==ce){var f=zd(b);if(ve[f]){if(!u(d))return a[b]||(a.attributes.getNamedItem(b)||p).specified?f:c;d?(a[b]=!0,a.setAttribute(b,f)):(a[b]=!1,a.removeAttribute(f))}else if(u(d))a.setAttribute(b,d);else if(a.getAttribute){var g=a.getAttribute(b,2);return null===g?c:g}}},prop:function(a,b,c){if(!u(c))return a[b];a[b]=c},text:function(){function a(a,b){if(t(b)){var c=a.nodeType;return c===_d||c===be?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(t(b)){if(a.multiple&&"select"===M(a)){var c=[];return f(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){if(t(b))return a.innerHTML;Fa(a,!0),a.innerHTML=b},empty:Qa},function(a,b){Da.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Qa&&t(2==a.length&&a!==Ka&&a!==Oa?b:c)){if(v(b)){for(d=0;d<f;d++)if(a===Ja)a(this[d],b);else for(e in b)a(this[d],e,b[e]);return this}for(var g=a.$dv,h=t(g)?Math.min(f,1):f,i=0;i<h;i++){var j=a(this[i],b,c);g=g?g+j:j}return g}for(d=0;d<f;d++)a(this[d],b,c);return this}}),f({removeData:Ha,on:function(a,b,d,e){if(u(e))throw ne("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ya(a)){var f=Ia(a,!0),g=f.events,h=f.handle;h||(h=f.handle=Va(a,g));for(var i=b.indexOf(" ")>=0?b.split(" "):[b],j=i.length,k=function(b,c,e){var f=g[b];f||(f=g[b]=[],f.specialHandlerWrapper=c,"$destroy"===b||e||ie(a,b,h)),f.push(d)};j--;)b=i[j],me[b]?(k(me[b],Xa),k(b,c,!0)):k(b)}},off:Ga,one:function(a,b,c){a=Fd(a),a.on(b,function d(){a.off(b,c),a.off(b,d)}),a.on(b,c)},replaceWith:function(a,b){var c,d=a.parentNode;Fa(a),f(new Da(b),function(b){c?d.insertBefore(b,c.nextSibling):d.replaceChild(b,a),c=b})},children:function(a){var b=[];return f(a.childNodes,function(a){a.nodeType===_d&&b.push(a)}),b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var c=a.nodeType;if(c===_d||c===ee){b=new Da(b);for(var d=0,e=b.length;d<e;d++){var f=b[d];a.appendChild(f)}}},prepend:function(a,b){if(a.nodeType===_d){var c=a.firstChild;f(new Da(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){Ca(a,Fd(b).eq(0).clone()[0])},remove:Ra,detach:function(a){Ra(a,!0)},after:function(a,b){var c=a,d=a.parentNode;b=new Da(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];d.insertBefore(g,c.nextSibling),c=g}},addClass:Ma,removeClass:La,toggleClass:function(a,b,c){b&&f(b.split(" "),function(b){var d=c;t(d)&&(d=!Ka(a,b)),(d?Ma:La)(a,b)})},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==ee?b:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Ea,triggerHandler:function(a,b,c){var d,e,g,h=b.type||b,i=Ia(a),j=i&&i.events,k=j&&j[h];k&&(d={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:p,type:h,target:a},b.type&&(d=l(d,b)),e=P(k),g=c?[d].concat(c):[d],f(e,function(b){d.isImmediatePropagationStopped()||b.apply(a,g)}))}},function(a,b){Da.prototype[b]=function(b,c,d){for(var e,f=0,g=this.length;f<g;f++)t(e)?(e=a(this[f],b,c,d),u(e)&&(e=Fd(e))):Na(e,a(this[f],b,c,d));return u(e)?e:this},Da.prototype.bind=Da.prototype.on,Da.prototype.unbind=Da.prototype.off}),$a.prototype={put:function(a,b){this[Za(a,this.nextUid)]=b},get:function(a){return this[Za(a,this.nextUid)]},remove:function(a){var b=this[a=Za(a,this.nextUid)];return delete this[a],b}};var ye=[function(){this.$get=[function(){return $a}]}],ze=/^[^\(]*\(\s*([^\)]*)\)/m,Ae=/,/,Be=/^\s*(_?)(\S+?)\1\s*$/,Ce=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,De=d("$injector");bb.$$annotate=ab;var Ee=d("$animate"),Fe=1,Ge="ng-animate",He=function(){this.$get=function(){}},Ie=function(){var a=new $a,b=[];this.$get=["$$AnimateRunner","$rootScope",function(c,d){function e(a,b,c){var d=!1;return b&&(b=x(b)?b.split(" "):Rd(b)?b:[],f(b,function(b){b&&(d=!0,a[b]=c)})),d}function g(){f(b,function(b){var c=a.get(b);if(c){var d=fb(b.attr("class")),e="",g="";f(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:g+=(g.length?" ":"")+b)}),f(b,function(a){e&&Ma(a,e),g&&La(a,g)}),a.remove(b)}}),b.length=0}function h(c,f,h){var i=a.get(c)||{},j=e(i,f,!0),k=e(i,h,!1);(j||k)&&(a.put(c,i),b.push(c),1===b.length&&d.$$postDigest(g))}return{enabled:p,on:p,off:p,pin:p,push:function(a,b,d,e){e&&e(),d=d||{},d.from&&a.css(d.from),d.to&&a.css(d.to),(d.addClass||d.removeClass)&&h(a,d.addClass,d.removeClass);var f=new c;return f.complete(),f}}}]},Je=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null),this.register=function(c,d){if(c&&"."!==c.charAt(0))throw Ee("notcsel","Expecting class selector starting with '.' got '{0}'.",c);var e=c+"-animation";b.$$registeredAnimations[c.substr(1)]=e,a.factory(e,d)},this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null,this.$$classNameFilter)){if(new RegExp("(\\s+|\\/)"+Ge+"(\\s+|\\/)").test(this.$$classNameFilter.toString()))throw Ee("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ge)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function b(a,b,c){if(c){var d=eb(c);!d||d.parentNode||d.previousElementSibling||(c=null)}c?c.after(a):b.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(c,d,e,f){return d=d&&Fd(d),e=e&&Fd(e),d=d||e.parent(),b(c,d,e),a.push(c,"enter",gb(f))},move:function(c,d,e,f){return d=d&&Fd(d),e=e&&Fd(e),d=d||e.parent(),b(c,d,e),a.push(c,"move",gb(f))},leave:function(b,c){return a.push(b,"leave",gb(c),function(){b.remove()})},addClass:function(b,c,d){return d=gb(d),d.addClass=db(d.addclass,c),a.push(b,"addClass",d)},removeClass:function(b,c,d){return d=gb(d),d.removeClass=db(d.removeClass,c),a.push(b,"removeClass",d)},setClass:function(b,c,d,e){return e=gb(e),e.addClass=db(e.addClass,c),e.removeClass=db(e.removeClass,d),a.push(b,"setClass",e)},animate:function(b,c,d,e,f){return f=gb(f),f.from=f.from?l(f.from,c):c,f.to=f.to?l(f.to,d):d,e=e||"ng-inline-animate",f.tempClasses=db(f.tempClasses,e),a.push(b,"animate",f)}}}]}],Ke=function(){this.$get=["$$rAF",function(a){function b(b){c.push(b),c.length>1||a(function(){for(var a=0;a<c.length;a++)c[a]();c=[]})}var c=[];return function(){var a=!1;return b(function(){a=!0}),function(c){a?c():b(c)}}}]},Le=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(a,b,c,d,e){function g(a){this.setHost(a);var b=c(),f=function(a){e(a,0,!1)};this._doneCallbacks=[],this._tick=function(a){var c=d[0];c&&c.hidden?f(a):b(a)},this._state=0}var h=2;return g.chain=function(a,b){function c(){if(d===a.length)return void b(!0);a[d](function(a){if(!1===a)return void b(!1);d++,c()})}var d=0;c()},g.all=function(a,b){function c(c){e=e&&c,++d===a.length&&b(e)}var d=0,e=!0;f(a,function(a){a.done(c)})},g.prototype={setHost:function(a){this.host=a||{}},done:function(a){this._state===h?a():this._doneCallbacks.push(a)},progress:p,getPromise:function(){if(!this.promise){var b=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)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){this._state!==h&&(f(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=h)}},g}]},Me=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,c){return function(b,d){function e(){return a(function(){f(),h||i.complete(),h=!0}),i}function f(){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)}var g=d||{};g.$$prepared||(g=O(g)),g.cleanupStyles&&(g.from=g.to=null),g.from&&(b.css(g.from),g.from=null);var h,i=new c;return{start:e,end:e}}}]},Ne=d("$compile");lb.$inject=["$provide","$$sanitizeUriProvider"];var Oe=/^((?:x|data)[\:\-_])/i,Pe=d("$controller"),Qe=/^(\S+)(\s+as\s+([\w$]+))?$/,Re=function(){this.$get=["$document",function(a){return function(b){return b?!b.nodeType&&b instanceof Fd&&(b=b[0]):b=a[0].body,b.offsetWidth+1}}]},Se="application/json",Te={"Content-Type":Se+";charset=utf-8"},Ue=/^\[|^\{(?!\{)/,Ve={"[":/]$/,"{":/}$/},We=/^\)\]\}',?\n/,Xe=d("$http"),Ye=function(a){return function(){throw Xe("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",a)}},Ze=Od.$interpolateMinErr=d("$interpolate");Ze.throwNoconcat=function(a){throw Ze("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",a)},Ze.interr=function(a,b){return Ze("interr","Can't interpolate: {0}\n{1}",a,b.toString())};var $e=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,_e={http:80,https:443,ftp:21},af=d("$location"),bf={$$html5:!1,$$replace:!1,absUrl:Tb("$$absUrl"),url:function(a){if(t(a))return this.$$url;var b=$e.exec(a);return(b[1]||""===a)&&this.path(decodeURIComponent(b[1])),(b[2]||b[1]||""===a)&&this.search(b[3]||""),this.hash(b[5]||""),this},protocol:Tb("$$protocol"),host:Tb("$$host"),port:Tb("$$port"),path:Ub("$$path",function(a){return a=null!==a?a.toString():"","/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(x(a)||y(a))a=a.toString(),this.$$search=aa(a);else{if(!v(a))throw af("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");a=O(a,{}),f(a,function(b,c){null==b&&delete a[c]}),this.$$search=a}break;default:t(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}return this.$$compose(),this},hash:Ub("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){return this.$$replace=!0,this}}
;f([Sb,Rb,Qb],function(a){a.prototype=Object.create(bf),a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==Qb||!this.$$html5)throw af("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=t(b)?null:b,this}});var cf=d("$parse"),df=Function.prototype.call,ef=Function.prototype.apply,ff=Function.prototype.bind,gf=qa();f("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){gf[a]=!0});var hf={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},jf=function(a){this.options=a};jf.prototype={constructor:jf,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index<this.text.length;){var b=this.text.charAt(this.index);if('"'===b||"'"===b)this.readString(b);else if(this.isNumber(b)||"."===b&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(b))this.readIdent();else if(this.is(b,"(){}[].,;:?"))this.tokens.push({index:this.index,text:b}),this.index++;else if(this.isWhitespace(b))this.index++;else{var c=b+this.peek(),d=c+this.peek(2),e=gf[b],f=gf[c],g=gf[d];if(e||f||g){var h=g?d:f?c:b;this.tokens.push({index:this.index,text:h,operator:!0}),this.index+=h.length}else 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){var b=a||1;return this.index+b<this.text.length&&this.text.charAt(this.index+b)},isNumber:function(a){return"0"<=a&&a<="9"&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||" "===a},isIdent:function(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){c=c||this.index;var d=u(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw cf("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var c=zd(this.text.charAt(this.index));if("."==c||this.isNumber(c))a+=c;else{var d=this.peek();if("e"==c&&this.isExpOperator(d))a+=c;else if(this.isExpOperator(c)&&d&&this.isNumber(d)&&"e"==a.charAt(a.length-1))a+=c;else{if(!this.isExpOperator(c)||d&&this.isNumber(d)||"e"!=a.charAt(a.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var b=this.text.charAt(this.index);if(!this.isIdent(b)&&!this.isNumber(b))break;this.index++}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 c="",d=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index);if(d+=f,e){if("u"===f){var g=this.text.substring(this.index+1,this.index+5);g.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+g+"]"),this.index+=4,c+=String.fromCharCode(parseInt(g,16))}else{c+=hf[f]||f}e=!1}else if("\\"===f)e=!0;else{if(f===a)return this.index++,void this.tokens.push({index:b,text:d,constant:!0,value:c});c+=f}this.index++}this.throwError("Unterminated quote",b)}};var kf=function(a,b){this.lexer=a,this.options=b};kf.Program="Program",kf.ExpressionStatement="ExpressionStatement",kf.AssignmentExpression="AssignmentExpression",kf.ConditionalExpression="ConditionalExpression",kf.LogicalExpression="LogicalExpression",kf.BinaryExpression="BinaryExpression",kf.UnaryExpression="UnaryExpression",kf.CallExpression="CallExpression",kf.MemberExpression="MemberExpression",kf.Identifier="Identifier",kf.Literal="Literal",kf.ArrayExpression="ArrayExpression",kf.Property="Property",kf.ObjectExpression="ObjectExpression",kf.ThisExpression="ThisExpression",kf.NGValueParameter="NGValueParameter",kf.prototype={ast:function(a){this.text=a,this.tokens=this.lexer.lex(a);var b=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),b},program:function(){for(var a=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:kf.Program,body:a}},expressionStatement:function(){return{type:kf.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();return this.expect("=")&&(a={type:kf.AssignmentExpression,left:a,right:this.assignment(),operator:"="}),a},ternary:function(){var a,b,c=this.logicalOR();return this.expect("?")&&(a=this.expression(),this.consume(":"))?(b=this.expression(),{type:kf.ConditionalExpression,test:c,alternate:a,consequent:b}):c},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:kf.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:kf.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a,b=this.relational();a=this.expect("==","!=","===","!==");)b={type:kf.BinaryExpression,operator:a.text,left:b,right:this.relational()};return b},relational:function(){for(var a,b=this.additive();a=this.expect("<",">","<=",">=");)b={type:kf.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:kf.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:kf.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:kf.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("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=O(this.constants[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:kf.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:kf.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:kf.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){for(var b=[a],c={type:kf.CallExpression,callee:this.identifier(),arguments:b,filter:!0};this.expect(":");)b.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do{a.push(this.expression())}while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:kf.Identifier,name:a.text}},constant:function(){return{type:kf.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(","));return this.consume("]"),{type:kf.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:kf.Property,kind:"init"},this.peek().constant?a.key=this.constant():this.peek().identifier?a.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),a.value=this.expression(),b.push(a)}while(this.expect(","));return this.consume("}"),{type:kf.ObjectExpression,properties:b}},throwError:function(a,b){throw cf("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw cf("ueoe","Unexpected end of expression: {0}",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw cf("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){var f=this.tokens[a],g=f.text;if(g===b||g===c||g===d||g===e||!b&&!c&&!d&&!e)return f}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return!!e&&(this.tokens.shift(),e)},constants:{true:{type:kf.Literal,value:!0},false:{type:kf.Literal,value:!1},null:{type:kf.Literal,value:null},undefined:{type:kf.Literal,value:c},this:{type:kf.ThisExpression}}},jc.prototype={compile:function(a,b){var d=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},dc(e,d.$filter);var g,h="";if(this.stage="assign",g=gc(e)){this.state.computing="assign";var i=this.nextId();this.recurse(g,i),this.return_(i),h="fn.assign="+this.generateFunction("assign","s,v,l")}var j=ec(e.body);d.stage="inputs",f(j,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}},d.state.computing=c;var e=d.nextId();d.recurse(a,e),d.return_(e),d.state.inputs.push(c),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e);var k='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+h+this.watchFns()+"return fn;",l=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",k)(this.$filter,Xb,Zb,$b,Yb,_b,ac,bc,a);return this.state=this.stage=c,l.literal=hc(e),l.constant=ic(e),l},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return f(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return f(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),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,e,g,h){var i,j,k,l,m=this;if(e=e||p,!h&&u(a.watchId))return b=b||this.nextId(),void this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,e,g,!0));switch(a.type){case kf.Program:f(a.body,function(b,d){m.recurse(b.expression,c,c,function(a){j=a}),d!==a.body.length-1?m.current().body.push(j,";"):m.return_(j)});break;case kf.Literal:l=this.escape(a.value),this.assign(b,l),e(l);break;case kf.UnaryExpression:this.recurse(a.argument,c,c,function(a){j=a}),l=a.operator+"("+this.ifDefined(j,0)+")",this.assign(b,l),e(l);break;case kf.BinaryExpression:this.recurse(a.left,c,c,function(a){i=a}),this.recurse(a.right,c,c,function(a){j=a}),l="+"===a.operator?this.plus(i,j):"-"===a.operator?this.ifDefined(i,0)+a.operator+this.ifDefined(j,0):"("+i+")"+a.operator+"("+j+")",this.assign(b,l),e(l);break;case kf.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case kf.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case kf.Identifier:b=b||this.nextId(),d&&(d.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name),Xb(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){g&&1!==g&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||lc(a.name))&&m.addEnsureSafeObject(b),e(b);break;case kf.MemberExpression:i=d&&(d.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,i,c,function(){m.if_(m.notNull(i),function(){g&&1!==g&&m.addEnsureSafeAssignContext(i),a.computed?(j=m.nextId(),m.recurse(a.property,j),m.getStringValue(j),m.addEnsureSafeMemberName(j),g&&1!==g&&m.if_(m.not(m.computedMember(i,j)),m.lazyAssign(m.computedMember(i,j),"{}")),l=m.ensureSafeObject(m.computedMember(i,j)),m.assign(b,l),d&&(d.computed=!0,d.name=j)):(Xb(a.property.name),g&&1!==g&&m.if_(m.not(m.nonComputedMember(i,a.property.name)),m.lazyAssign(m.nonComputedMember(i,a.property.name),"{}")),l=m.nonComputedMember(i,a.property.name),(m.state.expensiveChecks||lc(a.property.name))&&(l=m.ensureSafeObject(l)),m.assign(b,l),d&&(d.computed=!1,d.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!g);break;case kf.CallExpression:b=b||this.nextId(),a.filter?(j=m.filter(a.callee.name),k=[],f(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),k.push(b)}),l=j+"("+k.join(",")+")",m.assign(b,l),e(b)):(j=m.nextId(),i={},k=[],m.recurse(a.callee,j,i,function(){m.if_(m.notNull(j),function(){m.addEnsureSafeFunction(j),f(a.arguments,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(m.ensureSafeObject(a))})}),i.name?(m.state.expensiveChecks||m.addEnsureSafeObject(i.context),l=m.member(i.context,i.name,i.computed)+"("+k.join(",")+")"):l=j+"("+k.join(",")+")",l=m.ensureSafeObject(l),m.assign(b,l)},function(){m.assign(b,"undefined")}),e(b)}));break;case kf.AssignmentExpression:if(j=this.nextId(),i={},!fc(a.left))throw cf("lval","Trying to assign a value to a non l-value");this.recurse(a.left,c,i,function(){m.if_(m.notNull(i.context),function(){m.recurse(a.right,j),m.addEnsureSafeObject(m.member(i.context,i.name,i.computed)),m.addEnsureSafeAssignContext(i.context),l=m.member(i.context,i.name,i.computed)+a.operator+j,m.assign(b,l),e(b||l)})},1);break;case kf.ArrayExpression:k=[],f(a.elements,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(a)})}),l="["+k.join(",")+"]",this.assign(b,l),e(l);break;case kf.ObjectExpression:k=[],f(a.properties,function(a){m.recurse(a.value,m.nextId(),c,function(b){k.push(m.escape(a.key.type===kf.Identifier?a.key.name:""+a.key.value)+":"+b)})}),l="{"+k.join(",")+"}",this.assign(b,l),e(l);break;case kf.ThisExpression:this.assign(b,"s"),e("s");break;case kf.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),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,c){if(!0===a)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.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(x(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(y(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if(void 0===a)return"undefined";throw cf("esc","IMPOSSIBLE")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},kc.prototype={compile:function(a,b){var c=this,d=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,dc(d,c.$filter);var e,g;(e=gc(d))&&(g=this.recurse(e));var h,i=ec(d.body);i&&(h=[],f(i,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var j=[];f(d.body,function(a){j.push(c.recurse(a.expression))});var k=0===d.body.length?function(){}:1===d.body.length?j[0]:function(a,b){var c;return f(j,function(d){c=d(a,b)}),c};return g&&(k.assign=function(a,b,c){return g(a,c,b)}),h&&(k.inputs=h),k.literal=hc(d),k.constant=ic(d),k},recurse:function(a,b,d){var e,g,h,i=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case kf.Literal:return this.value(a.value,b);case kf.UnaryExpression:return g=this.recurse(a.argument),this["unary"+a.operator](g,b);case kf.BinaryExpression:case kf.LogicalExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case kf.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case kf.Identifier:return Xb(a.name,i.expression),i.identifier(a.name,i.expensiveChecks||lc(a.name),b,d,i.expression);case kf.MemberExpression:return e=this.recurse(a.object,!1,!!d),a.computed||(Xb(a.property.name,i.expression),g=a.property.name),a.computed&&(g=this.recurse(a.property)),a.computed?this.computedMember(e,g,b,d,i.expression):this.nonComputedMember(e,g,i.expensiveChecks,b,d,i.expression);case kf.CallExpression:return h=[],f(a.arguments,function(a){h.push(i.recurse(a))}),a.filter&&(g=this.$filter(a.callee.name)),a.filter||(g=this.recurse(a.callee,!0)),a.filter?function(a,d,e,f){for(var i=[],j=0;j<h.length;++j)i.push(h[j](a,d,e,f));var k=g.apply(c,i,f);return b?{context:c,name:c,value:k}:k}:function(a,c,d,e){var f,j=g(a,c,d,e);if(null!=j.value){Zb(j.context,i.expression),$b(j.value,i.expression);for(var k=[],l=0;l<h.length;++l)k.push(Zb(h[l](a,c,d,e),i.expression));f=Zb(j.value.apply(j.context,k),i.expression)}return b?{value:f}:f};case kf.AssignmentExpression:return e=this.recurse(a.left,!0,1),g=this.recurse(a.right),function(a,c,d,f){var h=e(a,c,d,f),j=g(a,c,d,f);return Zb(h.value,i.expression),_b(h.context),h.context[h.name]=j,b?{value:j}:j};case kf.ArrayExpression:return h=[],f(a.elements,function(a){h.push(i.recurse(a))}),function(a,c,d,e){for(var f=[],g=0;g<h.length;++g)f.push(h[g](a,c,d,e));return b?{value:f}:f};case kf.ObjectExpression:return h=[],f(a.properties,function(a){h.push({key:a.key.type===kf.Identifier?a.key.name:""+a.key.value,value:i.recurse(a.value)})}),function(a,c,d,e){for(var f={},g=0;g<h.length;++g)f[h[g].key]=h[g].value(a,c,d,e);return b?{value:f}:f};case kf.ThisExpression:return function(a){return b?{value:a}:a};case kf.NGValueParameter:return function(a,c,d,e){return b?{value:d}:d}}},"unary+":function(a,b){return function(c,d,e,f){var g=a(c,d,e,f);return g=u(g)?+g:0,b?{value:g}:g}},"unary-":function(a,b){return function(c,d,e,f){var g=a(c,d,e,f);return g=u(g)?-g:0,b?{value:g}:g}},"unary!":function(a,b){return function(c,d,e,f){var g=!a(c,d,e,f);return b?{value:g}:g}},"binary+":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g),i=b(d,e,f,g),j=bc(h,i);return c?{value:j}:j}},"binary-":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g),i=b(d,e,f,g),j=(u(h)?h:0)-(u(i)?i:0);return c?{value:j}:j}},"binary*":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)*b(d,e,f,g);return c?{value:h}:h}},"binary/":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)/b(d,e,f,g);return c?{value:h}:h}},"binary%":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)%b(d,e,f,g);return c?{value:h}:h}},"binary===":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)===b(d,e,f,g);return c?{value:h}:h}},"binary!==":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)!==b(d,e,f,g);return c?{value:h}:h}},"binary==":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)==b(d,e,f,g);return c?{value:h}:h}},"binary!=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)!=b(d,e,f,g);return c?{value:h}:h}},"binary<":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<b(d,e,f,g);return c?{value:h}:h}},"binary>":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>b(d,e,f,g);return c?{value:h}:h}},"binary<=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)<=b(d,e,f,g);return c?{value:h}:h}},"binary>=":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)>=b(d,e,f,g);return c?{value:h}:h}},"binary&&":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)&&b(d,e,f,g);return c?{value:h}:h}},"binary||":function(a,b,c){return function(d,e,f,g){var h=a(d,e,f,g)||b(d,e,f,g);return c?{value:h}:h}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){var i=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h);return d?{value:i}:i}},value:function(a,b){return function(){return b?{context:c,name:c,value:a}:a}},identifier:function(a,b,d,e,f){return function(g,h,i,j){var k=h&&a in h?h:g;e&&1!==e&&k&&!k[a]&&(k[a]={});var l=k?k[a]:c;return b&&Zb(l,f),d?{context:k,name:a,value:l}:l}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=Yb(j),Xb(j,e),d&&1!==d&&(_b(l),l&&!l[j]&&(l[j]={})),k=l[j],Zb(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,d,e,f,g){return function(h,i,j,k){var l=a(h,i,j,k);f&&1!==f&&(_b(l),l&&!l[b]&&(l[b]={}));var m=null!=l?l[b]:c;return(d||lc(b))&&Zb(m,g),e?{context:l,name:b,value:m}:m}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var lf=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new kf(this.lexer),this.astCompiler=c.csp?new kc(this.ast,b):new jc(this.ast,b)};lf.prototype={constructor:lf,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var mf=Object.prototype.valueOf,nf=d("$sce"),of={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Ne=d("$compile"),pf=b.createElement("a"),qf=Cc(a.location.href);Fc.$inject=["$document"],Hc.$inject=["$provide"];var rf=22,sf=".",tf="0";Mc.$inject=["$locale"],Nc.$inject=["$locale"];var uf={yyyy:Sc("FullYear",4),yy:Sc("FullYear",2,0,!0),y:Sc("FullYear",1),MMMM:Tc("Month"),MMM:Tc("Month",!0),MM:Sc("Month",2,1),M:Sc("Month",1,1),dd:Sc("Date",2),d:Sc("Date",1),HH:Sc("Hours",2),H:Sc("Hours",1),hh:Sc("Hours",2,-12),h:Sc("Hours",1,-12),mm:Sc("Minutes",2),m:Sc("Minutes",1),ss:Sc("Seconds",2),s:Sc("Seconds",1),sss:Sc("Milliseconds",3),EEEE:Tc("Day"),EEE:Tc("Day",!0),a:Yc,Z:Uc,ww:Xc(2),w:Xc(1),G:Zc,GG:Zc,GGG:Zc,GGGG:$c},vf=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,wf=/^\-?\d+$/;_c.$inject=["$locale"];var xf=r(zd),yf=r(Bd);cd.$inject=["$parse"];var zf=r({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===Ld.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),Af={};f(ve,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=mb("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),Af[d]=function(){return{restrict:"A",priority:100,link:e}}}}),f(xe,function(a,b){Af[b]=function(){return{priority:100,link:function(a,c,d){if("ngPattern"===b&&"/"==d.ngPattern.charAt(0)){var e=d.ngPattern.match(xd);if(e)return void d.$set("ngPattern",new RegExp(e[1],e[2]))}a.$watch(d[b],function(a){d.$set(b,a)})}}}}),f(["src","srcset","href"],function(a){var b=mb("ng-"+a);Af[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===Ld.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){if(!b)return void("href"===a&&e.$set(g,null));e.$set(g,b),Ed&&f&&d.prop(f,e[g])})}}}});var Bf={$addControl:p,$$renameControl:ed,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Cf="ng-submitted";fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Df=function(a){return["$timeout","$parse",function(b,d){function e(a){return""===a?d('this[""]').assign:d(a).assign||p}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:fd,compile:function(d,f){d.addClass(lg).addClass(jg);var g=f.name?"name":!(!a||!f.ngForm)&&"ngForm";return{pre:function(a,d,f,h){var i=h[0];if(!("action"in f)){var j=function(b){a.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),b.preventDefault()};ie(d[0],"submit",j),d.on("$destroy",function(){b(function(){je(d[0],"submit",j)},0,!1)})}(h[1]||i.$$parentForm).$addControl(i);var k=g?e(i.$name):p;g&&(k(a,i),f.$observe(g,function(b){i.$name!==b&&(k(a,c),i.$$parentForm.$$renameControl(i,b),(k=e(i.$name))(a,i))})),d.on("$destroy",function(){i.$$parentForm.$removeControl(i),k(a,c),l(i,Bf)})}}}}}]},Ef=Df(),Ff=Df(!0),Gf=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Hf=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,If=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Jf=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Kf=/^(\d{4})-(\d{2})-(\d{2})$/,Lf=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mf=/^(\d{4})-W(\d\d)$/,Nf=/^(\d{4})-(\d\d)$/,Of=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Pf="keydown wheel mousedown",Qf=qa();f("date,datetime-local,month,time,week".split(","),function(a){Qf[a]=!0});var Rf={text:hd,date:ld("date",Kf,kd(Kf,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ld("datetimelocal",Lf,kd(Lf,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:ld("time",Of,kd(Of,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ld("week",Mf,jd,"yyyy-Www"),month:ld("month",Nf,kd(Nf,["yyyy","MM"]),"yyyy-MM"),number:nd,url:od,email:pd,radio:qd,checkbox:sd,hidden:p,button:p,submit:p,reset:p,file:p},Sf=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Rf[zd(g.type)]||Rf.text)(e,f,g,h[0],b,a,c,d)}}}}],Tf=/^(true|false|\d+)$/,Uf=function(){return{restrict:"A",priority:100,compile:function(a,b){return Tf.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},Vf=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=t(a)?"":a})}}}}],Wf=["$interpolate","$compile",function(a,b){return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){var f=a(d.attr(e.$attr.ngBindTemplate));b.$$addBindingInfo(d,f.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=t(a)?"":a})}}}}],Xf=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],Yf=r({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),Zf=td("",!0),$f=td("Odd",0),_f=td("Even",1),ag=dd({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),bg=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cg={},dg={blur:!0,focus:!0};f("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=mb("ng-"+a);cg[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};dg[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var eg=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.createComment(" end ngIf: "+e.ngIf+" "),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=pa(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],fg=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Od.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!u(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a;var h=k(b,function(a){p(),c.enter(a,null,e).then(i)});l=b,n=h,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m===o&&(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],gg=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){if(/SVG/.test(d[0].toString()))return d.empty(),void a(Aa(f.template,b).childNodes)(c,function(a){d.append(a)},{futureParentElement:d});d.html(f.template),a(d.contents())(c)}}}],hg=dd({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),ig=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,e){var g=b.attr(d.$attr.ngList)||", ",h="false"!==d.ngTrim,i=h?Td(g):g,j=function(a){if(!t(a)){var b=[];return a&&f(a.split(i),function(a){a&&b.push(h?Td(a):a)}),b}};e.$parsers.push(j),e.$formatters.push(function(a){return Rd(a)?a.join(g):c}),e.$isEmpty=function(a){return!a||!a.length}}}},jg="ng-valid",kg="ng-invalid",lg="ng-pristine",mg="ng-dirty",ng="ng-untouched",og="ng-touched",pg="ng-pending",qg=d("ngModel"),rg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,e,g,h,i,j,k,l){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=c,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=c,this.$name=l(d.name||"",!1)(a),this.$$parentForm=Bf;var m,n=g(d.ngModel),o=n.assign,q=n,r=o,s=null,v=this;this.$$setOptions=function(a){if(v.$options=a,a&&a.getterSetter){var b=g(d.ngModel+"()"),c=g(d.ngModel+"($$$p)");q=function(a){var c=n(a);return A(c)&&(c=b(a)),c},r=function(a,b){A(n(a))?c(a,{$$$p:v.$modelValue}):o(a,v.$modelValue)}}else if(!n.assign)throw qg("nonassign","Expression '{0}' is non-assignable. Element: {1}",d.ngModel,$(e))},this.$render=p,
this.$isEmpty=function(a){return t(a)||""===a||null===a||a!==a};var w=0;ud({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:h}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,h.removeClass(e,mg),h.addClass(e,lg)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,h.removeClass(e,lg),h.addClass(e,mg),v.$$parentForm.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,h.setClass(e,ng,og)},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,h.setClass(e,og,ng)},this.$rollbackViewValue=function(){i.cancel(s),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!y(v.$modelValue)||!isNaN(v.$modelValue)){var a=v.$$lastCommittedViewValue,b=v.$$rawModelValue,d=v.$valid,e=v.$modelValue,f=v.$options&&v.$options.allowInvalid;v.$$runValidators(b,a,function(a){f||d===a||(v.$modelValue=a?b:c,v.$modelValue!==e&&v.$$writeModelToScope())})}},this.$$runValidators=function(a,b,d){function e(){var a=v.$$parserName||"parse";return t(m)?(i(a,null),!0):(m||(f(v.$validators,function(a,b){i(b,null)}),f(v.$asyncValidators,function(a,b){i(b,null)})),i(a,m),m)}function g(){var c=!0;return f(v.$validators,function(d,e){var f=d(a,b);c=c&&f,i(e,f)}),!!c||(f(v.$asyncValidators,function(a,b){i(b,null)}),!1)}function h(){var d=[],e=!0;f(v.$asyncValidators,function(f,g){var h=f(a,b);if(!I(h))throw qg("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",h);i(g,c),d.push(h.then(function(){i(g,!0)},function(a){e=!1,i(g,!1)}))}),d.length?k.all(d).then(function(){j(e)},p):j(!0)}function i(a,b){l===w&&v.$setValidity(a,b)}function j(a){l===w&&d(a)}w++;var l=w;return e()&&g()?void h():void j(!1)},this.$commitViewValue=function(){var a=v.$viewValue;i.cancel(s),(v.$$lastCommittedViewValue!==a||""===a&&v.$$hasNativeValidators)&&(v.$$lastCommittedViewValue=a,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function b(){v.$modelValue!==g&&v.$$writeModelToScope()}var d=v.$$lastCommittedViewValue,e=d;if(m=!t(e)||c)for(var f=0;f<v.$parsers.length;f++)if(e=v.$parsers[f](e),t(e)){m=!1;break}y(v.$modelValue)&&isNaN(v.$modelValue)&&(v.$modelValue=q(a));var g=v.$modelValue,h=v.$options&&v.$options.allowInvalid;v.$$rawModelValue=e,h&&(v.$modelValue=e,b()),v.$$runValidators(e,v.$$lastCommittedViewValue,function(a){h||(v.$modelValue=a?e:c,b())})},this.$$writeModelToScope=function(){r(a,v.$modelValue),f(v.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})},this.$setViewValue=function(a,b){v.$viewValue=a,v.$options&&!v.$options.updateOnDefault||v.$$debounceViewValueCommit(b)},this.$$debounceViewValueCommit=function(b){var c,d=0,e=v.$options;e&&u(e.debounce)&&(c=e.debounce,y(c)?d=c:y(c[b])?d=c[b]:y(c.default)&&(d=c.default)),i.cancel(s),d?s=i(function(){v.$commitViewValue()},d):j.$$phase?v.$commitViewValue():a.$apply(function(){v.$commitViewValue()})},a.$watch(function(){var b=q(a);if(b!==v.$modelValue&&(v.$modelValue===v.$modelValue||b===b)){v.$modelValue=v.$$rawModelValue=b,m=c;for(var d=v.$formatters,e=d.length,f=b;e--;)f=d[e](f);v.$viewValue!==f&&(v.$viewValue=v.$$lastCommittedViewValue=f,v.$render(),v.$$runValidators(b,f,p))}return b})}],sg=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:rg,priority:1,compile:function(b){return b.addClass(lg).addClass(ng).addClass(jg),{pre:function(a,b,c,d){var e=d[0],f=d[1]||e.$$parentForm;e.$$setOptions(d[2]&&d[2].$options),f.$addControl(e),c.$observe("name",function(a){e.$name!==a&&e.$$parentForm.$$renameControl(e,a)}),a.$on("$destroy",function(){e.$$parentForm.$removeControl(e)})},post:function(b,c,d,e){var f=e[0];f.$options&&f.$options.updateOn&&c.on(f.$options.updateOn,function(a){f.$$debounceViewValueCommit(a&&a.type)}),c.on("blur",function(c){f.$touched||(a.$$phase?b.$evalAsync(f.$setTouched):b.$apply(f.$setTouched))})}}}}}],tg=/(\s+|^)default(\s+|$)/,ug=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var c=this;this.$options=O(a.$eval(b.ngModelOptions)),u(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Td(this.$options.updateOn.replace(tg,function(){return c.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},vg=dd({terminal:!0,priority:1e3}),wg=d("ngOptions"),xg=/^\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]+?))?$/,yg=["$compile","$parse",function(a,c){function d(a,b,d){function f(a,b,c,d,e){this.selectValue=a,this.viewValue=b,this.label=c,this.group=d,this.disabled=e}function g(a){var b;if(!j&&e(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var h=a.match(xg);if(!h)throw wg("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",a,$(b));var i=h[5]||h[7],j=h[6],k=/ as /.test(h[0])&&h[1],l=h[9],m=c(h[2]?h[1]:i),n=k&&c(k),o=n||m,p=l&&c(l),q=l?function(a,b){return p(d,b)}:function(a){return Za(a)},r=function(a,b){return q(a,x(a,b))},s=c(h[2]||h[1]),t=c(h[3]||""),u=c(h[4]||""),v=c(h[8]),w={},x=j?function(a,b){return w[j]=b,w[i]=a,w}:function(a){return w[i]=a,w};return{trackBy:l,getTrackByValue:r,getWatchables:c(v,function(a){var b=[];a=a||[];for(var c=g(a),e=c.length,f=0;f<e;f++){var i=a===c?f:c[f],j=(a[i],x(a[i],i)),k=q(a[i],j);if(b.push(k),h[2]||h[1]){var l=s(d,j);b.push(l)}if(h[4]){var m=u(d,j);b.push(m)}}return b}),getOptions:function(){for(var a=[],b={},c=v(d)||[],e=g(c),h=e.length,i=0;i<h;i++){var j=c===e?i:e[i],k=c[j],m=x(k,j),n=o(d,m),p=q(n,m),w=s(d,m),y=t(d,m),z=u(d,m),A=new f(p,n,w,y,z);a.push(A),b[p]=A}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[r(a)]},getViewValueFromOption:function(a){return l?Od.copy(a.viewValue):a.viewValue}}}}}function g(b,c,e,g){function j(a,b){a.element=b,b.disabled=a.disabled,a.label!==b.label&&(b.label=a.label,b.textContent=a.label),a.value!==b.value&&(b.value=a.selectValue)}function k(a,b,c,d){var e;return b&&zd(b.nodeName)===c?e=b:(e=d.cloneNode(!1),b?a.insertBefore(e,b):a.appendChild(e)),e}function l(a){for(var b;a;)b=a.nextSibling,Ra(a),a=b}function m(a){var b=p&&p[0],c=w&&w[0];if(b||c)for(;a&&(a===b||a===c||a.nodeType===ce||"option"===M(a)&&""===a.value);)a=a.nextSibling;return a}function n(){var a=x&&q.readValue();x=y.getOptions();var b={},d=c[0].firstChild;if(v&&c.prepend(p),d=m(d),x.items.forEach(function(a){var e,f,g;a.group?(e=b[a.group],e||(f=k(c[0],d,"optgroup",i),d=f.nextSibling,f.label=a.group,e=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),g=k(e.groupElement,e.currentOptionElement,"option",h),j(a,g),e.currentOptionElement=g.nextSibling):(g=k(c[0],d,"option",h),j(a,g),d=g.nextSibling)}),Object.keys(b).forEach(function(a){l(b[a].currentOptionElement)}),l(d),o.$render(),!o.$isEmpty(a)){var e=q.readValue();(y.trackBy||r?Q(a,e):a===e)||(o.$setViewValue(e),o.$render())}}var o=g[1];if(o){for(var p,q=g[0],r=e.multiple,s=0,t=c.children(),u=t.length;s<u;s++)if(""===t[s].value){p=t.eq(s);break}var v=!!p,w=Fd(h.cloneNode(!1));w.val("?");var x,y=d(e.ngOptions,c,b),z=function(){v||c.prepend(p),c.val(""),p.prop("selected",!0),p.attr("selected",!0)},A=function(){v||p.remove()},B=function(){c.prepend(w),c.val("?"),w.prop("selected",!0),w.attr("selected",!0)},C=function(){w.remove()};r?(o.$isEmpty=function(a){return!a||0===a.length},q.writeValue=function(a){x.items.forEach(function(a){a.element.selected=!1}),a&&a.forEach(function(a){var b=x.getOptionFromViewValue(a);b&&!b.disabled&&(b.element.selected=!0)})},q.readValue=function(){var a=c.val()||[],b=[];return f(a,function(a){var c=x.selectValueMap[a];c&&!c.disabled&&b.push(x.getViewValueFromOption(c))}),b},y.trackBy&&b.$watchCollection(function(){if(Rd(o.$viewValue))return o.$viewValue.map(function(a){return y.getTrackByValue(a)})},function(){o.$render()})):(q.writeValue=function(a){var b=x.getOptionFromViewValue(a);b&&!b.disabled?(c[0].value!==b.selectValue&&(C(),A(),c[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(C(),z()):(A(),B())},q.readValue=function(){var a=x.selectValueMap[c.val()];return a&&!a.disabled?(A(),C(),x.getViewValueFromOption(a)):null},y.trackBy&&b.$watch(function(){return y.getTrackByValue(o.$viewValue)},function(){o.$render()})),v?(p.remove(),a(p)(b),p.removeClass("ng-scope")):p=Fd(h.cloneNode(!1)),n(),b.$watchCollection(y.getWatchables,n)}}var h=b.createElement("option"),i=b.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=p},post:g}}}],zg=["$locale","$interpolate","$log",function(a,b,c){var d=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(g,h,i){function j(a){h.text(a||"")}var k,l=i.count,m=i.$attr.when&&h.attr(i.$attr.when),n=i.offset||0,o=g.$eval(m)||{},q={},r=b.startSymbol(),s=b.endSymbol(),u=r+l+"-"+n+s,v=Od.noop;f(i,function(a,b){var c=e.exec(b);if(c){var d=(c[1]?"-":"")+zd(c[2]);o[d]=h.attr(i.$attr[b])}}),f(o,function(a,c){q[c]=b(a.replace(d,u))}),g.$watch(l,function(b){var d=parseFloat(b),e=isNaN(d);if(e||d in o||(d=a.pluralCat(d-n)),d!==k&&!(e&&y(k)&&isNaN(k))){v();var f=q[d];t(f)?(null!=b&&c.debug("ngPluralize: no rule defined for '"+d+"' in "+m),v=p,j()):v=g.$watch(f,j),k=d}})}}}],Ag=["$parse","$animate",function(a,g){var h="$$NG_REMOVED",i=d("ngRepeat"),j=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||a.$last),a.$odd=!(a.$even=0==(1&b))},k=function(a){return a.clone[0]},l=function(a){return a.clone[a.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(d,m){var n=m.ngRepeat,o=b.createComment(" end ngRepeat: "+n+" "),p=n.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 i("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",n);var q=p[1],r=p[2],s=p[3],t=p[4];if(!(p=q.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/)))throw i("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",q);var u=p[3]||p[1],v=p[2];if(s&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(s)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(s)))throw i("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",s);var w,x,y,z,A={$id:Za};return t?w=a(t):(y=function(a,b){return Za(b)},z=function(a){return a}),function(a,b,d,m,p){w&&(x=function(b,c,d){return v&&(A[v]=b),A[u]=c,A.$index=d,w(a,A)});var q=qa();a.$watchCollection(r,function(d){var m,r,t,w,A,B,C,D,E,F,G,H,I=b[0],J=qa();if(s&&(a[s]=d),e(d))E=d,D=x||y;else{D=x||z,E=[];for(var K in d)Ad.call(d,K)&&"$"!==K.charAt(0)&&E.push(K)}for(w=E.length,G=new Array(w),m=0;m<w;m++)if(A=d===E?m:E[m],B=d[A],C=D(A,B,m),q[C])F=q[C],delete q[C],J[C]=F,G[m]=F;else{if(J[C])throw f(G,function(a){a&&a.scope&&(q[a.id]=a)}),i("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",n,C,B);G[m]={id:C,scope:c,clone:c},J[C]=!0}for(var L in q){if(F=q[L],H=pa(F.clone),g.leave(H),H[0].parentNode)for(m=0,r=H.length;m<r;m++)H[m][h]=!0;F.scope.$destroy()}for(m=0;m<w;m++)if(A=d===E?m:E[m],B=d[A],F=G[m],F.scope){t=I;do{t=t.nextSibling}while(t&&t[h]);k(F)!=t&&g.move(pa(F.clone),null,I),I=l(F),j(F.scope,m,u,B,v,A,w)}else p(function(a,b){F.scope=b;var c=o.cloneNode(!1);a[a.length++]=c,g.enter(a,null,I),I=c,F.clone=a,J[F.id]=F,j(F.scope,m,u,B,v,A,w)});q=J})}}}}],Bg="ng-hide",Cg="ng-hide-animate",Dg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngShow,function(b){a[b?"removeClass":"addClass"](c,Bg,{tempClasses:Cg})})}}}],Eg=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,c,d){b.$watch(d.ngHide,function(b){a[b?"addClass":"removeClass"](c,Bg,{tempClasses:Cg})})}}}],Fg=dd(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&f(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),Gg=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var h=e.ngSwitch||e.on,i=[],j=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};c.$watch(h,function(c){var d,e;for(d=0,e=k.length;d<e;++d)a.cancel(k[d]);for(k.length=0,d=0,e=l.length;d<e;++d){var h=pa(j[d].clone);l[d].$destroy();(k[d]=a.leave(h)).then(m(k,d))}j.length=0,l.length=0,(i=g.cases["!"+c]||g.cases["?"])&&f(i,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.createComment(" end ngSwitchWhen: ");var g={clone:d};j.push(g),a.enter(d,f.parent(),f)})})})}}}],Hg=dd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),Ig=dd({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),Jg=dd({restrict:"EAC",link:function(a,b,c,e,f){if(!f)throw d("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",$(b));f(function(a){b.empty(),b.append(a)})}}),Kg=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],Lg={$setViewValue:p,$render:p},Mg=["$element","$scope","$attrs",function(a,d,e){var f=this,g=new $a;f.ngModelCtrl=Lg,f.unknownOption=Fd(b.createElement("option")),f.renderUnknownOption=function(b){var c="? "+Za(b)+" ?";f.unknownOption.val(c),a.prepend(f.unknownOption),a.val(c)},d.$on("$destroy",function(){f.renderUnknownOption=p}),f.removeUnknownOption=function(){f.unknownOption.parent()&&f.unknownOption.remove()},f.readValue=function(){return f.removeUnknownOption(),a.val()},f.writeValue=function(b){f.hasOption(b)?(f.removeUnknownOption(),a.val(b),""===b&&f.emptyOption.prop("selected",!0)):null==b&&f.emptyOption?(f.removeUnknownOption(),a.val("")):f.renderUnknownOption(b)},f.addOption=function(a,b){if(b[0].nodeType!==ce){na(a,'"option value"'),""===a&&(f.emptyOption=b);var c=g.get(a)||0;g.put(a,c+1),f.ngModelCtrl.$render(),wd(b)}},f.removeOption=function(a){var b=g.get(a);b&&(1===b?(g.remove(a),""===a&&(f.emptyOption=c)):g.put(a,b-1))},f.hasOption=function(a){return!!g.get(a)},f.registerOption=function(a,b,c,d,e){if(d){var g;c.$observe("value",function(a){u(g)&&f.removeOption(g),g=a,f.addOption(a,b)})}else e?a.$watch(e,function(a,d){c.$set("value",a),d!==a&&f.removeOption(d),f.addOption(a,b)}):f.addOption(c.value,b);b.on("$destroy",function(){f.removeOption(c.value),f.ngModelCtrl.$render()})}}],Ng=function(){function a(a,b,c,d){var e=d[1];if(e){var g=d[0];if(g.ngModelCtrl=e,b.on("change",function(){a.$apply(function(){e.$setViewValue(g.readValue())})}),c.multiple){g.readValue=function(){var a=[];return f(b.find("option"),function(b){b.selected&&a.push(b.value)}),a},g.writeValue=function(a){var c=new $a(a);f(b.find("option"),function(a){a.selected=u(c.get(a.value))})};var h,i=NaN;a.$watch(function(){i!==e.$viewValue||Q(h,e.$viewValue)||(h=P(e.$viewValue),e.$render()),i=e.$viewValue}),e.$isEmpty=function(a){return!a||0===a.length}}}}function b(a,b,c,d){var e=d[1];if(e){var f=d[0];e.$render=function(){f.writeValue(e.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Mg,priority:1,link:{pre:a,post:b}}},Og=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,c){if(u(c.value))var d=a(c.value,!0);else{var e=a(b.text(),!0);e||c.$set("value",b.text())}return function(a,b,c){var f="$selectController",g=b.parent(),h=g.data(f)||g.parent().data(f);h&&h.registerOption(a,b,c,d,e)}}}}],Pg=r({restrict:"E",terminal:!1}),Qg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){d&&(c.required=!0,d.$validators.required=function(a,b){return!c.required||!d.$isEmpty(b)},c.$observe("required",function(){d.$validate()}))}}},Rg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,e,f){if(f){var g,h=e.ngPattern||e.pattern;e.$observe("pattern",function(a){if(x(a)&&a.length>0&&(a=new RegExp("^"+a+"$")),a&&!a.test)throw d("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",h,a,$(b));g=a||c,f.$validate()}),f.$validators.pattern=function(a,b){return f.$isEmpty(b)||t(g)||g.test(b)}}}}},Sg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=-1;c.$observe("maxlength",function(a){var b=n(a);e=isNaN(b)?-1:b,d.$validate()}),d.$validators.maxlength=function(a,b){return e<0||d.$isEmpty(b)||b.length<=e}}}}},Tg=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=n(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};if(a.angular.bootstrap)return void(a.console&&console.log("WARNING: Tried to load angular more than once."));ka(),ua(Od),Od.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}function d(a,d){var e=d;c===e&&(e=Math.min(b(a),3));var f=Math.pow(10,e);return{v:e,f:(a*f|0)%f}}var e={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],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",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:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,b){var c=0|a,f=d(a,b);return 1==c&&0==f.v?e.ONE:e.OTHER}})}]),Fd(b).ready(function(){fa(b,ga)})}(window,document),!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>'),function(a,b,c){"use strict";function d(){function a(a,c){return b.extend(Object.create(a),c)}function c(a,b){var c=b.caseInsensitiveMatch,d={originalPath:a,regexp:a},e=d.keys=[];return a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[\?\*])?/g,function(a,b,c,d){var f="?"===d||"*?"===d?"?":null,g="*"===d||"*?"===d?"*":null;return e.push({name:c,optional:!!f}),b=b||"",(f?"":b)+"(?:"+(f?b:"")+(g&&"(.+?)"||"([^/]+)")+(f||"")+")"+(f||"")}).replace(/([\/$\*])/g,"\\$1"),d.regexp=new RegExp("^"+a+"$",c?"i":""),d}var d={};this.when=function(a,e){var f=b.copy(e);if(b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0),b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch),d[a]=b.extend(f,a&&c(a,f)),a){var g="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";d[g]=b.extend({redirectTo:a},c(g,f))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(a){return"string"==typeof a&&(a={redirectTo:a}),this.when(null,a),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(c,e,f,g,h,j,k){function l(a,b){var c=b.keys,d={};if(!b.regexp)return null;var e=b.regexp.exec(a);if(!e)return null;for(var f=1,g=e.length;f<g;++f){var h=c[f-1],i=e[f];h&&i&&(d[h.name]=i)}return d}function m(a){var d=t.current;q=o(),(r=q&&d&&q.$$route===d.$$route&&b.equals(q.pathParams,d.pathParams)&&!q.reloadOnSearch&&!s)||!d&&!q||c.$broadcast("$routeChangeStart",q,d).defaultPrevented&&a&&a.preventDefault()}function n(){var a=t.current,d=q;r?(a.params=d.params,b.copy(a.params,f),c.$broadcast("$routeUpdate",a)):(d||a)&&(s=!1,t.current=d,d&&d.redirectTo&&(b.isString(d.redirectTo)?e.path(p(d.redirectTo,d.params)).search(d.params).replace():e.url(d.redirectTo(d.pathParams,e.path(),e.search())).replace()),g.when(d).then(function(){if(d){var a,c,e=b.extend({},d.resolve);return b.forEach(e,function(a,c){e[c]=b.isString(a)?h.get(a):h.invoke(a,null,null,c)}),b.isDefined(a=d.template)?b.isFunction(a)&&(a=a(d.params)):b.isDefined(c=d.templateUrl)&&(b.isFunction(c)&&(c=c(d.params)),b.isDefined(c)&&(d.loadedTemplateUrl=k.valueOf(c),a=j(c))),b.isDefined(a)&&(e.$template=a),g.all(e)}}).then(function(e){d==t.current&&(d&&(d.locals=e,b.copy(d.params,f)),c.$broadcast("$routeChangeSuccess",d,a))},function(b){d==t.current&&c.$broadcast("$routeChangeError",d,a,b)}))}function o(){var c,f;return b.forEach(d,function(d,g){!f&&(c=l(e.path(),d))&&(f=a(d,{params:b.extend({},e.search(),c),pathParams:c}),f.$$route=d)}),f||d[null]&&a(d[null],{params:{},pathParams:{}})}function p(a,c){var d=[];return b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];d.push(c[f]),d.push(e[2]||""),delete c[f]}}),d.join("")}var q,r,s=!1,t={routes:d,reload:function(){s=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,s=!1}};c.$evalAsync(function(){m(a),a.defaultPrevented||n()})},updateParams:function(a){if(!this.current||!this.current.$$route)throw i("norout","Tried updating route when with no current route");a=b.extend({},this.current.params,a),e.path(p(this.current.$$route.originalPath,a)),e.search(a)}};return c.$on("$locationChangeStart",m),c.$on("$locationChangeSuccess",n),t}]}function e(){this.$get=function(){return{}}}function f(a,c,d){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(e,f,g,h,i){function j(){n&&(d.cancel(n),n=null),l&&(l.$destroy(),l=null),m&&(n=d.leave(m),n.then(function(){n=null}),m=null)}function k(){var g=a.current&&a.current.locals,h=g&&g.$template;if(b.isDefined(h)){var k=e.$new(),n=a.current,q=i(k,function(a){d.enter(a,null,m||f).then(function(){!b.isDefined(o)||o&&!e.$eval(o)||c()}),j()});m=q,l=n.scope=k,l.$emit("$viewContentLoaded"),l.$eval(p)}else j()}var l,m,n,o=g.autoscroll,p=g.onload||"";e.$on("$routeChangeSuccess",k),k()}}}function g(a,b,c){return{restrict:"ECA",priority:-400,link:function(d,e){var f=c.current,g=f.locals;e.html(g.$template);var h=a(e.contents());if(f.controller){g.$scope=d;var i=b(f.controller,g);f.controllerAs&&(d[f.controllerAs]=i),e.data("$ngControllerController",i),e.children().data("$ngControllerController",i)}h(d)}}}var h=b.module("ngRoute",["ng"]).provider("$route",d),i=b.$$minErr("ngRoute");h.provider("$routeParams",e),h.directive("ngView",f),h.directive("ngView",g),f.$inject=["$route","$anchorScroll","$animate"],g.$inject=["$compile","$controller","$route"]}(window,window.angular),function(a,b,c){"use strict";function d(a,c,d){function e(a,d,e){var g,h;e=e||{},h=e.expires,g=b.isDefined(e.path)?e.path:f,b.isUndefined(d)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",d=""),b.isString(h)&&(h=new Date(h));var i=encodeURIComponent(a)+"="+encodeURIComponent(d);i+=g?";path="+g:"",i+=e.domain?";domain="+e.domain:"",i+=h?";expires="+h.toUTCString():"",i+=e.secure?";secure":"";var j=i.length+1;return j>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+j+" > 4096 bytes)!"),i}var f=d.baseHref(),g=a[0];return function(a,b,c){g.cookie=e(a,b,c)}}b.module("ngCookies",["ng"]).provider("$cookies",[function(){function a(a){return a?b.extend({},d,a):d}var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(d,e){return{get:function(a){return d()[a]},getObject:function(a){var c=this.get(a);return c?b.fromJson(c):c},getAll:function(){return d()},put:function(b,c,d){e(b,c,a(d))},putObject:function(a,c,d){this.put(a,b.toJson(c),d)},remove:function(b,d){e(b,c,a(d))}}}]}]),b.module("ngCookies").factory("$cookieStore",["$cookies",function(a){return{get:function(b){return a.getObject(b)},put:function(b,c){a.putObject(b,c)},remove:function(b){a.remove(b)}}}]),d.$inject=["$document","$log","$browser"],b.module("ngCookies").provider("$$cookieWriter",function(){this.$get=d})}(window,window.angular),angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(a){var b=a.storageKey(),c=a.storage();c?c.get(b)?a.use(c.get(b)):angular.isString(a.preferredLanguage())?a.use(a.preferredLanguage()):c.set(b,a.use()):angular.isString(a.preferredLanguage())&&a.use(a.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY",function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q={},r=[],s=a,t=[],u=!1,v="translate-cloak",w=!1,x=".",y="2.4.2",z=function(){var a=window.navigator;return((angular.isArray(a.languages)?a.languages[0]:a.language||a.browserLanguage||a.systemLanguage||a.userLanguage)||"").split("-").join("_")},A=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},B=function(){return this.replace(/^\s+|\s+$/g,"")},C=function(a){for(var b=[],d=angular.lowercase(a),e=0,f=r.length;e<f;e++)b.push(angular.lowercase(r[e]));if(A(b,d)>-1)return a;if(c){var g;for(var h in c){var i=!1,j=Object.prototype.hasOwnProperty.call(c,h)&&angular.lowercase(h)===angular.lowercase(a);if("*"===h.slice(-1)&&(i=h.slice(0,-1)===a.slice(0,h.length-1)),(j||i)&&(g=c[h],A(b,angular.lowercase(g))>-1))return g}}var k=a.split("_");return k.length>1&&A(b,angular.lowercase(k[0]))>-1?k[0]:a},D=function(a,b){if(!a&&!b)return q;if(a&&!b){if(angular.isString(a))return q[a]}else angular.isObject(q[a])||(q[a]={}),angular.extend(q[a],E(b));return this};this.translations=D,this.cloakClassName=function(a){return a?(v=a,this):v};var E=function(a,b,c,d){var e,f,g,h;b||(b=[]),c||(c={});for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(h=a[e],angular.isObject(h)?E(h,b.concat(e),c,e):(f=b.length?""+b.join(x)+x+e:e,b.length&&e===d&&(g=""+b.join(x),c[g]="@:"+f),c[f]=h));return c};this.addInterpolation=function(a){return t.push(a),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(a){return k=a,this},this.useSanitizeValueStrategy=function(a){return u=a,this},this.preferredLanguage=function(a){return F(a),this};var F=function(a){return a&&(b=a),b};this.translationNotFoundIndicator=function(a){return this.translationNotFoundIndicatorLeft(a),this.translationNotFoundIndicatorRight(a),this},this.translationNotFoundIndicatorLeft=function(a){return a?(n=a,this):n},this.translationNotFoundIndicatorRight=function(a){return a?(o=a,this):o},this.fallbackLanguage=function(a){return G(a),this};var G=function(a){return a?(angular.isString(a)?(e=!0,d=[a]):angular.isArray(a)&&(e=!1,d=a),angular.isString(b)&&A(d,b)<0&&d.push(b),this):e?d[0]:d};this.use=function(a){if(a){if(!q[a]&&!l)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+a+"'");return f=a,this}return f};var H=function(a){if(!a)return i?i+s:s;s=a};this.storageKey=H,this.useUrlLoader=function(a,b){return this.useLoader("$translateUrlLoader",angular.extend({url:a},b))},this.useStaticFilesLoader=function(a){return this.useLoader("$translateStaticFilesLoader",a)},this.useLoader=function(a,b){return l=a,m=b||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(a){return h=a,this},this.storagePrefix=function(a){return a?(i=a,this):a},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(a){return j=a,this},this.usePostCompiling=function(a){return w=!!a,this},this.determinePreferredLanguage=function(a){var c=a&&angular.isFunction(a)?a():z();return b=r.length?C(c):c,this},this.registerAvailableLanguageKeys=function(a,b){return a?(r=a,b&&(c=b),this):r},this.useLoaderCache=function(a){return!1===a?p=void 0:!0===a?p=!0:void 0===a?p="$translationCache":a&&(p=a),this},this.$get=["$log","$injector","$rootScope","$q",function(a,c,i,r){var x,z,I,J=c.get(k||"$translateDefaultInterpolation"),K=!1,L={},M={},N=function(a,c,e){if(angular.isArray(a)){return function(a){for(var b={},d=[],f=function(a){var d=r.defer(),f=function(c){b[a]=c,d.resolve([a,c])};return N(a,c,e).then(f,f),d.promise},g=0,h=a.length;g<h;g++)d.push(f(a[g]));return r.all(d).then(function(){return b})}(a)}var g=r.defer();a&&(a=B.apply(a));var i=function(){var a=b?M[b]:M[f];if(z=0,h&&!a){var c=x.get(s);if(a=M[c],d&&d.length){var e=A(d,c);z=0===e?1:0,A(d,b)<0&&d.push(b)}}return a}();return i?i.then(function(){Z(a,c,e).then(g.resolve,g.reject)},g.reject):Z(a,c,e).then(g.resolve,g.reject),g.promise},O=function(a){return n&&(a=[n,a].join(" ")),o&&(a=[a,o].join(" ")),a},P=function(a){f=a,i.$emit("$translateChangeSuccess",{language:a}),h&&x.set(N.storageKey(),f),J.setLocale(f),angular.forEach(L,function(a,b){L[b].setLocale(f)}),i.$emit("$translateChangeEnd",{language:a})},Q=function(a){if(!a)throw"No language key specified for loading.";var b=r.defer();i.$emit("$translateLoadingStart",{language:a}),K=!0;var d=p;"string"==typeof d&&(d=c.get(d));var e=angular.extend({},m,{key:a,$http:angular.extend({},{cache:d},m.$http)});return c.get(l)(e).then(function(c){var d={};i.$emit("$translateLoadingSuccess",{language:a}),angular.isArray(c)?angular.forEach(c,function(a){angular.extend(d,E(a))}):angular.extend(d,E(c)),K=!1,b.resolve({key:a,table:d}),i.$emit("$translateLoadingEnd",{language:a})},function(a){i.$emit("$translateLoadingError",{language:a}),b.reject(a),i.$emit("$translateLoadingEnd",{language:a})}),b.promise};if(h&&(x=c.get(h),!x.get||!x.set))throw new Error("Couldn't use storage '"+h+"', missing get() or set() method!");angular.isFunction(J.useSanitizeValueStrategy)&&J.useSanitizeValueStrategy(u),t.length&&angular.forEach(t,function(a){var d=c.get(a);d.setLocale(b||f),angular.isFunction(d.useSanitizeValueStrategy)&&d.useSanitizeValueStrategy(u),L[d.getInterpolationIdentifier()]=d});var R=function(a){var b=r.defer();return Object.prototype.hasOwnProperty.call(q,a)?b.resolve(q[a]):M[a]?M[a].then(function(a){D(a.key,a.table),b.resolve(a.table)},b.reject):b.reject(),b.promise},S=function(a,b,c,d){var e=r.defer();return R(a).then(function(g){Object.prototype.hasOwnProperty.call(g,b)?(d.setLocale(a),e.resolve(d.interpolate(g[b],c)),d.setLocale(f)):e.reject()},e.reject),e.promise},T=function(a,b,c,d){var e,g=q[a];return Object.prototype.hasOwnProperty.call(g,b)&&(d.setLocale(a),e=d.interpolate(g[b],c),d.setLocale(f)),e},U=function(a){if(j){var b=c.get(j)(a,f);return void 0!==b?b:a}return a},V=function(a,b,c,e){var f=r.defer();if(a<d.length){var g=d[a];S(g,b,c,e).then(f.resolve,function(){V(a+1,b,c,e).then(f.resolve)})}else f.resolve(U(b));return f.promise},W=function(a,b,c,e){var f;if(a<d.length){var g=d[a];f=T(g,b,c,e),f||(f=W(a+1,b,c,e))}return f},X=function(a,b,c){return V(I>0?I:z,a,b,c)},Y=function(a,b,c){return W(I>0?I:z,a,b,c)},Z=function(a,b,c){
var e=r.defer(),g=f?q[f]:q,h=c?L[c]:J;if(g&&Object.prototype.hasOwnProperty.call(g,a)){var i=g[a];"@:"===i.substr(0,2)?N(i.substr(2),b,c).then(e.resolve,e.reject):e.resolve(h.interpolate(i,b))}else{var k;j&&!K&&(k=U(a)),f&&d&&d.length?X(a,b,h).then(function(a){e.resolve(a)},function(a){e.reject(O(a))}):j&&!K&&k?e.resolve(k):e.reject(O(a))}return e.promise},$=function(a,b,c){var e,g=f?q[f]:q,h=c?L[c]:J;if(g&&Object.prototype.hasOwnProperty.call(g,a)){var i=g[a];e="@:"===i.substr(0,2)?$(i.substr(2),b,c):h.interpolate(i,b)}else{var k;j&&!K&&(k=U(a)),f&&d&&d.length?(z=0,e=Y(a,b,h)):e=j&&!K&&k?k:O(a)}return e};if(N.preferredLanguage=function(a){return a&&F(a),b},N.cloakClassName=function(){return v},N.fallbackLanguage=function(a){if(void 0!==a&&null!==a){if(G(a),l&&d&&d.length)for(var b=0,c=d.length;b<c;b++)M[d[b]]||(M[d[b]]=Q(d[b]));N.use(N.use())}return e?d[0]:d},N.useFallbackLanguage=function(a){if(void 0!==a&&null!==a)if(a){var b=A(d,a);b>-1&&(I=b)}else I=0},N.proposedLanguage=function(){return g},N.storage=function(){return x},N.use=function(a){if(!a)return f;var b=r.defer();i.$emit("$translateChangeStart",{language:a});var c=C(a);return c&&(a=c),q[a]||!l||M[a]?(b.resolve(a),P(a)):(g=a,M[a]=Q(a).then(function(c){D(c.key,c.table),b.resolve(c.key),P(c.key),g===a&&(g=void 0)},function(a){g===a&&(g=void 0),i.$emit("$translateChangeError",{language:a}),b.reject(a),i.$emit("$translateChangeEnd",{language:a})})),b.promise},N.storageKey=function(){return H()},N.isPostCompilingEnabled=function(){return w},N.refresh=function(a){function b(){e.resolve(),i.$emit("$translateRefreshEnd",{language:a})}function c(){e.reject(),i.$emit("$translateRefreshEnd",{language:a})}if(!l)throw new Error("Couldn't refresh translation table, no loader registered!");var e=r.defer();if(i.$emit("$translateRefreshStart",{language:a}),a)q[a]?Q(a).then(function(c){D(c.key,c.table),a===f&&P(f),b()},c):c();else{var g=[],h={};if(d&&d.length)for(var j=0,k=d.length;j<k;j++)g.push(Q(d[j])),h[d[j]]=!0;f&&!h[f]&&g.push(Q(f)),r.all(g).then(function(a){angular.forEach(a,function(a){q[a.key]&&delete q[a.key],D(a.key,a.table)}),f&&P(f),b()})}return e.promise},N.instant=function(a,c,e){if(null===a||angular.isUndefined(a))return a;if(angular.isArray(a)){for(var g={},h=0,i=a.length;h<i;h++)g[a[h]]=N.instant(a[h],c,e);return g}if(angular.isString(a)&&a.length<1)return a;a&&(a=B.apply(a));var k,l=[];b&&l.push(b),f&&l.push(f),d&&d.length&&(l=l.concat(d));for(var m=0,n=l.length;m<n;m++){var o=l[m];if(q[o]&&void 0!==q[o][a]&&(k=$(a,c,e)),void 0!==k)break}return k||""===k||(k=J.interpolate(a,c),j&&!K&&(k=U(a))),k},N.versionInfo=function(){return y},N.loaderCache=function(){return p},l&&(angular.equals(q,{})&&N.use(N.use()),d&&d.length))for(var _=function(a){D(a.key,a.table),i.$emit("$translateChangeEnd",{language:a.key})},aa=0,ba=d.length;aa<ba;aa++)M[d[aa]]=Q(d[aa]).then(_);return N}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(a){var b,c={},d=null,e={escaped:function(a){var b={};for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=angular.element("<div></div>").text(a[c]).html());return b}},f=function(a){return angular.isFunction(e[d])?e[d](a):a};return c.setLocale=function(a){b=a},c.getInterpolationIdentifier=function(){return"default"},c.useSanitizeValueStrategy=function(a){return d=a,this},c.interpolate=function(b,c){return d&&(c=f(c)),a(b)(c||{})},c}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function(a,b,c,d,e,f){return{restrict:"AE",scope:!0,compile:function(b,g){var h=g.translateValues?g.translateValues:void 0,i=g.translateInterpolation?g.translateInterpolation:void 0,j=b[0].outerHTML.match(/translate-value-+/i),k="^(.*)("+c.startSymbol()+".*"+c.endSymbol()+")(.*)";return function(b,l,m){if(b.interpolateParams={},b.preText="",b.postText="",m.$observe("translate",function(a){if(angular.equals(a,"")||!angular.isDefined(a)){var d=l.text().match(k);angular.isArray(d)?(b.preText=d[1],b.postText=d[3],b.translationId=c(d[2])(b.$parent)):b.translationId=l.text().replace(/^\s+|\s+$/g,"")}else b.translationId=a}),m.$observe("translateDefault",function(a){b.defaultText=a}),h&&m.$observe("translateValues",function(a){a&&b.$parent.$watch(function(){angular.extend(b.interpolateParams,e(a)(b.$parent))})}),j){var n=function(a){m.$observe(a,function(c){b.interpolateParams[angular.lowercase(a.substr(14,1))+a.substr(15)]=c})};for(var o in m)Object.prototype.hasOwnProperty.call(m,o)&&"translateValue"===o.substr(0,14)&&"translateValues"!==o&&n(o)}var p=function(b,c,e){e||void 0===c.defaultText||(b=c.defaultText),l.html(c.preText+b+c.postText);var f=a.isPostCompilingEnabled(),h=void 0!==g.translateCompile,i=h&&"false"!==g.translateCompile;(f&&!h||i)&&d(l.contents())(c)},q=function(){return h||j?function(){var c=function(){b.translationId&&b.interpolateParams&&a(b.translationId,b.interpolateParams,i).then(function(a){p(a,b,!0)},function(a){p(a,b,!1)})};b.$watch("interpolateParams",c,!0),b.$watch("translationId",c)}:function(){var c=b.$watch("translationId",function(d){b.translationId&&d&&a(d,{},i).then(function(a){p(a,b,!0),c()},function(a){p(a,b,!1),c()})},!0)}}(),r=f.$on("$translateChangeSuccess",q);q(),b.$on("$destroy",r)}}}}]),angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function(a,b){return{compile:function(c){var d=function(){c.addClass(b.cloakClassName())},e=function(){c.removeClass(b.cloakClassName())},f=a.$on("$translateChangeEnd",function(){e(),f(),f=null});return d(),function(a,c,f){f.translateCloak&&f.translateCloak.length&&f.$observe("translateCloak",function(a){b(a).then(e,d)})}}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(a,b){var c=function(c,d,e){return angular.isObject(d)||(d=a(d)(this)),b.instant(c,d,e)};return c.$stateful=!0,c}]),function(a,b,c){"use strict";function d(a){function b(a,b){if(a)return e(a)?a.indexOf(b)>=0:a.hasOwnProperty(b)}return["$animate",function(a){return{restrict:"AE",transclude:"element",terminal:!0,require:"^^ngMessages",link:function(c,d,f,g,h){var i,j=d[0],k=f.ngMessage||f.when,l=f.ngMessageExp||f.whenExp,m=function(a){i=a?e(a)?a:a.split(/[\s,]+/):null,g.reRender()};l?(m(c.$eval(l)),c.$watchCollection(l,m)):m(k);var n,o;g.register(j,o={test:function(a){return b(i,a)},attach:function(){n||h(c,function(b){a.enter(b,null,d),n=b;var c=n.$$attachId=g.getAttachId();n.on("$destroy",function(){n&&n.$$attachId===c&&(g.deregister(j),o.detach())})})},detach:function(){if(n){var b=n;n=null,a.leave(b)}}})}}}]}var e=b.isArray,f=b.forEach,g=b.isString,h=b.element;b.module("ngMessages",[]).directive("ngMessages",["$animate",function(a){function b(a,b){return g(b)&&0===b.length||c(a.$eval(b))}function c(a){return g(a)?a.length:!!a}var d="ng-active",e="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(g,h,i){function j(a,b){for(var c=b,d=[];c&&c!==a;){var e=c.$$ngMessageNode;if(e&&e.length)return r[e];c.childNodes.length&&-1==d.indexOf(c)?(d.push(c),c=c.childNodes[c.childNodes.length-1]):c.previousSibling?c=c.previousSibling:(c=c.parentNode,d.push(c))}}function k(a,b,c){var d=r[c];if(m.head){var e=j(a,b);e?(d.next=e.next,e.next=d):(d.next=m.head,m.head=d)}else m.head=d}function l(a,b,c){var d=r[c],e=j(a,b);e?e.next=d.next:m.head=d.next}var m=this,n=0,o=0;this.getAttachId=function(){return o++};var p,q,r=this.messages={};this.render=function(j){j=j||{},p=!1,q=j;for(var k=b(h,i.ngMessagesMultiple)||b(h,i.multiple),l=[],n={},o=m.head,r=!1,s=0;null!=o;){s++;var t=o.message,u=!1;r||f(j,function(a,b){if(!u&&c(a)&&t.test(b)){if(n[b])return;n[b]=!0,u=!0,t.attach()}}),u?r=!k:l.push(t),o=o.next}f(l,function(a){a.detach()}),l.length!==s?a.setClass(g,d,e):a.setClass(g,e,d)},h.$watchCollection(i.ngMessages||i.for,m.render),g.on("$destroy",function(){f(r,function(a){a.message.detach()})}),this.reRender=function(){p||(p=!0,h.$evalAsync(function(){p&&q&&m.render(q)}))},this.register=function(a,b){var c=n.toString();r[c]={message:b},k(g[0],a,c),a.$$ngMessageNode=c,n++,m.reRender()},this.deregister=function(a){var b=a.$$ngMessageNode;delete a.$$ngMessageNode,l(g[0],a,b),delete r[b],m.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(a,b,c){return{restrict:"AE",require:"^^ngMessages",link:function(d,e,f){var g=f.ngMessagesInclude||f.src;a(g).then(function(a){c(a)(d,function(a){e.after(a);var c=h(b[0].createComment(" ngMessagesInclude: "+g+" "));e.after(c),e.remove()})})}}}]).directive("ngMessage",d("AE")).directive("ngMessageExp",d("A"))}(window,window.angular),function(){var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.push,h=d.slice,i=d.concat,j=e.toString,k=e.hasOwnProperty,l=d.forEach,m=d.map,n=d.reduce,o=d.reduceRight,p=d.filter,q=d.every,r=d.some,s=d.indexOf,t=d.lastIndexOf,u=Array.isArray,v=Object.keys,w=f.bind,x=function(a){return a instanceof x?a:this instanceof x?void(this._wrapped=a):new x(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):a._=x,x.VERSION="1.6.0";var y=x.each=x.forEach=function(a,b,d){if(null==a)return a;if(l&&a.forEach===l)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;e<f;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=x.keys(a),e=0,f=g.length;e<f;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};x.map=x.collect=function(a,b,c){var d=[];return null==a?d:m&&a.map===m?a.map(b,c):(y(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var z="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),n&&a.reduce===n)return d&&(b=x.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(y(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(z);return c},x.reduceRight=x.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduceRight===o)return d&&(b=x.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=x.keys(a);f=g.length}if(y(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(z);return c},x.find=x.detect=function(a,b,c){var d;return A(a,function(a,e,f){if(b.call(c,a,e,f))return d=a,!0}),d},x.filter=x.select=function(a,b,c){var d=[];return null==a?d:p&&a.filter===p?a.filter(b,c):(y(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},x.reject=function(a,b,c){return x.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},x.every=x.all=function(a,b,d){b||(b=x.identity);var e=!0;return null==a?e:q&&a.every===q?a.every(b,d):(y(a,function(a,f,g){if(!(e=e&&b.call(d,a,f,g)))return c}),!!e)};var A=x.some=x.any=function(a,b,d){b||(b=x.identity);var e=!1;return null==a?e:r&&a.some===r?a.some(b,d):(y(a,function(a,f,g){if(e||(e=b.call(d,a,f,g)))return c}),!!e)};x.contains=x.include=function(a,b){return null!=a&&(s&&a.indexOf===s?-1!=a.indexOf(b):A(a,function(a){return a===b}))},x.invoke=function(a,b){var c=h.call(arguments,2),d=x.isFunction(b);return x.map(a,function(a){return(d?b:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,x.property(b))},x.where=function(a,b){return x.filter(a,x.matches(b))},x.findWhere=function(a,b){return x.find(a,x.matches(b))},x.max=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-1/0,e=-1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},x.min=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h<e&&(d=a,e=h)}),d},x.shuffle=function(a){var b,c=0,d=[];return y(a,function(a){b=x.random(c++),d[c-1]=d[b],d[b]=a}),d},x.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=x.values(a)),a[x.random(a.length-1)]):x.shuffle(a).slice(0,Math.max(0,b))};var B=function(a){return null==a?x.identity:x.isFunction(a)?a:x.property(a)};x.sortBy=function(a,b,c){return b=B(b),x.pluck(x.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(c<d||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=B(c),y(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};x.groupBy=C(function(a,b,c){x.has(a,b)?a[b].push(c):a[b]=[c]}),x.indexBy=C(function(a,b,c){a[b]=c}),x.countBy=C(function(a,b){x.has(a,b)?a[b]++:a[b]=1}),x.sortedIndex=function(a,b,c,d){c=B(c);for(var e=c.call(d,b),f=0,g=a.length;f<g;){var h=f+g>>>1;c.call(d,a[h])<e?f=h+1:g=h}return f},x.toArray=function(a){return a?x.isArray(a)?h.call(a):a.length===+a.length?x.map(a,x.identity):x.values(a):[]},x.size=function(a){return null==a?0:a.length===+a.length?a.length:x.keys(a).length},x.first=x.head=x.take=function(a,b,c){if(null!=a)return null==b||c?a[0]:b<0?[]:h.call(a,0,b)},x.initial=function(a,b,c){return h.call(a,0,a.length-(null==b||c?1:b))},x.last=function(a,b,c){if(null!=a)return null==b||c?a[a.length-1]:h.call(a,Math.max(a.length-b,0))},x.rest=x.tail=x.drop=function(a,b,c){return h.call(a,null==b||c?1:b)},x.compact=function(a){return x.filter(a,x.identity)};var D=function(a,b,c){return b&&x.every(a,x.isArray)?i.apply(c,a):(y(a,function(a){x.isArray(a)||x.isArguments(a)?b?g.apply(c,a):D(a,b,c):c.push(a)}),c)};x.flatten=function(a,b){return D(a,b,[])},x.without=function(a){return x.difference(a,h.call(arguments,1))},x.partition=function(a,b){var c=[],d=[];return y(a,function(a){(b(a)?c:d).push(a)}),[c,d]},x.uniq=x.unique=function(a,b,c,d){x.isFunction(b)&&(d=c,c=b,b=!1);var e=c?x.map(a,c,d):a,f=[],g=[];return y(e,function(c,d){(b?d&&g[g.length-1]===c:x.contains(g,c))||(g.push(c),f.push(a[d]))}),f},x.union=function(){return x.uniq(x.flatten(arguments,!0))},x.intersection=function(a){var b=h.call(arguments,1);return x.filter(x.uniq(a),function(a){return x.every(b,function(b){return x.contains(b,a)})})},x.difference=function(a){var b=i.apply(d,h.call(arguments,1));return x.filter(a,function(a){return!x.contains(b,a)})},x.zip=function(){for(var a=x.max(x.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;c<a;c++)b[c]=x.pluck(arguments,""+c);return b},x.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;d<e;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},x.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=x.sortedIndex(a,b),a[d]===b?d:-1;d=c<0?Math.max(0,e+c):c}if(s&&a.indexOf===s)return a.indexOf(b,c);for(;d<e;d++)if(a[d]===b)return d;return-1},x.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(t&&a.lastIndexOf===t)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},x.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);e<d;)f[e++]=a,a+=c;return f};var E=function(){};x.bind=function(a,b){var c,d;if(w&&a.bind===w)return w.apply(a,h.call(arguments,1));if(!x.isFunction(a))throw new TypeError;return c=h.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(h.call(arguments)));E.prototype=a.prototype;var e=new E;E.prototype=null;var f=a.apply(e,c.concat(h.call(arguments)));return Object(f)===f?f:e}},x.partial=function(a){var b=h.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;e<f;e++)d[e]===x&&(d[e]=arguments[c++]);for(;c<arguments.length;)d.push(arguments[c++]);return a.apply(this,d)}},x.bindAll=function(a){var b=h.call(arguments,1);if(0===b.length)throw new Error("bindAll must be passed function names");return y(b,function(b){a[b]=x.bind(a[b],a)}),a},x.memoize=function(a,b){var c={};return b||(b=x.identity),function(){var d=b.apply(this,arguments);return x.has(c,d)?c[d]:c[d]=a.apply(this,arguments)}},x.delay=function(a,b){var c=h.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},x.defer=function(a){return x.delay.apply(x,[a,1].concat(h.call(arguments,1)))},x.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=!1===c.leading?0:x.now(),g=null,f=a.apply(d,e),d=e=null};return function(){var j=x.now();h||!1!==c.leading||(h=j);var k=b-(j-h);return d=this,e=arguments,k<=0?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||!1===c.trailing||(g=setTimeout(i,k)),f}},x.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=x.now()-g;j<b?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=x.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},x.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},x.wrap=function(a,b){return x.partial(b,a)},x.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},x.keys=function(a){if(!x.isObject(a))return[];if(v)return v(a);var b=[];for(var c in a)x.has(a,c)&&b.push(c);return b},x.values=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;e<c;e++)d[e]=a[b[e]];return d},x.pairs=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;e<c;e++)d[e]=[b[e],a[b[e]]];return d},x.invert=function(a){for(var b={},c=x.keys(a),d=0,e=c.length;d<e;d++)b[a[c[d]]]=c[d];return b},x.functions=x.methods=function(a){var b=[];for(var c in a)x.isFunction(a[c])&&b.push(c);return b.sort()},x.extend=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},x.pick=function(a){var b={},c=i.apply(d,h.call(arguments,1));return y(c,function(c){c in a&&(b[c]=a[c])}),b},x.omit=function(a){var b={},c=i.apply(d,h.call(arguments,1));for(var e in a)x.contains(c,e)||(b[e]=a[e]);return b},x.defaults=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},x.clone=function(a){return x.isObject(a)?x.isArray(a)?a.slice():x.extend({},a):a},x.tap=function(a,b){return b(a),a};var F=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof x&&(a=a._wrapped),b instanceof x&&(b=b._wrapped);var e=j.call(a);if(e!=j.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(x.isFunction(g)&&g instanceof g&&x.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,k=!0;if("[object Array]"==e){if(i=a.length,k=i==b.length)for(;i--&&(k=F(a[i],b[i],c,d)););}else{for(var l in a)if(x.has(a,l)&&(i++,!(k=x.has(b,l)&&F(a[l],b[l],c,d))))break;if(k){for(l in b)if(x.has(b,l)&&!i--)break;k=!i}}return c.pop(),d.pop(),k};x.isEqual=function(a,b){return F(a,b,[],[])},x.isEmpty=function(a){if(null==a)return!0;if(x.isArray(a)||x.isString(a))return 0===a.length;for(var b in a)if(x.has(a,b))return!1;return!0},x.isElement=function(a){return!(!a||1!==a.nodeType)},x.isArray=u||function(a){return"[object Array]"==j.call(a)},x.isObject=function(a){return a===Object(a)},y(["Arguments","Function","String","Number","Date","RegExp"],function(a){x["is"+a]=function(b){return j.call(b)=="[object "+a+"]"}}),x.isArguments(arguments)||(x.isArguments=function(a){return!(!a||!x.has(a,"callee"))}),"function"!=typeof/./&&(x.isFunction=function(a){return"function"==typeof a}),x.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},x.isNaN=function(a){return x.isNumber(a)&&a!=+a},x.isBoolean=function(a){return!0===a||!1===a||"[object Boolean]"==j.call(a)},x.isNull=function(a){return null===a},x.isUndefined=function(a){return void 0===a},x.has=function(a,b){return k.call(a,b)},x.noConflict=function(){return a._=b,this},x.identity=function(a){return a},x.constant=function(a){return function(){return a}},x.property=function(a){return function(b){return b[a]}},x.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},x.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;e<a;e++)d[e]=b.call(c,e);return d},x.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},x.now=Date.now||function(){return(new Date).getTime()};var G={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};G.unescape=x.invert(G.escape);var H={escape:new RegExp("["+x.keys(G.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(G.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(a){x[a]=function(b){return null==b?"":(""+b).replace(H[a],function(b){return G[a][b]})}}),x.result=function(a,b){if(null!=a){var c=a[b];return x.isFunction(c)?c.call(a):c}},x.mixin=function(a){y(x.functions(a),function(b){var c=x[b]=a[b];x.prototype[b]=function(){var a=[this._wrapped];return g.apply(a,arguments),M.call(this,c.apply(x,a))}})};var I=0;x.uniqueId=function(a){var b=++I+"";return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(a,b,c){var d;c=x.defaults({},c,x.templateSettings);var e=new RegExp([(c.escape||J).source,(c.interpolate||J).source,(c.evaluate||J).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(L,function(a){return"\\"+K[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(i){throw i.source=g,i}if(b)return d(b,x);var h=function(a){return d.call(this,a,x)};return h.source="function("+(c.variable||"obj")+"){\n"+g+"}",h},x.chain=function(a){return x(a).chain()};var M=function(a){return this._chain?x(a).chain():a};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];x.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],M.call(this,c)}}),y(["concat","join","slice"],function(a){var b=d[a];x.prototype[a]=function(){return M.call(this,b.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return x})}.call(this),function(){var a;a=angular.module("ngQuickDate",[]),a.provider("ngQuickDateDefaults",function(){return{options:{dateFormat:"M/d/yyyy",timeFormat:"h:mm a",labelFormat:null,placeholder:"Click to Set Date",hoverText:null,buttonIconHtml:null,closeButtonHtml:"&times;",nextLinkHtml:"Next &rarr;",prevLinkHtml:"&larr; Prev",disableTimepicker:!1,disableClearButton:!1,defaultTime:null,dayAbbreviations:["Su","M","Tu","W","Th","F","Sa"],dateFilter:null,parseDateFunction:function(a){var b;return b=Date.parse(a),isNaN(b)?null:new Date(b)}},$get:function(){return this.options},set:function(a,b){var c,d,e;if("object"==typeof a){e=[];for(c in a)d=a[c],e.push(this.options[c]=d);return e}return this.options[a]=b}}}),a.directive("quickDatepicker",["ngQuickDateDefaults","$filter","$sce",function(a,b,c){return{restrict:"E",require:"?ngModel",scope:{dateFilter:"=?",onChange:"&",required:"@"},replace:!0,link:function(d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t;return m=function(){var a;return q(),d.toggleCalendar(!1),d.weeks=[],d.inputDate=null,d.inputTime=null,d.invalid=!0,"string"==typeof f.initValue&&g.$setViewValue(f.initValue),d.defaultTime||(a=new Date(2013,0,1,12,0),d.datePlaceholder=b("date")(a,d.dateFormat),d.timePlaceholder=b("date")(a,d.timeFormat)),p(),o()},q=function(){var b;for(b in a)a[b],b.match(/[Hh]tml/)?d[b]=c.trustAsHtml(a[b]||""):!d[b]&&f[b]?d[b]=f[b]:d[b]||(d[b]=a[b]);if(d.labelFormat||(d.labelFormat=d.dateFormat,d.disableTimepicker||(d.labelFormat+=" "+d.timeFormat)),f.iconClass&&f.iconClass.length)return d.buttonIconHtml=c.trustAsHtml("<i ng-show='iconClass' class='"+f.iconClass+"'></i>")},h=!1,window.document.addEventListener("click",function(a){return d.calendarShown&&!h&&(d.toggleCalendar(!1),d.$apply()),h=!1}),angular.element(e[0])[0].addEventListener("click",function(a){return h=!0}),o=function(){var a;return a=g.$modelValue?n(g.$modelValue):null,s(),r(a),d.mainButtonStr=a?b("date")(a,d.labelFormat):d.placeholder,d.invalid=g.$invalid},r=function(a){return null!=a?(d.inputDate=b("date")(a,d.dateFormat),d.inputTime=b("date")(a,d.timeFormat)):(d.inputDate=null,d.inputTime=null)},p=function(a){var b;return null==a&&(a=null),b=null!=a?new Date(a):new Date,"Invalid Date"===b.toString()&&(b=new Date),b.setDate(1),d.calendarDate=new Date(b)},s=function(){var a,b,c,e,f,h,j,k,m,n,o,p,q;for(f=d.calendarDate.getDay(),c=l(d.calendarDate.getFullYear(),d.calendarDate.getMonth()),e=Math.ceil((f+c)/7),n=[],a=new Date(d.calendarDate),a.setDate(a.getDate()+-1*f),h=o=0,q=e-1;0<=q?o<=q:o>=q;h=0<=q?++o:--o)for(n.push([]),p=0;p<=6;++p)b=new Date(a),d.defaultTime&&(k=d.defaultTime.split(":"),b.setHours(k[0]||0),b.setMinutes(k[1]||0),b.setSeconds(k[2]||0)),j=g.$modelValue&&b&&i(b,g.$modelValue),m=i(b,new Date),n[h].push({date:b,selected:j,disabled:"function"==typeof d.dateFilter&&!d.dateFilter(b),other:b.getMonth()!==d.calendarDate.getMonth(),today:m}),a.setDate(a.getDate()+1);return d.weeks=n},g.$parsers.push(function(a){return d.required&&null==a?(g.$setValidity("required",!1),null):angular.isDate(a)?(g.$setValidity("required",!0),a):angular.isString(a)?(g.$setValidity("required",!0),d.parseDateFunction(a)):null}),g.$formatters.push(function(a){return angular.isDate(a)?a:angular.isString(a)?d.parseDateFunction(a):void 0}),function(a,c){return b("date")(a,c)},t=function(a){return"string"==typeof a?n(a):a},n=a.parseDateFunction,i=function(a,b,c){return null==c&&(c=!1),c?a-b==0:(a=t(a),b=t(b),a&&b&&a.getYear()===b.getYear()&&a.getMonth()===b.getMonth()&&a.getDate()===b.getDate())},j=function(a,b){return!(!a||!b)&&parseInt(a.getTime()/6e4)===parseInt(b.getTime()/6e4)},l=function(a,b){return[31,a%4==0&&a%100!=0||a%400==0?29:28,31,30,31,30,31,31,30,31,30,31][b]},k=function(a,b){var c,d,e,f,g,h;return g=c=d=h=f=null,e=function(){var a;return a=+new Date-h,g=a<b&&a>0?setTimeout(e,b-a):null},function(){return d=this,c=arguments,h=+new Date,g||(g=setTimeout(e,b),f=a.apply(d,c),d=c=null),f}},g.$render=function(){return p(g.$viewValue),o()},g.$viewChangeListeners.unshift(function(){if(p(g.$viewValue),o(),d.onChange)return d.onChange()}),d.$watch("calendarShown",function(a,b){var c;if(a)return c=angular.element(e[0].querySelector(".quickdate-date-input"))[0],c.select()}),d.toggleCalendar=k(function(a){return isFinite(a)?d.calendarShown=a:d.calendarShown=!d.calendarShown},150),d.selectDate=function(a,b){return null==b&&(b=!0),!g.$viewValue&&a||g.$viewValue&&!a||a&&g.$viewValue&&a.getTime()!==g.$viewValue.getTime(),!("function"==typeof d.dateFilter&&!d.dateFilter(a))&&(g.$setViewValue(a),b&&d.toggleCalendar(!1),!0)},d.selectDateFromInput=function(a){var b,c,e,f;null==a&&(a=!1);try{if(!(c=n(d.inputDate)))throw"Invalid Date";if(!d.disableTimepicker&&d.inputTime&&d.inputTime.length&&c){if(f=d.disableTimepicker?"00:00:00":d.inputTime,!(e=n(d.inputDate+" "+f)))throw"Invalid Time";c=e}if(!j(g.$viewValue,c)&&!d.selectDate(c,!1))throw"Invalid Date";return a&&d.toggleCalendar(!1),d.inputDateErr=!1,d.inputTimeErr=!1}catch(h){if("Invalid Date"===(b=h))return d.inputDateErr=!0;if("Invalid Time"===b)return d.inputTimeErr=!0}},d.onDateInputTab=function(){return d.disableTimepicker&&d.toggleCalendar(!1),!0},d.onTimeInputTab=function(){return d.toggleCalendar(!1),!0},d.nextMonth=function(){return p(new Date(new Date(d.calendarDate).setMonth(d.calendarDate.getMonth()+1))),o()},d.prevMonth=function(){return p(new Date(new Date(d.calendarDate).setMonth(d.calendarDate.getMonth()-1))),o()},d.clear=function(){return d.selectDate(null,!0)},m()},template:"<div class='quickdate'>\n  <a href='' ng-focus='toggleCalendar()' class='quickdate-button' title='{{hoverText}}'><div ng-hide='iconClass' ng-bind-html='buttonIconHtml'></div>{{mainButtonStr}}</a>\n  <div class='quickdate-popup' ng-class='{open: calendarShown}'>\n    <a href='' tabindex='-1' class='quickdate-close' ng-click='toggleCalendar()'><div ng-bind-html='closeButtonHtml'></div></a>\n    <div class='quickdate-text-inputs'>\n      <div class='quickdate-input-wrapper'>\n        <label>Date</label>\n        <input class='quickdate-date-input' ng-class=\"{'ng-invalid': inputDateErr}\" name='inputDate' type='text' ng-model='inputDate' placeholder='{{ datePlaceholder }}' ng-enter=\"selectDateFromInput(true)\" ng-blur=\"selectDateFromInput(false)\" on-tab='onDateInputTab()' />\n      </div>\n      <div class='quickdate-input-wrapper' ng-hide='disableTimepicker'>\n        <label>Time</label>\n        <input class='quickdate-time-input' ng-class=\"{'ng-invalid': inputTimeErr}\" name='inputTime' type='text' ng-model='inputTime' placeholder='{{ timePlaceholder }}' ng-enter=\"selectDateFromInput(true)\" ng-blur=\"selectDateFromInput(false)\" on-tab='onTimeInputTab()'>\n      </div>\n    </div>\n    <div class='quickdate-calendar-header'>\n      <a href='' class='quickdate-prev-month quickdate-action-link' tabindex='-1' ng-click='prevMonth()'><div ng-bind-html='prevLinkHtml'></div></a>\n      <span class='quickdate-month'>{{calendarDate | date:'MMMM yyyy'}}</span>\n      <a href='' class='quickdate-next-month quickdate-action-link' ng-click='nextMonth()' tabindex='-1' ><div ng-bind-html='nextLinkHtml'></div></a>\n    </div>\n    <table class='quickdate-calendar'>\n      <thead>\n        <tr>\n          <th ng-repeat='day in dayAbbreviations'>{{day}}</th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr ng-repeat='week in weeks'>\n          <td ng-mousedown='selectDate(day.date, true, true)' ng-click='$event.preventDefault()' ng-class='{\"other-month\": day.other, \"disabled-date\": day.disabled, \"selected\": day.selected, \"is-today\": day.today}' ng-repeat='day in week'>{{day.date | date:'d'}}</td>\n        </tr>\n      </tbody>\n    </table>\n    <div class='quickdate-popup-footer'>\n      <a href='' class='quickdate-clear' tabindex='-1' ng-hide='disableClearButton' ng-click='clear()'>Clear</a>\n    </div>\n  </div>\n</div>"}}]),a.directive("ngEnter",function(){return function(a,b,c){return b.bind("keydown keypress",function(b){if(13===b.which)return a.$apply(c.ngEnter),b.preventDefault()})}}),a.directive("onTab",function(){return{restrict:"A",link:function(a,b,c){return b.bind("keydown keypress",function(b){if(9===b.which&&!b.shiftKey)return a.$apply(c.onTab)})}}})}.call(this),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 za.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){!1===ta.suppressDeprecationWarnings&&"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){qb[a]||(e(b),qb[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){!1!==b&&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=ta.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(void 0!==b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),void 0!==b._i&&(a._i=b._i),void 0!==b._f&&(a._f=b._f),void 0!==b._l&&(a._l=b._l),void 0!==b._strict&&(a._strict=b._strict),void 0!==b._tzm&&(a._tzm=b._tzm),void 0!==b._isUTC&&(a._isUTC=b._isUTC),void 0!==b._offset&&(a._offset=b._offset),void 0!==b._pf&&(a._pf=b._pf),void 0!==b._locale&&(a._locale=b._locale),Ia.length>0)for(c in Ia)d=Ia[c],void 0!==(e=b[d])&&(a[d]=e);return a}function o(a){return a<0?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=ta.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||d,e&&a._d.setTime(+a._d+e*c),f&&na(a,"Date",ma(a,"Date")+f*c),g&&la(a,ma(a,"Month")+g*c),d&&ta.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;d<e;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=jb[a]||kb[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d))&&(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"}ta[b]=function(e,f){var g,h,i=ta._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=ta().utc().set(d,a);return i.call(ta._locale,b,e||"")},null!=f)return h(f);for(g=0;g<c;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 ha(ta([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[Ba]<0||a._a[Ba]>11?Ba:a._a[Ca]<1||a._a[Ca]>B(a._a[Aa],a._a[Ba])?Ca:a._a[Da]<0||a._a[Da]>24||24===a._a[Da]&&(0!==a._a[Ea]||0!==a._a[Fa]||0!==a._a[Ga])?Da:a._a[Ea]<0||a._a[Ea]>59?Ea:a._a[Fa]<0||a._a[Fa]>59?Fa:a._a[Ga]<0||a._a[Ga]>999?Ga:-1,a._pf._overflowDayOfYear&&(b<Aa||b>Ca)&&(b=Ca),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(!Ha[a]&&Ja)try{b=ta.locale(),require("./locale/"+a),ta.locale(b)}catch(c){}return Ha[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(ta.isMoment(a)||v(a)?+a:+ta(a))-+c,c._d.setTime(+c._d+d),ta.updateOffset(c,!1),c):ta(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(Na);for(b=0,c=d.length;b<c;b++)pb[d[b]]?d[b]=pb[d[b]]:d[b]=L(d[b]);return function(e){var f="";for(b=0;b<c;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()),lb[b]||(lb[b]=M(b)),lb[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Oa.lastIndex=0;d>=0&&Oa.test(a);)a=a.replace(Oa,c),Oa.lastIndex=0,d-=1;return a}function P(a,b){var c=b._strict;switch(a){case"Q":return Za;case"DDDD":return _a;case"YYYY":case"GGGG":case"gggg":return c?ab:Ra;case"Y":case"G":case"g":return cb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return c?bb:Sa;case"S":if(c)return Za;case"SS":if(c)return $a;case"SSS":if(c)return _a;case"DDD":return Qa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ua;case"a":case"A":return b._locale._meridiemParse;case"x":return Xa;case"X":return Ya;case"Z":case"ZZ":return Va;case"T":return Wa;case"SSSS":return Ta;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return c?$a:Pa;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pa;case"Do":return c?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Va)||[],c=b[b.length-1]||[],d=(c+"").match(hb)||["-",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[Ba]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Ba]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Ba]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Ca]=A(b));break;case"Do":null!=b&&(e[Ca]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Aa]=ta.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Aa]=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[Da]=A(b);break;case"m":case"mm":e[Ea]=A(b);break;case"s":case"ss":e[Fa]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ga]=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]=ta.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[Aa],ha(ta(),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[Aa],ha(ta(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d)<g&&++e:f=null!=c.e?c.e+g:g),i=ia(d,e,f,h,g),a._a[Aa]=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[Ca]&&null==a._a[Ba]&&S(a),a._dayOfYear&&(f=b(a._a[Aa],e[Aa]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=da(f,0,a._dayOfYear),a._a[Ba]=d.getUTCMonth(),a._a[Ca]=d.getUTCDate()),c=0;c<3&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;c<7;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Da]&&0===a._a[Ea]&&0===a._a[Fa]&&0===a._a[Ga]&&(a._nextDay=!0,a._a[Da]=0),a._d=(a._useUTC?da:ca).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Da]=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===ta.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(Na)||[],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),pb[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),!0===b._pf.bigHour&&b._a[Da]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Da]<12&&(b._a[Da]+=12),!1===b._isPm&&12===b._a[Da]&&(b._a[Da]=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(NaN));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||g<e)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=db.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fb.length;b<c;b++)if(fb[b][1].exec(d)){a._f=fb[b][0]+(e[6]||" ");break}for(b=0,c=gb.length;b<c;b++)if(gb[b][1].exec(d)){a._f+=gb[b][0];break}d.match(Va)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),!1===a._isValid&&(delete a._isValid,ta.createFromInputFallback(a))}function aa(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function ba(b){var c,d=b._i;d===a?b._d=new Date:v(d)?b._d=new Date(+d):null!==(c=Ka.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?_(b):u(d)?(b._a=aa(d.slice(0),function(a){return parseInt(a,10)}),T(b)):"object"==typeof d?U(b):"number"==typeof d?b._d=new Date(d):ta.createFromInputFallback(b)}function ca(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return a<1970&&h.setFullYear(a),h}function da(a){var b=new Date(Date.UTC.apply(null,arguments));return a<1970&&b.setUTCFullYear(a),b}function ea(a,b){if("string"==typeof a)if(isNaN(a)){if("number"!=typeof(a=b.weekdaysParse(a)))return null}else a=parseInt(a,10);return a}function fa(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ga(a,b,c){var d=ta.duration(a).abs(),e=ya(d.as("s")),f=ya(d.as("m")),g=ya(d.as("h")),h=ya(d.as("d")),i=ya(d.as("M")),j=ya(d.as("y")),k=e<mb.s&&["s",e]||1===f&&["m"]||f<mb.m&&["mm",f]||1===g&&["h"]||g<mb.h&&["hh",g]||1===h&&["d"]||h<mb.d&&["dd",h]||1===i&&["M"]||i<mb.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,fa.apply({},k)}function ha(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),f<e-7&&(f+=7),d=ta(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ia(a,b,c,d,e){var f,g,h=da(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(h<e?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 ja(b){var c,d=b._i,e=b._f;return b._locale=b._locale||ta.localeData(b._l),null===d||e===a&&""===d?ta.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),ta.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):ba(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function ka(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return ta();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function la(a,b){var c;return"string"==typeof b&&"number"!=typeof(b=a.localeData().monthsParse(b))?a:(c=Math.min(a.date(),B(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function ma(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function na(a,b,c){return"Month"===b?la(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function oa(a,b){return function(c){return null!=c?(na(this,a,c),ta.updateOffset(this,b),this):ma(this,a)}}function pa(a){return 400*a/146097}function qa(a){return 146097*a/400}function ra(a){ta.duration.fn[a]=function(){return this._data[a]}}function sa(a){"undefined"==typeof ender&&(ua=xa.moment,xa.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",ta):ta)}for(var ta,ua,va,wa="2.8.4",xa="undefined"!=typeof global?global:this,ya=Math.round,za=Object.prototype.hasOwnProperty,Aa=0,Ba=1,Ca=2,Da=3,Ea=4,Fa=5,Ga=6,Ha={},Ia=[],Ja="undefined"!=typeof module&&module&&module.exports,Ka=/^\/?Date\((\-?\d+)/i,La=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ma=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Na=/(\[[^\[]*\])|(\\)?(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,Oa=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pa=/\d\d?/,Qa=/\d{1,3}/,Ra=/\d{1,4}/,Sa=/[+\-]?\d{1,6}/,Ta=/\d+/,Ua=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Va=/Z|[\+\-]\d\d:?\d\d/gi,Wa=/T/i,Xa=/[\+\-]?\d+/,Ya=/[\+\-]?\d+(\.\d{1,3})?/,Za=/\d/,$a=/\d\d/,_a=/\d{3}/,ab=/\d{4}/,bb=/[+-]?\d{6}/,cb=/[+-]?\d+/,db=/^\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)?)?$/,eb="YYYY-MM-DDTHH:mm:ssZ",fb=[["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}/]],gb=[["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/]],hb=/([\+\-]|\d\d)/gi,ib=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),jb={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"},kb={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},lb={},mb={s:45,m:45,h:22,d:26,M:11},nb="DDD w W M D d".split(" "),ob="M D H h m s w W".split(" "),pb={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();return(a>=0?"+":"-")+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 a<0&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return a<0&&(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()}},qb={},rb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nb.length;)va=nb.pop(),pb[va+"o"]=i(pb[va],va);for(;ob.length;)va=ob.pop(),pb[va+va]=h(pb[va],2);pb.DDDD=h(pb.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;d<12;d++){if(e=ta.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;b<7;b++)if(this._weekdaysParse[b]||(c=ta([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 ha(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),ta=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(),ja(g)},ta.suppressDeprecationWarnings=!1,ta.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":""))}),ta.min=function(){return ka("isBefore",[].slice.call(arguments,0))},ta.max=function(){return ka("isAfter",[].slice.call(arguments,0))},ta.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(),ja(g).utc()},ta.unix=function(a){return ta(1e3*a)},ta.duration=function(a,b){var d,e,f,g,h=a,i=null;return ta.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=La.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Ca])*d,h:A(i[Da])*d,m:A(i[Ea])*d,s:A(i[Fa])*d,ms:A(i[Ga])*d}):(i=Ma.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(ta(h.from),ta(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),ta.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},ta.version=wa,ta.defaultFormat=eb,ta.ISO_8601=function(){},ta.momentProperties=Ia,ta.updateOffset=function(){},ta.relativeTimeThreshold=function(b,c){return mb[b]!==a&&(c===a?mb[b]:(mb[b]=c,!0))},ta.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return ta.locale(a,b)}),ta.locale=function(a,b){var c;return a&&(c=void 0!==b?ta.defineLocale(a,b):ta.localeData(a))&&(ta.duration._locale=ta._locale=c),ta._locale._abbr},ta.defineLocale=function(a,b){return null!==b?(b.abbr=a,Ha[a]||(Ha[a]=new j),Ha[a].set(b),ta.locale(a),Ha[a]):(delete Ha[a],null)},ta.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return ta.localeData(a)}),ta.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return ta._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},ta.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},ta.isDuration=function(a){return a instanceof l};for(va=rb.length-1;va>=0;--va)z(rb[va]);ta.normalizeUnits=function(a){return x(a)},ta.invalid=function(a){var b=ta.utc(NaN);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},ta.parseZone=function(){return ta.apply(null,arguments).parseZone()},ta.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(ta.fn=k.prototype,{clone:function(){return ta(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=ta(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?ta.utc(this._a):ta(this._a)).toArray())>0)},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||ta.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-ta(this).startOf("month")-(g-ta(g).startOf("month")),f-=6e4*(this.zone()-ta(this).startOf("month").zone()-(g.zone()-ta(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 ta.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(ta(),a)},calendar:function(a){var b=a||ta(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,ta(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=ea(a,this.localeData()),this.add(a-b,"d")):b},month:oa("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){return b=x(void 0!==b?b:"millisecond"),"millisecond"===b?(a=ta.isMoment(a)?a:ta(a),+this>+a):(ta.isMoment(a)?+a:+ta(a))<+this.clone().startOf(b)},isBefore:function(a,b){var c;return b=x(void 0!==b?b:"millisecond"),"millisecond"===b?(a=ta.isMoment(a)?a:ta(a),+this<+a):(c=ta.isMoment(a)?+a:+ta(a),+this.clone().endOf(b)<c)},isSame:function(a,b){var c;return b=x(b||"millisecond"),"millisecond"===b?(a=ta.isMoment(a)?a:ta(a),+this==+a):(c=+ta(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=ta.apply(null,arguments),a<this?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=ta.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),!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,ta.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ta.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?ta(a).zone():0,(this.zone()-a)%60==0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=ya((ta(this).startOf("day")-ta(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=ha(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ha(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=ha(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=ta.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)}}),ta.fn.millisecond=ta.fn.milliseconds=oa("Milliseconds",!1),ta.fn.second=ta.fn.seconds=oa("Seconds",!1),ta.fn.minute=ta.fn.minutes=oa("Minutes",!1),ta.fn.hour=ta.fn.hours=oa("Hours",!0),ta.fn.date=oa("Date",!0),ta.fn.dates=f("dates accessor is deprecated. Use date instead.",oa("Date",!0)),ta.fn.year=oa("FullYear",!0),ta.fn.years=f("years accessor is deprecated. Use year instead.",oa("FullYear",!0)),ta.fn.days=ta.fn.day,ta.fn.months=ta.fn.month,ta.fn.weeks=ta.fn.week,ta.fn.isoWeeks=ta.fn.isoWeek,ta.fn.quarters=ta.fn.quarter,ta.fn.toJSON=ta.fn.toISOString,m(ta.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(pa(e)),e-=o(qa(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=ga(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=ta.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=ta.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("month"===(a=x(a))||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pa(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qa(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;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:ta.fn.lang,locale:ta.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}}),
ta.duration.fn.toString=ta.duration.fn.toISOString;for(va in ib)c(ib,va)&&ra(va.toLowerCase());ta.duration.fn.asMilliseconds=function(){return this.as("ms")},ta.duration.fn.asSeconds=function(){return this.as("s")},ta.duration.fn.asMinutes=function(){return this.as("m")},ta.duration.fn.asHours=function(){return this.as("h")},ta.duration.fn.asDays=function(){return this.as("d")},ta.duration.fn.asWeeks=function(){return this.as("weeks")},ta.duration.fn.asMonths=function(){return this.as("M")},ta.duration.fn.asYears=function(){return this.as("y")},ta.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10;return a+(1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th")}}),Ja?module.exports=ta:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&!0===c.config().noGlobal&&(xa.moment=ua),ta}),sa(!0)):sa()}.call(this);var mixinsBV=angular.module("kbApp.mixins.bv",[]);mixinsBV.factory("bvService",[function(){var a=10,b=290,c=(Math.PI,2*Math.PI),d=40,e=40,f=.001875,g=3,h=.4,i=1.05,j=10,k=2,l=450,m=250,n=.4,o=1.5,p=.8,q=1,r=.005,s=4e-4,t=5e-4,u=.17,v=10,w=["ball.png","kostal.jpg"],x={"Kostal Hagen":"kostal.jpg"},y={Set:"The set has been won by {0}!",Start:"Good luck and have fun!",Over:"Over, over, the game is over...\nThe winner is {0}!",Replay:"Replay"};!function(){var a=!1,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(c){function d(){!a&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)f[g]="function"==typeof c[g]&&"function"==typeof e[g]&&b.test(c[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]):c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d}}();var z=document.getElementById("canvas").getContext("2d"),A=z.canvas.width,B=z.canvas.height,C={},D=Class.extend({init:function(){},random:function(a,b){var c=b-a;return Math.min(Math.floor(Math.random()*c),b-1)+a},format:function(a){for(var b=1;b<arguments.length;b++)a=a.replace(new RegExp("\\{"+(b-1)+"\\}","g"),arguments[b]);return a}}),E=Class.extend({init:function(a){this.toload=a,this.resources={}},loaded:function(){this.toload--},setResource:function(a,b){this.resources[a]=b},getResource:function(a){return this.resources[a]}}),F=E.extend({init:function(a,b){var c=this;c._super(b.length);for(var d=0;d<b.length;d++){var e=document.createElement("img");e.src=a+"/"+b[d],e.onload=function(){c.loaded()},c.setResource(b[d],e)}}}),G=D.extend({init:function(a,b,c){this.beach=a,this.ballx=b.x,this.bally=b.y,this.data=[],this.players=[],this.count=0,this.contacts=0;for(var d=0;d<c.length;d++)this.players.push({color:c[d].color,name:c[d].name,points:c[d].points,sets:c[d].sets})},addData:function(a){var b=[];this.contacts=0;for(var c=0;c<a.length;c++)b.push(a[c].input.copy()),this.contacts+=a[c].totalContacts;if(0===this.count){for(var d=!1,c=b.length;c--;)if(b[c]){d=!0;break}if(!d)return}this.data.push(b),this.count++},play:function(a,b){a.pause();var c=this.count,f=0,g=[],h=new O(a.field),i=new P(a.field),j=new M(g,a.field,h,i);j.setBackground(this.beach),i.x=this.ballx,i.y=this.bally;for(var k=this.data,l=0;l<this.players.length;l++){var m=new R(a,a.players[l].container);m.setIdentity(this.players[l].name,this.players[l].color),g.push(m)}var n=setInterval(function(){if(f===c)return clearInterval(n),b&&b.apply(a),void a.play();for(var d=k[f++],l=g.length;l--;)g[l].steer(d[l]);for(var m=e;m--;){i.logic(),h.logic();for(var l=g.length;l--;)g[l].logic(),i.collision(g[l]);i.collision(h)}j.paint(i,g)},d/2)},stop:function(){}}),H=Class.extend({init:function(a,b,c,d){this.setPosition(a||0,b||0),this.width=c||0,this.height=d||0},setPosition:function(a,b){this.x=a,this.y=b},paint:function(){}}),I=(Class.extend({init:function(){}}),H.extend({init:function(a,b){this._super(a,0,b,B),this.wh=b/2,this.hh=B/2}})),J=I.extend({init:function(){this._super(0,A)},paint:function(){z.strokeStyle="#cccccc",z.beginPath(),z.rect(0,0,A,B),z.closePath(),z.stroke()}}),K=I.extend({init:function(b,c){var d=A/c-a/2;this._super((d+a)*b,d)}}),L=H.extend({init:function(a){this._super(0,0,A,B),this.field=a.field,this.players=a.players,this.net=a.net,this.ball=a.ball,this.game=a,this.message=[],this.persistent=!1,this.timeLeft=0,this.radius=v},setup:function(){this.sets=2*this.game.maxSets-1,this.factor=2.5,this.offset=(this.game.maxSets-1)*this.radius*this.factor,this.shift=2*this.radius},setMessage:function(a,b){this.message=a.split("\n"),this.persistent=!b,b&&(this.timeLeft=b)},clearMessage:function(){this.message=[],this.persistent=!1,this.timeLeft=0},setBackground:function(a){this.background=C.images.getResource(x[a]),document.getElementById("beach").innerHTML=a},paint:function(){z.clearRect(0,0,A,B),z.drawImage(this.background,0,0),this.field.paint(),this.net.paint(),this.ball.paint();for(var a=this.players.length;a--;)this.players[a].paint();this.ball.getBottom()>B&&this.paintCursor(this.ball.x),this.paintScore();for(var a=this.players.length;a--;)this.players[a].paintPulse();this.paintMessage()},paintMessage:function(){if(!this.persistent){if(!this.timeLeft)return;this.timeLeft--}z.save(),z.translate(A/2,B/2),z.textAlign="center",z.fillStyle="#8A2BE2",z.font="32pt Merge";for(var a=0;a<this.message.length;a++)z.fillText(this.message[a],0,50*a);z.restore()},paintScore:function(){z.save(),z.translate(this.field.wh-this.offset,30);for(var a=0;a<this.sets;a++)this.game.sets.length>a?z.fillStyle=this.game.sets[a].color:z.fillStyle="#cccccc",z.strokeStyle="#666666",z.beginPath(),z.arc(this.factor*a*this.radius,0,this.radius,0,c,!1),z.fill(),z.stroke(),z.closePath();z.fillStyle="#dddddd",z.font="32pt Merge",z.textAlign="right",z.fillText(this.players[0].points,-this.shift,15),z.textAlign="left",z.fillText(this.players[1].points,2*this.offset+this.shift,15),z.restore()},paintCursor:function(a){z.save(),z.translate(a,10),z.fillStyle="#000000",z.beginPath(),z.moveTo(0,-5),z.lineTo(5,5),z.lineTo(-5,5),z.closePath(),z.fill(),z.restore()}}),M=L.extend({init:function(a,b,c,d){var e={players:a,field:b,net:c,ball:d};this._super(e),this.setMessage(y.Replay)},setup:function(){},paintScore:function(){}}),N=H.extend({init:function(a,b,c){this.container=a,this._super(0,0,b,c),this.friction=p,this.wh=this.width/2,this.hh=this.height/2,this.setPositionFromContainerOrigin(),this.setVelocity(0,0)},setPositionFromContainerOrigin:function(){var a=this.container.x+this.container.wh,b=this.hh;this.setPosition(a,b)},getTotalVelocity:function(){return Math.sqrt(this.vx*this.vx+this.vy*this.vy)},setVelocity:function(a,b){this.vx=a,this.vy=b},setPosition:function(a,b){this.x=a,this.y=b},getBottom:function(){return this.y-this.hh},getTop:function(){return this.y+this.hh},getLeft:function(){return this.x-this.wh},getRight:function(){return this.x+this.wh},checkField:function(){this.y<this.hh&&(this.y=this.hh,this.vy=0),this.getLeft()<this.container.x?(this.vx=0,this.x=this.container.x+this.wh):this.getRight()>this.container.x+this.container.width&&(this.vx=0,this.x=this.container.x+this.container.width-this.wh)},collision:function(){},logic:function(){this.vy-=f,this.x+=this.vx,this.y+=this.vy,this.checkField()},paint:function(){},hit:function(a,b,c){var d=a*a+b*b,e=Math.atan2(b,a),f=c.getTotalVelocity(),g=Math.cos(e)*this.friction*f,h=Math.sin(e)*this.friction*f;g+=q*c.omega*b/d,h-=q*c.omega*a/d,c.setVelocity(g,h)}}),O=N.extend({init:function(c){this._super(c,a,b),this.radius=a/2,this.y=b,this.originX=this.x,this.friction=1},reset:function(){this.x=this.originX,this.vx=0},collision:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.radius+this.radius;if(c<=0){var e=0;return a.vx>0&&b+d>=0&&b<=this.radius?e=-1:a.vx<0&&b-d<=0&&b+this.radius>=0&&(e=1),void(0!=e&&(this.vx=5*a.vx,a.vx=-a.vx,a.vy+=e*a.omega))}Math.sqrt(b*b+c*c)<=d&&this.hit(b,c,a)},hit:function(a,b,c){this._super(a,b,c),c.spin(this.vx,this.vy,a,b)},logic:function(){this.x+=this.vx,this.vx-=this.x-this.originX,this.vx*=.99},paint:function(){z.save(),z.translate(this.originX,this.container.height);var a=Math.atan2(this.x-this.originX,this.height);z.rotate(a),z.strokeStyle="#666666",z.fillStyle="#b0ca33",z.lineWidth=1,z.beginPath(),z.arc(0,-this.y,this.wh,0,Math.PI,!0),z.lineTo(-this.wh,0),z.lineTo(this.wh,0),z.lineTo(this.wh,-this.y),z.fill(),z.stroke(),z.closePath(),z.restore()}}),P=N.extend({init:function(a){this.radius=48,this.diameter=2*this.radius,this._super(a,this.diameter,this.diameter),this.rotation=0,this.omega=0,this.sleeping=!0,this.dead=!1},setVelocity:function(a,b){this.sleeping=!1,this._super(a,b)},setServe:function(a){var b=a.x+a.width/2,c=m;this.sleeping=!0,this.dead=!1,this.omega=0,this.rotation=0,this.vx=0,this.vy=0,this.setPosition(b,c)},collision:function(a){if(this.dead)return void(a instanceof Q&&(this.x<a.container.x||this.x>a.container.x+a.container.width)&&a.scorePoint());a.collision(this)},checkField:function(){this.y<=this.radius&&(this.dead=!0,this.y=this.radius)},logic:function(){if(!this.sleeping&&!this.dead){if(this.x<=this.radius?(this.vx*=-1,this.vy+=this.omega):this.x>=this.container.width-this.radius&&(this.vx*=-1,this.vy-=this.omega),this.omega){var a=this.getTotalVelocity(),b=this.vy*this.omega*r/a,c=-this.vx*this.omega*r/a;this.vx+=b,this.vy+=c}this.rotation+=this.omega,this._super()}},changeSpin:function(a,b,c,d,e){var f=c*c+d*d,g=(c*a+d*b)/f,h=a+e*c*g,i=b+e*d*g;this.omega+=(h*d-i*c)/f},spin:function(a,b,c,d){this.changeSpin(this.vx,this.vy,c,d,1),this.changeSpin(a,b,c,d,-1)},paint:function(){z.save(),z.translate(this.x,this.container.height-this.y),z.rotate(this.rotation),z.drawImage(C.images.getResource("ball.png"),-this.radius,-this.radius),z.restore()}}),Q=N.extend({init:function(a,b,c){this.radius=48,this.diameter=2*this.radius,this._super(b,this.diameter,this.diameter),this.game=a,this.input=c,this.points=0,this.sets=0,this.pulses=[],this.color="rgb(0, 0, 0)",this.name="Player",this.reset()},addContact:function(){return!!this.isTouching||(this.isTouching=!0,this.contacts++,this.totalContacts++,!1)},reset:function(){this.input.reset(),this.setVelocity(0,0),this.setPositionFromContainerOrigin(),this.pulse=1,this.contacts=0,this.totalContacts=0,this.isTouching=!1},scorePoint:function(){if(this.points++,this.game.setServe(this.container),this.points>=this.game.maxPoints){for(var a=!0,b=this.game.players.length;b--;)if(this.game.players[b]!==this&&Math.abs(this.game.players[b].points-this.points)<2){a=!1;break}if(a)return this.game.setWon(this)}},hit:function(a,b,c){var d=c.sleeping?o:n;this._super(a,b,c);var e=a*this.vx+b*this.vy;if(e>0){var f=d*e/(a*a+b*b);c.vx+=a*f,c.vy+=b*f}c.spin(this.vx,this.vy,a,b)},collision:function(a){var b=a.x-this.x,c=a.y-this.y,d=Math.sqrt(b*b+c*c),e=a.radius+this.radius;if(d>e)return void(this.isTouching=!1);var f=e/d,h=f*b,i=f*c;return a.setPosition(this.x+h,this.y+i),this.game.contact(this)?void 0:this.contacts>g?void(a.dead=!0):void this.hit(b,c,a)},setIdentity:function(a,b){this.name=a,this.color=b},updatePulse:function(){this.pulses.push(this.pulse),this.pulses.length>100&&this.pulses.shift()},steer:function(){this.input.update(),this.updatePulse()},logic:function(){this.input.left?(this.vx=-this.pulse*h,this.pulse-=t):this.input.right?(this.vx=this.pulse*h,this.pulse-=t):this.vx=0,this.y===this.hh&&this.input.up&&(this.vy=i+f,this.pulse-=u),this.pulse=Math.max(Math.min(1,this.pulse+s),.5),this._super()},paint:function(){z.save(),z.translate(this.x,this.container.height-this.y),z.fillStyle=this.color,z.beginPath(),z.arc(0,0,this.radius,0,c,!0),z.fill(),z.closePath(),z.restore()},paintPulse:function(){z.save(),z.translate(this.container.x?this.container.x+this.container.width-250:50,45),z.fillStyle="rgba(150, 150, 150, 0.2)",z.fillRect(0,-30,200,30),z.beginPath(),z.moveTo(0,0);for(var a=0;a<this.pulses.length;a++)z.lineTo(2*a,-30*(1/this.pulses[a]-1));z.strokeStyle=this.color,z.stroke(),z.closePath(),z.fillStyle="#cccccc",z.textAlign="center",z.font="24px Merge",z.fillText(this.name,100,-10),z.restore()}}),R=(Q.extend({init:function(a,b){this._super(a,b,new S),this.setIdentity("Computer","#FF6633")},steer:function(){switch(Math.floor(6*Math.random())){case 0:this.input.setUp(!0);break;case 1:this.input.setLeft(!0),this.input.setRight(!1);break;case 2:this.input.setRight(!0),this.input.setLeft(!1);break;case 4:this.input.setRight(!1),this.input.setLeft(!1);break;case 5:this.input.setUp(!1)}this._super()}}),Q.extend({init:function(a,b){this._super(a,b,new S)},steer:function(a){a&&(this.input.setUp(!!a.u),this.input.setLeft(!!a.l),this.input.setRight(!!a.r)),this._super()},scorePoint:function(){}})),S=D.extend({init:function(){this.reset(),this._super()},update:function(){this.previousUp=this.up,this.previousLeft=this.left,this.previousRight=this.right,this.left=this.bufferLeft,this.up=this.bufferUp,this.right=this.bufferRight},reset:function(){this.up=!1,this.left=!1,this.right=!1,this.bufferUp=!1,this.bufferLeft=!1,this.bufferRight=!1,this.previousUp=!1,this.previousLeft=!1,this.previousRight=!1},setUp:function(a){this.bufferUp=a},setLeft:function(a){this.bufferLeft=a},setRight:function(a){this.bufferRight=a},bind:function(){},unbind:function(){},cancelBubble:function(a){var b=a||event;b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0},copy:function(){return this.previousUp===this.up&&this.previousRight===this.right&&this.previousLeft===this.left?0:{l:this.left?1:0,u:this.up?1:0,r:this.right?1:0}}}),T=S.extend({init:function(a){var b=this;b._super(),b.codes={},b.codes[a[0]]=b.setUp,b.codes[a[1]]=b.setLeft,b.codes[a[2]]=b.setRight;var c=!1;this.downhandler=function(a){return c=b.handler(a,!0)},this.uphandler=function(a){return c=b.handler(a,!1)},this.presshandler=function(a){return c||b.cancelBubble(a),c}},bind:function(){var a=document.attachEvent||document.addEventListener;a("keydown",this.downhandler),a("keyup",this.uphandler),a("keypress",this.presshandler)},unbind:function(){},handler:function(a,b){return!this.codes[a.keyCode]||(this.codes[a.keyCode].apply(this,[b]),this.cancelBubble(a),!1)}}),U=(S.extend({init:function(a){this._super()}}),D.extend({init:function(){this.messages=[],this.created=new Date}})),V=(D.extend({init:function(){}}),D.extend({init:function(){this.ready=!1,this.load(),this.players=[],this.observers=[],this.replays=[],this.instantReplay=null,this.sets=[],this.lobby=new U,this.field=new J,this.ball=new P(this.field),this.net=new O(this.field),this.viewPort=new L(this),this.loop=null,this.running=!1,this.maxPoints=j,this.maxSets=k,this.wait=0,this.beach="",this.beaches=[];for(var a in x)this.beaches.push(a)},contact:function(a){for(var b=!1,c=this.players.length;c--;){var d=this.players[c];d===a?b=d.addContact():d.contacts=0}return b},reset:function(){var a;for(a=this.players.length;a--;)this.players.pop();for(a=this.observers.length;a--;)this.observers.pop();for(a=this.replays.length;a--;)this.replays.pop();for(a=this.sets.length;a--;)this.sets.pop()},setWon:function(a){for(var b=0;b<this.players.length;b++)this.players[b].points=0;a.sets++,this.sets.push(a),a.sets===this.maxSets?(this.viewPort.setMessage(this.format(y.Over,a.name)),this.endMatch()):this.viewPort.setMessage(this.format(y.Set,a.name),2*this.wait)},addPlayer:function(a){this.players.push(a)},addObserver:function(a){this.observers.push(a)},saveReplay:function(){this.replays.push(this.instantReplay)},recordReplay:function(){this.instantReplay=new G(this.beach,this.ball,this.players)},detectInstantReplay:function(){if(this.replays.length){var a=this.replays[this.replays.length-1];if(a.contacts>8&&a.count>220)return!0}return!1},playLastReplay:function(a){this.replays.length&&this.replays[this.replays.length-1].play(this,a)},continuation:function(){this.net.reset();for(var a=this.players.length;a--;)this.players[a].reset();this.recordReplay()},setServe:function(a){if(this.saveReplay(),this.ball.setServe(a),this.detectInstantReplay())return void this.playLastReplay(this.continuation);this.wait=Math.ceil(l/d),this.continuation()},tick:function(){if(this.wait)this.wait--;else{for(var a=this.players.length;a--;)this.players[a].steer();this.instantReplay.addData(this.players);for(var b=e;b--;){this.ball.logic(),this.net.logic();for(var a=this.players.length;a--;)this.players[a].logic(),this.ball.collision(this.players[a]);this.ball.collision(this.net)}}this.viewPort.paint(this.ball,this.players)},beginMatch:function(){var a=this.random(0,this.beaches.length);this.viewPort.setMessage(y.Start,100),this.beach=this.beaches[a],this.viewPort.setBackground(this.beach),this.viewPort.setup(),a=this.random(0,this.players.length),this.ball.setServe(this.players[a].container),this.continuation(),this.play()},endMatch:function(){this.saveReplay(),this.viewPort.paint(this.ball,this.players),this.pause()},play:function(){var a=this;if(!a.running){a.running=!0;for(var b=this.players.length;b--;)this.players[b].input.bind();a.loop=setInterval(function(){a.tick()},d)}},pause:function(){if(this.running){this.running=!1;for(var a=this.players.length;a--;)this.players[a].input.unbind();clearInterval(this.loop)}},load:function(){this.ready=!0,C.images=new F("assets/bv",w)}}));return{startBV:function(){var a=new V,b=new K(0,2),c=new T([87,65,68]),d=new Q(a,b,c);d.setIdentity("Player1","#0000FF"),a.addPlayer(d);var e=new K(1,2),f=new T([38,37,39]),g=new Q(a,e,f);g.setIdentity("Player2","#FF0000"),a.addPlayer(g),a.beginMatch()}}}]);var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=function(){},f=d.Base={extend:function(a){e.prototype=this;var b=new e;return a&&b.mixIn(a),b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},g=d.WordArray=f.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||i).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes;if(a=a.sigBytes,this.clamp(),d%4)for(var e=0;e<a;e++)b[d+e>>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535<c.length)for(e=0;e<a;e+=4)b[d+e>>>2]=c[e>>>2];else b.push.apply(b,c);return this.sigBytes+=a,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=f.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d<b;d+=4)c.push(4294967296*a.random()|0);return new g.init(c,b)}}),h=c.enc={},i=h.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d<a;d++){var e=b[d>>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16)),c.push((15&e).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new g.init(c,b/2)}},j=h.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d<a;d++)c.push(String.fromCharCode(b[d>>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new g.init(c,b)}},k=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data")}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}},l=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=k.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,f=this.blockSize,h=e/(4*f),h=b?a.ceil(h):a.max((0|h)-this._minBufferSize,0);if(b=h*f,e=a.min(4*b,e),b){for(var i=0;i<b;i+=f)this._doProcessBlock(d,i);i=d.splice(0,b),c.sigBytes-=e}return new g.init(i,e)},clone:function(){var a=f.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0});d.Hasher=l.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new m.HMAC.init(a,c).finalize(b)}}});var m=c.algo={};return c}(Math);!function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=b.Hasher,e=[],b=a.algo.SHA1=d.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)e[j]=0|a[b+j];else{var k=e[j-3]^e[j-8]^e[j-14]^e[j-16];e[j]=k<<1|k>>>31}k=(d<<5|d>>>27)+i+e[j],k=20>j?k+(1518500249+(f&g|~f&h)):40>j?k+(1859775393+(f^g^h)):60>j?k+((f&g|f&h|g&h)-1894007588):k+((f^g^h)-899497514),i=h,h=g,g=f<<30|f>>>2,f=d,d=k}c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[14+(d+64>>>9<<4)]=Math.floor(c/4294967296),b[15+(d+64>>>9<<4)]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=d.clone.call(this);return a._hash=this._hash.clone(),a}});a.SHA1=d._createHelper(b),a.HmacSHA1=d._createHmacHelper(b)}();var CryptoJS=CryptoJS||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=c!=b?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;f<e;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else if(c.length>65535)for(var f=0;f<e;f+=4)b[d+f>>>2]=c[f>>>2];else b.push.apply(b,c);return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c=[],d=0;d<b;d+=4)c.push(4294967296*a.random()|0);return new f.init(c,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e<c;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;e<c;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d<b;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;l<j;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);CryptoJS.lib.Cipher||function(a){var b=CryptoJS,c=b.lib,d=c.Base,e=c.WordArray,f=c.BufferedBlockAlgorithm,g=b.enc,h=(g.Utf8,g.Base64),i=b.algo,j=i.EvpKDF,k=c.Cipher=f.extend({cfg:d.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){f.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){return a&&this._append(a),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?w:t}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),l=(c.StreamCipher=k.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),b.mode={}),m=c.BlockCipherMode=d.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),n=l.CBC=function(){function b(b,c,d){var e=this._iv;if(e){var f=e;this._iv=a}else var f=this._prevBlock;for(var g=0;g<d;g++)b[c+g]^=f[g]}var c=m.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e),d.encryptBlock(a,c),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);d.decryptBlock(a,c),b.call(this,a,c,e),this._prevBlock=f}}),c}(),o=b.pad={},p=o.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,f=d<<24|d<<16|d<<8|d,g=[],h=0;h<d;h+=4)g.push(f);var i=e.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},q=(c.BlockCipher=k.extend({cfg:k.cfg.extend({mode:n,padding:p}),reset:function(){k.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),c.CipherParams=d.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),r=b.format={},s=r.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=e.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(h)},parse:function(a){var b=h.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=e.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return q.create({ciphertext:b,salt:d})}},t=c.SerializableCipher=d.extend({cfg:d.extend({format:s}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return q.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){return d=this.cfg.extend(d),b=this._parse(b,d.format),a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),u=b.kdf={},v=u.OpenSSL={execute:function(a,b,c,d){d||(d=e.random(8));var f=j.create({keySize:b+c}).compute(a,d),g=e.create(f.words.slice(b),4*c);return f.sigBytes=4*b,q.create({key:f,iv:g,salt:d})}},w=c.PasswordBasedCipher=t.extend({cfg:t.cfg.extend({kdf:v}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=t.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);return d.iv=e.iv,t.decrypt.call(this,a,b,e.key,d)}})}(),function(){var a=CryptoJS,b=a.lib,c=b.BlockCipher,d=a.algo,e=[],f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[];!function(){for(var a=[],b=0;b<256;b++)a[b]=b<128?b<<1:b<<1^283;for(var c=0,d=0,b=0;b<256;b++){var o=d^d<<1^d<<2^d<<3^d<<4;o=o>>>8^255&o^99,e[c]=o,f[o]=c;var p=a[c],q=a[p],r=a[q],s=257*a[o]^16843008*o;g[c]=s<<24|s>>>8,h[c]=s<<16|s>>>16,i[c]=s<<8|s>>>24,j[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;k[o]=s<<24|s>>>8,l[o]=s<<16|s>>>16,m[o]=s<<8|s>>>24,n[o]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var o=[0,1,2,4,8,16,32,64,128,27,54],p=d.AES=c.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,f=4*(d+1),g=this._keySchedule=[],h=0;h<f;h++)if(h<c)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=e[i>>>24]<<24|e[i>>>16&255]<<16|e[i>>>8&255]<<8|e[255&i]):(i=i<<8|i>>>24,i=e[i>>>24]<<24|e[i>>>16&255]<<16|e[i>>>8&255]<<8|e[255&i],i^=o[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],p=0;p<f;p++){var h=f-p;if(p%4)var i=g[h];else var i=g[h-4];j[p]=p<4||h<=4?i:k[e[i>>>24]]^l[e[i>>>16&255]]^m[e[i>>>8&255]]^n[e[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,g,h,i,j,e)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,k,l,m,n,f);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;o<i;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});a.AES=c._createHelper(p)}(),function(a){var b=CryptoJS,c=b.lib,d=c.CipherParams,e=b.enc,f=e.Hex,g=b.format;g.Hex={stringify:function(a){return a.ciphertext.toString(f)},parse:function(a){var b=f.parse(a);return d.create({ciphertext:b})}}}(),function(){var a=CryptoJS,b=a.lib,c=b.Base,d=b.WordArray,e=a.algo,f=e.MD5,g=e.EvpKDF=c.extend({cfg:c.extend({keySize:4,hasher:f,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,e=c.hasher.create(),f=d.create(),g=f.words,h=c.keySize,i=c.iterations;g.length<h;){j&&e.update(j);var j=e.update(a).finalize(b);e.reset();for(var k=1;k<i;k++)j=e.finalize(j),e.reset();f.concat(j)}return f.sigBytes=4*h,f}});a.EvpKDF=function(a,b,c){return g.create(c).compute(a,b)}}(),CryptoJS.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},function(){var a=CryptoJS,b=a.lib,c=b.WordArray,d=a.enc;d.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp()
;for(var e=[],f=0;f<c;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;k<4&&f+.75*k<c;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,d=this._map,e=d.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;i<b;i++)if(i%4){var j=d.indexOf(a.charAt(i-1))<<i%4*2,k=d.indexOf(a.charAt(i))>>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return c.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),angular.module("progressbar-directive",[]),angular.module("progressbar-directive").directive("progressBar",function(){return{restrict:"E",replace:!0,link:function(a,b,c){function d(){if(b.children().css({width:e.toString()+"%"}),void 0!==c.frontbarclasses){var a=-1;angular.forEach(f,function(c){e<=c&&e>a&&(b.children().attr("class","processbarBaseFront frontBar"+c.toString()),a=c)})}if(void 0!==c.backbarclasses){var d=-1;angular.forEach(g,function(a){e<=a&&e>d&&(b.attr("class","processbarBaseBack backBar"+a.toString()),d=a)})}}b.children().html(""),a.barValue=c.barValue;var e=0,f=JSON.parse(c.frontbarclasses),g=JSON.parse(c.backbarclasses);a.$watch(c.barValue,function(a){void 0!==a&&(e=a>100?100:a,d())})},template:'<div class="processbarBaseBack"> <div class="processbarBaseFront"></div></div>'}}),function(a){"use strict";if(a.URL=a.URL||a.webkitURL,a.Blob&&a.URL)try{return void new Blob}catch(d){}var b=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||function(a){var b=function(a){return Object.prototype.toString.call(a).match(/^\[object\s(.*)\]$/)[1]},c=function(){this.data=[]},d=function(a,b,c){this.data=a,this.size=a.length,this.type=b,this.encoding=c},e=c.prototype,f=d.prototype,g=a.FileReaderSync,h=function(a){this.code=this[this.name=a]},i="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),j=i.length,k=a.URL||a.webkitURL||a,l=k.createObjectURL,m=k.revokeObjectURL,n=k,o=a.btoa,p=a.atob,q=a.ArrayBuffer,r=a.Uint8Array,s=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(d.fake=f.fake=!0;j--;)h.prototype[i[j]]=j+1;return k.createObjectURL||(n=a.URL=function(a){var b,c=document.createElementNS("http://www.w3.org/1999/xhtml","a");return c.href=a,"origin"in c||("data:"===c.protocol.toLowerCase()?c.origin=null:(b=a.match(s),c.origin=b&&b[1])),c}),n.createObjectURL=function(a){var b,c=a.type;return null===c&&(c="application/octet-stream"),a instanceof d?(b="data:"+c,"base64"===a.encoding?b+";base64,"+a.data:"URI"===a.encoding?b+","+decodeURIComponent(a.data):o?b+";base64,"+o(a.data):b+","+encodeURIComponent(a.data)):l?l.call(k,a):void 0},n.revokeObjectURL=function(a){"data:"!==a.substring(0,5)&&m&&m.call(k,a)},e.append=function(a){var c=this.data;if(r&&(a instanceof q||a instanceof r)){for(var e="",f=new r(a),i=0,j=f.length;i<j;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return e<3&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,c){var d=c?c.type||"":"",e=new b;if(a)for(var f=0,g=a.length;f<g;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var c=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=c(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var saveAs=saveAs||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i,l){l||(b=o(b));var p,q,r,s=this,t=b.type,u=!1,v=function(){n(s,"writestart progress write writeend".split(" "))},w=function(){if(!u&&p||(p=c().createObjectURL(b)),q)q.location.href=p;else{void 0==a.open(p,"_blank")&&"undefined"!=typeof safari&&(a.location.href=p)}s.readyState=s.DONE,v(),m(p)},x=function(a){return function(){if(s.readyState!==s.DONE)return a.apply(this,arguments)}},y={create:!0,exclusive:!1};return s.readyState=s.INIT,i||(i="download"),e?(p=c().createObjectURL(b),d.href=p,d.download=i,void setTimeout(function(){f(d),v(),m(p),s.readyState=s.DONE})):(a.chrome&&t&&t!==j&&(r=b.slice||b.webkitSlice,b=r.call(b,0,b.size,j),u=!0),g&&"download"!==i&&(i+=".download"),(t===j||g)&&(q=a),h?(k+=b.size,void h(a.TEMPORARY,k,x(function(a){a.root.getDirectory("saved",y,x(function(a){var c=function(){a.getFile(i,y,x(function(a){a.createWriter(x(function(c){c.onwriteend=function(b){q.location.href=a.toURL(),s.readyState=s.DONE,n(s,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=s["on"+a]}),c.write(b),s.abort=function(){c.abort(),s.readyState=s.DONE},s.readyState=s.WRITING}),w)}),w)};a.getFile(i,{create:!1},x(function(a){a.remove(),c()}),x(function(a){a.code===a.NOT_FOUND_ERR?c():w()}))}),w)}),w)):void w())},q=p.prototype,r=function(a,b,c){return new p(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=o(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(0,function(){"use strict";return angular.module("tmh.dynamicLocale",[]).config(["$provide",function(a){function b(a){return a.$stateful=!0,a}a.decorator("dateFilter",["$delegate",b]),a.decorator("numberFilter",["$delegate",b]),a.decorator("currencyFilter",["$delegate",b])}]).constant("tmhDynamicLocale.STORAGE_KEY","tmhDynamicLocale.locale").provider("tmhDynamicLocale",["tmhDynamicLocale.STORAGE_KEY",function(a){function b(a,b,c,d){var f=document.createElement("script"),g=e||document.getElementsByTagName("body")[0],h=!1;f.type="text/javascript",f.readyState?f.onreadystatechange=function(){"complete"!==f.readyState&&"loaded"!==f.readyState||(f.onreadystatechange=null,d(function(){h||(h=!0,f.parentNode===g&&g.removeChild(f),b())},30,!1))}:(f.onload=function(){h||(h=!0,f.parentNode===g&&g.removeChild(f),b())},f.onerror=function(){h||(h=!0,f.parentNode===g&&g.removeChild(f),c())}),f.src=a,f.async=!0,g.appendChild(f)}function c(a,c,d,e,h,i,k){function n(a,b){g===d&&(angular.forEach(a,function(c,d){b[d]?angular.isArray(b[d])&&(a[d].length=b[d].length):delete a[d]}),angular.forEach(b,function(c,d){angular.isArray(b[d])||angular.isObject(b[d])?(a[d]||(a[d]=angular.isArray(b[d])?[]:{}),n(a[d],b[d])):a[d]=b[d]}))}if(m[d])return g=d,m[d];var o,p=h.defer();return d===g?p.resolve(c):(o=i.get(d))?(g=d,e.$evalAsync(function(){n(c,o),f[l](j,d),e.$broadcast("$localeChangeSuccess",d,c),p.resolve(c)})):(g=d,m[d]=p.promise,b(a,function(){var a=angular.injector(["ngLocale"]),b=a.get("$locale");n(c,b),i.put(d,b),delete m[d],e.$applyAsync(function(){f[l](j,d),e.$broadcast("$localeChangeSuccess",d,c),p.resolve(c)})},function(){delete m[d],e.$applyAsync(function(){g===d&&(g=c.id),e.$broadcast("$localeChangeError",d),p.reject(d)})},k)),p.promise}var d,e,f,g,h="angular/i18n/angular-locale_{{locale}}.js",i="tmhDynamicLocaleStorageCache",j=a,k="get",l="put",m={},n={};this.localeLocationPattern=function(a){return a?(h=a,this):h},this.appendScriptTo=function(a){e=a},this.useStorage=function(a){i=a,k="get",l="put"},this.useCookieStorage=function(){angular.version.minor<7?this.useStorage("$cookieStore"):(this.useStorage("$cookies"),k="getObject",l="putObject")},this.defaultLocale=function(a){d=a},this.storageKey=function(a){return a?(j=a,this):j},this.addLocalePatternValue=function(a,b){n[a]=b},this.$get=["$rootScope","$injector","$interpolate","$locale","$q","tmhDynamicLocaleCache","$timeout",function(a,b,e,l,m,o,p){function q(b){var d={locale:b,angularVersion:angular.version.full};return c(r(angular.extend({},n,d)),l,b,a,m,o,p)}var r=e(h);return f=b.get(i),a.$evalAsync(function(){var a;(a=f[k](j)||d)&&q(a)}),{set:q,get:function(){return g}}}]}]).provider("tmhDynamicLocaleCache",function(){this.$get=["$cacheFactory",function(a){return a("tmh.dynamicLocales")}]}).provider("tmhDynamicLocaleStorageCache",function(){this.$get=["$cacheFactory",function(a){return a("tmh.dynamicLocales.store")}]}).run(["tmhDynamicLocale",angular.noop]),"tmh.dynamicLocale"}),function(window,angular,undefined){var appControllers=angular.module("kbApp.controllers",[]);appControllers.controller("kbAppCtrl",["kbAppService","$rootScope","$scope","$q","$timeout","kbAppProperties","kbAppPageService","authService","$location","dxsService","utilService",function(a,b,c,d,e,f,g,h,i,j,k){c.appPageInfo=g.pageInfo||{},c.appIsLogedIn=!1,c.appUserTranslationId=h.getSession().user.translationId,c.appIsInitialized=a.isInitialized,c.appIsMatchingProperties=f.match,c.appIsUserAuthorized=h.authorized,c.appIsLoggedInStateMatch=h.isLoggedInStateMatch,c.appDate=new Date("2010-01-01 00:00:00");var l=j.getInstance(),m={dxsId:268436225,value:1262304e3};l.addDataRd(m),l.getDataRd(1e4).then(null,null,function(a){!0===a&&(c.appDate=k.unixTimeStampToDate(m.value))}),c.$watch(function(){return h.isLoggedIn()},function(a,b){a!==b&&(c.appIsLogedIn=a)}),c.$watch(function(){return h.getSession().user.translationId},function(a,b){a!==b&&(c.appUserTranslationId=a)}),b.$on("$routeChangeStart",function(a,b,c){!1===h.authorized(b.user)&&i.path("/home")}),b.$on("appPropertiesRefreshed",function(){c.inverterTypeName=f.getInverterTypeName(),c.inverterName=f.getInverterName()}),b.$on("$routeChangeError",function(a,b,c){var d="/";angular.isDefined(c)&&(d=c.originalPath),i.path(d)})}]);var appServices=angular.module("kbApp.services",["kbApp.dxs.services","kbApp.mixins"]);appServices.factory("kbAppService",["initService","$timeout","$rootScope","$q",function(a,b,c,d){var e=!1,f=function(){var a=d.defer();return!0===e?b(function(){a.resolve()},2):c.$on("appInitialized",function(){e=!0,a.resolve()}),a.promise};return{isInitialized:e,isInitializedPromise:f}}]),appServices.constant("kbAppPropertiesMap",{STRG_ASYNC_INTERFACE:1,PIKO_FUTURE:2,STRING_2:4,STRING_3:8,STRING_4:16,"3_PHASE":32,FAN:64,ARCDETECTION:128,MODEM_SLOT_PRESENT:256,MODEM_PRESENT:512,MODEM_GSM:1024,CAN:2048,RS485_2:4096,BATTERY:8192,EXT_CURRENT_SENS:16384,EXT_CURRENT_SENS_POS1:32768,EXT_CURRENT_SENS_POS2:65536,AUTO_IP:131072,ESB:262144,WINTERMODE_SUPPORTED:524288,MODBUS:1048576,PV_MODULE_REGULATION:2097152,SHADING_TRACKER_STRING_1:4194304,SHADING_TRACKER_STRING_2:8388608,SHADING_TRACKER_STRING_3:16777216,WEATHER_FORECAST:33554432,OVERVOLTAGE_PROT_AC:67108864,OVERVOLTAGE_PROT_DC:134217728,PARALLEL_CONNECTION:268435456,FORCE_STRINGLOG_5_6:536870912}),appServices.factory("kbAppProperties",["kbAppPropertiesMap","dxsService","$q","$timeout","$rootScope","KbError","KbErrorTypes",function(kbAppPropertiesMap,dxsService,$q,$timeout,$rootScope,KbError,KbErrorTypes){var properties=0,inverterName="",inverterTypeName="",init=function(){var a=$q.defer(),b=dxsService.getInstance(),c={dxsId:16780288},d={dxsId:16777984},e={dxsId:16780544};return b.addDataRd(c),b.addDataRd(d),b.addDataRd(e),b.getDataRd(1e4).then(null,null,function(b){!0===b?(properties=c.value,inverterName=d.value,inverterTypeName=e.value,$rootScope.$broadcast("appPropertiesRefreshed"),a.resolve("Properties received successful")):a.reject(new KbError("System Properties could not be loaded",KbErrorTypes.ERR_INTERNAL))}),a.promise},match=function(prop){var result=0,propResult=prop.replace(/\s+/g,""),propArray=propResult.split(/[&|() !]+/);propArray=propArray.filter(Boolean);for(var i=0;i<propArray.length;i++){var tmpResult=0;if(kbAppPropertiesMap.hasOwnProperty(propArray[i])){var tmpProp=kbAppPropertiesMap[propArray[i]];(tmpProp&properties)==tmpProp&&(tmpResult=1)}propResult=propResult.replace(propArray[i],tmpResult)}return 1==(result=eval(propResult))||!0===result},getInverterName=function(){return inverterName},getInverterTypeName=function(){return inverterTypeName};return{init:init,match:match,getInverterName:getInverterName,getInverterTypeName:getInverterTypeName}}]),appServices.factory("kbAppPageService",["$rootScope","$q","$timeout","KbErrorTypes",function(a,b,c,d){var e={loadingInProgress:!1,loadingFailed:!1,submitInProgress:!1,submitSuccessful:!1,submitFailed:!1,displayMsgId:""},f=null,g=function(a,g){null!=f&&c.cancel(f),e.submitInProgress=!0;var h=b.when(a);h.then(function(a){e.submitInProgress=!1,e.submitSuccessful=!0,e.submitFailed=!1,e.displayMsgId="",angular.isDefined(a)&&angular.isDefined(a.type)&&angular.isDefined(a.msg)&&angular.isDefined(a.data)&&a.type,angular.isDefined(g)&&angular.isFunction(g)&&g("success")},function(a){if(e.submitInProgress=!1,e.submitSuccessful=!1,e.submitFailed=!0,e.displayMsgId="",angular.isDefined(a)&&angular.isDefined(a.type)&&angular.isDefined(a.msg)&&angular.isDefined(a.data))switch(a.type){case d.ERR_AUTHENTICATION:e.displayMsgId="ID_367";break;case d.ERR_PARAMETER:e.displayMsgId="ID_368";break;case d.ERR_BUSY:e.displayMsgId="ID_XXX";break;case d.ERR_NOT_DEFINED:case d.ERR_INTERNAL:e.displayMsgId="ID_369";break;case d.ERR_COMMUNICATION:e.displayMsgId="ID_371";break;case d.ERR_LOGIN_PARAMETER:e.displayMsgId="ID_370"}angular.isDefined(g)&&angular.isFunction(g)&&g("error")}),h.finally(function(){f=c(function(){e.submitInProgress=!1,e.submitSuccessful=!1,e.submitFailed=!1,e.displayMsgId="",f=null},5e3)})};return a.$on("$routeChangeStart",function(){e.loadingInProgress=!0,e.loadingFailed=!1,e.submitInProgress=!1,e.submitSuccessful=!1,e.submitFailed=!1,e.displayMsgId=""}),a.$on("kbPageLoaded",function(){e.loadingInProgress=!1,e.loadingFailed=!1,e.displayMsgId=""}),a.$on("kbPageLoadFailed",function(){e.loadingInProgress=!1,e.loadingFailed=!0,e.displayMsgId=""}),{pageInfo:e,submitHelper:g}}]);var kbApp=angular.module("kbApp",["kbApp.services","kbApp.controllers","ngRoute","ngMessages","ngQuickDate","templates-app","templates-common","kbApp.pages","kbApp.init","kbApp.mixins","kbApp.auth","kbApp.language","kbApp.navigation","kbApp.dxs","progressbar-directive","kb-elements"]);kbApp.config(["$routeProvider",function(a){a.when("/home",{templateUrl:"pages/home/home.tpl.html",controller:"homeCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]}}).when("/current-values/pv-generator",{templateUrl:"pages/current-values/pv-generator/current-values-pv-generator.tpl.html",controller:"current-values-pv-generatorCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/current-values/battery",{templateUrl:"pages/current-values/battery/current-values-battery.tpl.html",controller:"current-values-batteryCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/current-values/home",{templateUrl:"pages/current-values/home/current-values-home.tpl.html",controller:"current-values-homeCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/current-values/grid",{templateUrl:"pages/current-values/grid/current-values-grid.tpl.html",controller:"current-values-gridCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/current-values/analog-inputs",{templateUrl:"pages/current-values/analog-inputs/current-values-analog-inputs.tpl.html",controller:"current-values-analog-inputsCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/current-values/s0-in",{templateUrl:"pages/current-values/s0-in/current-values-s0-in.tpl.html",controller:"current-values-s0-inCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/statistics/day",{templateUrl:"pages/statistics/day/statistics-day.tpl.html",controller:"statistics-dayCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/statistics/total",{templateUrl:"pages/statistics/total/statistics-total.tpl.html",controller:"statistics-totalCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/statistics/log-data",{templateUrl:"pages/statistics/log-data/statistics-log-data.tpl.html",controller:"statistics-log-dataCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/general/inverter-name",{templateUrl:"pages/settings/general/inverter-name/settings-general-inverter-name.tpl.html",controller:"settings-general-inverter-nameCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/general/date-time",{templateUrl:"pages/settings/general/date-time/settings-general-date-time.tpl.html",controller:"settings-general-date-timeCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/general/login",{templateUrl:"pages/settings/general/login/settings-general-login.tpl.html",controller:"settings-general-loginCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/communication/inverter-address",{templateUrl:"pages/settings/communication/inverter-address/settings-communication-inverter-address.tpl.html",controller:"settings-communication-inverter-addressCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/communication/network",{templateUrl:"pages/settings/communication/network/settings-communication-network.tpl.html",controller:"settings-communication-networkCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/communication/rs485",{templateUrl:"pages/settings/communication/rs485/settings-communication-rs485.tpl.html",controller:"settings-communication-rs485Ctrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/communication/modem",{templateUrl:"pages/settings/communication/modem/settings-communication-modem.tpl.html",controller:"settings-communication-modemCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/portal-configuration",{templateUrl:"pages/settings/portal-configuration/settings-portal-configuration.tpl.html",controller:"settings-portal-configurationCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/data-logger",{templateUrl:"pages/settings/data-logger/settings-data-logger.tpl.html",controller:"settings-data-loggerCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/overvoltage-protection",{templateUrl:"pages/settings/overvoltage-protection/settings-overvoltage-protection.tpl.html",controller:"settings-overvoltage-protectionCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/generator-configuration",{templateUrl:"pages/settings/generator-configuration/settings-generator-configuration.tpl.html",controller:"settings-generator-configurationCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/battery-configuration",{templateUrl:"pages/settings/battery-configuration/settings-battery-configuration.tpl.html",controller:"settings-battery-configurationCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/switching-output",{templateUrl:"pages/settings/switching-output/settings-switching-output.tpl.html",controller:"settings-switching-outputCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/settings/analog-inputs",{templateUrl:"pages/settings/analog-inputs/settings-analog-inputs.tpl.html",controller:"settings-analog-inputsCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/info/events",{templateUrl:"pages/info/events/info-events.tpl.html",controller:"info-eventsCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]},user:"PLANT_OWNER, INSTALLER, DEVELOPER, SERVICE"}).when("/info/versions",{templateUrl:"pages/info/versions/info-versions.tpl.html",controller:"info-versionsCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]}}).when("/login",{templateUrl:"pages/login/login.tpl.html",controller:"loginCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]}}).when("/logout",{templateUrl:"pages/logout/logout.tpl.html",controller:"logoutCtrl",resolve:{initialized:["kbAppService",function(a){return a.isInitializedPromise()}]}}).otherwise({redirectTo:"/home"})}]);var authServices=angular.module("kbApp.auth.services",["kbApp.mixins"]);authServices.factory("authService",["$http","$q","$timeout","$location","KbError","KbErrorTypes",function(a,b,c,d,e,f){"use strict";var g=null,h={DEFAULT:{roleId:0,translationId:"ID_374"},INSTALLER:{roleId:1,translationId:"ID_363"},PLANT_OWNER:{roleId:2,translationId:"ID_362"},SERVICE:{roleId:3,translationId:"ID_390"},DEVELOPER:{roleId:7,translationId:"ID_389"}},i=function(){g={id:0,key:"",chiperIV:"",user:{userId:"default",roleId:h.DEFAULT.roleId,translationId:h.DEFAULT.translationId},isLoggedIn:!1,logoutInProgress:!1}};i();var j=function(a,b){if(void 0!==a){void 0!==b&&(g.user.userId=b);for(var c in h)if(h.hasOwnProperty(c)){var d=h[c];if(a==d.roleId)return g.user.roleId=a,void(g.user.translationId=d.translationId)}}i()},k=function(){var a={};return a.id=g.id,a.user=g.user,a},l=function(a,b){angular.isDefined(a)&&0!==a?(g.id=a,j(b)):0!==g.id&&(i(),d.path("/login"))},m=function(a,b){for(var c=[],d=0;d<a.length;d++)for(var e=0;e<b.length;e++)if(a.charAt(d)===b.charAt(e)){c.push(e);break}return c},n=function(a,b){var c,d,e=-1;return b<=5*a.length-1&&(c=parseInt(b/5,10),d=b%5,e=a[c]>>d&1),e},o=function(d,h){var i=b.defer(),j={};return!1===angular.isDefined(d)?c(function(){i.reject(new e("userId is empty or not defined!!!",f.ERR_LOGIN_PARAMETER))},5):!1===angular.isDefined(h)?c(function(){i.reject(new e("password is empty or not defined!!!",f.ERR_LOGIN_PARAMETER))},5):a({method:"GET",url:"/api/login.json"}).success(function(b){if(!0!==angular.isDefined(b))i.reject(new e("No data has been returned",f.ERR_INTERNAL));else if(!0!==angular.isDefined(b.session))i.reject(new e("No Session has been returned",f.ERR_INTERNAL));else if(!0!==angular.isDefined(b.session.sessionId)||0===b.session.sessionId)i.reject(new e("Session Id is invalid",f.ERR_INTERNAL));else if(!0!==angular.isDefined(b.salt)||28!=b.salt.length)i.reject(new e("Salt is invalid",f.ERR_INTERNAL));else{g.user.userId=d,g.key=CryptoJS.SHA1(b.salt+h).toString(CryptoJS.enc.Base64).substr(0,16),g.chiperIV=CryptoJS.SHA1(b.salt+g.key).toString(CryptoJS.enc.Base64).substr(0,16);var c=h+b.salt;j.mode=1,j.userId=g.user.userId,j.pwh=CryptoJS.SHA1(c),j.pwh=j.pwh.toString(CryptoJS.enc.Base64),a({method:"POST",url:"/api/login.json",data:j}).success(function(a){if(!1===angular.isDefined(a)||!1===angular.isDefined(a.session))i.reject(new e("Authentication failed! No session has been returned",f.ERR_LOGIN_PARAMETER));else if(!0!==angular.isDefined(a.status)||!0!==angular.isDefined(a.status.code))i.reject(new e("No status is returned",f.ERR_INTERNAL));else switch(a.status.code){case f.ERR_OK:g.isLoggedIn=!0,i.resolve("Authentication successful");break;case f.ERR_LOGIN_PARAMETER:i.reject(new e("Wrong Username or Password",f.ERR_LOGIN_PARAMETER));break;default:i.reject(new e("Unknown error",f.ERR_INTERNAL))}}).error(function(){i.reject(new e("Authentication failed! No answer",f.ERR_COMMUNICATION))})}}).error(function(){i.reject(new e("Cant get a session! No answer",f.ERR_COMMUNICATION))}),i.promise},p=function(c){var d,h,i=b.defer(),j={},k=[];if(!0!==angular.isDefined(c)||8!=c.length)i.reject(new e("Service Code is invalid!!!",f.ERR_LOGIN_PARAMETER));else{for(k=m(c,"ABCDEFGHJKMNPQRSTVWXYZ0123456789"),d=n(k,8)<<0,d|=n(k,38)<<1,d|=n(k,24)<<2,d|=n(k,2)<<3,d|=n(k,15)<<4,d|=n(k,10)<<5,d|=n(k,11)<<6,d|=n(k,4)<<7,d|=n(k,34)<<8,d|=n(k,30)<<9,d|=n(k,20)<<10,d|=n(k,12)<<11,d|=n(k,0)<<12,d|=n(k,33)<<13,d|=n(k,32)<<14,d|=n(k,18)<<15,d|=n(k,9)<<16,d|=n(k,3)<<17,d|=n(k,39)<<18,d|=n(k,25)<<19,d|=n(k,37)<<20,d|=n(k,13)<<21,d|=n(k,28)<<22,d|=n(k,23)<<23,d=""+d;d.length<6;)d="0"+d;h=n(k,31)<<0,h+=n(k,6)<<1,h+=n(k,22)<<2,a({method:"GET",url:"/api/login.json"}).success(function(b){if(!0!==angular.isDefined(b))i.reject(new e("No data has been returned",f.ERR_INTERNAL));else if(!0!==angular.isDefined(b.session))i.reject(new e("No Session has been returned",f.ERR_INTERNAL));else if(!0!==angular.isDefined(b.session.sessionId)||0===b.session.sessionId)i.reject(new e("Session Id is invalid",f.ERR_INTERNAL));else if(!0!==angular.isDefined(b.salt)||28!=b.salt.length)i.reject(new e("Salt is invalid",f.ERR_INTERNAL));else{g.user.userId=d+"_"+h,g.key=CryptoJS.SHA1(b.salt+c).toString(CryptoJS.enc.Base64).substr(0,16),g.chiperIV=CryptoJS.SHA1(b.salt+g.key).toString(CryptoJS.enc.Base64).substr(0,16);var k=c+b.salt;j.mode=2,j.userId=g.user.userId,j.pwh=CryptoJS.SHA1(k),j.pwh=j.pwh.toString(CryptoJS.enc.Base64),a({method:"POST",url:"/api/login.json",data:j}).success(function(a){if(!1===angular.isDefined(a)||!1===angular.isDefined(a.session))i.reject(new e("Authentication failed! No session has been returned",f.ERR_LOGIN_PARAMETER));else if(!0!==angular.isDefined(a.status)||!0!==angular.isDefined(a.status.code))i.reject(new e("No status is returned",f.ERR_INTERNAL));else switch(a.status.code){case f.ERR_OK:g.isLoggedIn=!0,i.resolve("Authentication successful");break;case f.ERR_LOGIN_PARAMETER:i.reject(new e("Wrong Username or Password",f.ERR_LOGIN_PARAMETER));break;default:i.reject(new e("Unknown error",f.ERR_INTERNAL))}}).error(function(){i.reject(new e("Authentication failed! No answer",f.ERR_COMMUNICATION))})}}).error(function(){i.reject(new e("Cant get a session! No answer",f.ERR_COMMUNICATION))})}return i.promise},q=function(){return g.isLoggedIn};return{getSession:k,setSession:l,loginUserPw:o,loginServiceCode:p,isLoggedIn:q,isLoggedInStateMatch:function(a){var b=!0;return!1!==a&&!0!==a||a!=g.isLoggedIn&&(b=!1),b},logout:function(){var h=b.defer();return!1===g.logoutInProgress&&q()?(g.logoutInProgress=!0,a({method:"POST",url:"/api/logout.json"}).success(function(a){if(angular.isDefined(a)&&angular.isDefined(a.status)&&angular.isDefined(a.status.code))switch(a.status.code){case f.ERR_OK:i(),d.path("/login"),h.resolve("Successful logout");break;default:h.reject(new e("Unknown error",f.ERR_INTERNAL))}else h.reject(new e("Unknown error",f.ERR_INTERNAL));g.logoutInProgress=!1}).error(function(){h.reject(new e("Failed to logout, No answer",f.ERR_COMMUNICATION)),g.logoutInProgress=!1})):c(function(){h.resolve("Successful logout")},5),h.promise},authorized:function(a){var b=!1;if(angular.isDefined(a)&&""!==a&&0!==a&&null!==a){if(angular.isNumber(a)&&(d=a,0==(g.user.roleId&d)&&0!==d||(b=!0)),angular.isString(a))for(var c=a.split(/[, ;]+/),d=-1,e=0;e<c.length;e++)if(h.hasOwnProperty(c[e])&&(-1==d&&(d=0),d=h[c[e]].roleId,g.user.roleId==d)){b=!0;break}}else b=!0;return b},encrypt:function(a){var b=null;if(0!==g.id){var c=CryptoJS.enc.Utf8.parse(g.key),d=CryptoJS.enc.Utf8.parse(g.chiperIV);b=CryptoJS.AES.encrypt(a.toString(),c,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding,iv:d}),b=b.toString(CryptoJS.format.Hex)}return b}}}]),authServices.factory("authHttpInterceptor",["$q","$injector",function(a,b){return{request:function(c){if(!c.url.match(/.*\.tpl\..*/)){var d=b.get("authService");!1===angular.isDefined(c.params)&&(c.params={}),0!==d.getSession().id?c.params.sessionId=d.getSession().id:delete c.params.sessionId}return c||a.when(c)},requestError:function(b){return a.reject(b)},response:function(c){var d=b.get("authService");return angular.isDefined(c)&&angular.isDefined(c.data)&&angular.isDefined(c.data.session)&&d.setSession(c.data.session.sessionId,c.data.session.roleId),c||a.when(c)},responseError:function(b){return a.reject(b)}}}]),authServices.config(["$httpProvider",function(a){a.interceptors.push("authHttpInterceptor")}]),angular.module("kbApp.auth",["kbApp.auth.services"]);var dxsServices=angular.module("kbApp.dxs.services",["kbApp.mixins"]);dxsServices.factory("dxsService",["$http","$q","$timeout","authService","KbError","KbErrorTypes",function(a,b,c,d,e,f){var g=[],h=2e4,i=function(){function a(a,b){return Math.floor(Math.random()*(b-a))+a}var b={dataRd:[],dataWr:[],timer:"undefined",addDataRd:k,delDataRd:l,addDataWr:m,delDataWr:n,getDataRd:o,getDataWr:p,setDataWr:q,clear:r};return b.id=a(0,4294967295),b.canceled=!1,g.push(b),g[g.length-1]},j=function(a,b){var c,d=!0;if("[object Array]"!=Object.prototype.toString.call(a))d=!1;else if("[object Array]"!=Object.prototype.toString.call(b.dxsEntries))d=!1;else for(var e=0;e<a.length;e++)if(void 0===a[e].readProhibited||!1===a[e].readProhibited){c=!1,a[e].value="-"
;for(var f=0;f<b.dxsEntries.length;f++)if(void 0!==b.dxsEntries[f].dxsId&&void 0!==b.dxsEntries[f].value&&b.dxsEntries[f].dxsId==a[e].dxsId){a[e].value=b.dxsEntries[f].value,c=!0;break}!1===c&&(d=!1)}return d},k=function(a){var b=!1;return"object"==typeof a&&void 0!==a.dxsId&&("string"==typeof a.dxsId&&("0x"==a.dxsId.substr(0,2)?a.dxsId=parseInt(a.dxsId,16):a.dxsId=parseInt(a.dxsId,10)),this.dataRd.push(a),b=!0),b},l=function(a){var b=!1;if(null==a)this.dataRd=[],b=!0;else if("object"==typeof a&&void 0!==a.dxsId){"string"==typeof a.dxsId&&("0x"==a.dxsId.substr(0,2)?a.dxsId=parseInt(a.dxsId,16):a.dxsId=parseInt(a.dxsId,10));for(var c=0;c<this.dataRd.length;c++)if(this.dataRd[c].dxsId==a.dxsId){this.dataRd.splice(c,1),b=!0;break}}return b},m=function(a){var b,c=!1,d=!1;if("object"==typeof a&&void 0!==a.dxsId){for("string"==typeof a.dxsId&&("0x"==a.dxsId.substr(0,2)?a.dxsId=parseInt(a.dxsId,16):a.dxsId=parseInt(a.dxsId,10)),b=0;b<this.dataWr.length;b++)if(this.dataWr[b].dxsId==a.dxsId){d=!0;break}!1===d&&this.dataWr.push(a),c=!0}return c},n=function(a){var b=!1;if(null==a)this.dataWr=[],b=!0;else if("object"==typeof a&&void 0!==a.dxsId){"string"==typeof a.dxsId&&("0x"==a.dxsId.substr(0,2)?a.dxsId=parseInt(a.dxsId,16):a.dxsId=parseInt(a.dxsId,10));for(var c=0;c<this.dataWr.length;c++)if(this.dataWr[c].dxsId==a.dxsId){this.dataWr.splice(c,1),b=!0;break}}return b},o=function(d){var e,f=this,g={},i=d||1e3;if(0===d&&(i=0),g.dxsEntries=[],e=b.defer(),f.dataRd.length<=0)return c(function(){e.notify(!0)},2),e.promise;for(var k=0;k<f.dataRd.length;k++)g.dxsEntries.push(f.dataRd[k].dxsId);var l=function(){a({url:"/api/dxs.json",method:"GET",timeout:h,params:g}).then(function(a){j(f.dataRd,a.data)?e.notify(!0):e.notify(!1),!0!==f.canceled&&0!==i&&(f.timer=c(l,i))},function(){e.notify(!1);for(var a=0;a<f.dataRd.length;a++)f.dataRd[a].value="-";!0!==f.canceled&&0!==i&&(f.timer=c(l,i))})};return l(),e.promise},p=function(){var d,g={},i=this,k=0;if(g.dxsEntries=[],d=b.defer(),i.dataWr.length<=0)return c(function(){d.resolve()},2),d.promise;for(var l=0;l<i.dataWr.length;l++)void 0!==i.dataWr[l].readProhibited&&!1!==i.dataWr[l].readProhibited||g.dxsEntries.push(i.dataWr[l].dxsId);var m=function(){a({url:"/api/dxs.json",method:"GET",timeout:h,params:g}).then(function(a){j(i.dataWr,a.data)?(d.resolve(),k=0):(k++,k<3?m():d.reject(new e("Answer dont match requested data",f.ERR_INTERNAL)))},function(){k++,k<3?m():d.reject(new e("No Answer",f.ERR_COMMUNICATION))})};return m(),d.promise},q=function(){var g,i={},j=this,k=!1;if(i.dxsEntries=[],g=b.defer(),j.dataWr.length<=0)return c(function(){g.resolve()},2),g.promise;for(var l=0;l<j.dataWr.length;l++)if(angular.isDefined(j.dataWr[l].enc)){var m=d.encrypt(j.dataWr[l].value),n=d.encrypt("LK_3421!");null!==m&&null!==n||(k=!0),i.dxsEntries.push({dxsId:j.dataWr[l].dxsId,enc:n,value:m})}else i.dxsEntries.push({dxsId:j.dataWr[l].dxsId,value:j.dataWr[l].value});return!0===k?c(function(){g.reject(new e("Internal Error",f.ERR_INTERNAL))},2):a({url:"/api/dxs.json",method:"POST",timeout:h,data:i}).then(function(a){if(void 0!==a.data.status)if(0===a.data.status.code)g.resolve();else{var b=a.data.status.dxsId||-1;switch(a.data.status.code){case 1:g.reject(new e("Authentication required for dxsID: "+b,f.ERR_AUTHENTICATION));break;case 2:g.reject(new e("Got invalid Parameter",f.ERR_INTERNAL));break;case 4:default:g.reject(new e("Internal Error",f.ERR_INTERNAL))}}else g.reject(new e("Wrong data returned",f.ERR_INTERNAL))},function(){g.reject(new e("No answer",f.ERR_COMMUNICATION))}),g.promise},r=function(){for(var a=0;a<g.length;a++){var b=g[a];if("undefined"===b)g.splice(a,1);else if(b.id==this.id)return b.canceled=!0,c.cancel(b.timer),void g.splice(a,1)}};return{getInstance:i}}]),angular.module("kbApp.dxs",["kbApp.dxs.services"]);var initDirectives=angular.module("kbApp.init.directives",[]);initDirectives.directive("kbHideAfterInit",["$timeout",function(a){return{restrict:"A",link:function(b,c,d){b.$on("appInitialized",function(){a(function(){c.fadeOut(1e3)},2e3)}),b.$on("appNotInitialized",function(a,b){c.find("i").removeClass("icon-spinner animate-spin").addClass("icon-error"),c.find("#errorMsg").text(b.msg)})}}}]);var initServices=angular.module("kbApp.init.services",["kbApp.services","kbApp.auth.services","kbApp.language.services","kbApp.navigation.services"]);initServices.factory("initService",["$q","$rootScope","$browser",function(a,b,c){var d=["initSystemProperties","initLanguage","initNavigation"],e={},f=!1,g=function(){var d=[],g=function(){c.defer(function(){f=!0,b.$apply(function(){b.$broadcast("appInitialized")})})};angular.forEach(e,function(a){d.push(a())}),a.all(d).then(g,function(a){b.$broadcast("appNotInitialized",a)})},h=function(){var a=_.keys(e),b=_.partial(_.contains,a);_.every(d,b)&&g()},i=function(b,c,d){e[b]=function(){var b=null;return b=!0===angular.isFunction(c)?a.all(c()):a.all(c),b.then(d)},h()};return i.watchAfterInit=function(a,b,c,d){a.$watch(b,function(a,b,d){f&&c(a,b,d)},d)},i.onAfterInit=function(a,b,c){a.$on(b,function(a){f&&c(a)})},i.isInitialized=function(){return f},i}]),initServices.run(["kbAppProperties","initService","languageService","navigationService",function(a,b,c,d){b("initLanguage",null,c.init),b("initNavigation",null,d.init),b("initSystemProperties",null,a.init)}]),angular.module("kbApp.init",["kbApp.init.services","kbApp.init.directives"]);var languageControllers=angular.module("kbApp.language.controllers",["kbApp.language.services","kbApp.init.services"]);languageControllers.controller("languageSelCtrl",["$scope","initService","languageService",function(a,b,c){a.languages=[],a.selectLanguage=c.selectLanguage,a.activeLanguage=c.activeLanguage,b.onAfterInit(a,"appInitialized",function(){a.languages=c.languages})}]);var languageDirectives=angular.module("kbApp.language.directives",[]);languageDirectives.directive("kbLanguageSelectItem",[function(){return{restrict:"A",templateUrl:"language/languageSelectItem.tpl.html",link:function(a,b,c){a.$watch("activeLanguage()",function(c){a.language==c?b.find("a").addClass("active"):b.find("a").removeClass("active")})}}}]);var languageServices=angular.module("kbApp.language.services",["pascalprecht.translate","ngCookies","kbApp.mixins","tmh.dynamicLocale"]).config(["$translateProvider","tmhDynamicLocaleProvider",function(a,b){a.useLoader("translationProvider",{}),b.localeLocationPattern("assets/language/i18n/angular-locale_{{locale}}.js")}]);languageServices.factory("translationProvider",["$q","$timeout","languageService",function(a,b,c){return function(d){var e=a.defer();return b(function(){c.languages.indexOf(d.key)>-1?e.resolve(c.translations[d.key]):e.reject(d.key)},10),e.promise}}]),languageServices.factory("languageService",["$http","$q","$translate","tmhDynamicLocale","$cookies","KbError","KbErrorTypes",function(a,b,c,d,e,f,g){var h=[],i=[],j=function(){var c=b.defer();return a.get("/assets/language/translation.json").then(function(a){var b=a.data;if("[object Array]"!=Object.prototype.toString.call(b))return void c.reject(new f("Structure of translation mismatch expecting structure"));if(0===b.length)return void c.reject(new f("No content in data"));for(var d=0;d<b.length;d++)void 0!==b[d].language&&void 0!==b[d].translations&&(h.push(b[d].language),i[b[d].language]=b[d].translations);c.resolve()},function(){c.reject(new f("No answer",g.ERR_COMMUNICATION))}),c.promise},k=function(a){function b(a){var b,c,d,e="en_GB";if(angular.isString(a)){for(b=0;b<h.length;b++)if(d=h[b],c=new RegExp(".*"+a.replace("-","_")+".*","i"),null!==d.match(c))return d}else if(angular.isArray(a))for(var f=0;f<a.length;f++){var g=a[f];for(b=0;b<h.length;b++)if(d=h[b],c=new RegExp(".*"+g.replace("-","_")+".*","i"),null!==d.match(c))return d}return e}var f=b(a);return c.use(f).then(function(){var a=new Date,b=new Date(a.getFullYear()+1,a.getMonth(),a.getDate());e.put("language",f,{expires:b}),d.set(f.toLowerCase().replace("_","-"))})};return{init:function(){var a,c,d=b.defer();return d.notify("Load translations"),j().then(function(){a=e.get("language"),c=a||window.navigator.languages||window.navigator.userLanguage||window.navigator.language,k(c).then(function(){d.resolve("Load translations successful")},function(){d.reject(new f("Load translations failed"))})},function(){d.reject(new f("Load translations failed"))}),d.promise},languages:h,translations:i,selectLanguage:k,activeLanguage:function(){return c.use()}}}]),angular.module("kbApp.language",["kbApp.language.services","kbApp.language.directives","kbApp.language.controllers"]);var mixinsBV=angular.module("kbApp.mixins.bv",[]);mixinsBV.factory("bvService",[function(){var a=10,b=290,c=(Math.PI,2*Math.PI),d=40,e=40,f=.001875,g=3,h=.4,i=1.05,j=10,k=2,l=450,m=250,n=.4,o=1.5,p=.8,q=1,r=.005,s=4e-4,t=5e-4,u=.17,v=10,w=["ball.png","kostal.jpg"],x={"Kostal Hagen":"kostal.jpg"},y={Set:"The set has been won by {0}!",Start:"Good luck and have fun!",Over:"Over, over, the game is over...\nThe winner is {0}!",Replay:"Replay"};!function(){var a=!1,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(c){function d(){!a&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)f[g]="function"==typeof c[g]&&"function"==typeof e[g]&&b.test(c[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]):c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d}}();var z=document.getElementById("canvas").getContext("2d"),A=z.canvas.width,B=z.canvas.height,C={},D=Class.extend({init:function(){},random:function(a,b){var c=b-a;return Math.min(Math.floor(Math.random()*c),b-1)+a},format:function(a){for(var b=1;b<arguments.length;b++)a=a.replace(new RegExp("\\{"+(b-1)+"\\}","g"),arguments[b]);return a}}),E=Class.extend({init:function(a){this.toload=a,this.resources={}},loaded:function(){this.toload--},setResource:function(a,b){this.resources[a]=b},getResource:function(a){return this.resources[a]}}),F=E.extend({init:function(a,b){var c=this;c._super(b.length);for(var d=0;d<b.length;d++){var e=document.createElement("img");e.src=a+"/"+b[d],e.onload=function(){c.loaded()},c.setResource(b[d],e)}}}),G=D.extend({init:function(a,b,c){this.beach=a,this.ballx=b.x,this.bally=b.y,this.data=[],this.players=[],this.count=0,this.contacts=0;for(var d=0;d<c.length;d++)this.players.push({color:c[d].color,name:c[d].name,points:c[d].points,sets:c[d].sets})},addData:function(a){var b=[];this.contacts=0;for(var c=0;c<a.length;c++)b.push(a[c].input.copy()),this.contacts+=a[c].totalContacts;if(0===this.count){for(var d=!1,c=b.length;c--;)if(b[c]){d=!0;break}if(!d)return}this.data.push(b),this.count++},play:function(a,b){a.pause();var c=this.count,f=0,g=[],h=new O(a.field),i=new P(a.field),j=new M(g,a.field,h,i);j.setBackground(this.beach),i.x=this.ballx,i.y=this.bally;for(var k=this.data,l=0;l<this.players.length;l++){var m=new R(a,a.players[l].container);m.setIdentity(this.players[l].name,this.players[l].color),g.push(m)}var n=setInterval(function(){if(f===c)return clearInterval(n),b&&b.apply(a),void a.play();for(var d=k[f++],l=g.length;l--;)g[l].steer(d[l]);for(var m=e;m--;){i.logic(),h.logic();for(var l=g.length;l--;)g[l].logic(),i.collision(g[l]);i.collision(h)}j.paint(i,g)},d/2)},stop:function(){}}),H=Class.extend({init:function(a,b,c,d){this.setPosition(a||0,b||0),this.width=c||0,this.height=d||0},setPosition:function(a,b){this.x=a,this.y=b},paint:function(){}}),I=(Class.extend({init:function(){}}),H.extend({init:function(a,b){this._super(a,0,b,B),this.wh=b/2,this.hh=B/2}})),J=I.extend({init:function(){this._super(0,A)},paint:function(){z.strokeStyle="#cccccc",z.beginPath(),z.rect(0,0,A,B),z.closePath(),z.stroke()}}),K=I.extend({init:function(b,c){var d=A/c-a/2;this._super((d+a)*b,d)}}),L=H.extend({init:function(a){this._super(0,0,A,B),this.field=a.field,this.players=a.players,this.net=a.net,this.ball=a.ball,this.game=a,this.message=[],this.persistent=!1,this.timeLeft=0,this.radius=v},setup:function(){this.sets=2*this.game.maxSets-1,this.factor=2.5,this.offset=(this.game.maxSets-1)*this.radius*this.factor,this.shift=2*this.radius},setMessage:function(a,b){this.message=a.split("\n"),this.persistent=!b,b&&(this.timeLeft=b)},clearMessage:function(){this.message=[],this.persistent=!1,this.timeLeft=0},setBackground:function(a){this.background=C.images.getResource(x[a]),document.getElementById("beach").innerHTML=a},paint:function(){z.clearRect(0,0,A,B),z.drawImage(this.background,0,0),this.field.paint(),this.net.paint(),this.ball.paint();for(var a=this.players.length;a--;)this.players[a].paint();this.ball.getBottom()>B&&this.paintCursor(this.ball.x),this.paintScore();for(var a=this.players.length;a--;)this.players[a].paintPulse();this.paintMessage()},paintMessage:function(){if(!this.persistent){if(!this.timeLeft)return;this.timeLeft--}z.save(),z.translate(A/2,B/2),z.textAlign="center",z.fillStyle="#8A2BE2",z.font="32pt Merge";for(var a=0;a<this.message.length;a++)z.fillText(this.message[a],0,50*a);z.restore()},paintScore:function(){z.save(),z.translate(this.field.wh-this.offset,30);for(var a=0;a<this.sets;a++)this.game.sets.length>a?z.fillStyle=this.game.sets[a].color:z.fillStyle="#cccccc",z.strokeStyle="#666666",z.beginPath(),z.arc(this.factor*a*this.radius,0,this.radius,0,c,!1),z.fill(),z.stroke(),z.closePath();z.fillStyle="#dddddd",z.font="32pt Merge",z.textAlign="right",z.fillText(this.players[0].points,-this.shift,15),z.textAlign="left",z.fillText(this.players[1].points,2*this.offset+this.shift,15),z.restore()},paintCursor:function(a){z.save(),z.translate(a,10),z.fillStyle="#000000",z.beginPath(),z.moveTo(0,-5),z.lineTo(5,5),z.lineTo(-5,5),z.closePath(),z.fill(),z.restore()}}),M=L.extend({init:function(a,b,c,d){var e={players:a,field:b,net:c,ball:d};this._super(e),this.setMessage(y.Replay)},setup:function(){},paintScore:function(){}}),N=H.extend({init:function(a,b,c){this.container=a,this._super(0,0,b,c),this.friction=p,this.wh=this.width/2,this.hh=this.height/2,this.setPositionFromContainerOrigin(),this.setVelocity(0,0)},setPositionFromContainerOrigin:function(){var a=this.container.x+this.container.wh,b=this.hh;this.setPosition(a,b)},getTotalVelocity:function(){return Math.sqrt(this.vx*this.vx+this.vy*this.vy)},setVelocity:function(a,b){this.vx=a,this.vy=b},setPosition:function(a,b){this.x=a,this.y=b},getBottom:function(){return this.y-this.hh},getTop:function(){return this.y+this.hh},getLeft:function(){return this.x-this.wh},getRight:function(){return this.x+this.wh},checkField:function(){this.y<this.hh&&(this.y=this.hh,this.vy=0),this.getLeft()<this.container.x?(this.vx=0,this.x=this.container.x+this.wh):this.getRight()>this.container.x+this.container.width&&(this.vx=0,this.x=this.container.x+this.container.width-this.wh)},collision:function(){},logic:function(){this.vy-=f,this.x+=this.vx,this.y+=this.vy,this.checkField()},paint:function(){},hit:function(a,b,c){var d=a*a+b*b,e=Math.atan2(b,a),f=c.getTotalVelocity(),g=Math.cos(e)*this.friction*f,h=Math.sin(e)*this.friction*f;g+=q*c.omega*b/d,h-=q*c.omega*a/d,c.setVelocity(g,h)}}),O=N.extend({init:function(c){this._super(c,a,b),this.radius=a/2,this.y=b,this.originX=this.x,this.friction=1},reset:function(){this.x=this.originX,this.vx=0},collision:function(a){var b=a.x-this.x,c=a.y-this.y,d=a.radius+this.radius;if(c<=0){var e=0;return a.vx>0&&b+d>=0&&b<=this.radius?e=-1:a.vx<0&&b-d<=0&&b+this.radius>=0&&(e=1),void(0!=e&&(this.vx=5*a.vx,a.vx=-a.vx,a.vy+=e*a.omega))}Math.sqrt(b*b+c*c)<=d&&this.hit(b,c,a)},hit:function(a,b,c){this._super(a,b,c),c.spin(this.vx,this.vy,a,b)},logic:function(){this.x+=this.vx,this.vx-=this.x-this.originX,this.vx*=.99},paint:function(){z.save(),z.translate(this.originX,this.container.height);var a=Math.atan2(this.x-this.originX,this.height);z.rotate(a),z.strokeStyle="#666666",z.fillStyle="#b0ca33",z.lineWidth=1,z.beginPath(),z.arc(0,-this.y,this.wh,0,Math.PI,!0),z.lineTo(-this.wh,0),z.lineTo(this.wh,0),z.lineTo(this.wh,-this.y),z.fill(),z.stroke(),z.closePath(),z.restore()}}),P=N.extend({init:function(a){this.radius=48,this.diameter=2*this.radius,this._super(a,this.diameter,this.diameter),this.rotation=0,this.omega=0,this.sleeping=!0,this.dead=!1},setVelocity:function(a,b){this.sleeping=!1,this._super(a,b)},setServe:function(a){var b=a.x+a.width/2,c=m;this.sleeping=!0,this.dead=!1,this.omega=0,this.rotation=0,this.vx=0,this.vy=0,this.setPosition(b,c)},collision:function(a){if(this.dead)return void(a instanceof Q&&(this.x<a.container.x||this.x>a.container.x+a.container.width)&&a.scorePoint());a.collision(this)},checkField:function(){this.y<=this.radius&&(this.dead=!0,this.y=this.radius)},logic:function(){if(!this.sleeping&&!this.dead){if(this.x<=this.radius?(this.vx*=-1,this.vy+=this.omega):this.x>=this.container.width-this.radius&&(this.vx*=-1,this.vy-=this.omega),this.omega){var a=this.getTotalVelocity(),b=this.vy*this.omega*r/a,c=-this.vx*this.omega*r/a;this.vx+=b,this.vy+=c}this.rotation+=this.omega,this._super()}},changeSpin:function(a,b,c,d,e){var f=c*c+d*d,g=(c*a+d*b)/f,h=a+e*c*g,i=b+e*d*g;this.omega+=(h*d-i*c)/f},spin:function(a,b,c,d){this.changeSpin(this.vx,this.vy,c,d,1),this.changeSpin(a,b,c,d,-1)},paint:function(){z.save(),z.translate(this.x,this.container.height-this.y),z.rotate(this.rotation),z.drawImage(C.images.getResource("ball.png"),-this.radius,-this.radius),z.restore()}}),Q=N.extend({init:function(a,b,c){this.radius=48,this.diameter=2*this.radius,this._super(b,this.diameter,this.diameter),this.game=a,this.input=c,this.points=0,this.sets=0,this.pulses=[],this.color="rgb(0, 0, 0)",this.name="Player",this.reset()},addContact:function(){return!!this.isTouching||(this.isTouching=!0,this.contacts++,this.totalContacts++,!1)},reset:function(){this.input.reset(),this.setVelocity(0,0),this.setPositionFromContainerOrigin(),this.pulse=1,this.contacts=0,this.totalContacts=0,this.isTouching=!1},scorePoint:function(){if(this.points++,this.game.setServe(this.container),this.points>=this.game.maxPoints){for(var a=!0,b=this.game.players.length;b--;)if(this.game.players[b]!==this&&Math.abs(this.game.players[b].points-this.points)<2){a=!1;break}if(a)return this.game.setWon(this)}},hit:function(a,b,c){var d=c.sleeping?o:n;this._super(a,b,c);var e=a*this.vx+b*this.vy;if(e>0){var f=d*e/(a*a+b*b);c.vx+=a*f,c.vy+=b*f}c.spin(this.vx,this.vy,a,b)},collision:function(a){var b=a.x-this.x,c=a.y-this.y,d=Math.sqrt(b*b+c*c),e=a.radius+this.radius;if(d>e)return void(this.isTouching=!1);var f=e/d,h=f*b,i=f*c;return a.setPosition(this.x+h,this.y+i),this.game.contact(this)?void 0:this.contacts>g?void(a.dead=!0):void this.hit(b,c,a)},setIdentity:function(a,b){this.name=a,this.color=b},updatePulse:function(){this.pulses.push(this.pulse),this.pulses.length>100&&this.pulses.shift()},steer:function(){this.input.update(),this.updatePulse()},logic:function(){this.input.left?(this.vx=-this.pulse*h,this.pulse-=t):this.input.right?(this.vx=this.pulse*h,this.pulse-=t):this.vx=0,this.y===this.hh&&this.input.up&&(this.vy=i+f,this.pulse-=u),this.pulse=Math.max(Math.min(1,this.pulse+s),.5),this._super()},paint:function(){z.save(),z.translate(this.x,this.container.height-this.y),z.fillStyle=this.color,z.beginPath(),z.arc(0,0,this.radius,0,c,!0),z.fill(),z.closePath(),z.restore()},paintPulse:function(){z.save(),z.translate(this.container.x?this.container.x+this.container.width-250:50,45),z.fillStyle="rgba(150, 150, 150, 0.2)",z.fillRect(0,-30,200,30),z.beginPath(),z.moveTo(0,0);for(var a=0;a<this.pulses.length;a++)z.lineTo(2*a,-30*(1/this.pulses[a]-1));z.strokeStyle=this.color,z.stroke(),z.closePath(),z.fillStyle="#cccccc",z.textAlign="center",z.font="24px Merge",z.fillText(this.name,100,-10),z.restore()}}),R=(Q.extend({init:function(a,b){this._super(a,b,new S),this.setIdentity("Computer","#FF6633")},steer:function(){switch(Math.floor(6*Math.random())){case 0:this.input.setUp(!0);break;case 1:this.input.setLeft(!0),this.input.setRight(!1);break;case 2:this.input.setRight(!0),this.input.setLeft(!1);break;case 4:this.input.setRight(!1),this.input.setLeft(!1);break;case 5:this.input.setUp(!1)}this._super()}}),Q.extend({init:function(a,b){this._super(a,b,new S)},steer:function(a){a&&(this.input.setUp(!!a.u),this.input.setLeft(!!a.l),this.input.setRight(!!a.r)),this._super()},scorePoint:function(){}})),S=D.extend({init:function(){this.reset(),this._super()},update:function(){this.previousUp=this.up,this.previousLeft=this.left,this.previousRight=this.right,this.left=this.bufferLeft,this.up=this.bufferUp,this.right=this.bufferRight},reset:function(){this.up=!1,this.left=!1,this.right=!1,this.bufferUp=!1,this.bufferLeft=!1,this.bufferRight=!1,this.previousUp=!1,this.previousLeft=!1,this.previousRight=!1},setUp:function(a){this.bufferUp=a},setLeft:function(a){this.bufferLeft=a},setRight:function(a){this.bufferRight=a},bind:function(){},unbind:function(){},cancelBubble:function(a){var b=a||event;b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?b.stopPropagation():b.cancelBubble=!0},copy:function(){return this.previousUp===this.up&&this.previousRight===this.right&&this.previousLeft===this.left?0:{l:this.left?1:0,u:this.up?1:0,r:this.right?1:0}}}),T=S.extend({init:function(a){var b=this;b._super(),b.codes={},b.codes[a[0]]=b.setUp,b.codes[a[1]]=b.setLeft,b.codes[a[2]]=b.setRight;var c=!1;this.downhandler=function(a){return c=b.handler(a,!0)},this.uphandler=function(a){return c=b.handler(a,!1)},this.presshandler=function(a){return c||b.cancelBubble(a),c}},bind:function(){var a=document.attachEvent||document.addEventListener;a("keydown",this.downhandler),a("keyup",this.uphandler),a("keypress",this.presshandler)},unbind:function(){},handler:function(a,b){return!this.codes[a.keyCode]||(this.codes[a.keyCode].apply(this,[b]),this.cancelBubble(a),!1)}}),U=(S.extend({init:function(a){this._super()}}),D.extend({init:function(){this.messages=[],this.created=new Date}})),V=(D.extend({init:function(){}}),D.extend({init:function(){this.ready=!1,this.load(),this.players=[],this.observers=[],this.replays=[],this.instantReplay=null,this.sets=[],this.lobby=new U,this.field=new J,this.ball=new P(this.field),this.net=new O(this.field),this.viewPort=new L(this),this.loop=null,this.running=!1,this.maxPoints=j,this.maxSets=k,this.wait=0,this.beach="",this.beaches=[];for(var a in x)this.beaches.push(a)},contact:function(a){for(var b=!1,c=this.players.length;c--;){var d=this.players[c];d===a?b=d.addContact():d.contacts=0}return b},reset:function(){var a;for(a=this.players.length;a--;)this.players.pop();for(a=this.observers.length;a--;)this.observers.pop();for(a=this.replays.length;a--;)this.replays.pop();for(a=this.sets.length;a--;)this.sets.pop()},setWon:function(a){for(var b=0;b<this.players.length;b++)this.players[b].points=0;a.sets++,this.sets.push(a),a.sets===this.maxSets?(this.viewPort.setMessage(this.format(y.Over,a.name)),this.endMatch()):this.viewPort.setMessage(this.format(y.Set,a.name),2*this.wait)},addPlayer:function(a){this.players.push(a)},addObserver:function(a){this.observers.push(a)},saveReplay:function(){this.replays.push(this.instantReplay)},recordReplay:function(){this.instantReplay=new G(this.beach,this.ball,this.players)},detectInstantReplay:function(){if(this.replays.length){var a=this.replays[this.replays.length-1];if(a.contacts>8&&a.count>220)return!0}return!1},playLastReplay:function(a){this.replays.length&&this.replays[this.replays.length-1].play(this,a)},continuation:function(){this.net.reset();for(var a=this.players.length;a--;)this.players[a].reset();this.recordReplay()},setServe:function(a){if(this.saveReplay(),this.ball.setServe(a),this.detectInstantReplay())return void this.playLastReplay(this.continuation);this.wait=Math.ceil(l/d),this.continuation()},tick:function(){if(this.wait)this.wait--;else{for(var a=this.players.length;a--;)this.players[a].steer();this.instantReplay.addData(this.players);for(var b=e;b--;){this.ball.logic(),this.net.logic();for(var a=this.players.length;a--;)this.players[a].logic(),this.ball.collision(this.players[a]);this.ball.collision(this.net)}}this.viewPort.paint(this.ball,this.players)},beginMatch:function(){var a=this.random(0,this.beaches.length);this.viewPort.setMessage(y.Start,100),this.beach=this.beaches[a],this.viewPort.setBackground(this.beach),this.viewPort.setup(),a=this.random(0,this.players.length),this.ball.setServe(this.players[a].container),this.continuation(),this.play()},endMatch:function(){this.saveReplay(),this.viewPort.paint(this.ball,this.players),this.pause()},play:function(){var a=this;if(!a.running){a.running=!0;for(var b=this.players.length;b--;)this.players[b].input.bind();a.loop=setInterval(function(){a.tick()},d)}},pause:function(){if(this.running){this.running=!1;for(var a=this.players.length;a--;)this.players[a].input.unbind();clearInterval(this.loop)}},load:function(){this.ready=!0,C.images=new F("assets/bv",w)}}));return{startBV:function(){var a=new V,b=new K(0,2),c=new T([87,65,68]),d=new Q(a,b,c);d.setIdentity("Player1","#0000FF"),a.addPlayer(d);var e=new K(1,2),f=new T([38,37,39]),g=new Q(a,e,f);g.setIdentity("Player2","#FF0000"),a.addPlayer(g),a.beginMatch()}}}]);var mixinsDirectives=angular.module("kbApp.mixins.directives",["kbApp.auth","kbApp.services"]);mixinsDirectives.directive("kbMaxLength",["$compile",function(a){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){c.$set("ngTrim","false");var e=parseInt(c.kbMaxLength,10);d.$parsers.push(function(a){return a.length>e&&(a=a.substr(0,e),d.$setViewValue(a),d.$render()),a})}}}]),mixinsDirectives.directive("kbPasswordConfirm",[function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){a.$watch(c.ngModel,function(){e()}),c.$observe("kbPasswordConfirm",function(a){e()});var e=function(){var a=d.$viewValue,b=c.kbPasswordConfirm;d.$setValidity("kbPasswordConfirm",!a||!b||a===b)}}}}}]),mixinsDirectives.directive("kbInteger",[function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){if(d){var e=[];"string"==typeof c.kbInteger&&""!==c.kbInteger&&(e=c.kbInteger.split(","));var f=function(a){var b=!0;angular.isString(a)&&(b=/^[0-9]+$/.test(a));var c=parseInt(a,10);if(isNaN(c)||!1===b)d.$setValidity("integer",!1);else{var f=!1;if(e.length>0)for(var g=0;g<e.length;g++){var h=e[g];if(h.indexOf("-")>-1){var i=h.split("-");if(2==i.length){var j=parseInt(i[0],10),k=parseInt(i[1],10);c>=j&&c<=k&&(f=!0)}}else{var l=parseInt(h,10);l==c&&(f=!0)}}else f=!0;d.$setValidity("integer",f)}return c};d.$parsers.push(f),d.$formatters.unshift(f)}}}}]),mixinsDirectives.directive("kbTime",[function(){return{restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$parsers.push(function(a){var b=NaN;a.search(/^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$/);if(-1!=a.search(/^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$/)){d.$setValidity("time",!0);var c=a.split(":");b=3600*c[0]+60*c[1]}else d.$setValidity("time",!1);return b}),d.$formatters.unshift(function(a){var b,c,e,f="xx:xx",g=function(a,b,c){return c=c||"0",a+="",a.length>=b?a:new Array(b-a.length+1).join(c)+a};return a=parseInt(a,10),angular.isNumber(a)&&!isNaN(a)?(d.$setValidity("time",!0),b=a,c=parseInt(b/3600,10),b%=3600,e=parseInt(b/60,10),f=g(c,2)+":"+g(e,2)):d.$setValidity("time",!1),f})}}}]);var filters=angular.module("kbApp.mixins.filters",[]);filters.filter("kbDynUnit",["$filter",function(a){return function(b,c,d,e,f){c=c||"",e=e||0,f=f||1,d=Number(d)||0;var g=null===b?null:Number(b),h="";return angular.isNumber(g)&&null!==g&&isFinite(g)?(g*=f,0!==d&&(d>=1?(Math.abs(g)>=d&&(g/=1e3,h="k"),Math.abs(g)>=d&&(g/=1e3,h="M"),Math.abs(g)>=d&&(g/=1e3,h="G")):(Math.abs(g)<=d&&(g*=1e3,h="m"),Math.abs(g)<=d&&(g*=1e3,h="µ"))),g=a("number")(g,e)):(g="-",h="",c=""),g=g+h+c}}]),angular.module("kbApp.mixins",["kbApp.mixins.bv","kbApp.mixins.services","kbApp.mixins.directives","kbApp.mixins.filters"]);var mixinsServices=angular.module("kbApp.mixins.services",[]);mixinsServices.constant("KbErrorTypes",{ERR_NOT_DEFINED:-1,ERR_OK:0,ERR_AUTHENTICATION:1,ERR_PARAMETER:2,ERR_BUSY:3,ERR_INTERNAL:4,ERR_COMMUNICATION:5,ERR_LOGIN_PARAMETER:6}),mixinsServices.factory("utilService",["$compile",function(a){var b=function(b,c){angular.isFunction(c)&&(c={post:c});var d,e=b.contents().remove();return{pre:c&&c.pre?c.pre:null,post:function(b,f){d||(d=a(e)),d(b,function(a){f.append(a)}),c&&c.post&&c.post.apply(null,arguments)}}},c=function(a,b){var c=navigator.userAgent.match(/MSIE\s([\d.]+)/),d=navigator.userAgent.match(/Trident\/7.0/)&&navigator.userAgent.match(/rv:11/),e=c?c[1]:d?11:-1;if(c&&e<10)return void console.log("No blobs on IE ver<10");var f=new Blob([a],{type:"text/plain;charset=utf-8"});saveAs(f,b)};return{unixTimeStampToDate:function(a){var b=moment.unix(a);return b.add(b.zone(),"minute"),b.isValid()?b.utc().toDate():null},dateToUnixTimestamp:function(a){var b=moment(a);return b.unix()-60*b.zone()},compileRecursive:b,serveDataToFile:c}}]),mixinsServices.factory("KbError",["KbErrorTypes",function(a){return function(b,c,d){this.msg=b||"",this.type=c||a.ERR_NOT_DEFINED,this.data=d||null}}]);var navigationControllers=angular.module("kbApp.navigation.controllers",["kbApp.navigation.services","kbApp.init.services"]);navigationControllers.controller("navigationCtrl",["$scope","initService","navigationService","$location",function(a,b,c,d){a.menu=[],a.breadcrumbs=c.breadcrumbs,b.onAfterInit(a,"$locationChangeSuccess",function(){c.activeStatusSet(d.path())}),b.onAfterInit(a,"appInitialized",function(){a.menu=c.menu,a.breadcrumbs=c.breadcrumbs})}]);var navigationDirectives=angular.module("kbApp.navigation.directives",["kbApp.navigation.services","kbApp.mixins","pascalprecht.translate"]);navigationDirectives.directive("kbNavigation",["utilService",function(a){return{restrict:"E",scope:{nodes:"="},templateUrl:"navigation/navigationNav.tpl.html",compile:function(b){return a.compileRecursive(b,function(a,b,c){})}}}]),navigationDirectives.directive("kbNavigationNode",["utilService","navigationService","$translate",function(a,b,c){return{restrict:"E",scope:{node:"="},templateUrl:"navigation/navigationNavNode.tpl.html",compile:function(c){return a.compileRecursive(c,function(a,c,d){a.showNode=b.showNode,a.toggleCollapse=function(){b.collapseStatusToggle(a.node)},a.isActive=function(){return a.node.active},a.$watch("node.collapse",function(a){!0===a?c.find("ul:first").hide("slow"):c.find("ul:first").show("slow")}),!0===a.node.collapse?c.find("ul:first").hide():c.find("ul:first").show()})}}}]),navigationDirectives.directive("kbNavigationBreadcrumb",[function(){return{restrict:"E",scope:{breadcrumbs:"="},templateUrl:"navigation/navigationBreadcrumb.tpl.html"}}]);var navigationServices=angular.module("kbApp.navigation.services",["kbApp.mixins"]);navigationServices.factory("navigationService",["$http","$q","$location","kbAppProperties","authService","KbError","KbErrorTypes",function(a,b,c,d,e,f,g){var h=[],i=[],j=function(){var c=b.defer();return a.get("/src/app/navigation/nav.json").then(function(a){h.length=0;for(var b=0;b<a.data.length;b++)h.push(a.data[b]);!1===angular.isArray(h)?c.reject(new f("Structure of returned menu object don`t fit expected structure",g.ERR_INTERNAL)):0===h.length?c.reject(new f("No content in Menu Object",g.ERR_INTERNAL)):c.resolve()},function(){c.reject(new f("No Answer",g.ERR_COMMUNICATION))}),c.promise},k=function(a,b){var c=function(a,b){var d="";return d=angular.isDefined(b)?"/"+a.name+b:"/"+a.name,angular.isDefined(a.parent)&&(d=c(a.parent,d)),d};if(angular.isArray(a))for(var d=0,e=a.length;d<e;d++)angular.isDefined(b)&&(a[d].parent=b),angular.isDefined(a[d].nodes)&&angular.isArray(a[d].nodes)?k(a[d].nodes,a[d]):a[d].nodes=[],void 0===a[d].icon&&(a[d].icon=""),a[d].path=c(a[d])},l=function(a){function b(a,c){var d=null;if(angular.isArray(a))for(var e=0;e<a.length;e++){if(a[e].name==c){d=a[e];break}angular.isArray(a[e].nodes)&&(d=b(a[e].nodes,c))}return d}return b(h,a)},m=function(a){
var b=!0;if(!0===angular.isString(a))if(""!==a)try{a=angular.fromJson(a)}catch(c){b=!1}else b=!1;return!0===angular.isDefined(a)&&null!==a&&!0===angular.isObject(a)&&!0===b&&((!1===angular.isDefined(a.user)||!1===angular.isString(a.user)&&!1===angular.isNumber(a.user))&&(a.user=null),(!1===angular.isDefined(a.loginStatus)||!1!==a.loginStatus&&!0!==a.loginStatus)&&(a.loginStatus=null),(!1===angular.isDefined(a.properties)||!1===angular.isString(a.properties)&&!1===angular.isNumber(a.properties))&&(a.properties=null),null!==a.user&&!1===e.authorized(a.user)&&(b=!1),null!==a.loginStatus&&!1===e.isLoggedInStateMatch(a.loginStatus)&&(b=!1),null!==a.properties&&!1===d.match(a.properties)&&(b=!1)),b},n=function(a){if(!1===angular.isDefined(a)&&(a=h),angular.isArray(a))for(var b=0,c=a.length;b<c;b++)a[b].collapse=!0,a[b].active=!1,angular.isArray(a[b].nodes)&&a[b].nodes.length>0&&n(a[b].nodes)},o=function(a){void 0!==a&&void 0!==a.collapse&&(a.collapse=!a.collapse)},p=function(a){var b=function(a,c){var d;if(angular.isDefined(a)&&angular.isArray(a))for(var e=0;e<a.length;e++)a[e].path==c?(a[e].active=!0,d=a[e]):a[e].active=!1,void 0===d?d=b(a[e].nodes,c):b(a[e].nodes,c);return d},c=function(a){angular.isDefined(a)&&angular.isDefined(a.parent)&&(a.parent.collapse=!1,c(a.parent))},d=function(a){angular.isDefined(a)&&(i.unshift(a),angular.isDefined(a.parent)&&d(a.parent))},e=b(h,a);if(void 0!==e){for(c(e);i.length>0;)i.pop();d(e)}};return{menu:h,breadcrumbs:i,collapseStatusToggle:o,activeStatusSet:p,getNodeFromPath:l,showNode:m,init:function(){var a=b.defer();return a.notify("Load menu"),j().then(function(){try{k(h),n(h),p(c.path()),a.resolve("Load menu successful")}catch(b){a.reject(new f("Load menu failed"))}},function(){a.reject(new f("Load menu failed"))}),a.promise}}}]),angular.module("kbApp.navigation",["kbApp.navigation.services","kbApp.navigation.controllers","kbApp.navigation.directives"]),angular.module("kbApp.pages.current-values.analog-inputs",[]).controller("current-values-analog-inputsCtrl",["$scope","dxsService",function(a,b){var c=b.getInstance();a.Analog1={dxsId:167772417},c.addDataRd(a.Analog1),a.Analog2={dxsId:167772673},c.addDataRd(a.Analog2),a.Analog3={dxsId:167772929},c.addDataRd(a.Analog3),a.Analog4={dxsId:167773185},c.addDataRd(a.Analog4),c.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){c.clear()})}]),angular.module("kbApp.pages.current-values.battery",[]).controller("current-values-batteryCtrl",["$scope","dxsService",function(a,b){var c=b.getInstance();a.Voltage={dxsId:33556226},c.addDataRd(a.Voltage),a.Charge={dxsId:33556229},c.addDataRd(a.Charge),a.Current={dxsId:33556238},c.addDataRd(a.Current),a.CurrentDir={dxsId:33556230},c.addDataRd(a.CurrentDir),a.ChargeCycles={dxsId:33556228},c.addDataRd(a.ChargeCycles),a.Temperature={dxsId:33556227},c.addDataRd(a.Temperature),c.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){c.clear()})}]),angular.module("kbApp.pages.current-values.grid",[]).controller("current-values-gridCtrl",["$scope","dxsService","kbAppProperties",function(a,b,c){var d=b.getInstance();a.GridOutputPower={dxsId:67109120},d.addDataRd(a.GridOutputPower),a.GridFreq={dxsId:67110400},d.addDataRd(a.GridFreq),a.GridCosPhi={dxsId:67110656},d.addDataRd(a.GridCosPhi),a.GridLimitation={dxsId:67110144},d.addDataRd(a.GridLimitation),a.GridVoltageL1={dxsId:67109378},d.addDataRd(a.GridVoltageL1),a.GridCurrentL1={dxsId:67109377},d.addDataRd(a.GridCurrentL1),a.GridPowerL1={dxsId:67109379},d.addDataRd(a.GridPowerL1),c.match("3_PHASE")&&(a.GridVoltageL2={dxsId:67109634},d.addDataRd(a.GridVoltageL2),a.GridCurrentL2={dxsId:67109633},d.addDataRd(a.GridCurrentL2),a.GridPowerL2={dxsId:67109635},d.addDataRd(a.GridPowerL2),a.GridVoltageL3={dxsId:67109890},d.addDataRd(a.GridVoltageL3),a.GridCurrentL3={dxsId:67109889},d.addDataRd(a.GridCurrentL3),a.GridPowerL3={dxsId:67109891},d.addDataRd(a.GridPowerL3)),d.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.current-values.home",[]).controller("current-values-homeCtrl",["$scope","dxsService",function(a,b){var c=b.getInstance();a.AktHomeConsumptionSolar={dxsId:83886336},c.addDataRd(a.AktHomeConsumptionSolar),a.AktHomeConsumptionBat={dxsId:83886592},c.addDataRd(a.AktHomeConsumptionBat),a.AktHomeConsumptionGrid={dxsId:83886848},c.addDataRd(a.AktHomeConsumptionGrid),a.PhaseSelHomeConsumpL1={dxsId:83887106},c.addDataRd(a.PhaseSelHomeConsumpL1),a.PhaseSelHomeConsumpL2={dxsId:83887362},c.addDataRd(a.PhaseSelHomeConsumpL2),a.PhaseSelHomeConsumpL3={dxsId:83887618},c.addDataRd(a.PhaseSelHomeConsumpL3),c.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){c.clear()})}]),angular.module("kbApp.pages.current-values.pv-generator",[]).controller("current-values-pv-generatorCtrl",["$scope","dxsService","kbAppProperties",function(a,b,c){var d=b.getInstance();a.dc1Voltage={dxsId:33555202},d.addDataRd(a.dc1Voltage),a.dc1Current={dxsId:33555201},d.addDataRd(a.dc1Current),a.dc1Power={dxsId:33555203},d.addDataRd(a.dc1Power),c.match("STRING_2")&&(a.dc2Voltage={dxsId:33555458},d.addDataRd(a.dc2Voltage),a.dc2Current={dxsId:33555457},d.addDataRd(a.dc2Current),a.dc2Power={dxsId:33555459},d.addDataRd(a.dc2Power)),c.match("STRING_3")&&(a.dc3Voltage={dxsId:33555714},d.addDataRd(a.dc3Voltage),a.dc3Current={dxsId:33555713},d.addDataRd(a.dc3Current),a.dc3Power={dxsId:33555715},d.addDataRd(a.dc3Power)),d.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.current-values.s0-in",[]).controller("current-values-s0-inCtrl",["$scope","dxsService",function(a,b){var c=b.getInstance();a.S0InPulseCnt={dxsId:184549632},c.addDataRd(a.S0InPulseCnt),a.Loginterval={dxsId:150995968},c.addDataRd(a.Loginterval);var d=function(a){var b="-";if(angular.isNumber(a)){var c=parseInt(a,10),d=parseInt(Math.floor(c/60),10),e=parseInt(Math.floor(d/60),10);c-=60*d,d-=60*e,b="",0===a&&(b="0s"),0!==c&&(b=c+"s"),0!==d&&(b=d+"min "+b),0!==e&&(b=e+"h "+b)}return b};a.LogintervalReadable=d(a.Loginterval.value),a.$watch("Loginterval.value",function(b,c){a.LogintervalReadable=d(b)}),c.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){c.clear()})}]),angular.module("kbApp.pages.home",[]).controller("homeCtrl",["$scope","dxsService","kbAppProperties",function(a,b,c){var d=b.getInstance();a.dcPowerPV={dxsId:33556736},d.addDataRd(a.dcPowerPV),a.acPower={dxsId:67109120},d.addDataRd(a.acPower),c.match("EXT_CURRENT_SENS")&&(a.ownConsumption={dxsId:83888128},d.addDataRd(a.ownConsumption)),c.match("BATTERY")&&(a.batStateOfCharge={dxsId:33556229},d.addDataRd(a.batStateOfCharge)),a.operatingStatus={dxsId:16780032},d.addDataRd(a.operatingStatus),a.operatingStatusTranslationId="",d.getDataRd().then(null,null,function(b){if(!0===b)switch(a.$emit("kbPageLoaded"),a.operatingStatus.value){case 0:a.operatingStatusTranslationId="ID_92";break;case 1:a.operatingStatusTranslationId="ID_93";break;case 2:a.operatingStatusTranslationId="ID_94";break;case 3:a.operatingStatusTranslationId="ID_191";break;case 4:a.operatingStatusTranslationId="ID_96";break;case 5:a.operatingStatusTranslationId="ID_95";break;case 6:a.operatingStatusTranslationId="ID_361";break;case 7:a.operatingStatusTranslationId="ID_360";break;case 8:a.operatingStatusTranslationId="ID_366";break;default:a.operatingStatusTranslationId=""}}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.info.events",[]).controller("info-eventsCtrl",["$scope","dxsService","utilService",function(a,b,c){var d=10,e=b.getInstance(),f=[],g={dxsId:234881792,value:0};e.addDataRd(g);for(var h=0;h<d;h++)f.push({dxsId:234881537+h}),e.addDataRd(f[h]);a.EventCnt=0,a.Events=[];var i=function(){a.EventCnt=g.value,a.Events.splice(0,a.Events.length);for(var b=0;b<a.EventCnt;b++){var d=f[b].value;a.Events.push({date:c.unixTimeStampToDate((d[0]<<0)+(d[1]<<8)+(d[2]<<16)+(d[3]<<24)),code:(d[4]<<0)+(d[5]<<8),env:("0000"+((d[6]<<0)+(d[7]<<8)).toString(16)).toUpperCase().substr(this.length-4,4)+"h"})}};e.getDataRd().then(null,null,function(b){!0===b&&(a.$emit("kbPageLoaded"),i())}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.info.versions",[]).controller("info-versionsCtrl",["$scope","dxsService",function(a,b){var c=b.getInstance();a.VersionUI={dxsId:16779267},c.addDataRd(a.VersionUI),a.VersionFW={dxsId:16779265},c.addDataRd(a.VersionFW),a.VersionHW={dxsId:16779266},c.addDataRd(a.VersionHW),a.VersionPAR={dxsId:16779268},c.addDataRd(a.VersionPAR),a.SerialNumber={dxsId:16777728},c.addDataRd(a.SerialNumber),a.ArticelNumber={dxsId:16777472},c.addDataRd(a.ArticelNumber),a.CountrySettingsName={dxsId:16779522},c.addDataRd(a.CountrySettingsName),a.CountrySettingsVersion={dxsId:16779521},c.addDataRd(a.CountrySettingsVersion),c.getDataRd(0).then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){c.clear()})}]),angular.module("kbApp.pages.login",[]).controller("loginCtrl",["$scope","authService","kbAppPageService","$q","$location","KbError","KbErrorTypes",function(a,b,c,d,e,f,g){var h=function(){angular.isDefined(a.password)&&(a.password.value=""),angular.isDefined(a.userName)&&(a.userName.value=""),angular.isDefined(a.servicecode)&&(a.servicecode.value=""),a.form.$setPristine()};a.userList=[{translationId:"ID_362",value:"user"},{translationId:"ID_363",value:"installer"}],a.userSelected=angular.copy(a.userList[0].value),a.login=function(i){var j;"user"==i?(j=b.loginUserPw(a.userName.value,a.password.value),c.submitHelper(j,h)):"installer"==i?(j=b.loginServiceCode(a.servicecode.value.toUpperCase()),c.submitHelper(j,h)):(j=d.defer(),j.reject(new f("Wrong user selected (Error in Code)",g.ERR_INTERNAL)),c.submitHelper(j.promise,h)),j.then(function(){e.path("/")})},a.$emit("kbPageLoaded")}]),angular.module("kbApp.pages.logout",[]).controller("logoutCtrl",["$scope","authService","$location","kbAppPageService",function(a,b,c,d){a.logoutFail=!1;var e;!1===b.isLoggedIn()?c.path("/login"):(e=b.logout(),d.submitHelper(e)),a.$emit("kbPageLoaded")}]),angular.module("kbApp.pages",["kbApp.pages.home","kbApp.pages.current-values.pv-generator","kbApp.pages.current-values.battery","kbApp.pages.current-values.home","kbApp.pages.current-values.grid","kbApp.pages.current-values.analog-inputs","kbApp.pages.current-values.s0-in","kbApp.pages.statistics.day","kbApp.pages.statistics.total","kbApp.pages.statistics.log-data","kbApp.pages.settings.general.inverter-name","kbApp.pages.settings.general.date-time","kbApp.pages.settings.general.login","kbApp.pages.settings.communication.inverter-address","kbApp.pages.settings.communication.network","kbApp.pages.settings.communication.rs485","kbApp.pages.settings.communication.modem","kbApp.pages.settings.portal-configuration","kbApp.pages.settings.data-logger","kbApp.pages.settings.overvoltage-protection","kbApp.pages.settings.generator-configuration","kbApp.pages.settings.battery-configuration","kbApp.pages.settings.switching-output","kbApp.pages.settings.analog-inputs","kbApp.pages.info.versions","kbApp.pages.info.events","kbApp.pages.login","kbApp.pages.logout"]),angular.module("kbApp.pages.settings.analog-inputs",[]).controller("settings-analog-inputsCtrl",["$scope","dxsService","kbAppPageService",function(a,b,c){a.modes=[];var d=b.getInstance();a.mode={dxsId:167773696},d.addDataWr(a.mode),a.submitForm=function(){c.submitHelper(d.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(d.getDataWr(),function(){a.form.$setPristine()})},d.getDataWr().then(function(){switch(a.mode.value){case 0:a.modes.push({translationId:"ID_345",value:0});break;case 1:case 3:a.modes.push({translationId:"ID_345",value:1}),a.modes.push({translationId:"ID_346",value:3});break;case 2:a.modes.push({translationId:"ID_345",value:1}),a.modes.push({translationId:"ID_394",value:2}),a.modes.push({translationId:"ID_346",value:3})}a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.settings.battery-configuration",[]).controller("settings-battery-configurationCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties","authService","$locale",function(a,b,c,d,e,f){var g,h=b.getInstance(),i=0,j=1,k=2,l=3,m=4;a.batteryType={dxsId:33556252,show:!1},a.batteryTypeSupported={dxsId:33556253,show:!1},a.dischargeHysteresisOn={dxsId:33556249,show:!1},a.wintermode={dxsId:83888896,show:!1},a.weatherForecast={dxsId:33556484,show:!1},a.chargeTimeStart={dxsId:33556239,show:!1},a.chargeTimeEnd={dxsId:33556240,show:!1},a.minSoCManual={dxsId:33556231,show:!1},a.minSoCManualInc={dxsId:33556232,show:!1},a.minSoCManualIncStart={dxsId:33556233,show:!1},a.minSoCManualIncEnd={dxsId:33556234,show:!1},a.minSoCAutomatic={dxsId:33556247,show:!1},a.minSoCDynamic={dxsId:33556248,show:!1},a.minSoCAutomaticViewValue={value:50,show:!1},a.eps={dxsId:83888640,show:!1},a.maintenanceCharge={dxsId:33556236,show:!1},e.authorized("PLANT_OWNER, INSTALLER, SERVICE, DEVELOPER")&&(h.addDataRd(a.batteryType),h.addDataRd(a.batteryTypeSupported),h.addDataRd(a.dischargeHysteresisOn),h.addDataRd(a.wintermode),h.addDataRd(a.weatherForecast),h.addDataRd(a.chargeTimeStart),h.addDataRd(a.chargeTimeEnd),h.addDataRd(a.minSoCManual),h.addDataRd(a.minSoCManualInc),h.addDataRd(a.minSoCManualIncStart),h.addDataRd(a.minSoCManualIncEnd),h.addDataRd(a.minSoCAutomatic),h.addDataRd(a.minSoCDynamic)),e.authorized("INSTALLER, SERVICE, DEVELOPER")&&(h.addDataRd(a.eps),h.addDataRd(a.maintenanceCharge)),a.batteryTypes=[],a.months=[],a.wintermodes=[],a.minSoCs=[],a.getBatteryTypeTranslationId=function(a){var b="";switch(a){case i:b="ID_450";break;case j:b="ID_451";break;case k:b="ID_452";break;case l:b="ID_453";break;case m:b="ID_454";break;default:b=""}return b};var n=function(){h.delDataWr(),a.batteryType.show=!1,a.dischargeHysteresisOn.show=!1,a.wintermode.show=!1,a.eps.show=!1,a.weatherForecast.show=!1,a.chargeTimeStart.show=!1,a.chargeTimeEnd.show=!1,a.maintenanceCharge.show=!1,a.minSoCManual.show=!1,a.minSoCManualInc.show=!1,a.minSoCManualIncStart.show=!1,a.minSoCManualIncEnd.show=!1,a.minSoCAutomatic.show=!1,a.minSoCDynamic.show=!1,a.minSoCAutomaticViewValue.show=!1,e.authorized("PLANT_OWNER, INSTALLER, SERVICE, DEVELOPER")&&(h.addDataWr(a.batteryType),a.batteryType.show=!0),a.batteryType.value!=i&&(d.match("WEATHER_FORECAST")&&(h.addDataWr(a.dischargeHysteresisOn),a.dischargeHysteresisOn.show=!0),!0!==d.match("WINTERMODE_SUPPORTED")&&a.batteryType.value!=j||(h.addDataWr(a.wintermode),a.wintermode.show=!0),e.authorized("INSTALLER, SERVICE, DEVELOPER")&&d.match("ESB")&&(h.addDataWr(a.eps),a.eps.show=!0),!d.match("WEATHER_FORECAST")||0===a.wintermode.value&&!1!==a.wintermode.show||(h.addDataWr(a.weatherForecast),a.weatherForecast.show=!0),!1!==a.weatherForecast.value&&0!==a.wintermode.value||(h.addDataWr(a.chargeTimeStart),h.addDataWr(a.chargeTimeEnd),a.chargeTimeStart.show=!0,a.chargeTimeEnd.show=!0),e.authorized("INSTALLER, SERVICE, DEVELOPER")&&0===a.wintermode.value&&(h.addDataWr(a.maintenanceCharge),a.maintenanceCharge.show=!0),0===a.wintermode.value&&a.wintermode.show&&(h.addDataWr(a.minSoCManual),h.addDataWr(a.minSoCManualInc),h.addDataWr(a.minSoCManualIncStart),h.addDataWr(a.minSoCManualIncEnd),a.minSoCManual.show=!0,a.minSoCManualInc.show=!0,a.minSoCManualIncStart.show=!0,a.minSoCManualIncEnd.show=!0),!0===d.match("WINTERMODE_SUPPORTED")&&0!==a.wintermode.value&&(h.addDataWr(a.minSoCAutomatic),a.minSoCAutomatic.show=!0,a.minSoCAutomaticViewValue.show=!0,a.weatherForecast.show&&!0===a.weatherForecast.value&&(h.addDataWr(a.minSoCDynamic),a.minSoCDynamic.show=!0)))},o=function(){a.batteryTypes.push({translationId:a.getBatteryTypeTranslationId(i),value:i}),a.batteryTypeSupported.value&1<<j-1&&a.batteryTypes.push({translationId:a.getBatteryTypeTranslationId(j),value:j}),a.batteryTypeSupported.value&1<<k-1&&a.batteryTypes.push({translationId:a.getBatteryTypeTranslationId(k),value:k}),a.batteryTypeSupported.value&1<<l-1&&a.batteryTypes.push({translationId:a.getBatteryTypeTranslationId(l),value:l}),a.batteryTypeSupported.value&1<<m-1&&a.batteryTypes.push({translationId:a.getBatteryTypeTranslationId(m),value:m})},p=function(){for(var b=0;b<f.DATETIME_FORMATS.SHORTMONTH.length;b++)a.months[b]={text:f.DATETIME_FORMATS.SHORTMONTH[b],value:b}},q=function(){a.wintermodes=[],a.batteryType.value==j&&a.wintermodes.push({translationId:"ID_357",value:0}),!0===d.match("WINTERMODE_SUPPORTED")&&(a.wintermodes.push({translationId:"ID_358",value:1}),a.wintermodes.push({translationId:"ID_427",value:2}))},r=function(){var b,c;switch(a.minSoCs=[],a.batteryType.value){case j:b=50,c=100;break;case k:b=10,c=100;break;case l:b=5,c=100;break;case m:b=10,c=100;break;default:b=50,c=100}for(g=b;g<=c;g+=5)a.minSoCs.push({text:g.toString(),value:g});a.minSoCDynamic.show?(void 0===a.minSoCs[0].translationId&&a.minSoCs.unshift({translationId:"ID_433",value:"dynamic"}),h.delDataWr(a.chargeTimeStart),h.delDataWr(a.chargeTimeEnd)):void 0!==a.minSoCs[0].translationId&&a.minSoCs.shift()},s=function(){if(!0===a.minSoCDynamic.value&&a.weatherForecast.show&&!0===a.weatherForecast.value)a.minSoCAutomaticViewValue.value="dynamic";else{var b=!1;a.minSoCs.forEach(function(c){if(c.value==a.minSoCAutomatic.value)return void(b=!0)}),a.minSoCAutomaticViewValue.value=!0===b?a.minSoCAutomatic.value:a.minSoCs[0].value}a.onChangeMinSoCAutomaticViewValue()};a.onChangeBatteryType=function(){n(),r(),q(),s()},a.onChangeMinSoCAutomaticViewValue=function(){"dynamic"==a.minSoCAutomaticViewValue.value?(a.minSoCAutomatic.value=a.minSoCs[1].value,a.minSoCDynamic.value=!0):(a.minSoCAutomatic.value=a.minSoCAutomaticViewValue.value,a.minSoCDynamic.value=!1)},a.onWeatherForecastChange=function(){n(),r(),s()},a.onChangeWintermode=function(){n(),r()},a.submitForm=function(){c.submitHelper(h.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(h.getDataWr(),function(){a.form.$setPristine()})},h.getDataRd(0).then(null,function(){a.$emit("kbPageLoadFailed")},function(){n(),h.getDataWr().then(function(){n(),h.getDataWr().then(function(){n(),r(),o(),p(),q(),s(),a.form.$setPristine(),a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")})},function(){a.$emit("kbPageLoadFailed")})}),a.$on("$destroy",function(){h.clear()})}]),angular.module("kbApp.pages.settings.communication.inverter-address",[]).controller("settings-communication-inverter-addressCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.inverterAddress={dxsId:117441025},e.addDataWr(a.inverterAddress),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})},e.getDataWr().then(function(){a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.settings.communication.modem",[]).controller("settings-communication-modemCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.publicLineNum={dxsId:117441282},a.gsmPin={dxsId:117441283,value:""},a.gsmSigQual={dxsId:117441284},a.modem="",a.modem_trans_id="ID_377",a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})};var f=function(){var b="NO_MODEM";return d.match("MODEM_SLOT_PRESENT & MODEM_PRESENT & MODEM_GSM")?(b="GSM_MODEM",a.modem_trans_id="ID_379"):d.match("MODEM_SLOT_PRESENT & MODEM_PRESENT")?(b="ANALOG_MODEM",a.modem_trans_id="ID_378"):(b="NO_MODEM",a.modem_trans_id="ID_377"),b},g=function(){var c=f();if(c!=a.modem)switch(e.clear(),e=b.getInstance(),c){case"ANALOG_MODEM":e.addDataWr(a.publicLineNum),e.getDataWr().then(function(){a.modem=c,a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")});break;case"GSM_MODEM":e.addDataWr(a.gsmPin),e.addDataRd(a.gsmSigQual),e.getDataRd().then(null,function(){a.$emit("kbPageLoadFailed")},function(){a.modem=c,a.$emit("kbPageLoaded")});break;default:a.modem=c,a.$emit("kbPageLoaded")}};g(),a.$watch(function(){return f()},function(a,b){a!==b&&g()}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.settings.communication.network",[]).controller("settings-communication-networkCtrl",["$scope","dxsService","kbAppPageService",function(a,b,c){var d=b.getInstance();a.settingIpAuto={dxsId:117440769},d.addDataWr(a.settingIpAuto),a.settingIp1={dxsId:117440770},d.addDataWr(a.settingIp1),a.settingIp2={dxsId:117440771},d.addDataWr(a.settingIp2),a.settingIp3={dxsId:117440772},d.addDataWr(a.settingIp3),a.settingIp4={dxsId:117440773},d.addDataWr(a.settingIp4),a.settingSubnetmask1={dxsId:117440774},d.addDataWr(a.settingSubnetmask1),a.settingSubnetmask2={dxsId:117440775},d.addDataWr(a.settingSubnetmask2),a.settingSubnetmask3={dxsId:117440776},d.addDataWr(a.settingSubnetmask3),a.settingSubnetmask4={dxsId:117440777},d.addDataWr(a.settingSubnetmask4),a.settingGateway1={dxsId:117440779},d.addDataWr(a.settingGateway1),a.settingGateway2={dxsId:117440780},d.addDataWr(a.settingGateway2),a.settingGateway3={dxsId:117440781},d.addDataWr(a.settingGateway3),a.settingGateway4={dxsId:117440782},d.addDataWr(a.settingGateway4),a.settingExtGateway={dxsId:117440778},d.addDataWr(a.settingExtGateway),a.dns2_1={dxsId:117440787},d.addDataWr(a.dns2_1),a.dns2_2={dxsId:117440788},d.addDataWr(a.dns2_2),a.dns2_3={dxsId:117440789},d.addDataWr(a.dns2_3),a.dns2_4={dxsId:117440790},d.addDataWr(a.dns2_4),a.netInfoIp1={dxsId:117440791},d.addDataRd(a.netInfoIp1),a.netInfoIp2={dxsId:117440792},d.addDataRd(a.netInfoIp2),a.netInfoIp3={dxsId:117440793},d.addDataRd(a.netInfoIp3),a.netInfoIp4={dxsId:117440794},d.addDataRd(a.netInfoIp4),a.netInfoSubnetmask1={dxsId:117440795},d.addDataRd(a.netInfoSubnetmask1),a.netInfoSubnetmask2={dxsId:117440796},d.addDataRd(a.netInfoSubnetmask2),a.netInfoSubnetmask3={dxsId:117440797},d.addDataRd(a.netInfoSubnetmask3),a.netInfoSubnetmask4={dxsId:117440798},d.addDataRd(a.netInfoSubnetmask4),a.netInfoGateway1={dxsId:117440799},d.addDataRd(a.netInfoGateway1),a.netInfoGateway2={dxsId:117440800},d.addDataRd(a.netInfoGateway2),a.netInfoGateway3={dxsId:117440801},d.addDataRd(a.netInfoGateway3),a.netInfoGateway4={dxsId:117440802},d.addDataRd(a.netInfoGateway4),a.netInfoDns1_1={dxsId:117440803},d.addDataRd(a.netInfoDns1_1),a.netInfoDns1_2={dxsId:117440804},d.addDataRd(a.netInfoDns1_2),a.netInfoDns1_3={dxsId:117440805},d.addDataRd(a.netInfoDns1_3),a.netInfoDns1_4={dxsId:117440806},d.addDataRd(a.netInfoDns1_4),a.netInfoDns2_1={dxsId:117440807},d.addDataRd(a.netInfoDns2_1),a.netInfoDns2_2={dxsId:117440808},d.addDataRd(a.netInfoDns2_2),a.netInfoDns2_3={dxsId:117440809},d.addDataRd(a.netInfoDns2_3),a.netInfoDns2_4={dxsId:117440810},d.addDataRd(a.netInfoDns2_4),a.netInfoMacAddress={dxsId:117440811},d.addDataRd(a.netInfoMacAddress),a.submitForm=function(){c.submitHelper(d.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(d.getDataWr(),function(){a.form.$setPristine()})},d.getDataWr().then(function(){d.getDataRd(1e3).then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")})},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.settings.communication.rs485",[]).controller("settings-communication-rs485Ctrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.inverterAddress={dxsId:117441025},e.addDataRd(a.inverterAddress),a.rs485Termination={dxsId:117441027},e.addDataWr(a.rs485Termination),a.rs485Preload={dxsId:117441026},e.addDataWr(a.rs485Preload),d.match("PIKO_FUTURE")&&(a.rs485Mode={dxsId:117441028},e.addDataWr(a.rs485Mode),a.rs485Baudrate={dxsId:117441029},e.addDataWr(a.rs485Baudrate),a.rs485Modes=[{translationId:"ID_415",value:0},{translationId:"ID_416",value:1}],a.rs485Baudrates=[{text:"9600",value:9600},{text:"19200",value:19200}]),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})},e.getDataWr().then(function(){e.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")})},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.settings.data-logger",[]).controller("settings-data-loggerCtrl",["$scope","dxsService","kbAppProperties","kbAppPageService",function(a,b,c,d){a.logintervals=[],c.match("PIKO_FUTURE")&&a.logintervals.push({text:"5",value:300}),a.logintervals.push({text:"15",value:900}),a.logintervals.push({text:"60",value:3600});var e=b.getInstance();a.selLoginterval={dxsId:150995968},e.addDataWr(a.selLoginterval),a.submitForm=function(){d.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){d.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})},e.getDataWr().then(function(){a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.settings.general.date-time",[]).controller("settings-general-date-timeCtrl",["$scope","dxsService","kbAppPageService","utilService",function(a,b,c,d){var e=b.getInstance();a.unixTimestamp={dxsId:268436225,value:1262304e3},e.addDataWr(a.unixTimestamp),a.date=new Date(a.unixTimestamp.value),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine(),a.date=d.unixTimeStampToDate(a.unixTimestamp.value)})},a.setDateToPcTime=function(){a.date=new Date,a.unixTimestamp.value=d.dateToUnixTimestamp(a.date),a.form.$setDirty()},e.getDataWr().then(function(){a.$emit("kbPageLoaded"),a.date=d.unixTimeStampToDate(a.unixTimestamp.value)},function(){a.$emit("kbPageLoadFailed")}),a.dateChangeCB=function(){a.unixTimestamp.value=d.dateToUnixTimestamp(a.date)},a.$on("$destroy",function(){e.clear()})}]).config(["ngQuickDateDefaultsProvider",function(a){a.set("parseDateFunction",function(a){var b=moment();return angular.isString(a)?b=moment(a,"DD.MM.YYYY HH:mm"):angular.isDate(a)&&(b=moment(a)),b.year()<1970?b=moment("01.01.1970 00:00:00","DD.MM.YYYY HH:mm:ss"):b.year()>2050&&(b=moment("01.01.2050 00:00:00","DD.MM.YYYY HH:mm:ss")),b.toDate()}),a.set("closeButtonHtml",'<i class="icon-close"></i>'),a.set("prevLinkHtml",'<i class="icon-arrow-left"></i>'),a.set("nextLinkHtml",'<i class="icon-arrow-right"></i>'),a.set("buttonIconHtml",'<i class="icon-calendar"></i>')}]),angular.module("kbApp.pages.settings.general.inverter-name",[]).controller("settings-general-inverter-nameCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.InverterName={dxsId:16777984},e.addDataWr(a.InverterName),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})},e.getDataWr().then(function(){a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.settings.general.login",[]).controller("settings-general-loginCtrl",["$scope","dxsService","kbAppPageService",function(a,b,c){var d=b.getInstance();a.OldPwd="",a.NewPwd="",a.NewPwdRepeat="";var e={dxsId:16780800,enc:!0,value:""};d.addDataWr(e),a.submitForm=function(){e.value=a.OldPwd+";"+a.NewPwd,c.submitHelper(d.setDataWr(),function(){a.form.$setPristine(),a.OldPwd="",a.NewPwd="",a.NewPwdRepeat=""})},a.resetForm=function(){a.form.$setPristine(),a.OldPwd="",a.NewPwd="",a.NewPwdRepeat=""},a.$emit("kbPageLoaded"),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.settings.generator-configuration",[]).controller("settings-generator-configurationCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.parallelConnection={dxsId:33556481,value:!1},d.match("PARALLEL_CONNECTION")&&e.addDataWr(a.parallelConnection),a.generatorManagementSelect="default",a.generatorManagements=[],a.generatorManagements.push({text:"-",value:"default"}),a.shadingTracker={dxsId:33556483,value:0,string1:!1,string2:!1,string3:!1},d.match("SHADING_TRACKER_STRING_1 | SHADING_TRACKER_STRING_2 | SHADING_TRACKER_STRING_3")&&(e.addDataWr(a.shadingTracker),a.generatorManagements.push({translationId:"ID_435",value:"shadow_tracking"})),a.pvModuleRegulation={dxsId:33556482},d.match("PV_MODULE_REGULATION")&&(e.addDataWr(a.pvModuleRegulation),a.generatorManagements.push({translationId:"ID_423",value:"pv_module_regulation"}));var f=function(){angular.isDefined(a.shadingTracker.value)&&0!==a.shadingTracker.value?(a.generatorManagementSelect="shadow_tracking",1&a.shadingTracker.value&&(a.shadingTracker.string1=!0),2&a.shadingTracker.value&&(a.shadingTracker.string2=!0),4&a.shadingTracker.value&&(a.shadingTracker.string3=!0)):angular.isDefined(a.pvModuleRegulation.value)&&!0===a.pvModuleRegulation.value?a.generatorManagementSelect="pv_module_regulation":a.generatorManagementSelect="default"};a.generatorManagementSelectChange=function(){switch(a.generatorManagementSelect){case"default":a.shadingTracker.string1=!1,a.shadingTracker.string2=!1,a.shadingTracker.string3=!1,a.pvModuleRegulation.value=!1;break;case"shadow_tracking":a.shadingTracker.string1=!1,a.shadingTracker.string2=!1,a.shadingTracker.string3=!1,d.match("SHADING_TRACKER_STRING_1")&&!1===a.parallelConnection.value&&(a.shadingTracker.string1=!0),d.match("SHADING_TRACKER_STRING_2")&&!1===a.parallelConnection.value&&(a.shadingTracker.string2=!0),d.match("SHADING_TRACKER_STRING_3")&&(a.shadingTracker.string3=!0),a.pvModuleRegulation.value=!1;break;case"pv_module_regulation":a.shadingTracker.string1=!1,a.shadingTracker.string2=!1,a.shadingTracker.string3=!1,a.pvModuleRegulation.value=!0;break;default:a.shadingTracker.string1=!1,a.shadingTracker.string2=!1,a.shadingTracker.string3=!1,a.pvModuleRegulation.value=!1}},a.$watch("shadingTracker",function(b,c){angular.isUndefined(c)||(a.shadingTracker.value=0,!0===a.shadingTracker.string1&&(a.shadingTracker.value+=1),!0===a.shadingTracker.string2&&(a.shadingTracker.value+=2),!0===a.shadingTracker.string3&&(a.shadingTracker.value+=4))},!0),a.$watch("parallelConnection.value",function(b){!0===b&&(a.shadingTracker.string1=!1,a.shadingTracker.string2=!1)}),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){f(),a.generatorManagementSelectChange(),a.form.$setPristine()})},e.getDataWr().then(function(){f(),a.form.$setPristine(),a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.settings.overvoltage-protection",[]).controller("settings-overvoltage-protectionCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.overvoltageProtectionDc={dxsId:33556485},d.match("OVERVOLTAGE_PROT_DC")&&e.addDataWr(a.overvoltageProtectionDc),a.overvoltageProtectionAc={dxsId:67110913},d.match("OVERVOLTAGE_PROT_AC")&&e.addDataWr(a.overvoltageProtectionAc),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})},e.getDataWr().then(function(){a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),
angular.module("kbApp.pages.settings.portal-configuration",[]).controller("settings-portal-configurationCtrl",["$scope","dxsService","kbAppPageService","bvService",function(a,b,c,d){var e=b.getInstance(),f=b.getInstance();a.portalCode={dxsId:117441537,readProhibited:!0},a.portalShowDefault=!1,a.portalName={dxsId:117441538},f.addDataRd(a.portalName),a.portalExport={dxsId:117441539},a.lastPortalCon={dxsId:117441542},a.portalShowExtend=!1,a.portalServer={dxsId:117441543},a.portalPort={dxsId:117441544},a.portalUser={dxsId:117441545},a.portalPw={dxsId:117441546,readProhibited:!0,enc:!0,value:"abcd"};var g=function(b){a.portalShowDefault=!1,a.portalShowExtend=!1,f.delDataRd(a.lastPortalCon),f.delDataWr(a.portalExport),f.delDataWr(a.portalServer),f.delDataWr(a.portalPort),f.delDataWr(a.portalUser),f.delDataWr(a.portalPw),b!==undefined&&"-"!==b&&(a.portalShowDefault=!0,f.addDataRd(a.lastPortalCon),f.addDataWr(a.portalExport),"Skytron"===b&&(a.portalShowExtend=!0,f.addDataWr(a.portalServer),f.addDataWr(a.portalPort),f.addDataWr(a.portalUser),f.addDataWr(a.portalPw)),f.getDataWr(),f.getDataRd(1e4))};a.submitPortalCode=function(){e.delDataWr(a.portalCode),angular.isDefined(a.portalCode.value)&&a.portalCode.value.length>4&&e.addDataWr(a.portalCode),c.submitHelper(e.setDataWr(),function(b){"success"===b&&(a.portalCode.value="",f.getDataRd(0).then(null,null,function(){g(a.portalName.value)}))})},a.submitForm=function(){f.delDataWr(a.portalCode),angular.isDefined(a.portalCode.value)&&a.portalCode.value.length>4&&f.addDataWr(a.portalCode),a.portalShowExtend&&(f.delDataWr(a.portalPw),a.form.portalPw.$dirty&&f.addDataWr(a.portalPw)),c.submitHelper(f.setDataWr(),function(b){"success"===b&&(f.getDataRd(0),f.getDataWr(),a.portalCode.value="",a.portalPw.value="abcd",a.form.$setPristine())})},a.resetForm=function(){c.submitHelper(f.getDataWr(),function(){a.form.$setPristine(),a.portalCode.value=""})},f.getDataRd(0).then(null,function(){a.$emit("kbPageLoadFailed")},function(){g(a.portalName.value),a.$emit("kbPageLoaded")}),a.BV=!1,a.$watch("portalCode.value",function(b){"playBV"==b&&(a.BV=!0,d.startBV())}),a.$on("$destroy",function(){f.clear()})}]),angular.module("kbApp.pages.settings.switching-output",[]).controller("settings-switching-outputCtrl",["$scope","dxsService","kbAppPageService","kbAppProperties",function(a,b,c,d){var e=b.getInstance();a.S0Function={dxsId:201326848},e.addDataWr(a.S0Function),a.OwnConsumpCtrlFunction={dxsId:201327105},e.addDataWr(a.OwnConsumpCtrlFunction),a.DelayError={dxsId:201327113},e.addDataWr(a.DelayError),a.DelayErrorEnable={dxsId:201327106},e.addDataWr(a.DelayErrorEnable),a.Fc1PowerThreshold={dxsId:201327107},e.addDataWr(a.Fc1PowerThreshold),a.Fc1ExceedTime={dxsId:201327108},e.addDataWr(a.Fc1ExceedTime),a.Fc1Runtime={dxsId:201327109},e.addDataWr(a.Fc1Runtime),a.Fc1MaxActivationsDay={dxsId:201327110},e.addDataWr(a.Fc1MaxActivationsDay),a.Fc2ThresholdOn={dxsId:201327111},e.addDataWr(a.Fc2ThresholdOn),a.Fc2ThresholdOff={dxsId:201327112},e.addDataWr(a.Fc2ThresholdOff),d.match("BATTERY")&&(a.UseBattery={dxsId:201327114},e.addDataWr(a.UseBattery)),a.switchingOutputOptions=[{translationId:"ID_331",value:0},{translationId:"ID_332",value:1},{translationId:"ID_287",value:2}],d.match("EXT_CURRENT_SENS")&&a.switchingOutputOptions.push({translationId:"ID_288",value:4}),a.submitForm=function(){c.submitHelper(e.setDataWr(),function(){a.form.$setPristine()})},a.resetForm=function(){c.submitHelper(e.getDataWr(),function(){a.form.$setPristine()})},e.getDataWr().then(function(){a.$emit("kbPageLoaded")},function(){a.$emit("kbPageLoadFailed")}),a.$on("$destroy",function(){e.clear()})}]),angular.module("kbApp.pages.statistics.day",[]).controller("statistics-dayCtrl",["$scope","dxsService","kbAppProperties",function(a,b,c){var d=b.getInstance();a.Yield={dxsId:251658754},d.addDataRd(a.Yield),c.match("EXT_CURRENT_SENS")&&(a.HomeConsumption={dxsId:251659010},d.addDataRd(a.HomeConsumption),a.OwnConsumption={dxsId:251659266},d.addDataRd(a.OwnConsumption),a.OwnConsRate={dxsId:251659278},d.addDataRd(a.OwnConsRate),a.AutonomyDegree={dxsId:251659279},d.addDataRd(a.AutonomyDegree)),d.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kbApp.pages.statistics.log-data",[]).controller("statistics-log-dataCtrl",["$scope","$q","$http","kbAppPageService","utilService","KbError","KbErrorTypes",function(a,b,c,d,e,f,g){var h=function(){var a=b.defer();return c({url:"/LogDaten.dat",method:"GET"}).then(function(b){a.resolve(),e.serveDataToFile(b.data,"LogData.dat")},function(b){401==b.status?a.reject(new f("No Authentication",g.ERR_AUTHENTICATION)):a.reject(new f("Internal Error",g.ERR_INTERNAL))}),a.promise};d.submitHelper(h()),a.$emit("kbPageLoaded")}]),angular.module("kbApp.pages.statistics.total",[]).controller("statistics-totalCtrl",["$scope","dxsService","kbAppProperties",function(a,b,c){var d=b.getInstance();a.Yield={dxsId:251658753},d.addDataRd(a.Yield),a.OperatingTime={dxsId:251658496},d.addDataRd(a.OperatingTime),c.match("EXT_CURRENT_SENS")&&(a.HomeConsumption={dxsId:251659009},d.addDataRd(a.HomeConsumption),a.OwnConsumption={dxsId:251659265},d.addDataRd(a.OwnConsumption),a.OwnConsRate={dxsId:251659280},d.addDataRd(a.OwnConsRate),a.AutonomyDegree={dxsId:251659281},d.addDataRd(a.AutonomyDegree)),d.getDataRd().then(null,null,function(b){!0===b&&a.$emit("kbPageLoaded")}),a.$on("$destroy",function(){d.clear()})}]),angular.module("kb-elements",["kb-elements.select"]);var kbSelect=angular.module("kb-elements.select",[]);kbSelect.run(["$templateCache",function(a){a.put("kbElements/templates/select/selectItem.html",[].join(""))}]),kbSelect.directive("kbSelect",["kbSelectService","$translate","$rootScope",function(a,b,c){return{template:'<div class="kb-select"><span></span><i class="icon-arrow-small-down"></i><ul class="dropdown"><li kb-select-item="item" ng-repeat="item in itemList"/></ul></div>',restrict:"E",replace:!0,require:"ngModel",scope:{itemList:"=",ngModel:"="},link:function(d,e,f,g){function h(a){for(var b="",c=0;c<d.itemList.length;c++){var e=d.itemList[c];if(e.value==a){b=angular.copy(e);break}}return b}function i(a){var b="";return angular.isDefined(a.value)&&(b=angular.copy(a.value)),b}!1===angular.isDefined(d.itemList)&&(d.itemList=[]),g.$setPristine(),a.register(e),e.bind("click",function(b){b.stopPropagation(),a.toggleActive(e)}),d.$on("$destroy",function(){a.unregister(e)}),g.$validators.itemInItemlist=function(a){for(var b=0;b<d.itemList.length;b++){if(d.itemList[b].value==a)return!0}return!1},g.$render=function(){angular.isDefined(g.$viewValue.text)?e.find("span").text(g.$viewValue.text):angular.isDefined(g.$viewValue.translationId)&&e.find("span").text(b.instant(g.$viewValue.translationId))},c.$on("$translateChangeSuccess",function(){g.$render()}),d.$watch("itemList",function(){for(var a=0;a<d.itemList.length;a++){var b=d.itemList[a];if(b.value==d.ngModel){d.selectItem(b),g.$render();break}}},!0),g.$formatters.push(h),g.$parsers.push(i),d.selectItem=function(a){a!==g.$viewValue&&(angular.isDefined(a)&&angular.isDefined(a.value)?g.$setViewValue(angular.copy(a)):g.$render())},g.$viewChangeListeners.push(function(){g.$render()})},controller:["$scope","$element",function(a,b){this.select=function(b){a.selectItem(b)}}]}}]),kbSelect.directive("kbSelectItem",[function(){return{template:'<li><a ng-click="selectItem()">{{kbSelectItem.text}}{{kbSelectItem.translationId | translate}}</a></li>',require:"^kbSelect",restrict:"A",replace:!0,scope:{kbSelectItem:"="},link:function(a,b,c,d){a.selectItem=function(){d.select(a.kbSelectItem)}}}}]),kbSelect.factory("kbSelectService",["$document",function(a){var b=a.find("body"),c={},d=[];return b.bind("click",function(){angular.forEach(d,function(a){a.removeClass("active")})}),c.register=function(a){d.push(a)},c.unregister=function(a){var b;(b=d.indexOf(a))>-1&&d.splice(b,1)},c.toggleActive=function(a){angular.forEach(d,function(b){b!==a&&b.removeClass("active")}),a.toggleClass("active")},c}]),angular.module("templates-app",[]).run(["$templateCache",function(a){a.put("language/languageSelectItem.tpl.html",'<div id="languageSelectItem">\n   <a href="" ng-click="selectLanguage(language)">\n      <div ng-class="\'img_language_flags_f_\' + language"></div>\n   </a>\n</div>'),a.put("navigation/navigationBreadcrumb.tpl.html",'<div class="breadcrumb">\n   <div class="breadcrumbAnchor"></div>\n   <div ng-repeat="node in breadcrumbs">\n      <p class="breadcrumbItem" translate="{{\'ID_\'+node.textId}}"></p>\n\n      <div ng-class="{\'breadcrumbSeparator\':!$last}"></div>\n   </div>\n</div>'),a.put("navigation/navigationNav.tpl.html",'<ul>\n   <kb-navigation-node ng-repeat="node in nodes" node="node"></kb-navigation-node>\n</ul>\n'),a.put("navigation/navigationNavNode.tpl.html",'<li ng-show="showNode(node.options)" ng-class="{separation: node.options.separation}">\n   <div ng-if="node.nodes.length <= 0">\n      <a href="{{\'#\'+node.path}}" ng-class="{\'active\':isActive()}">\n         <i ng-if="node.icon != \'\'" class="{{node.icon}}"></i>\n         <div translate="{{\'ID_\'+node.textId}}"></div>\n      </a>\n   </div>\n\n   <div ng-if="node.nodes.length > 0">\n      <a ng-click="toggleCollapse()">\n         <i ng-if="node.icon != \'\'" class="{{node.icon}}"></i>\n         <div translate="{{\'ID_\'+node.textId}}"></div>\n      </a>\n   </div>\n\n   <ul ng-if="node.nodes.length > 0">\n      <kb-navigation-node ng-repeat="node in node.nodes" node="node">\n   </ul>\n</li>'),a.put("pages/current-values/analog-inputs/current-values-analog-inputs.tpl.html",'<fieldset>\n   <div class="row">\n      <label translate="ID_307"></label><div class="value">{{Analog1.value | kbDynUnit:\'V\':100:2}}</div>\n   </div>\n   <div class="row">\n      <label class="label" translate="ID_308"></label><div class="value">{{Analog2.value | kbDynUnit:\'V\':100:2}}</div>\n   </div>\n   <div class="row">\n      <label class="label" translate="ID_309"></label><div class="value">{{Analog3.value | kbDynUnit:\'V\':100:2}}</div>\n   </div>\n   <div class="row">\n      <label class="label" translate="ID_310"></label><div class="value">{{Analog4.value | kbDynUnit:\'V\':100:2}}</div>\n   </div>\n</fieldset>'),a.put("pages/current-values/battery/current-values-battery.tpl.html",'<fieldset>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{Voltage.value | kbDynUnit:\'V\':1000}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_198"></label><div class="value">{{Charge.value | kbDynUnit:\'%\':101:1}}</div>\n   </div>\n   <div class="row">\n      <label ng-if="CurrentDir.value == 0" translate="ID_199"></label><label ng-if="CurrentDir.value != 0" translate="ID_242"></label><div class="value">{{Current.value | kbDynUnit:\'A\':100:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_267"></label><div class="value">{{ChargeCycles.value | kbDynUnit:\'\':1000000}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_44"></label><div class="value">{{Temperature.value | kbDynUnit:\'°C\':1000:1}}</div>\n   </div>\n</fieldset>'),a.put("pages/current-values/grid/current-values-grid.tpl.html",'<fieldset>\n   <legend translate="ID_265"></legend>\n   <div class="row">\n      <label translate="ID_34"></label><div class="value">{{GridOutputPower.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_83"></label><div class="value">{{GridFreq.value | kbDynUnit:\'Hz\':1000:1}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("PIKO_FUTURE")\'>\n      <label translate="ID_395"></label><div class="value">{{GridCosPhi.value | kbDynUnit:\'\':10:2}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_266"></label><div class="value">{{GridLimitation.value | kbDynUnit:\'%\':101:1}}</div>\n   </div>\n</fieldset>\n\n<fieldset>\n   <legend translate="ID_208"></legend>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{GridVoltageL1.value | kbDynUnit:\'V\':1000:0}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_40"></label><div class="value">{{GridCurrentL1.value | kbDynUnit:\'A\':100:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_42"></label><div class="value">{{GridPowerL1.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>\n\n<fieldset ng-if=\'appIsMatchingProperties("3_PHASE")\'>\n   <legend translate="ID_209"></legend>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{GridVoltageL2.value | kbDynUnit:\'V\':1000:0}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_40"></label><div class="value">{{GridCurrentL2.value | kbDynUnit:\'A\':100:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_42"></label><div class="value">{{GridPowerL2.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>\n\n<fieldset ng-if=\'appIsMatchingProperties("3_PHASE")\'>\n   <legend translate="ID_210"></legend>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{GridVoltageL3.value | kbDynUnit:\'V\':1000:0}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_40"></label><div class="value">{{GridCurrentL3.value | kbDynUnit:\'A\':100:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_42"></label><div class="value">{{GridPowerL3.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>'),a.put("pages/current-values/home/current-values-home.tpl.html",'<fieldset>\n   <legend translate="ID_391"></legend>\n   <div class="row">\n      <label translate="ID_201"></label><div class="value">{{AktHomeConsumptionSolar.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_200"></label><div class="value">{{AktHomeConsumptionBat.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_202"></label><div class="value">{{AktHomeConsumptionGrid.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>\n\n<fieldset>\n   <legend translate="ID_392"></legend>\n   <div class="row">\n      <label translate="ID_208"></label><div class="value">{{PhaseSelHomeConsumpL1.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_209"></label><div class="value">{{PhaseSelHomeConsumpL2.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_210"></label><div class="value">{{PhaseSelHomeConsumpL3.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>'),a.put("pages/current-values/pv-generator/current-values-pv-generator.tpl.html",'<fieldset>\n   <legend translate="ID_2"></legend>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{dc1Voltage.value | kbDynUnit:\'V\':10000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_40"></label><div class="value">{{dc1Current.value | kbDynUnit:\'A\':100:2}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_42"></label><div class="value">{{dc1Power.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>\n<fieldset ng-if=\'appIsMatchingProperties("STRING_2")\'>\n   <legend translate="ID_3"></legend>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{dc2Voltage.value | kbDynUnit:\'V\':10000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_40"></label><div class="value">{{dc2Current.value | kbDynUnit:\'A\':100:2}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_42"></label><div class="value">{{dc2Power.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>\n<fieldset ng-if=\'appIsMatchingProperties("STRING_3")\'>\n   <legend translate="ID_4"></legend>\n   <div class="row">\n      <label translate="ID_38"></label><div class="value">{{dc3Voltage.value | kbDynUnit:\'V\':10000:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_40"></label><div class="value">{{dc3Current.value | kbDynUnit:\'A\':100:2}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_42"></label><div class="value">{{dc3Power.value | kbDynUnit:\'W\':1000:1}}</div>\n   </div>\n</fieldset>'),a.put("pages/current-values/s0-in/current-values-s0-in.tpl.html",'<fieldset>\n   <div class="row">\n      <label translate="ID_350"></label><div class="value"><div>{{S0InPulseCnt.value}} / {{LogintervalReadable}}</div>\n   </div>\n</div></fieldset>'),a.put("pages/home/home.tpl.html",'<form name="form" novalidate>\n   \n   <fieldset>\n      <legend translate="ID_31"></legend>\n      \n      <div class="row">\n         <label translate="ID_1"></label><div class="value">{{dcPowerPV.value | kbDynUnit:\'W\':10000:1}}</div>\n      </div>\n      \n      <div class="row">\n         <label translate="ID_34"></label><div class="value">{{acPower.value | kbDynUnit:\'W\':10000:1}}</div>\n      </div>\n      \n      <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n         <label translate="ID_273"></label><div class="value">{{ownConsumption.value | kbDynUnit:\'W\':10000:1}}</div>\n      </div>\n   </fieldset>\n   \n   <fieldset ng-if=\'appIsMatchingProperties("BATTERY")\'>\n      <legend translate="ID_200"></legend>\n      \n      <div class="row">\n         <label translate="ID_198"></label><div class="value">{{batStateOfCharge.value | kbDynUnit:\'%\':101:1}}</div>\n      </div>\n   </fieldset>\n   \n   <fieldset>\n      <legend translate="ID_49"></legend>\n      \n      <div class="row">\n         <label translate="ID_388"></label><div class="value">{{operatingStatusTranslationId | translate}}</div>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/info/events/info-events.tpl.html",'<fieldset>\n   <table ng-if="EventCnt > 0" class="table">\n      <tr>\n         <th></th>\n         <th translate="ID_386"></th>\n         <th translate="ID_229"></th>\n      </tr>\n      <tr ng-repeat="Event in Events">\n         <td>{{$index + 1}}</td>\n         <td>{{Event.date | date:\'dd.M.yyyy H:mm\'}}</td>\n         <td>{{Event.code}} ( {{Event.env}} )</td>\n      </tr>\n   </table>\n   <table ng-if="EventCnt <= 0" class="table">\n      <tr>\n         <th translate="ID_387"></th>\n      </tr>\n   </table>\n</fieldset>'),a.put("pages/info/versions/info-versions.tpl.html",'<fieldset>\n   <div class="row">\n      <label translate="ID_75"></label><div class="value">{{VersionUI.value}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_74"></label><div class="value">{{VersionFW.value}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_73"></label><div class="value">{{VersionHW.value}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_76"></label><div class="value">{{VersionPAR.value}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_21"></label><div class="value">{{SerialNumber.value}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_314"></label><div class="value">{{ArticelNumber.value}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_215"></label><div class="value">{{CountrySettingsName.value}}</div><div class="value">&nbsp({{CountrySettingsVersion.value}})</div>\n   </div>\n</fieldset>'),a.put("pages/login/login.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         \n         <label translate="ID_365"></label>\n         <kb-select ng-model="userSelected" item-list="userList"></kb-select>\n      </div>\n\n      \n      <div ng-show="userSelected == \'user\'">\n         <div class="row">\n            \n            <label translate="ID_71"></label>\n            <input type="text" name="userName" ng-model="userName.value" ng-maxlength="16">\n            <div class="info-error" ng-messages="form.userName.$error" ng-if="form.userName.$dirty">\n               <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            </div>\n         </div>\n         <div class="row">\n            \n            <label translate="ID_72"></label>\n            <input type="password" name="password" ng-model="password.value" ng-maxlength="16">\n            <div class="info-error" ng-messages="form.password.$error" ng-if="form.password.$dirty">\n               <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            </div>\n         </div>\n      </div>\n\n      \n      <div ng-show="userSelected == \'installer\'">\n         <div class="row">\n            \n            <label translate="ID_155"></label>\n            <input type="password" name="servicecode" ng-model="servicecode.value" ng-maxlength="16">\n            <div class="info-error" ng-messages="form.servicecode.$error" ng-if="form.servicecode.$dirty">\n               <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            </div>\n         </div>\n      </div>\n\n      <div class="bottomframe">\n         <button translate="ID_315" class="right" type="submit" ng-click="login(userSelected)" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/logout/logout.tpl.html",""),a.put("pages/settings/analog-inputs/settings-analog-inputs.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label translate="ID_344"></label>\n         <kb-select ng-model="mode.value" item-list="modes"></kb-select>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),
a.put("pages/settings/battery-configuration/settings-battery-configuration.tpl.html",'<form name="form" novalidate>\n   \n   <div ng-show="false">\n   <style>\n      .show-true{\n         background-color: #b0ca33;\n         padding-left: 10px;\n         font-weight: bold;\n      }\n      .show-false{\n         background-color: lightcoral;\n         padding-left: 10px;\n         font-weight: bold;\n      }\n      </style>\n      <label><input type="checkbox" ng-model="debugEnable" ng-init="debugEnable=true"> Debug Output Enable</label>\n      <div></div>\n      <fieldset ng-show="debugEnable">\n         <div class="row">\n            <label>batteryType</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': batteryType.show , \'show-false\': !batteryType.show}">{{batteryType.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>dischargeHysteresisOn</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': dischargeHysteresisOn.show , \'show-false\': !dischargeHysteresisOn.show}">{{dischargeHysteresisOn.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>wintermode</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': wintermode.show , \'show-false\': !wintermode.show}">{{wintermode.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>eps</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': eps.show , \'show-false\': !eps.show}">{{eps.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>weatherForecast</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': weatherForecast.show , \'show-false\': !weatherForecast.show}">{{weatherForecast.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>chargeTimeStart</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': chargeTimeStart.show , \'show-false\': !chargeTimeStart.show}">{{chargeTimeStart.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>chargeTimeEnd</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': chargeTimeEnd.show , \'show-false\': !chargeTimeEnd.show}">{{chargeTimeEnd.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>maintenanceCharge</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': maintenanceCharge.show , \'show-false\': !maintenanceCharge.show}">{{maintenanceCharge.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>minSoCManual</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': minSoCManual.show , \'show-false\': !minSoCManual.show}">{{minSoCManual.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>minSoCManualInc</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': minSoCManualInc.show , \'show-false\': !minSoCManualInc.show}">{{minSoCManualInc.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>minSoCManualIncStart</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': minSoCManualIncStart.show , \'show-false\': !minSoCManualIncStart.show}">{{minSoCManualIncStart.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>minSoCManualIncEnd</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': minSoCManualIncEnd.show , \'show-false\': !minSoCManualIncEnd.show}">{{minSoCManualIncEnd.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>minSoCAutomatic</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': minSoCAutomatic.show , \'show-false\': !minSoCAutomatic.show}">{{minSoCAutomatic.value}}</label>\n            </div>\n         </div>\n         <div class="row">\n            <label>minSoCDynamic</label>\n            <div class="value">\n               <label ng-class="{\'show-true\': minSoCDynamic.show , \'show-false\': !minSoCDynamic.show}">{{minSoCDynamic.value}}</label>\n            </div>\n         </div>\n      </fieldset>\n   </div>\n\n\n\n\n   <fieldset>\n      \n      <div class="row" ng-if="batteryType.show">\n         <label translate="ID_449"></label>\n         <div class="value">\n            <kb-select ng-model="batteryType.value" item-list="batteryTypes" ng-change="onChangeBatteryType()" style="width: 120px"></kb-select>\n         </div>\n      </div>\n      \n      <div class="row" ng-if="!batteryType.show">\n         <label translate="ID_449"></label>\n         <div class="value">\n            <label translate="{{getBatteryTypeTranslationId(batteryType.value)}}"></label>\n         </div>\n      </div>\n\n      \n      <div class="row" ng-if="dischargeHysteresisOn.show">\n         <label translate="ID_425"></label>\n         <div class="value">\n            <input type="text" kb-integer="50-10000" class="medium" name="BatDischargeHysteresisOn" ng-model="dischargeHysteresisOn.value">\n         </div>\n         <label>W</label>\n         <div class="info-error" ng-messages="form.BatDischargeHysteresisOn.$error" ng-if="form.BatDischargeHysteresisOn.$dirty">\n            <div ng-message="integer"><span>{{"ID_400"| translate}} (50-10000W)</span></div> \n         </div>\n      </div>\n      \n      <div class="row" ng-if="wintermode.show">\n         <label translate="ID_436"></label>\n         <div class="value">\n            <kb-select class="validate-on-pristine" ng-model="wintermode.value" item-list="wintermodes" ng-change="onChangeWintermode()"></kb-select>\n         </div>\n      </div>\n      \n      <div class="row" ng-if="eps.show">\n         <label translate="ID_303"></label>\n         <div class="value">\n            <input type="checkbox" name="EPS" ng-model="eps.value">\n         </div>\n      </div>\n\n      \n      <fieldset ng-if="weatherForecast.show || chargeTimeStart.show || chargeTimeEnd.show || maintenanceCharge.show">\n         <legend translate="ID_428"></legend>\n         \n         <div class="row" ng-if="weatherForecast.show">\n            <label translate="ID_437"></label>\n            <div class="value">\n               <input type="checkbox" name="weatherForecast" ng-model="weatherForecast.value" ng-change="onWeatherForecastChange()">\n            </div>\n         </div>\n         \n         <div class="row" ng-if="chargeTimeStart.show || chargeTimeEnd.show">\n            <label translate="ID_276"></label>\n            <div class="value">\n               <input ng-if="chargeTimeStart.show" type="text" kb-time class="time" name="chargeTimeStart" ng-model="chargeTimeStart.value"> -\n               <input ng.if="chargeTimeEnd.show" type="text" kb-time class="time" name="chargeTimeEnd" ng-model="chargeTimeEnd.value">\n            </div>\n         </div>\n         \n         <div class="row" ng-if="maintenanceCharge.show">\n            <label translate="ID_234"></label>\n            <input type="checkbox" id="maintenanceCharge" name="maintenanceCharge" ng-model="maintenanceCharge.value">\n            <label for="maintenanceCharge" translate="ID_240"></label>\n         </div>\n      </fieldset>\n      \n      \n      <fieldset ng-if=" minSoCManual.show || minSoCManualInc.show || minSoCManualIncStart.show || minSoCManualIncEnd.show">\n         <legend translate="ID_429"></legend>\n         \n         <div class="row">\n            <label translate="ID_430"></label>\n         </div>\n\n         \n         <div class="row">\n            <div class="indent"></div>\n            <label translate="ID_431"></label>\n            <div class="value">\n               <kb-select class="validate-on-pristine" ng-model="minSoCManual.value" item-list="minSoCs" style="width: 70px"></kb-select>\n               <span>%</span>\n               <label translate="ID_434" style="width: auto; margin-left: 20px; margin-right: 20px"></label>\n               <kb-select class="validate-on-pristine" ng-model="minSoCManualIncEnd.value" item-list="months" style="width: 70px"></kb-select>\n            </div>\n         </div>\n         \n         <div class="row">\n            <div class="indent"></div>\n            <label translate="ID_432"></label>\n            <div class="value">\n               <kb-select class="validate-on-pristine" ng-model="minSoCManualInc.value" item-list="minSoCs" style="width: 70px"></kb-select>\n               <span>%</span>\n               <label translate="ID_434" style="width: auto; margin-left: 20px; margin-right: 20px"></label>\n               <kb-select class="validate-on-pristine" ng-model="minSoCManualIncStart.value" item-list="months" style="width: 70px"></kb-select>\n            </div>\n         </div>\n      </fieldset>\n      \n      <fieldset ng-if="minSoCAutomaticViewValue.show">\n         <legend translate="ID_429"></legend>\n         <div class="row">\n            <label translate="ID_430"></label>\n            <div class="value">\n               <kb-select ng-model="minSoCAutomaticViewValue.value" item-list="minSoCs" ng-change="onChangeMinSoCAutomaticViewValue()" style="width: 120px"></kb-select>\n               <span ng-if="minSoCDynamic.value === false">%</span>\n            </div>\n         </div>\n      </fieldset>\n\n\n\n\n\n\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/communication/inverter-address/settings-communication-inverter-address.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label translate="ID_319"></label>\n         <input ng-if=\'!appIsMatchingProperties("MODBUS")\' type="text" kb-integer="1-220,255" kb-max-length="3" class="small" name="inverterAddress" ng-model="inverterAddress.value">\n         <input ng-if=\'appIsMatchingProperties("MODBUS")\' type="text" kb-integer="1-247" kb-max-length="3" class="small" name="inverterAddress" ng-model="inverterAddress.value">\n         <div class="info-error" ng-messages="form.inverterAddress.$error" ng-if="form.inverterAddress.$dirty">\n            <div ng-if=\'!appIsMatchingProperties("MODBUS")\' ng-message="integer"><span>{{"ID_400"| translate}} (1-220, 255)</span></div> \n            <div ng-if=\'appIsMatchingProperties("MODBUS")\' ng-message="integer"><span>{{"ID_400"| translate}} (1-247)</span></div> \n         </div>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/communication/modem/settings-communication-modem.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label translate="ID_144"></label>\n         <div class="value">{{modem_trans_id|translate}}</div>\n      </div>\n      \n      <div class="row" ng-if="modem == \'ANALOG_MODEM\'">\n         <label translate="ID_381"></label>\n         <input type="text" class="small" ng-model="publicLineNum.value" kb-integer="0-9999" maxlength="4">\n      </div>\n      \n      <div class="row" ng-if="modem != \'ANALOG_MODEM\'">\n         <label translate="ID_380"></label>\n         <input name="gsmPin" type="password" class="gsm-pin" ng-model="gsmPin.value" maxlength="4" ng-pattern="/[0-9]{4}/">\n         <div class="info-error" ng-if="form.gsmPin.$dirty && form.gsmPin.$invalid">\n            <div><span>{{"ID_400"| translate}} (0000-9999)</span></div> \n         </div>\n      </div>\n      <div class="row" ng-if="modem == \'GSM_MODEM\'">\n         <label translate="ID_148"></label>\n         <div class="value">\n            <progress-bar bar-value="gsmSigQual.value" frontbarclasses="[0,25,75,100]" backbarclasses="[100]">\n\n            </progress-bar>\n         </div>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/communication/network/settings-communication-network.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <fieldset>\n         <legend translate="ID_323"></legend>\n         \n         <div class="row">\n            <input id="optAutoIpOn" name="optAutoIp" type="radio" ng-model="settingIpAuto.value" ng-value="true">\n            <label for="optAutoIpOn" translate="ID_59"></label>\n         </div>\n         <div class="row">\n            <input id="optAutoIpOff" name="optAutoIp" type="radio" ng-model="settingIpAuto.value" ng-value="false">\n            <label for="optAutoIpOff" translate="ID_326"></label>\n         </div>\n         \n         <div class="row">\n            <div class="indent"></div>\n            <label ng-class="{disabled:ipAuto.value}" translate="ID_60"></label>\n            <input type="text" name="ip1" class="small" ng-disabled="settingIpAuto.value" ng-model="settingIp1.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" name="ip2" class="small" ng-disabled="settingIpAuto.value" ng-model="settingIp2.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" name="ip3" class="small" ng-disabled="settingIpAuto.value" ng-model="settingIp3.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" name="ip4" class="small" ng-disabled="settingIpAuto.value" ng-model="settingIp4.value" kb-integer="0-255" kb-max-length="3">\n         </div>\n         \n         <div class="row">\n            <div class="indent"></div>\n            <label ng-class="{disabled:ipAuto.value}" translate="ID_62"></label>\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingSubnetmask1.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingSubnetmask2.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingSubnetmask3.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingSubnetmask4.value" kb-integer="0-255" kb-max-length="3">\n         </div>\n         \n         <div class="row">\n            <div class="indent"></div>\n            <label ng-class="{disabled:ipAuto.value}" translate="ID_404"></label>\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingGateway1.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingGateway2.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingGateway3.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="settingGateway4.value" kb-integer="0-255" kb-max-length="3">\n         </div>\n         \n         <div class="row">\n            <div class="indent"></div>\n            <label ng-class="{disabled:ipAuto.value}" translate="ID_408"></label>\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="dns2_1.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="dns2_2.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="dns2_3.value" kb-integer="0-255" kb-max-length="3">\n            <input type="text" class="small" ng-disabled="settingIpAuto.value" ng-model="dns2_4.value" kb-integer="0-255" kb-max-length="3">\n         </div>\n         <br>\n         <div class="row"><i class="icon-info info-info" translate="ID_329"></i></div>\n      </fieldset>\n      <fieldset>\n         \n         <legend translate="ID_70"></legend>\n         \n         <div class="row">\n            <input id="optExtRouterOn" name="optExtRouter" type="radio" ng-model="settingExtGateway.value" ng-value="true">\n            <label for="optExtRouterOn" translate="ID_404"></label>\n         </div>\n         \n         <div class="row">\n            <input id="optExtRouterOff" name="optExtRouter" type="radio" ng-model="settingExtGateway.value" ng-value="false">\n            <label for="optExtRouterOff" translate="ID_405"></label>\n         </div>\n      </fieldset>\n      <fieldset>\n         \n         <legend translate="ID_406"></legend>\n         \n         <div class="row">\n            <label translate="ID_60"></label>\n            <div class="value">{{netInfoIp1.value + "." + netInfoIp2.value + "." + netInfoIp3.value + "." + netInfoIp4.value}}</div>\n         </div>\n         \n         <div class="row">\n            <label translate="ID_62"></label>\n            <div class="value">{{netInfoSubnetmask1.value + "." + netInfoSubnetmask2.value + "." + netInfoSubnetmask3.value + "." + netInfoSubnetmask4.value}}</div>\n         </div>\n         \n         <div class="row">\n            <label translate="ID_404"></label>\n            <div class="value">{{netInfoGateway1.value + "." + netInfoGateway2.value + "." + netInfoGateway3.value + "." + netInfoGateway4.value}}</div>\n         </div>\n         \n         <div class="row">\n            <label translate="ID_409"></label>\n            <div class="value">{{netInfoDns1_1.value + "." + netInfoDns1_2.value + "." + netInfoDns1_3.value + "." + netInfoDns1_4.value}}</div>\n         </div>\n         \n         <div class="row">\n            <label translate="ID_410"></label>\n            <div class="value">{{netInfoDns2_1.value + "." + netInfoDns2_2.value + "." + netInfoDns2_3.value + "." + netInfoDns2_4.value}}</div>\n         </div>\n         \n         <div class="row">\n            <label translate="ID_407"></label>\n            <div class="value">{{netInfoMacAddress.value}}</div>\n         </div>\n      </fieldset>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n\n</form>'),a.put("pages/settings/communication/rs485/settings-communication-rs485.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      \n      <div class="row">\n         <label translate="ID_65"></label>\n         <input type="checkbox" name="rs485Termination" ng-model="rs485Termination.value">\n      </div>\n      \n      <div class="row">\n         <label translate="ID_67"></label>\n         <input type="checkbox" name="rs485Preload" ng-model="rs485Preload.value">\n      </div>\n      \n      <div class="row" ng-if=\'appIsMatchingProperties("PIKO_FUTURE")\'>\n         <label translate="ID_413"></label>\n         <kb-select ng-model="rs485Mode.value" item-list="rs485Modes" style="width: 90px"></kb-select>\n      </div>\n      \n      <div class="row" ng-if=\'appIsMatchingProperties("PIKO_FUTURE")\'>\n         <label translate="ID_414"></label>\n         <kb-select ng-model="rs485Baudrate.value" item-list="rs485Baudrates" style="width: 90px"></kb-select>\n      </div>\n      <div class="row">\n         <label translate="ID_319"></label>\n         <div class="value">{{inverterAddress.value}}</div>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/data-logger/settings-data-logger.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label translate="ID_375"></label>\n         <kb-select ng-model="selLoginterval.value" item-list="logintervals" style="width: 50px"></kb-select>\n         <label translate="ID_124"></label>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/general/date-time/settings-general-date-time.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label translate="ID_11"></label>\n         <quick-datepicker name="datetime" ng-model="date" date-format="dd.MM.yyyy" time-format="HH:mm" on-change="dateChangeCB()" label-format="dd.MM.yyyy | HH:mm" disable-clear-button="true">\n         </quick-datepicker>\n         <button ng-click="setDateToPcTime()" translate="ID_318"></button>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/general/inverter-name/settings-general-inverter-name.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label translate="ID_9"></label>\n         <input type="text" name="inverterName" style="width: 150px" ng-model="InverterName.value" ng-pattern="/^[a-zA-Z0-9_]*$/" ng-minlength="1" ng-maxlength="15" ng-required="true">\n         <div class="info-error" ng-messages="form.inverterName.$error" ng-if="form.inverterName.$dirty">\n            <div ng-message="required"><span>{{"ID_396"| translate}}</span></div> \n            <div ng-message="minlength"><span>{{"ID_397"| translate}}</span></div> \n            <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            <div ng-message="pattern"><span>{{"ID_399"| translate}} (a-z, A-Z, 0-9, _)</span></div> \n         </div>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/general/login/settings-general-login.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         \n         <label translate="ID_384"></label>\n         <input type="password" name="OldPwd" ng-model="OldPwd" ng-pattern="/^[a-zA-Z0-9_]*$/" ng-minlength="4" ng-maxlength="15" ng-required="true">\n         <div class="info-error" ng-messages="form.OldPwd.$error" ng-if="form.OldPwd.$dirty">\n            <div ng-message="required"><span>{{"ID_396"| translate}}</span></div> \n            <div ng-message="minlength"><span>{{"ID_397"| translate}}</span></div> \n            <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            <div ng-message="pattern"><span>{{"ID_399"| translate}} (a-z, A-Z, 0-9, _)</span></div> \n         </div>\n      </div>\n\n      <br>\n\n      <div class="row">\n         \n         <label translate="ID_382"></label>\n         <input type="password" name="NewPwd" ng-model="NewPwd" ng-pattern="/^[a-zA-Z0-9_]*$/" ng-minlength="4" ng-maxlength="15" ng-required="true">\n         <div class="info-error" ng-messages="form.NewPwd.$error" ng-if="form.NewPwd.$dirty">\n            <div ng-message="required"><span>{{"ID_396"| translate}}</span></div> \n            <div ng-message="minlength"><span>{{"ID_397"| translate}}</span></div> \n            <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            <div ng-message="pattern"><span>{{"ID_399"| translate}} (a-z, A-Z, 0-9, _)</span></div> \n         </div>\n      </div>\n      <div class="row">\n         \n         <label translate="ID_383"></label>\n         <input type="password" name="NewPwdRepeat" ng-model="NewPwdRepeat" ng-pattern="/^[a-zA-Z0-9_]*$/" ng-minlength="4" ng-maxlength="15" ng-required="true" kb-password-confirm="{{NewPwd}}">\n         <div class="info-error" ng-messages="form.NewPwdRepeat.$error" ng-if="form.NewPwdRepeat.$dirty">\n            <div ng-message="required"><span>{{"ID_396"| translate}}</span></div> \n            <div ng-message="minlength"><span>{{"ID_397"| translate}}</span></div> \n            <div ng-message="maxlength"><span>{{"ID_398"| translate}}</span></div> \n            <div ng-message="pattern"><span>{{"ID_399"| translate}} (a-z, A-Z, 0-9, _)</span></div> \n            <div ng-message="kbPasswordConfirm"><span>{{"ID_401"| translate}}</span></div> \n         </div>\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/generator-configuration/settings-generator-configuration.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      \n      <div class="row" ng-if=\'appIsMatchingProperties("PARALLEL_CONNECTION")\'>\n         <label translate="ID_270" ng-class=\'{disabled:!appIsUserAuthorized("INSTALLER, DEVELOPER, SERVICE")}\'></label>\n         <input type="checkbox" name="parallelConnection" ng-model="parallelConnection.value" ng-disabled=\'!appIsUserAuthorized("INSTALLER, DEVELOPER, SERVICE")\'>\n      </div>\n      \n      <div class="row" ng-show=\'appIsMatchingProperties("SHADING_TRACKER_STRING_1 | SHADING_TRACKER_STRING_2 | SHADING_TRACKER_STRING_3 | PV_MODULE_REGULATION")\'>\n         <label translate="ID_422"></label>\n         <kb-select ng-model="generatorManagementSelect" item-list="generatorManagements" ng-change="generatorManagementSelectChange()" style="width: 200px"></kb-select>\n      </div>\n      \n      <fieldset ng-show="generatorManagementSelect == \'shadow_tracking\'">\n         <legend translate="ID_435"></legend>\n         \n         <div class="row" ng-if=\'appIsMatchingProperties("SHADING_TRACKER_STRING_1") && parallelConnection.value === false\'>\n            <label><span translate="ID_424"></span><span> 1</span></label>\n            <input type="checkbox" name="shadowTrackerString1" ng-model="shadingTracker.string1">\n         </div>\n         \n         <div class="row" ng-if=\'appIsMatchingProperties("SHADING_TRACKER_STRING_2") && parallelConnection.value === false\'>\n            <label><span translate="ID_424"></span><span> 2</span></label>\n            <input type="checkbox" name="shadowTrackerString2" ng-model="shadingTracker.string2">\n         </div>\n         \n         <div class="row" ng-if=\'appIsMatchingProperties("SHADING_TRACKER_STRING_3")\'>\n            <label><span translate="ID_424"></span><span> 3</span></label>\n            <input type="checkbox" name="shadowTrackerString3" ng-model="shadingTracker.string3">\n         </div>\n         \n         <div class="row" ng-show="parallelConnection.value == true"><i class="icon-info info-info" translate="ID_448"></i></div>\n      </fieldset>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/settings/overvoltage-protection/settings-overvoltage-protection.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         <label class="wide" translate="ID_447"></label>\n      </div>\n      \n      <div class="row" ng-if=\'appIsMatchingProperties("OVERVOLTAGE_PROT_DC")\'>\n         <label translate="ID_446"></label>\n         <input type="checkbox" name="overvoltageProtectionDc" ng-model="overvoltageProtectionDc.value">\n      </div>\n      \n      <div class="row" ng-if=\'appIsMatchingProperties("OVERVOLTAGE_PROT_AC")\'>\n         <label translate="ID_445"></label>\n         <input type="checkbox" name="overvoltageProtectionAc" ng-model="overvoltageProtectionAc.value">\n      </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),
a.put("pages/settings/portal-configuration/settings-portal-configuration.tpl.html",'<fieldset>\n  <div class="row">\n     <label translate="ID_69"></label>\n     <input type="text" name="portalCode" ng-model="portalCode.value" ng-pattern="/^[a-zA-Z0-9_ ]*$/">\n      <button type="button" translate="ID_86" class="right" ng-click="submitPortalCode()" ng-disabled="!portalCode.value"></button>\n  </div>\n</fieldset>\n<form name="form" novalidate>\n   <fieldset ng-if="portalShowDefault">\n      <div class="row">\n          <label translate="ID_330"></label>\n          <div class="value">{{portalName.value}}</div>\n      </div>\n      <div class="row">\n          \n          <label translate="ID_347"></label>\n          <div ng-if="lastPortalCon.value <= 691200" class="value"><span translate="ID_348"></span> {{lastPortalCon.value/60 | number:0}} <span translate="ID_349"></span></div>\n          <div ng-if="lastPortalCon.value > 691200" class="value">-</div>\n      </div>\n      <div class="row">\n          <label translate="ID_70"></label>\n          <input type="checkbox" name="portalExport" ng-model="portalExport.value">\n      </div>\n\n       <div ng-if="portalShowExtend">\n           <div class="row">\n               <label translate="ID_456"></label>\n               <input class="portal-server" type="text" name="portalServer" ng-model="portalServer.value">\n           </div>\n           <div class="row">\n               <label translate="ID_457"></label>\n               <input class="portal-port" type="text" name="portalPort" ng-model="portalPort.value" kb-integer="1-65535" kb-max-length="5">\n           </div>\n           <div class="row">\n               <label translate="ID_71"></label>\n               <input type="text" name="portalUser" ng-model="portalUser.value" ng-pattern="/[a-zA-Z0-9]*[a-zA-Z][a-zA-Z0-9]*/" ng-minlength="4" ng-maxlength="30">\n           </div>\n           <div class="row">\n               <label translate="ID_72"></label>\n               <input type="password" name="portalPw" ng-model="portalPw.value" ng-pattern="/[a-zA-Z0-9]*[a-zA-Z][a-zA-Z0-9]*/" ng-minlength="4" ng-maxlength="20">\n           </div>\n       </div>\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n   \n   <div id="BV" ng-show="BV" style="z-index: 5000">\n      <div id="beach"></div>\n      <canvas id="canvas" width="1000" height="600">Your browser is too old. Please consider upgrading your browser.</canvas>\n   </div>\n</form>'),a.put("pages/settings/switching-output/settings-switching-output.tpl.html",'<form name="form" novalidate>\n   <fieldset>\n      <div class="row">\n         \n         <label translate="ID_343"></label>\n         <kb-select ng-model="S0Function.value" item-list="switchingOutputOptions" style="width: 300px"></kb-select>\n      </div>\n\n      \n      <fieldset ng-show="S0Function.value == 2 || S0Function.value == 4">\n         <legend translate="ID_287"></legend>\n         \n         <div class="row">\n            <input type="radio" kb-integer id="optOwnConsumpCtrlFunc1" name="optOwnConsumpCtrlFunc" ng-model="OwnConsumpCtrlFunction.value" ng-value="1">\n            <label for="optOwnConsumpCtrlFunc1" translate="ID_333"></label>\n         </div>\n         <div class="row">\n            \n            <div class="indent"></div><label translate="ID_335"></label>\n            <input type="text" kb-integer="0-1000000" ng-model="Fc1PowerThreshold.value" class="medium" ng-disabled="OwnConsumpCtrlFunction.value != 1">\n            <label>W</label>\n         </div>\n         <div class="row">\n            \n            <div class="indent"></div><label translate="ID_336"></label>\n            <input type="text" kb-integer="0-720" ng-model="Fc1ExceedTime.value" class="medium" ng-disabled="OwnConsumpCtrlFunction.value != 1">\n            <label>min</label>\n         </div>\n         <div class="row">\n            \n            <div class="indent"></div><label translate="ID_337"></label>\n            <input type="text" kb-integer="0-1440" ng-model="Fc1Runtime.value" class="medium" ng-disabled="OwnConsumpCtrlFunction.value != 1">\n            <label>min</label>\n         </div>\n         <div class="row">\n            \n            <div class="indent"></div><label translate="ID_338"></label>\n            <input type="text" kb-integer="0-999" ng-model="Fc1MaxActivationsDay.value" class="medium" ng-disabled="OwnConsumpCtrlFunction.value != 1">\n            <label translate="ID_339"></label>\n         </div>\n         \n         <div class="row">\n            <input type="radio" id="optOwnConsumpCtrlFunc2" name="optOwnConsumpCtrlFunc" ng-model="OwnConsumpCtrlFunction.value" ng-value="2">\n            <label for="optOwnConsumpCtrlFunc2" translate="ID_334"></label>\n         </div>\n         <div class="row">\n            \n            <div class="indent"></div><label translate="ID_340"></label>\n            <input type="text" kb-integer="0-1000000" ng-model="Fc2ThresholdOn.value" class="medium" ng-disabled="OwnConsumpCtrlFunction.value != 2">\n            <label>W</label>\n         </div>\n         <div class="row">\n            \n            <div class="indent"></div><label translate="ID_341"></label>\n            <input type="text" kb-integer="0-1000000" ng-model="Fc2ThresholdOff.value" class="medium" ng-disabled="OwnConsumpCtrlFunction.value != 2">\n            <label>W</label>\n         </div>\n      </fieldset>\n\n      <fieldset ng-show="S0Function.value == 2 || S0Function.value == 4">\n         <legend translate="ID_420"></legend>\n\n         \n         <div class="row">\n            <input type="checkbox" id="cbDelayErrorEnable" ng-model="DelayErrorEnable.value">\n            <label for="cbDelayErrorEnable" class="wide" translate="ID_342"></label>\n         </div>\n         <div class="row">\n            <div class="indent"></div>\n            <input type="text" kb-integer="0-720" ng-model="DelayError.value" class="medium" ng-disabled="!DelayErrorEnable.value">\n            <label>min</label>\n         </div>\n         <div class="row"></div>\n         \n         <div class="row" ng-if=\'appIsMatchingProperties("BATTERY")\'>\n            <input type="checkbox" id="cbUseBattery" ng-model="UseBattery.value">\n            <label for="cbUseBattery" class="wide" translate="ID_419"></label>\n         </div>\n      </fieldset>\n\n\n      <div class="bottomframe">\n         <button type="button" translate="ID_317" class="left" ng-click="resetForm()" ng-disabled="form.$pristine || appPageInfo.submitInProgress">Reset</button>\n         <button type="submit" translate="ID_86" class="right" ng-click="submitForm()" ng-disabled="form.$invalid || form.$pristine || appPageInfo.submitInProgress"></button>\n      </div>\n   </fieldset>\n</form>'),a.put("pages/statistics/day/statistics-day.tpl.html",'<fieldset>\n   <div class="row">\n      <label translate="ID_77"></label><div class="value">{{Yield.value | kbDynUnit:\'Wh\':1000:1}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_313"></label><div class="value">{{HomeConsumption.value | kbDynUnit:\'Wh\':1000:1}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_273"></label><div class="value">{{OwnConsumption.value | kbDynUnit:\'Wh\':1000:1}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_393"></label><div class="value">{{OwnConsRate.value | kbDynUnit:\'%\':101:1}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_402"></label><div class="value">{{AutonomyDegree.value | kbDynUnit:\'%\':101:1}}</div>\n   </div>\n</fieldset>\n'),a.put("pages/statistics/log-data/statistics-log-data.tpl.html",""),a.put("pages/statistics/total/statistics-total.tpl.html",'<fieldset>\n   <div class="row">\n      <label translate="ID_77"></label><div class="value">{{Yield.value | kbDynUnit:\'Wh\':1000000:1:1000}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_313"></label><div class="value">{{HomeConsumption.value | kbDynUnit:\'Wh\':1000:1:1000}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_273"></label><div class="value">{{OwnConsumption.value | kbDynUnit:\'Wh\':1000:1:1000}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_393"></label><div class="value">{{OwnConsRate.value | kbDynUnit:\'%\':101:1}}</div>\n   </div>\n   <div class="row" ng-if=\'appIsMatchingProperties("EXT_CURRENT_SENS")\'>\n      <label translate="ID_402"></label><div class="value">{{AutonomyDegree.value | kbDynUnit:\'%\':101:1}}</div>\n   </div>\n   <div class="row">\n      <label translate="ID_78"></label><div class="value">{{OperatingTime.value | kbDynUnit:\'h\':100000}}</div>\n   </div>\n</fieldset>\n')}]),angular.module("templates-common",[])}(window,window.angular);
//# sourceMappingURL=../kbApp-1.1.6.map