").append(e).html();try{return e[0].nodeType===da?Ri(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Ri(t)})}catch(t){return Ri(n)}}function V(e){try{return decodeURIComponent(e)}catch(t){}}function W(e){var t,n,i={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=V(t[0]),y(n))){var a=y(t[1])?V(t[1]):!0;Fi.call(i,n)?na(i[n])?i[n].push(a):i[n]=[i[n],a]:i[n]=a}}),i}function G(e){var t=[];return o(e,function(e,n){na(e)?o(e,function(e){t.push(Z(n,!0)+(e===!0?"":"="+Z(e,!0)))}):t.push(Z(n,!0)+(e===!0?"":"="+Z(e,!0)))}),t.length?t.join("&"):""}function K(e){return Z(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Z(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function X(e,t){var n,i,a=ra.length;for(e=Vi(e),i=0;a>i;++i)if(n=ra[i]+t,b(n=e.attr(n)))return n;return null}function Y(e,t){var n,i,a={};o(ra,function(t){var a=t+"app";!n&&e.hasAttribute&&e.hasAttribute(a)&&(n=e,i=e.getAttribute(a))}),o(ra,function(t){var a,o=t+"app";!n&&(a=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=a,i=a.getAttribute(o))}),n&&(a.strictDi=null!==X(n,"strict-di"),t(n,i?[i]:[],a))}function J(n,i,a){v(a)||(a={});var r={strictDi:!1};a=u(r,a);var s=function(){if(n=Vi(n),n.injector()){var e=n[0]===t?"document":z(n);throw Ji("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/,"<").replace(/>/,">"))}i=i||[],i.unshift(["$provide",function(e){e.value("$rootElement",n)}]),a.debugInfoEnabled&&i.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),i.unshift("ng");var o=Ft(i,a.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,c=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(a.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!c.test(e.name)?s():(e.name=e.name.replace(c,""),void(Qi.resumeBootstrap=function(e){o(e,function(e){i.push(e)}),s()}))}function Q(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function et(e){return Qi.element(e).injector().get("$$testability")}function tt(e,t){return t=t||"_",e.replace(sa,function(e,n){return(n?t:"")+e.toLowerCase()})}function nt(){var t;la||(Wi=e.jQuery,Wi&&Wi.fn.on?(Vi=Wi,u(Wi.fn,{scope:Aa.scope,isolateScope:Aa.isolateScope,controller:Aa.controller,injector:Aa.injector,inheritedData:Aa.inheritedData}),t=Wi.cleanData,Wi.cleanData=function(e){var n;if(ta)ta=!1;else for(var i,a=0;null!=(i=e[a]);a++)n=Wi._data(i,"events"),n&&n.$destroy&&Wi(i).triggerHandler("$destroy");t(e)}):Vi=_t,Qi.element=Vi,la=!0)
+}function it(e,t,n){if(!e)throw Ji("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function at(e,t,n){return n&&na(e)&&(e=e[e.length-1]),it(k(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ot(e,t){if("hasOwnProperty"===e)throw Ji("badname","hasOwnProperty is not a valid {0} name",t)}function rt(e,t,n){if(!t)return e;for(var i,a=t.split("."),o=e,r=a.length,s=0;r>s;s++)i=a[s],e&&(e=(o=e)[i]);return!n&&k(e)?F(o,e):e}function st(e){var t=e[0],n=e[e.length-1],i=[t];do{if(t=t.nextSibling,!t)break;i.push(t)}while(t!==n);return Vi(i)}function lt(){return Object.create(null)}function ct(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=i("$injector"),a=i("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||i,t(o,"module",function(){var e={};return function(i,o,r){var s=function(e,t){if("hasOwnProperty"===e)throw a("badname","hasOwnProperty is not a valid {0} name",t)};return s(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){function e(e,n,i,a){return a||(a=t),function(){return a[i||"push"]([e,n,arguments]),c}}if(!o)throw n("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.",i);var t=[],a=[],s=[],l=e("$injector","invoke","push",a),c={_invokeQueue:t,_configBlocks:a,_runBlocks:s,requires:o,name:i,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return r&&l(r),c})}})}function dt(t){u(t,{bootstrap:J,copy:L,extend:u,equals:U,element:Vi,forEach:o,injector:Ft,noop:h,bind:F,toJson:H,fromJson:j,identity:f,isUndefined:_,isDefined:y,isString:b,isFunction:k,isObject:v,isNumber:w,isElement:I,isArray:na,version:ha,isDate:$,lowercase:Ri,uppercase:qi,callbacks:{counter:0},getTestability:et,$$minErr:i,$$csp:oa,reloadWithDebugInfo:Q}),Gi=ct(e);try{Gi("ngLocale")}catch(n){Gi("ngLocale",[]).provider("$locale",pn)}Gi("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:jn}),e.provider("$compile",Gt).directive({a:bo,input:Ro,textarea:Ro,form:Co,script:Er,select:Pr,style:Lr,option:Nr,ngBind:ar,ngBindHtml:rr,ngBindTemplate:or,ngClass:sr,ngClassEven:cr,ngClassOdd:lr,ngCloak:dr,ngController:ur,ngForm:Mo,ngHide:Sr,ngIf:hr,ngInclude:fr,ngInit:_r,ngNonBindable:yr,ngPluralize:vr,ngRepeat:br,ngShow:kr,ngStyle:Cr,ngSwitch:Mr,ngSwitchWhen:xr,ngSwitchDefault:Ar,ngOptions:Dr,ngTransclude:Tr,ngModel:Ko,ngList:er,ngChange:Zo,pattern:Yo,ngPattern:Yo,required:Xo,ngRequired:Xo,minlength:Qo,ngMinlength:Qo,maxlength:Jo,ngMaxlength:Jo,ngValue:nr,ngModelOptions:ir}).directive({ngInclude:gr}).directive(wo).directive(pr),e.provider({$anchorScroll:qt,$animate:Ba,$browser:zt,$cacheFactory:Vt,$controller:Yt,$document:Jt,$exceptionHandler:Qt,$filter:ti,$interpolate:dn,$interval:un,$http:rn,$httpBackend:ln,$location:Cn,$log:Mn,$parse:Un,$rootScope:Hn,$q:Bn,$$q:Rn,$sce:Gn,$sceDelegate:Wn,$sniffer:Kn,$templateCache:Wt,$templateRequest:Zn,$$testability:Xn,$timeout:Yn,$window:ei,$$rAF:qn,$$asyncCallback:Ht})}])}function ut(){return++ga}function pt(e){return e.replace(va,function(e,t,n,i){return i?n.toUpperCase():n}).replace(ba,"Moz$1")}function mt(e){return!Sa.test(e)}function ht(e){var t=e.nodeType;return t===ca||!t||t===pa}function ft(e,t){var n,i,a,r,s=t.createDocumentFragment(),l=[];if(mt(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(Ca.exec(e)||["",""])[1].toLowerCase(),a=xa[i]||xa._default,n.innerHTML=a[1]+e.replace(Ma,"<$1>$2>")+a[2],r=a[0];r--;)n=n.lastChild;l=B(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function gt(e,n){n=n||t;var i;return(i=ka.exec(e))?[n.createElement(i[1])]:(i=ft(e,n))?i.childNodes:[]}function _t(e){if(e instanceof _t)return e;var t;if(b(e)&&(e=ia(e),t=!0),!(this instanceof _t)){if(t&&"<"!=e.charAt(0))throw $a("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new _t(e)}t?xt(this,gt(e)):xt(this,e)}function yt(e){return e.cloneNode(!0)}function vt(e,t){if(t||wt(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),i=0,a=n.length;a>i;i++)wt(n[i])}function bt(e,t,n,i){if(y(i))throw $a("offargs","jqLite#off() does not support the `selector` argument");var a=$t(e),r=a&&a.events,s=a&&a.handle;if(s)if(t)o(t.split(" "),function(t){if(y(n)){var i=r[t];if(N(i||[],n),i&&i.length>0)return}ya(e,t,s),delete r[t]});else for(t in r)"$destroy"!==t&&ya(e,t,s),delete r[t]}function wt(e,t){var i=e.ng339,a=i&&fa[i];if(a){if(t)return void delete a.data[t];a.handle&&(a.events.$destroy&&a.handle({},"$destroy"),bt(e)),delete fa[i],e.ng339=n}}function $t(e,t){var i=e.ng339,a=i&&fa[i];return t&&!a&&(e.ng339=i=ut(),a=fa[i]={events:{},data:{},handle:n}),a}function kt(e,t,n){if(ht(e)){var i=y(n),a=!i&&t&&!v(t),o=!t,r=$t(e,!a),s=r&&r.data;if(i)s[t]=n;else{if(o)return s;if(a)return s&&s[t];u(s,t)}}}function St(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Ct(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",ia((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+ia(t)+" "," ")))})}function Mt(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=ia(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",ia(n))}}function xt(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var i=0;n>i;i++)e[e.length++]=t[i]}else e[e.length++]=t}}function At(e,t){return Tt(e,"$"+(t||"ngController")+"Controller")}function Tt(e,t,i){e.nodeType==pa&&(e=e.documentElement);for(var a=na(t)?t:[t];e;){for(var o=0,r=a.length;r>o;o++)if((i=Vi.data(e,a[o]))!==n)return i;e=e.parentNode||e.nodeType===ma&&e.host}}function Et(e){for(vt(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function It(e,t){t||vt(e);var n=e.parentNode;n&&n.removeChild(e)}function Dt(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Vi(n).on("load",t)}function Pt(e,t){var n=Ta[t.toLowerCase()];return n&&Ea[P(e)]&&n}function Nt(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Ia[t]}function Lt(e,t){var n=function(n,i){n.isDefaultPrevented=function(){return n.defaultPrevented};var a=t[i||n.type],o=a?a.length:0;if(o){if(_(n.immediatePropagationStopped)){var r=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),r&&r.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(a=O(a));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||a[s].call(e,n)}};return n.elem=e,n}function Ot(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var i=typeof e;return n="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||c)():i+":"+e}function Ut(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Bt(e){var t=e.toString().replace(La,""),n=t.match(Da);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Rt(e,t,n){var i,a,r,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw b(n)&&n||(n=e.name||Bt(e)),Oa("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);a=e.toString().replace(La,""),r=a.match(Da),o(r[1].split(Pa),function(e){e.replace(Na,function(e,t,n){i.push(n)})})}e.$inject=i}}else na(e)?(s=e.length-1,at(e[s],"fn"),i=e.slice(0,s)):at(e,"fn",!0);return i}function Ft(e,t){function i(e){return function(t,n){return v(t)?void o(t,l(e)):e(t,n)}}function a(e,t){if(ot(e,"service"),(k(t)||na(t))&&(t=M.instantiate(t)),!t.$get)throw Oa("pget","Provider '{0}' must define $get factory method.",e);return C[e+w]=t}function r(e,t){return function(){var i=A.invoke(t,this,n,e);if(_(i))throw Oa("undef","Provider '{0}' must return a value from $get factory method.",e);return i}}function s(e,t,n){return a(e,{$get:n!==!1?r(e,t):t})}function c(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function d(e,t){return s(e,g(t),!1)}function u(e,t){ot(e,"constant"),C[e]=t,x[e]=t}function p(e,t){var n=M.get(e+w),i=n.$get;n.$get=function(){var e=A.invoke(i,n);return A.invoke(t,null,{$delegate:e})}}function m(e){var t,n=[];return o(e,function(e){function i(e){var t,n;for(t=0,n=e.length;n>t;t++){var i=e[t],a=M.get(i[0]);a[i[1]].apply(a,i[2])}}if(!S.get(e)){S.put(e,!0);try{b(e)?(t=Gi(e),n=n.concat(m(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):k(e)?n.push(M.invoke(e)):na(e)?n.push(M.invoke(e)):at(e,"module")}catch(a){throw na(e)&&(e=e[e.length-1]),a.message&&a.stack&&-1==a.stack.indexOf(a.message)&&(a=a.message+"\n"+a.stack),Oa("modulerr","Failed to instantiate module {0} due to:\n{1}",e,a.stack||a.message||a)}}}),n}function f(e,n){function i(t){if(e.hasOwnProperty(t)){if(e[t]===y)throw Oa("cdep","Circular dependency found: {0}",t+" <- "+$.join(" <- "));return e[t]}try{return $.unshift(t),e[t]=y,e[t]=n(t)}catch(i){throw e[t]===y&&delete e[t],i}finally{$.shift()}}function a(e,n,a,o){"string"==typeof a&&(o=a,a=null);var r,s,l,c=[],d=Rt(e,t,o);for(s=0,r=d.length;r>s;s++){if(l=d[s],"string"!=typeof l)throw Oa("itkn","Incorrect injection token! Expected service name as string, got {0}",l);c.push(a&&a.hasOwnProperty(l)?a[l]:i(l))}return na(e)&&(e=e[r]),e.apply(n,c)}function o(e,t,n){var i,o,r=function(){};return r.prototype=(na(e)?e[e.length-1]:e).prototype,i=new r,o=a(e,i,t,n),v(o)||k(o)?o:i}return{invoke:a,instantiate:o,get:i,annotate:Rt,has:function(t){return C.hasOwnProperty(t+w)||e.hasOwnProperty(t)}}}t=t===!0;var y={},w="Provider",$=[],S=new Ut([],!0),C={$provide:{provider:i(a),factory:i(s),service:i(c),value:i(d),constant:i(u),decorator:p}},M=C.$injector=f(C,function(){throw Oa("unpr","Unknown provider: {0}",$.join(" <- "))}),x={},A=x.$injector=f(x,function(e){var t=M.get(e+w);return A.invoke(t.$get,t,n,e)});return o(m(e),function(e){A.invoke(e||h)}),A}function qt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function a(e){var t=null;return Array.prototype.some.call(e,function(e){return"a"===P(e)?(t=e,!0):void 0}),t}function o(){var e=s.yOffset;if(k(e))e=e();else if(I(e)){var n=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}else w(e)||(e=0);return e}function r(e){if(e){e.scrollIntoView();var n=o();if(n){var i=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}else t.scrollTo(0,0)}function s(){var e,t=n.hash();t?(e=l.getElementById(t))?r(e):(e=a(l.getElementsByName(t)))?r(e):"top"===t&&r(null):r(null)}var l=t.document;return e&&i.$watch(function(){return n.hash()},function(e,t){(e!==t||""!==e)&&Dt(function(){i.$evalAsync(s)})}),s}]}function Ht(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function jt(e,t,i,a){function r(e){try{e.apply(null,R(arguments,1))}finally{if($--,0===$)for(;k.length;)try{k.pop()()}catch(t){i.error(t)}}}function s(e,t){!function n(){o(C,function(e){e()}),S=t(n,e)}()}function l(){c(),d()}function c(){M=e.history.state,M=_(M)?null:M,U(M,P)&&(M=P),P=M}function d(){(A!==p.url()||x!==M)&&(A=p.url(),x=M,o(I,function(e){e(p.url(),M)}))}function u(e){try{return decodeURIComponent(e)}catch(t){return e}}var p=this,m=t[0],f=e.location,g=e.history,y=e.setTimeout,v=e.clearTimeout,w={};p.isMock=!1;var $=0,k=[];p.$$completeOutstandingRequest=r,p.$$incOutstandingRequestCount=function(){$++},p.notifyWhenNoOutstandingRequests=function(e){o(C,function(e){e()}),0===$?e():k.push(e)};var S,C=[];p.addPollFn=function(e){return _(S)&&s(100,y),C.push(e),e};var M,x,A=f.href,T=t.find("base"),E=null;c(),x=M,p.url=function(t,n,i){if(_(i)&&(i=null),f!==e.location&&(f=e.location),g!==e.history&&(g=e.history),t){var o=x===i;if(A===t&&(!a.history||o))return;var r=A&&_n(A)===_n(t);return A=t,x=i,!a.history||r&&o?(r||(E=t),n?f.replace(t):f.href=t):(g[n?"replaceState":"pushState"](i,"",t),c(),x=M),p}return E||f.href.replace(/%27/g,"'")},p.state=function(){return M};var I=[],D=!1,P=null;p.onUrlChange=function(t){return D||(a.history&&Vi(e).on("popstate",l),Vi(e).on("hashchange",l),D=!0),I.push(t),t},p.$$checkUrlChange=d,p.baseHref=function(){var e=T.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var N={},L="",O=p.baseHref();p.cookies=function(e,t){var a,o,r,s,l;if(!e){if(m.cookie!==L)for(L=m.cookie,o=L.split("; "),N={},s=0;s
0&&(e=u(r.substring(0,l)),N[e]===n&&(N[e]=u(r.substring(l+1))));return N}t===n?m.cookie=encodeURIComponent(e)+"=;path="+O+";expires=Thu, 01 Jan 1970 00:00:00 GMT":b(t)&&(a=(m.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+O).length+1,a>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+a+" > 4096 bytes)!"))},p.defer=function(e,t){var n;return $++,n=y(function(){delete w[n],r(e)},t||0),w[n]=!0,n},p.defer.cancel=function(e){return w[e]?(delete w[e],v(e),r(h),!0):!1}}function zt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new jt(e,i,t,n)}]}function Vt(){this.$get=function(){function e(e,n){function a(e){e!=p&&(m?m==e&&(m=e.n):m=e,o(e.n,e.p),o(e,p),p=e,p.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var r=0,s=u({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,d={},p=null,m=null;return t[e]={put:function(e,t){if(cc&&this.remove(m.key),t},get:function(e){if(c").parent()[0])});var r=L(e,t,e,n,i,a);I.$$addScopeClass(e);var s=null;return function(t,n,i){it(t,"scope"),i=i||{};var a=i.parentBoundTranscludeFn,o=i.transcludeControllers,l=i.futureParentElement;a&&a.$$boundTransclude&&(a=a.$$boundTransclude),s||(s=D(l));var c;if(c="html"!==s?Vi(J(s,Vi("").append(e).html())):n?Aa.clone.call(e):e,o)for(var d in o)c.data("$"+d+"Controller",o[d].instance);return I.$$addScopeInfo(c,t),n&&n(c,t),r&&r(t,c,c,a),c}}function D(e){var t=e&&e[0];return t&&"foreignobject"!==P(t)&&t.toString().match(/SVG/)?"svg":"html"}function L(e,t,i,a,o,r){function s(e,i,a,o){var r,s,l,c,d,u,p,m,g;if(h){var _=i.length;for(g=new Array(_),d=0;d
d;)l=g[f[d++]],r=f[d++],s=f[d++],r?(r.scope?(c=e.$new(),I.$$addScopeInfo(Vi(l),c)):c=e,m=r.transcludeOnThisElement?O(e,r.transclude,o,r.elementTranscludeOnThisElement):!r.templateOnThisElement&&o?o:!o&&t?O(e,t):null,r(s,c,l,a,m)):s&&s(e,l.childNodes,n,o)}for(var l,c,d,u,p,m,h,f=[],g=0;gy;y++){var w=!1,$=!1;u=_[y],p=u.name,f=ia(u.value),h=Kt(p),(g=ut.test(h))&&(p=tt(h.substr(6),"-"));var k=h.replace(/(Start|End)$/,"");W(k)&&h===k+"Start"&&(w=p,$=p.substr(0,p.length-5)+"end",p=p.substr(0,p.length-6)),m=Kt(p.toLowerCase()),l[m]=p,(g||!n.hasOwnProperty(m))&&(n[m]=f,Pt(e,m)&&(n[m]=!0)),et(e,t,f,m,g),V(t,m,"A",i,a,w,$)}if(r=e.className,b(r)&&""!==r)for(;o=d.exec(r);)m=Kt(o[2]),V(t,m,"C",i,a)&&(n[m]=ia(o[3])),r=r.substr(o.index+o[0].length);break;case da:Y(t,e.nodeValue);break;case ua:try{o=c.exec(e.nodeValue),o&&(m=Kt(o[1]),V(t,m,"M",i,a)&&(n[m]=ia(o[2])))}catch(S){}}return t.sort(Z),t}function F(e,t,n){var i=[],a=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Ra("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==ca&&(e.hasAttribute(t)&&a++,e.hasAttribute(n)&&a--),i.push(e),e=e.nextSibling}while(a>0)}else i.push(e);return Vi(i)}function q(e,t,n){return function(i,a,o,r,s){return a=F(a[0],t,n),e(i,a,o,r,s)}}function H(e,r,s,l,c,d,u,p,m){function h(e,t,n,i){e&&(n&&(e=q(e,n,i)),e.require=C.require,e.directiveName=x,(N===C||C.$$isolateScope)&&(e=at(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=q(t,n,i)),t.require=C.require,t.directiveName=x,(N===C||C.$$isolateScope)&&(t=at(t,{isolateScope:!0})),p.push(t))}function f(e,t,n,i){var a,r,s="data",l=!1,c=n;if(b(t)){if(r=t.match(_),t=t.substring(r[0].length),r[3]&&(r[1]?r[3]=null:r[1]=r[3]),"^"===r[1]?s="inheritedData":"^^"===r[1]&&(s="inheritedData",c=n.parent()),"?"===r[2]&&(l=!0),a=null,i&&"data"===s&&(a=i[t])&&(a=a.instance),a=a||c[s]("$"+t+"Controller"),!a&&!l)throw Ra("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return a||null}return na(t)&&(a=[],o(t,function(t){a.push(f(e,t,n,i))})),a}function w(e,t,a,l,c){function d(e,t,i){var a;return M(e)||(i=t,t=e,e=n),W&&(a=w),i||(i=W?k.parent():k),c(e,t,a,i,T)}var m,h,_,v,b,w,$,k,C;if(r===a?(C=s,k=s.$$element):(k=Vi(a),C=new rt(k,s)),N&&(b=t.$new(!0)),c&&($=d,$.$$boundTransclude=c),P&&(S={},w={},o(P,function(e){var n,i={$scope:e===N||e.$$isolateScope?b:t,$element:k,$attrs:C,$transclude:$};v=e.controller,"@"==v&&(v=C[e.name]),n=y(v,i,!0,e.controllerAs),w[e.name]=n,W||k.data("$"+e.name+"Controller",n.instance),S[e.name]=n})),N){I.$$addScopeInfo(k,b,!0,!(L&&(L===N||L===N.$$originalDirective))),I.$$addScopeClass(k,!0);var x=S&&S[N.name],A=b;x&&x.identifier&&N.bindToController===!0&&(A=x.instance),o(b.$$isolateBindings=N.$$isolateBindings,function(e,n){var a,o,r,s,l=e.attrName,c=e.optional,d=e.mode;switch(d){case"@":C.$observe(l,function(e){A[n]=e}),C.$$observers[l].$$scope=t,C[l]&&(A[n]=i(C[l])(t));break;case"=":if(c&&!C[l])return;o=g(C[l]),s=o.literal?U:function(e,t){return e===t||e!==e&&t!==t},r=o.assign||function(){throw a=A[n]=o(t),Ra("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",C[l],N.name)},a=A[n]=o(t);var u=function(e){return s(e,A[n])||(s(e,a)?r(t,e=A[n]):A[n]=e),a=e};u.$stateful=!0;var p;p=e.collection?t.$watchCollection(C[l],u):t.$watch(g(C[l],u),null,o.literal),b.$on("$destroy",p);break;case"&":o=g(C[l]),A[n]=function(e){return o(t,e)}}})}for(S&&(o(S,function(e){e()}),S=null),m=0,h=u.length;h>m;m++)_=u[m],ot(_,_.isolateScope?b:t,k,C,_.require&&f(_.directiveName,_.require,k,w),$);var T=t;for(N&&(N.template||null===N.templateUrl)&&(T=b),e&&e(T,a.childNodes,n,c),m=p.length-1;m>=0;m--)_=p[m],ot(_,_.isolateScope?b:t,k,C,_.require&&f(_.directiveName,_.require,k,w),$)}m=m||{};for(var $,S,C,x,A,T,E,D=-Number.MAX_VALUE,P=m.controllerDirectives,N=m.newIsolateScopeDirective,L=m.templateDirective,O=m.nonTlbTranscludeDirective,H=!1,V=!1,W=m.hasElementTranscludeDirective,Z=s.$$element=Vi(r),Y=d,Q=l,et=0,tt=e.length;tt>et;et++){C=e[et];var it=C.$$start,st=C.$$end;if(it&&(Z=F(r,it,st)),A=n,D>C.priority)break;if((E=C.scope)&&(C.templateUrl||(v(E)?(X("new/isolated scope",N||$,C,Z),N=C):X("new/isolated scope",N,C,Z)),$=$||C),x=C.name,!C.templateUrl&&C.controller&&(E=C.controller,P=P||{},X("'"+x+"' controller",P[x],C,Z),P[x]=C),(E=C.transclude)&&(H=!0,C.$$tlb||(X("transclusion",O,C,Z),O=C),"element"==E?(W=!0,D=C.priority,A=Z,Z=s.$$element=Vi(t.createComment(" "+x+": "+s[x]+" ")),r=Z[0],nt(c,R(A),r),Q=I(A,l,D,Y&&Y.name,{nonTlbTranscludeDirective:O})):(A=Vi(yt(r)).contents(),Z.empty(),Q=I(A,l))),C.template)if(V=!0,X("template",L,C,Z),L=C,E=k(C.template)?C.template(Z,s):C.template,E=dt(E),C.replace){if(Y=C,A=mt(E)?[]:Xt(J(C.templateNamespace,ia(E))),r=A[0],1!=A.length||r.nodeType!==ca)throw Ra("tplrt","Template for directive '{0}' must have exactly one root element. {1}",x,"");nt(c,Z,r);var lt={$attr:{}},ct=B(r,[],lt),ut=e.splice(et+1,e.length-(et+1));N&&j(ct),e=e.concat(ct).concat(ut),G(s,lt),tt=e.length}else Z.html(E);if(C.templateUrl)V=!0,X("template",L,C,Z),L=C,C.replace&&(Y=C),w=K(e.splice(et,e.length-et),Z,s,c,H&&Q,u,p,{controllerDirectives:P,newIsolateScopeDirective:N,templateDirective:L,nonTlbTranscludeDirective:O}),tt=e.length;else if(C.compile)try{T=C.compile(Z,s,Q),k(T)?h(null,T,it,st):T&&h(T.pre,T.post,it,st)}catch(pt){a(pt,z(Z))}C.terminal&&(w.terminal=!0,D=Math.max(D,C.priority))}return w.scope=$&&$.scope===!0,w.transcludeOnThisElement=H,w.elementTranscludeOnThisElement=W,w.templateOnThisElement=V,w.transclude=Q,m.hasElementTranscludeDirective=W,w}function j(e){for(var t=0,n=e.length;n>t;t++)e[t]=m(e[t],{$$isolateScope:!0})}function V(t,i,o,l,c,d,u){if(i===c)return null;var p=null;if(r.hasOwnProperty(i))for(var h,f=e.get(i+s),g=0,_=f.length;_>g;g++)try{h=f[g],(l===n||l>h.priority)&&-1!=h.restrict.indexOf(o)&&(d&&(h=m(h,{$$start:d,$$end:u})),t.push(h),p=h)}catch(y){a(y)}return p}function W(t){if(r.hasOwnProperty(t))for(var n,i=e.get(t+s),a=0,o=i.length;o>a;a++)if(n=i[a],n.multiElement)return!0;return!1}function G(e,t){var n=t.$attr,i=e.$attr,a=e.$$element;o(e,function(i,a){"$"!=a.charAt(0)&&(t[a]&&t[a]!==i&&(i+=("style"===a?";":" ")+t[a]),e.$set(a,i,!0,n[a]))}),o(t,function(t,o){"class"==o?(E(a,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(a.attr("style",a.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,i[o]=n[o])})}function K(e,t,n,i,a,r,s,c){var d,p,m=[],h=t[0],f=e.shift(),g=u({},f,{templateUrl:null,transclude:null,replace:null,$$originalDirective:f}),_=k(f.templateUrl)?f.templateUrl(t,n):f.templateUrl,y=f.templateNamespace;return t.empty(),l(x.getTrustedResourceUrl(_)).then(function(l){var u,b,w,$;if(l=dt(l),f.replace){if(w=mt(l)?[]:Xt(J(y,ia(l))),u=w[0],1!=w.length||u.nodeType!==ca)throw Ra("tplrt","Template for directive '{0}' must have exactly one root element. {1}",f.name,_);b={$attr:{}},nt(i,t,u);var k=B(u,[],b);v(f.scope)&&j(k),e=k.concat(e),G(n,b)}else u=h,t.html(l);for(e.unshift(g),d=H(e,u,n,a,t,f,r,s,c),o(i,function(e,n){e==u&&(i[n]=t[0])}),p=L(t[0].childNodes,a);m.length;){var S=m.shift(),C=m.shift(),M=m.shift(),x=m.shift(),A=t[0];if(!S.$$destroyed){if(C!==h){var T=C.className;c.hasElementTranscludeDirective&&f.replace||(A=yt(u)),nt(M,Vi(C),A),E(Vi(A),T)}$=d.transcludeOnThisElement?O(S,d.transclude,x):x,d(p,S,A,i,$)}}m=null}),function(e,t,n,i,a){var o=a;t.$$destroyed||(m?(m.push(t),m.push(n),m.push(i),m.push(o)):(d.transcludeOnThisElement&&(o=O(t,d.transclude,a)),d(p,t,n,i,o)))}}function Z(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name"+n+""+e+">",i.childNodes[0].childNodes;default:return n}}function Q(e,t){if("srcdoc"==t)return x.HTML;var n=P(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?x.RESOURCE_URL:void 0}function et(e,t,n,a,o){var r=i(n,!0);if(r){if("multiple"===a&&"select"===P(e))throw Ra("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",z(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers={});if(w.test(a))throw Ra("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");s[a]&&(r=i(s[a],!0,Q(e,a),p[a]||o),r&&(s[a]=r(t),(l[a]||(l[a]=[])).$$inter=!0,(s.$$observers&&s.$$observers[a].$$scope||t).$watch(r,function(e,t){"class"===a&&e!=t?s.$updateClass(e,t):s.$set(a,e)})))}}}})}}function nt(e,n,i){var a,o,r=n[0],s=n.length,l=r.parentNode;if(e)for(a=0,o=e.length;o>a;a++)if(e[a]==r){e[a++]=i;for(var c=a,d=c+s-1,u=e.length;u>c;c++,d++)u>d?e[c]=e[d]:delete e[c];e.length-=s-1,e.context===r&&(e.context=i);break}l&&l.replaceChild(i,r);var p=t.createDocumentFragment();p.appendChild(r),Vi(i).data(Vi(r).data()),Wi?(ta=!0,Wi.cleanData([r])):delete Vi.cache[r[Vi.expando]];for(var m=1,h=n.length;h>m;m++){var f=n[m];Vi(f).remove(),p.appendChild(f),delete n[m]}n[0]=i,n.length=1}function at(e,t){return u(function(){return e.apply(null,arguments)},e,t)}function ot(e,t,n,i,o,r){try{e(t,n,i,o,r)}catch(s){a(s,z(n))}}var rt=function(e,t){if(t){var n,i,a,o=Object.keys(t);for(n=0,i=o.length;i>n;n++)a=o[n],this[a]=t[a]}else this.$attr={};this.$$element=e};rt.prototype={$normalize:Kt,$addClass:function(e){e&&e.length>0&&A.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&A.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Zt(e,t);n&&n.length&&A.addClass(this.$$element,n);var i=Zt(t,e);i&&i.length&&A.removeClass(this.$$element,i)},$set:function(e,t,i,r){var s,l=this.$$element[0],c=Pt(l,e),d=Nt(l,e),u=e;if(c?(this.$$element.prop(e,t),r=c):d&&(this[d]=t,u=d),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e],r||(this.$attr[e]=r=tt(e,"-"))),s=P(this.$$element),"a"===s&&"href"===e||"img"===s&&"src"===e)this[e]=t=T(t,"src"===e);else if("img"===s&&"srcset"===e){for(var p="",m=ia(t),h=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,f=/\s/.test(m)?h:/(,)/,g=m.split(f),_=Math.floor(g.length/2),y=0;_>y;y++){var v=2*y;p+=T(ia(g[v]),!0),p+=" "+ia(g[v+1])}var b=ia(g[2*y]).split(/\s/);p+=T(ia(b[0]),!0),2===b.length&&(p+=" "+ia(b[1])),this[e]=t=p}i!==!1&&(null===t||t===n?this.$$element.removeAttr(r):this.$$element.attr(r,t));var w=this.$$observers;w&&o(w[u],function(e){try{e(t)}catch(n){a(n)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers=lt()),a=i[e]||(i[e]=[]);return a.push(t),S.$evalAsync(function(){!a.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){N(a,t)}}};var st=i.startSymbol(),ct=i.endSymbol(),dt="{{"==st||"}}"==ct?f:function(e){return e.replace(/\{\{/g,st).replace(/}}/g,ct)},ut=/^ngAttr[A-Z]/;return I.$$addBindingInfo=$?function(e,t){var n=e.data("$binding")||[];na(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:h,I.$$addBindingClass=$?function(e){E(e,"ng-binding")}:h,I.$$addScopeInfo=$?function(e,t,n,i){var a=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(a,t)}:h,I.$$addScopeClass=$?function(e,t){E(e,t?"ng-isolate-scope":"ng-scope")}:h,I}]}function Kt(e){return pt(e.replace(Fa,""))}function Zt(e,t){var n="",i=e.split(/\s+/),a=t.split(/\s+/);e:for(var o=0;o0?" ":"")+r}return n}function Xt(e){e=Vi(e);var t=e.length;if(1>=t)return e;for(;t--;){var n=e[t];n.nodeType===ua&&Zi.call(e,t,1)}return e}function Yt(){var e={},t=!1,a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){ot(t,"controller"),v(t)?u(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,r){function s(e,t,n,a){if(!e||!v(e.$scope))throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",a,t);e.$scope[t]=n}return function(i,l,c,d){var p,m,h,f;if(c=c===!0,d&&b(d)&&(f=d),b(i)&&(m=i.match(a),h=m[1],f=f||m[3],i=e.hasOwnProperty(h)?e[h]:rt(l.$scope,h,!0)||(t?rt(r,h,!0):n),at(i,h,!0)),c){var g=function(){};return g.prototype=(na(i)?i[i.length-1]:i).prototype,p=new g,f&&s(l,f,p,h||i.name),u(function(){return o.invoke(i,p,l,h),p},{instance:p,identifier:f})}return p=o.instantiate(i,l,h),f&&s(l,f,p,h||i.name),p}}]}function Jt(){this.$get=["$window",function(e){return Vi(e.document)}]}function Qt(){this.$get=["$log",function(e){return function(){e.error.apply(e,arguments)}}]}function en(e,t){if(b(e)){e=e.replace(Va,"");var n=t("Content-Type");(n&&0===n.indexOf(qa)||ja.test(e)&&za.test(e))&&(e=j(e))}return e}function tn(e){var t,n,i,a={};return e?(o(e.split("\n"),function(e){i=e.indexOf(":"),t=Ri(ia(e.substr(0,i))),n=ia(e.substr(i+1)),t&&(a[t]=a[t]?a[t]+", "+n:n)}),a):a}function nn(e){var t=v(e)?e:n;return function(n){return t||(t=tn(e)),n?t[Ri(n)]||null:t}}function an(e,t,n){return k(n)?n(e,t):(o(n,function(n){e=n(e,t)}),e)}function on(e){return e>=200&&300>e}function rn(){var e=this.defaults={transformResponse:[en],transformRequest:[function(e){return!v(e)||x(e)||A(e)?e:H(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:O(Ha),put:O(Ha),patch:O(Ha)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},t=!1;this.useApplyAsync=function(e){return y(e)?(t=!!e,this):t};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,r,l,c,d,p){function m(t){function i(e){var t=u({},e);return t.data=e.data?an(e.data,e.headers,r.transformResponse):e.data,on(e.status)?t:d.reject(t)}function a(t){function n(e){var t;o(e,function(n,i){k(n)&&(t=n(),null!=t?e[i]=t:delete e[i])})}var i,a,r,s=e.headers,l=u({},t.headers);s=u({},s.common,s[Ri(t.method)]);e:for(i in s){a=Ri(i);for(r in l)if(Ri(r)===a)continue e;l[i]=s[i]}return n(l),l}var r={method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},s=a(t);
+u(r,t),r.headers=s,r.method=qi(r.method);var l=function(t){s=t.headers;var n=an(t.data,nn(s),t.transformRequest);return _(n)&&o(s,function(e,t){"content-type"===Ri(t)&&delete s[t]}),_(t.withCredentials)&&!_(e.withCredentials)&&(t.withCredentials=e.withCredentials),g(t,n,s).then(i,i)},c=[l,n],p=d.when(r);for(o(C,function(e){(e.request||e.requestError)&&c.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)});c.length;){var m=c.shift(),h=c.shift();p=p.then(m,h)}return p.success=function(e){return p.then(function(t){e(t.data,t.status,t.headers,r)}),p},p.error=function(e){return p.then(null,function(t){e(t.data,t.status,t.headers,r)}),p},p}function h(){o(arguments,function(e){m[e]=function(t,n){return m(u(n||{},{method:e,url:t}))}})}function f(){o(arguments,function(e){m[e]=function(t,n,i){return m(u(i||{},{method:e,url:t,data:n}))}})}function g(i,o,s){function l(e,n,i,a){function o(){u(n,e,i,a)}h&&(on(e)?h.put($,[e,n,tn(i),a]):h.remove($)),t?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function u(e,t,n,a){t=Math.max(t,0),(on(t)?g.resolve:g.reject)({data:e,status:t,headers:nn(n),config:i,statusText:a})}function p(){var e=m.pendingRequests.indexOf(i);-1!==e&&m.pendingRequests.splice(e,1)}var h,f,g=d.defer(),b=g.promise,$=w(i.url,i.params);if(m.pendingRequests.push(i),b.then(p,p),!i.cache&&!e.cache||i.cache===!1||"GET"!==i.method&&"JSONP"!==i.method||(h=v(i.cache)?i.cache:v(e.cache)?e.cache:S),h)if(f=h.get($),y(f)){if(E(f))return f.then(p,p),f;na(f)?u(f[1],f[0],O(f[2]),f[3]):u(f,200,{},"OK")}else h.put($,b);if(_(f)){var k=Qn(i.url)?r.cookies()[i.xsrfCookieName||e.xsrfCookieName]:n;k&&(s[i.xsrfHeaderName||e.xsrfHeaderName]=k),a(i.method,$,o,l,s,i.timeout,i.withCredentials,i.responseType)}return b}function w(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||_(e)||(na(e)||(e=[e]),o(e,function(e){v(e)&&(e=$(e)?e.toISOString():H(e)),n.push(Z(t)+"="+Z(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var S=l("$http"),C=[];return o(i,function(e){C.unshift(b(e)?p.get(e):p.invoke(e))}),m.pendingRequests=[],h("get","delete","head","jsonp"),f("post","put","patch"),m.defaults=e,m}]}function sn(){return new e.XMLHttpRequest}function ln(){this.$get=["$browser","$window","$document",function(e,t,n){return cn(e,sn,e.defer,t.angular.callbacks,n[0])}]}function cn(e,t,n,i,a){function r(e,t,n){var o=a.createElement("script"),r=null;return o.type="text/javascript",o.src=e,o.async=!0,r=function(e){ya(o,"load",r),ya(o,"error",r),a.body.removeChild(o),o=null;var s=-1,l="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},_a(o,"load",r),_a(o,"error",r),a.body.appendChild(o),r}return function(a,s,l,c,d,u,p,m){function f(){v&&v(),b&&b.abort()}function g(t,i,a,o,r){k&&n.cancel(k),v=b=null,t(i,a,o,r),e.$$completeOutstandingRequest(h)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"==Ri(a)){var _="_"+(i.counter++).toString(36);i[_]=function(e){i[_].data=e,i[_].called=!0};var v=r(s.replace("JSON_CALLBACK","angular.callbacks."+_),_,function(e,t){g(c,e,i[_].data,"",t),i[_]=h})}else{var b=t();b.open(a,s,!0),o(d,function(e,t){y(e)&&b.setRequestHeader(t,e)}),b.onload=function(){var e=b.statusText||"",t="response"in b?b.response:b.responseText,n=1223===b.status?204:b.status;0===n&&(n=t?200:"file"==Jn(s).protocol?404:0),g(c,n,t,b.getAllResponseHeaders(),e)};var w=function(){g(c,-1,null,null,"")};if(b.onerror=w,b.onabort=w,p&&(b.withCredentials=!0),m)try{b.responseType=m}catch($){if("json"!==m)throw $}b.send(l||null)}if(u>0)var k=n(f,u);else E(u)&&u.then(f)}}function dn(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,a){function o(e){return"\\\\\\"+e}function r(o,r,p,m){function h(n){return n.replace(c,e).replace(d,t)}function f(e){try{return T(A(e))}catch(t){var n=Wa("interr","Can't interpolate: {0}\n{1}",o,t.toString());i(n)}}m=!!m;for(var g,y,v,b=0,w=[],$=[],S=o.length,C=[],M=[];S>b;){if(-1==(g=o.indexOf(e,b))||-1==(y=o.indexOf(t,g+s))){b!==S&&C.push(h(o.substring(b)));break}b!==g&&C.push(h(o.substring(b,g))),v=o.substring(g+s,y),w.push(v),$.push(n(v,f)),b=y+l,M.push(C.length),C.push("")}if(p&&C.length>1)throw Wa("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",o);if(!r||w.length){var x=function(e){for(var t=0,n=w.length;n>t;t++){if(m&&_(e[t]))return;C[M[t]]=e[t]}return C.join("")},A=function(e){return p?a.getTrusted(p,e):a.valueOf(e)},T=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=H(e)}return e};return u(function(e){var t=0,n=w.length,a=new Array(n);try{for(;n>t;t++)a[t]=$[t](e);return x(a)}catch(r){var s=Wa("interr","Can't interpolate: {0}\n{1}",o,r.toString());i(s)}},{exp:o,expressions:w,$$watchDelegate:function(e,t,n){var i;return e.$watchGroup($,function(n,a){var o=x(n);k(t)&&t.call(this,o,n!==a?i:o,e),i=o},n)}})}}var s=e.length,l=t.length,c=new RegExp(e.replace(/./g,o),"g"),d=new RegExp(t.replace(/./g,o),"g");return r.startSymbol=function(){return e},r.endSymbol=function(){return t},r}]}function un(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,i){function a(a,r,s,l){var c=t.setInterval,d=t.clearInterval,u=0,p=y(l)&&!l,m=(p?i:n).defer(),h=m.promise;return s=y(s)?s:0,h.then(null,null,a),h.$$intervalId=c(function(){m.notify(u++),s>0&&u>=s&&(m.resolve(u),d(h.$$intervalId),delete o[h.$$intervalId]),p||e.$apply()},r),o[h.$$intervalId]=m,h}var o={};return a.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},a}]}function pn(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return 1===e?"one":"other"}}}}function mn(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=K(t[n]);return t.join("/")}function hn(e,t,n){var i=Jn(e,n);t.$$protocol=i.protocol,t.$$host=i.hostname,t.$$port=p(i.port)||Ka[i.protocol]||null}function fn(e,t,n){var i="/"!==e.charAt(0);i&&(e="/"+e);var a=Jn(e,n);t.$$path=decodeURIComponent(i&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname),t.$$search=W(a.search),t.$$hash=decodeURIComponent(a.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function gn(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function _n(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function yn(e){return e.substr(0,_n(e).lastIndexOf("/")+1)}function vn(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function bn(e,t){this.$$html5=!0,t=t||"";var i=yn(e);hn(e,this,e),this.$$parse=function(t){var n=gn(i,t);if(!b(n))throw Za("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,i);fn(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=G(this.$$search),t=this.$$hash?"#"+K(this.$$hash):"";this.$$url=mn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+this.$$url.substr(1)},this.$$parseLinkUrl=function(a,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var r,s,l;return(r=gn(e,a))!==n?(s=r,l=(r=gn(t,r))!==n?i+(gn("/",r)||r):e+s):(r=gn(i,a))!==n?l=i+r:i==a+"/"&&(l=i),l&&this.$$parse(l),!!l}}function wn(e,t){var n=yn(e);hn(e,this,e),this.$$parse=function(i){function a(e,t,n){var i,a=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),a.exec(t)?e:(i=a.exec(e),i?i[1]:e)}var o=gn(e,i)||gn(n,i),r="#"==o.charAt(0)?gn(t,o):this.$$html5?o:"";if(!b(r))throw Za("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',i,t);fn(r,this,e),this.$$path=a(this.$$path,r,e),this.$$compose()},this.$$compose=function(){var n=G(this.$$search),i=this.$$hash?"#"+K(this.$$hash):"";this.$$url=mn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t){return _n(e)==_n(t)?(this.$$parse(t),!0):!1}}function $n(e,t){this.$$html5=!0,wn.apply(this,arguments);var n=yn(e);this.$$parseLinkUrl=function(i,a){if(a&&"#"===a[0])return this.hash(a.slice(1)),!0;var o,r;return e==_n(i)?o=i:(r=gn(n,i))?o=e+t+r:n===i+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=G(this.$$search),i=this.$$hash?"#"+K(this.$$hash):"";this.$$url=mn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+t+this.$$url}}function kn(e){return function(){return this[e]}}function Sn(e,t){return function(n){return _(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Cn(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return y(e)?(t=e,this):t},this.html5Mode=function(e){return T(e)?(n.enabled=e,this):v(e)?(T(e.enabled)&&(n.enabled=e.enabled),T(e.requireBase)&&(n.requireBase=e.requireBase),T(e.rewriteLinks)&&(n.rewriteLinks=e.rewriteLinks),this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(i,a,o,r){function s(e,t,n){var i=c.url(),o=c.$$state;try{a.url(e,t,n),c.$$state=a.state()}catch(r){throw c.url(i),c.$$state=o,r}}function l(e,t){i.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}var c,d,u,p=a.baseHref(),m=a.url();if(n.enabled){if(!p&&n.requireBase)throw Za("nobase","$location in HTML5 mode requires a tag to be present!");u=vn(m)+(p||"/"),d=o.history?bn:$n}else u=_n(m),d=wn;c=new d(u,"#"+t),c.$$parseLinkUrl(m,m),c.$$state=a.state();var h=/^\s*(javascript|mailto):/i;r.on("click",function(t){if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var o=Vi(t.target);"a"!==P(o[0]);)if(o[0]===r[0]||!(o=o.parent())[0])return;var s=o.prop("href"),l=o.attr("href")||o.attr("xlink:href");v(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Jn(s.animVal).href),h.test(s)||!s||o.attr("target")||t.isDefaultPrevented()||c.$$parseLinkUrl(s,l)&&(t.preventDefault(),c.absUrl()!=a.url()&&(i.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),c.absUrl()!=m&&a.url(c.absUrl(),!0);var f=!0;return a.onUrlChange(function(e,t){i.$evalAsync(function(){var n=c.absUrl(),a=c.$$state;c.$$parse(e),c.$$state=t,i.$broadcast("$locationChangeStart",e,n,t,a).defaultPrevented?(c.$$parse(n),c.$$state=a,s(n,!1,a)):(f=!1,l(n,a))}),i.$$phase||i.$digest()}),i.$watch(function(){var e=a.url(),t=a.state(),n=c.$$replace,r=e!==c.absUrl()||c.$$html5&&o.history&&t!==c.$$state;(f||r)&&(f=!1,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",c.absUrl(),e,c.$$state,t).defaultPrevented?(c.$$parse(e),c.$$state=t):(r&&s(c.absUrl(),n,t===c.$$state?null:c.$$state),l(e,t))})),c.$$replace=!1}),c}]}function Mn(){var e=!0,t=this;this.debugEnabled=function(t){return y(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function a(e){var t=n.console||{},a=t[e]||t.log||h,r=!1;try{r=!!a.apply}catch(s){}return r?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),a.apply(t,e)}:function(e,t){a(e,null==t?"":t)}}return{log:a("log"),info:a("info"),warn:a("warn"),error:a("error"),debug:function(){var n=a("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function xn(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Ya("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function An(e,t){if(e){if(e.constructor===e)throw Ya("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Ya("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Ya("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Ya("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Tn(e,t){if(e){if(e.constructor===e)throw Ya("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Ja||e===Qa||e===eo)throw Ya("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function En(e){return e.constant}function In(e,t,n,i){An(e,i);for(var a,o=t.split("."),r=0;o.length>1;r++){a=xn(o.shift(),i);var s=An(e[a],i);s||(s={},e[a]=s),e=s}return a=xn(o.shift(),i),An(e[a],i),e[a]=n,n}function Dn(e){return"constructor"==e}function Pn(e,t,i,a,o,r,s){xn(e,r),xn(t,r),xn(i,r),xn(a,r),xn(o,r);var l=function(e){return An(e,r)},c=s||Dn(e)?l:f,d=s||Dn(t)?l:f,u=s||Dn(i)?l:f,p=s||Dn(a)?l:f,m=s||Dn(o)?l:f;return function(r,s){var l=s&&s.hasOwnProperty(e)?s:r;return null==l?l:(l=c(l[e]),t?null==l?n:(l=d(l[t]),i?null==l?n:(l=u(l[i]),a?null==l?n:(l=p(l[a]),o?null==l?n:l=m(l[o]):l):l):l):l)}}function Nn(e,t){return function(n,i){return e(n,i,An,t)}}function Ln(e,t,i){var a=t.expensiveChecks,r=a?so:ro,s=r[e];if(s)return s;var l=e.split("."),c=l.length;if(t.csp)s=6>c?Pn(l[0],l[1],l[2],l[3],l[4],i,a):function(e,t){var o,r=0;do o=Pn(l[r++],l[r++],l[r++],l[r++],l[r++],i,a)(e,t),t=n,e=o;while(c>r);return o};else{var d="";a&&(d+="s = eso(s, fe);\nl = eso(l, fe);\n");var u=a;o(l,function(e,t){xn(e,i);var n=(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e;(a||Dn(e))&&(n="eso("+n+", fe)",u=!0),d+="if(s == null) return undefined;\ns="+n+";\n"}),d+="return s;";var p=new Function("s","l","eso","fe",d);p.toString=g(d),u&&(p=Nn(p,i)),s=p}return s.sharedGetter=!0,s.assign=function(t,n){return In(t,e,n,e)},r[e]=s,s}function On(e){return k(e.valueOf)?e.valueOf():lo.call(e)}function Un(){var e=lt(),t=lt();this.$get=["$filter","$sniffer",function(n,i){function a(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function r(e,t){for(var n=0,i=e.length;i>n;n++){var a=e[n];a.constant||(a.inputs?r(a.inputs,t):-1===t.indexOf(a)&&t.push(a))}return t}function s(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=On(e),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function l(e,t,n,i){var a,o=i.$$inputs||(i.$$inputs=r(i.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(a=i(e),l=t&&On(t)),a},t,n)}for(var c=[],d=0,u=o.length;u>d;d++)c[d]=s;return e.$watch(function(e){for(var t=!1,n=0,r=o.length;r>n;n++){var l=o[n](e);(t||(t=!s(l,c[n])))&&(c[n]=l&&On(l))}return t&&(a=i(e)),a},t,n)}function c(e,t,n,i){var a,o;return a=e.$watch(function(e){return i(e)},function(e,n,i){o=e,k(t)&&t.apply(this,arguments),y(e)&&i.$$postDigest(function(){y(o)&&a()})},n)}function d(e,t,n,i){function a(e){var t=!0;return o(e,function(e){y(e)||(t=!1)}),t}var r,s;return r=e.$watch(function(e){return i(e)},function(e,n,i){s=e,k(t)&&t.call(this,e,n,i),a(e)&&i.$$postDigest(function(){a(s)&&r()})},n)}function u(e,t,n,i){var a;return a=e.$watch(function(e){return i(e)},function(){k(t)&&t.apply(this,arguments),a()},n)}function p(e,t){if(!t)return e;var n=function(n,i){var a=e(n,i),o=t(a,n,i);return y(a)||t.$stateful?o:a};return e.$$watchDelegate&&e.$$watchDelegate!==l?n.$$watchDelegate=e.$$watchDelegate:t.$stateful||(n.$$watchDelegate=l,n.inputs=[e]),n}var m={csp:i.csp,expensiveChecks:!1},f={csp:i.csp,expensiveChecks:!0};return function(i,o,r){var s,g,_;switch(typeof i){case"string":_=i=i.trim();var y=r?t:e;if(s=y[_],!s){":"===i.charAt(0)&&":"===i.charAt(1)&&(g=!0,i=i.substring(2));var v=r?f:m,b=new ao(v),w=new oo(b,n,v);s=w.parse(i),s.constant?s.$$watchDelegate=u:g?(s=a(s),s.$$watchDelegate=s.literal?d:c):s.inputs&&(s.$$watchDelegate=l),y[_]=s}return p(s,o);case"function":return p(i,o);default:return p(h,o)}}}]}function Bn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Fn(function(t){e.$evalAsync(t)},t)}]}function Rn(){this.$get=["$browser","$exceptionHandler",function(e,t){return Fn(function(t){e.defer(t)},t)}]}function Fn(e,t){function a(e,t,n){function i(t){return function(n){a||(a=!0,t.call(e,n))}}var a=!1;return[i(t),i(n)]}function r(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var i,a,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var r=0,s=o.length;s>r;++r){a=o[r][0],i=o[r][e.status];try{k(i)?a.resolve(i(e.value)):1===e.status?a.resolve(e.value):a.reject(e.value)}catch(l){a.reject(l),t(l)}}}function c(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function d(){this.promise=new r,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function u(e){var t=new d,n=0,i=na(e)?[]:{};return o(e,function(e,a){n++,_(e).then(function(e){i.hasOwnProperty(a)||(i[a]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(a)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}var p=i("$q",TypeError),m=function(){return new d};r.prototype={then:function(e,t,n){var i=new d;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([i,e,t,n]),this.$$state.status>0&&c(this.$$state),i.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return g(t,!0,e)},function(t){return g(t,!1,e)},t)}},d.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,i;i=a(this,this.$$resolve,this.$$reject);try{(v(e)||k(e))&&(n=e&&e.then),k(n)?(this.promise.$$state.status=-1,n.call(e,i[0],i[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,c(this.promise.$$state))}catch(o){i[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var i=this.promise.$$state.pending;this.promise.$$state.status<=0&&i&&i.length&&e(function(){for(var e,a,o=0,r=i.length;r>o;o++){a=i[o][0],e=i[o][3];try{a.notify(k(e)?e(n):n)}catch(s){t(s)}}})}};var h=function(e){var t=new d;return t.reject(e),t.promise},f=function(e,t){var n=new d;return t?n.resolve(e):n.reject(e),n.promise},g=function(e,t,n){var i=null;try{k(n)&&(i=n())}catch(a){return f(a,!1)}return E(i)?i.then(function(){return f(e,t)},function(e){return f(e,!1)}):f(e,t)},_=function(e,t,n,i){var a=new d;return a.resolve(e),a.promise.then(t,n,i)},y=function b(e){function t(e){i.resolve(e)}function n(e){i.reject(e)}if(!k(e))throw p("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof b))return new b(e);var i=new d;return e(t,n),i.promise};return y.defer=m,y.reject=h,y.when=_,y.all=u,y}function qn(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,a=!!n,o=a?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=a,o}]}function Hn(){var e=10,t=i("$rootScope"),n=null,r=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,s,l,d){function u(){this.$id=c(),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.$$isolateBindings=null}function p(e){if(w.$$phase)throw t("inprog","{0} already in progress",w.$$phase);w.$$phase=e}function m(){w.$$phase=null}function f(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function g(){}function y(){for(;C.length;)try{C.shift()()}catch(e){s(e)}r=null}function b(){null===r&&(r=d.defer(function(){w.$apply(y)}))}u.prototype={constructor:u,$new:function(e,t){function n(){i.$$destroyed=!0}var i;return t=t||this,e?(i=new u,i.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),i=new this.$$ChildScope),i.$parent=t,i.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=i,t.$$childTail=i):t.$$childHead=t.$$childTail=i,(e||t!=this)&&i.$on("$destroy",n),i},$watch:function(e,t,i){var a=l(e);if(a.$$watchDelegate)return a.$$watchDelegate(this,t,i,a);var o=this,r=o.$$watchers,s={fn:t,last:g,get:a,exp:e,eq:!!i};return n=null,k(t)||(s.fn=h),r||(r=o.$$watchers=[]),r.unshift(s),function(){N(r,s),n=null}},$watchGroup:function(e,t){function n(){l=!1,c?(c=!1,t(a,a,s)):t(a,i,s)}var i=new Array(e.length),a=new Array(e.length),r=[],s=this,l=!1,c=!0;if(!e.length){var d=!0;return s.$evalAsync(function(){d&&t(a,a,s)}),function(){d=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){a[0]=e,i[0]=n,t(a,e===n?a:i,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){a[t]=e,i[t]=o,l||(l=!0,s.$evalAsync(n))});r.push(o)}),function(){for(;r.length;)r.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,i,s,l;if(!_(o)){if(v(o))if(a(o)){r!==m&&(r=m,g=r.length=0,u++),t=o.length,g!==t&&(u++,r.length=g=t);for(var c=0;t>c;c++)l=r[c],s=o[c],i=l!==l&&s!==s,i||l===s||(u++,r[c]=s)}else{r!==h&&(r=h={},g=0,u++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=r[n],n in r?(i=l!==l&&s!==s,i||l===s||(u++,r[n]=s)):(g++,r[n]=s,u++));if(g>t){u++;for(n in r)o.hasOwnProperty(n)||(g--,delete r[n])}}else r!==o&&(r=o,u++);return u}}function i(){if(f?(f=!1,t(o,o,c)):t(o,s,c),d)if(v(o))if(a(o)){s=new Array(o.length);for(var e=0;e1,u=0,p=l(e,n),m=[],h={},f=!0,g=0;return this.$watch(p,i)},$digest:function(){var i,a,o,l,c,u,h,f,_,v,b,C=e,M=this,x=[];p("$digest"),d.$$checkUrlChange(),this===w&&null!==r&&(d.defer.cancel(r),y()),n=null;do{for(u=!1,f=M;$.length;){try{b=$.shift(),b.scope.$eval(b.expression)}catch(A){s(A)}n=null}e:do{if(l=f.$$watchers)for(c=l.length;c--;)try{if(i=l[c])if((a=i.get(f))===(o=i.last)||(i.eq?U(a,o):"number"==typeof a&&"number"==typeof o&&isNaN(a)&&isNaN(o))){if(i===n){u=!1;break e}}else u=!0,n=i,i.last=i.eq?L(a,null):a,i.fn(a,o===g?a:o,f),5>C&&(_=4-C,x[_]||(x[_]=[]),v=k(i.exp)?"fn: "+(i.exp.name||i.exp.toString()):i.exp,v+="; newVal: "+H(a)+"; oldVal: "+H(o),x[_].push(v))}catch(A){s(A)}if(!(h=f.$$childHead||f!==M&&f.$$nextSibling))for(;f!==M&&!(h=f.$$nextSibling);)f=f.$parent}while(f=h);if((u||$.length)&&!C--)throw m(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,H(x))}while(u||$.length);for(m();S.length;)try{S.shift()()}catch(A){s(A)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==w){for(var t in this.$$listenerCount)f(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$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=h,this.$on=this.$watch=this.$watchGroup=function(){return h},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e){w.$$phase||$.length||d.defer(function(){$.length&&w.$digest()}),$.push({scope:this,expression:e})},$$postDigest:function(e){S.push(e)},$apply:function(e){try{return p("$apply"),this.$eval(e)}catch(t){s(t)}finally{m();try{w.$digest()}catch(t){throw s(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&C.push(t),b()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++;while(i=i.$parent);var a=this;return function(){var i=n.indexOf(t);-1!==i&&(n[i]=null,f(a,1,e))}},$emit:function(e){var t,n,i,a=[],o=this,r=!1,l={name:e,targetScope:o,stopPropagation:function(){r=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=B([l],arguments,1);do{for(t=o.$$listeners[e]||a,l.currentScope=o,n=0,i=t.length;i>n;n++)if(t[n])try{t[n].apply(null,c)}catch(d){s(d)}else t.splice(n,1),n--,i--;if(r)return l.currentScope=null,l;o=o.$parent}while(o);return l.currentScope=null,l},$broadcast:function(e){var t=this,n=t,i=t,a={name:e,targetScope:t,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!t.$$listenerCount[e])return a;for(var o,r,l,c=B([a],arguments,1);n=i;){for(a.currentScope=n,o=n.$$listeners[e]||[],r=0,l=o.length;l>r;r++)if(o[r])try{o[r].apply(null,c)}catch(d){s(d)}else o.splice(r,1),r--,l--;if(!(i=n.$$listenerCount[e]&&n.$$childHead||n!==t&&n.$$nextSibling))for(;n!==t&&!(i=n.$$nextSibling);)n=n.$parent}return a.currentScope=null,a}};var w=new u,$=w.$$asyncQueue=[],S=w.$$postDigestQueue=[],C=w.$$applyAsyncQueue=[];return w}]}function jn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return y(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return y(e)?(t=e,this):t},this.$get=function(){return function(n,i){var a,o=i?t:e;return a=Jn(n).href,""===a||a.match(o)?n:"unsafe:"+a}}}function zn(e){if("self"===e)return e;if(b(e)){if(e.indexOf("***")>-1)throw co("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=aa(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(S(e))return new RegExp("^"+e.source+"$");throw co("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Vn(e){var t=[];return y(e)&&o(e,function(e){t.push(zn(e))}),t}function Wn(){this.SCE_CONTEXTS=uo;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Vn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Vn(e)),t},this.$get=["$injector",function(i){function a(e,t){return"self"===e?Qn(t):!!e.exec(t.href)}function o(n){var i,o,r=Jn(n.toString()),s=!1;for(i=0,o=e.length;o>i;i++)if(a(e[i],r)){s=!0;break}if(s)for(i=0,o=t.length;o>i;i++)if(a(t[i],r)){s=!1;break}return s}function r(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var i=p.hasOwnProperty(e)?p[e]:null;if(!i)throw co("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw co("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new i(t)}function l(e){return e instanceof u?e.$$unwrapTrustedValue():e}function c(e,t){if(null===t||t===n||""===t)return t;var i=p.hasOwnProperty(e)?p[e]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(e===uo.RESOURCE_URL){if(o(t))return t;throw co("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===uo.HTML)return d(t);throw co("unsafe","Attempting to use an unsafe value in a safe context.")}var d=function(){throw co("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(d=i.get("$sanitize"));var u=r(),p={};return p[uo.HTML]=r(u),p[uo.CSS]=r(u),p[uo.URL]=r(u),p[uo.JS]=r(u),p[uo.RESOURCE_URL]=r(p[uo.URL]),{trustAs:s,getTrusted:c,valueOf:l}}]}function Gn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&8>zi)throw co("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=O(uo);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=f),i.parseAs=function(e,n){var a=t(n);return a.literal&&a.constant?a:t(n,function(t){return i.getTrusted(e,t)})};var a=i.parseAs,r=i.getTrusted,s=i.trustAs;return o(uo,function(e,t){var n=Ri(t);i[pt("parse_as_"+n)]=function(t){return a(e,t)},i[pt("get_trusted_"+n)]=function(t){return r(e,t)},i[pt("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Kn(){this.$get=["$window","$document",function(e,t){var n,i,a={},o=p((/android (\d+)/.exec(Ri((e.navigator||{}).userAgent))||[])[1]),r=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,c=s.body&&s.body.style,d=!1,u=!1;if(c){for(var m in c)if(i=l.exec(m)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),d=!!("transition"in c||n+"Transition"in c),u=!!("animation"in c||n+"Animation"in c),!o||d&&u||(d=b(s.body.style.webkitTransition),u=b(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||r),hasEvent:function(e){if("input"==e&&9==zi)return!1;if(_(a[e])){var t=s.createElement("div");a[e]="on"+e in t}return a[e]},csp:oa(),vendorPrefix:n,transitions:d,animations:u,android:o}}]}function Zn(){this.$get=["$templateCache","$http","$q",function(e,t,n){function i(a,o){function r(){if(s.totalPendingRequests--,!o)throw Ra("tpload","Failed to load template: {0}",a);return n.reject()}var s=i;s.totalPendingRequests++;var l=t.defaults&&t.defaults.transformResponse;if(na(l)){var c=l;l=[];for(var d=0;d-1});var o=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!o(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var i in e)if("$"!==i.charAt(0)&&o(e[i],t))return!0}return!1;case"array":for(var a=0;ae;e=Math.abs(e);var r=e+"",s="",l=[],c=!1;if(-1!==r.indexOf("e")){var d=r.match(/([\d\.]+)e(-?)(\d+)/);d&&"-"==d[2]&&d[3]>a+1?(r="0",e=0):(s=r,c=!0)}if(c)a>0&&e>-1&&1>e&&(s=e.toFixed(a));else{var u=(r.split(ho)[1]||"").length;_(a)&&(a=Math.min(Math.max(t.minFrac,u),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+a)).toString()+"e"+-a),0===e&&(o=!1);var p=(""+e).split(ho),m=p[0];p=p[1]||"";var h,f=0,g=t.lgSize,y=t.gSize;if(m.length>=g+y)for(f=m.length-g,h=0;f>h;h++)(f-h)%y===0&&0!==h&&(s+=n),s+=m.charAt(h);for(h=f;he&&(i="-",e=-e),e=""+e;e.length0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),ri(o,t,i)}}function li(e,t){return function(n,i){var a=n["get"+e](),o=qi(t?"SHORT"+e:e);return i[o][a]}}function ci(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=ri(Math[t>0?"floor":"ceil"](t/60),2)+ri(Math.abs(t%60),2)}function di(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function ui(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function pi(e){return function(t){var n=di(t.getFullYear()),i=ui(t),a=+i-+n,o=1+Math.round(a/6048e5);return ri(o,e)}}function mi(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function hi(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),a=0,o=0,r=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(a=p(t[9]+t[10]),o=p(t[9]+t[11])),r.call(i,p(t[1]),p(t[2])-1,p(t[3]));var l=p(t[4]||0)-a,c=p(t[5]||0)-o,d=p(t[6]||0),u=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,l,c,d,u),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,a){var r,s,l="",c=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,b(n)&&(n=_o.test(n)?p(n):t(n)),w(n)&&(n=new Date(n)),!$(n))return n;for(;i;)s=go.exec(i),s?(c=B(c,s,1),i=c.pop()):(c.push(i),i=null);return a&&"UTC"===a&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(t){r=fo[t],l+=r?r(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function fi(){return function(e){return H(e,!0)}}function gi(){return function(e,t){if(w(e)&&(e=e.toString()),!na(e)&&!b(e))return e;if(t=1/0===Math.abs(Number(t))?Number(t):p(t),b(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,i,a=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,i=t):(n=e.length+t,i=e.length);i>n;n++)a.push(e[n]);return a}}function _i(e){return function(t,n,i){function o(e,t){for(var i=0;ie?-1:1):i>n?-1:1}if(!a(t))return t;n=na(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(t){var n=!1,i=t||f;if(b(t)){if(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),""===t)return r(function(e,t){return s(e,t)},n);if(i=e(t),i.constant){var a=i();return r(function(e,t){return s(e[a],t[a])},n)}}return r(function(e,t){return s(i(e),i(t))},n)});for(var l=[],c=0;c15&&19>t||t>=37&&40>=t||p(e)}),a.hasEvent("paste")&&t.on("paste cut",p)}t.on("change",d),i.$render=function(){t.val(i.$isEmpty(i.$modelValue)?"":i.$viewValue)}}function Si(e,t){if($(e))return e;if(b(e)){Po.lastIndex=0;var n=Po.exec(e);if(n){var i=+n[1],a=+n[2],o=0,r=0,s=0,l=0,c=di(i),d=7*(a-1);return t&&(o=t.getHours(),r=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(i,0,c.getDate()+d,o,r,s,l)}}return 0/0}function Ci(e,t){return function(n,i){var a,r;if($(n))return n;if(b(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),xo.test(n))return new Date(n);if(e.lastIndex=0,a=e.exec(n))return a.shift(),r=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(a,function(e,n){n=f},s.$observe("min",function(e){f=p(e),l.$validate()})}if(y(s.max)||s.ngMax){var g;l.$validators.max=function(e){return l.$isEmpty(e)||_(g)||i(e)<=g},s.$observe("max",function(e){g=p(e),l.$validate()})}l.$isEmpty=function(e){return!e||e.getTime&&e.getTime()!==e.getTime()}}}function xi(e,t,i,a){var o=t[0],r=a.$$hasNativeValidators=v(o.validity);r&&a.$parsers.push(function(e){var i=t.prop(Bi)||{};return i.badInput&&!i.typeMismatch?n:e})}function Ai(e,t,i,a,o,r){if(xi(e,t,i,a),ki(e,t,i,a,o,r),a.$$parserName="number",a.$parsers.push(function(e){return a.$isEmpty(e)?null:Eo.test(e)?parseFloat(e):n}),a.$formatters.push(function(e){if(!a.$isEmpty(e)){if(!w(e))throw Uo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),i.min||i.ngMin){var s;a.$validators.min=function(e){return a.$isEmpty(e)||_(s)||e>=s},i.$observe("min",function(e){y(e)&&!w(e)&&(e=parseFloat(e,10)),s=w(e)&&!isNaN(e)?e:n,a.$validate()})}if(i.max||i.ngMax){var l;a.$validators.max=function(e){return a.$isEmpty(e)||_(l)||l>=e},i.$observe("max",function(e){y(e)&&!w(e)&&(e=parseFloat(e,10)),l=w(e)&&!isNaN(e)?e:n,a.$validate()})}}function Ti(e,t,n,i,a,o){ki(e,t,n,i,a,o),wi(i),i.$$parserName="url",i.$validators.url=function(e){return i.$isEmpty(e)||Ao.test(e)}}function Ei(e,t,n,i,a,o){ki(e,t,n,i,a,o),wi(i),i.$$parserName="email",i.$validators.email=function(e){return i.$isEmpty(e)||To.test(e)}}function Ii(e,t,n,i){_(n.name)&&t.attr("name",c());var a=function(e){t[0].checked&&i.$setViewValue(n.value,e&&e.type)};t.on("click",a),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function Di(e,t,n,a,o){var r;if(y(a)){if(r=e(a),!r.constant)throw i("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,a);return r(t)}return o}function Pi(e,t,n,i,a,o,r,s){var l=Di(s,e,"ngTrueValue",n.ngTrueValue,!0),c=Di(s,e,"ngFalseValue",n.ngFalseValue,!1),d=function(e){i.$setViewValue(t[0].checked,e&&e.type)};t.on("click",d),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e!==l},i.$formatters.push(function(e){return U(e,l)}),i.$parsers.push(function(e){return e?l:c})}function Ni(e){function t(e,t,l){t===n?i("$pending",e,l):a("$pending",e,l),T(t)?t?(u(s.$error,e,l),d(s.$$success,e,l)):(d(s.$error,e,l),u(s.$$success,e,l)):(u(s.$error,e,l),u(s.$$success,e,l)),s.$pending?(o(Wo,!0),s.$valid=s.$invalid=n,r("",null)):(o(Wo,!1),s.$valid=Li(s.$error),s.$invalid=!s.$valid,r("",s.$valid));var c;c=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,r(e,c),p.$setValidity(e,c,s)}function i(e,t,n){s[e]||(s[e]={}),d(s[e],t,n)}function a(e,t,i){s[e]&&u(s[e],t,i),Li(s[e])&&(s[e]=n)}function o(e,t){t&&!c[e]?(m.addClass(l,e),c[e]=!0):!t&&c[e]&&(m.removeClass(l,e),c[e]=!1)}function r(e,t){e=e?"-"+tt(e,"-"):"",o(Fo+e,t===!0),o(qo+e,t===!1)}var s=e.ctrl,l=e.$element,c={},d=e.set,u=e.unset,p=e.parentForm,m=e.$animate;c[qo]=!(c[Fo]=l.hasClass(Fo)),s.$setValidity=t}function Li(e){if(e)for(var t in e)return!1;return!0}function Oi(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function p(e,t){var a=i(t,e),o=i(e,t);a=u(a,1),o=u(o,-1),a&&a.length&&n.addClass(s,a),o&&o.length&&n.removeClass(s,o)}function m(e){if(t===!0||r.$index%2===t){var n=a(e||[]);if(h){if(!U(e,h)){var i=a(h);p(i,n)}}else c(n)}h=O(e)}var h;r.$watch(l[e],m,!0),l.$observe("class",function(){m(r.$eval(l[e]))}),"ngClass"!==e&&r.$watch("$index",function(n,i){var o=1&n;if(o!==(1&i)){var s=a(r.$eval(l[e]));o===t?c(s):d(s)}})}}}]}var Ui=/^\/(.+)\/([a-z]*)$/,Bi="validity",Ri=function(e){return b(e)?e.toLowerCase():e},Fi=Object.prototype.hasOwnProperty,qi=function(e){return b(e)?e.toUpperCase():e},Hi=function(e){return b(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},ji=function(e){return b(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Ri=Hi,qi=ji);var zi,Vi,Wi,Gi,Ki=[].slice,Zi=[].splice,Xi=[].push,Yi=Object.prototype.toString,Ji=i("ng"),Qi=e.angular||(e.angular={}),ea=0;zi=t.documentMode,h.$inject=[],f.$inject=[];var ta,na=Array.isArray,ia=function(e){return b(e)?e.trim():e},aa=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#(?:<\/\1>|)$/,Sa=/<|?\w+;/,Ca=/<([\w:]+)/,Ma=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,xa={option:[1,''," "],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};xa.optgroup=xa.option,xa.tbody=xa.tfoot=xa.colgroup=xa.caption=xa.thead,xa.th=xa.td;var Aa=_t.prototype={ready:function(n){function i(){a||(a=!0,n())}var a=!1;"complete"===t.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),_t(e).on("load",i))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Vi(e>=0?this[e]:this[this.length+e])},length:0,push:Xi,sort:[].sort,splice:[].splice},Ta={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ta[Ri(e)]=e});var Ea={};o("input,select,option,textarea,button,form,details".split(","),function(e){Ea[e]=!0});var Ia={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:kt,removeData:wt},function(e,t){_t[t]=e}),o({data:kt,inheritedData:Tt,scope:function(e){return Vi.data(e,"$scope")||Tt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Vi.data(e,"$isolateScope")||Vi.data(e,"$isolateScopeNoTemplate")},controller:At,injector:function(e){return Tt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:St,css:function(e,t,n){return t=pt(t),y(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,i){var a=Ri(t);if(Ta[a]){if(!y(i))return e[t]||(e.attributes.getNamedItem(t)||h).specified?a:n;i?(e[t]=!0,e.setAttribute(t,a)):(e[t]=!1,e.removeAttribute(a))}else if(y(i))e.setAttribute(t,i);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){return y(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(_(t)){var n=e.nodeType;return n===ca||n===da?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(_(t)){if(e.multiple&&"select"===P(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return _(t)?e.innerHTML:(vt(e,!0),void(e.innerHTML=t))},empty:Et},function(e,t){_t.prototype[t]=function(t,i){var a,o,r=this.length;if(e!==Et&&(2==e.length&&e!==St&&e!==At?t:i)===n){if(v(t)){for(a=0;r>a;a++)if(e===kt)e(this[a],t);else for(o in t)e(this[a],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(r,1):r,c=0;l>c;c++){var d=e(this[c],t,i);s=s?s+d:d}return s}for(a=0;r>a;a++)e(this[a],t,i);return this}}),o({removeData:wt,on:function Or(e,t,n,i){if(y(i))throw $a("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ht(e)){var a=$t(e,!0),o=a.events,r=a.handle;r||(r=a.handle=Lt(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var c=o[t];c||(o[t]=[],"mouseenter"===t||"mouseleave"===t?Or(e,wa[t],function(e){var n=this,i=e.relatedTarget;(!i||i!==n&&!n.contains(i))&&r(e,t)}):"$destroy"!==t&&_a(e,t,r),c=o[t]),c.push(n)}}},off:bt,one:function(e,t,n){e=Vi(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;vt(e),o(new _t(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){e.nodeType===ca&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===ca||n===ma){t=new _t(t);for(var i=0,a=t.length;a>i;i++){var o=t[i];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===ca){var n=e.firstChild;o(new _t(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Vi(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:It,detach:function(e){It(e,!0)},after:function(e,t){var n=e,i=e.parentNode;t=new _t(t);for(var a=0,o=t.length;o>a;a++){var r=t[a];i.insertBefore(r,n.nextSibling),n=r}},addClass:Mt,removeClass:Ct,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var i=n;_(i)&&(i=!St(e,t)),(i?Mt:Ct)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==ma?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:yt,triggerHandler:function(e,t,n){var i,a,r,s=t.type||t,l=$t(e),c=l&&l.events,d=c&&c[s];d&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:h,type:s,target:e},t.type&&(i=u(i,t)),a=O(d),r=n?[i].concat(n):[i],o(a,function(t){i.isImmediatePropagationStopped()||t.apply(e,r)}))}},function(e,t){_t.prototype[t]=function(t,n,i){for(var a,o=0,r=this.length;r>o;o++)_(a)?(a=e(this[o],t,n,i),y(a)&&(a=Vi(a))):xt(a,e(this[o],t,n,i));return y(a)?a:this},_t.prototype.bind=_t.prototype.on,_t.prototype.unbind=_t.prototype.off}),Ut.prototype={put:function(e,t){this[Ot(e,this.nextUid)]=t},get:function(e){return this[Ot(e,this.nextUid)]},remove:function(e){var t=this[e=Ot(e,this.nextUid)];return delete this[e],t}};var Da=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Pa=/,/,Na=/^\s*(_?)(\S+?)\1\s*$/,La=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Oa=i("$injector");Ft.$$annotate=Rt;var Ua=i("$animate"),Ba=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var i=t+"-animation";if(t&&"."!=t.charAt(0))throw Ua("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=i,e.factory(i,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function i(t){var i,a=e.defer();return a.promise.$$cancelFn=function(){i&&i()},n.$$postDigest(function(){i=t(function(){a.resolve()})}),a.promise}function a(e,t){var n=[],i=[],a=lt();return o((e.attr("class")||"").split(/\s+/),function(e){a[e]=!0}),o(t,function(e,t){var o=a[t];e===!1&&o?i.push(t):e!==!0||o||n.push(t)}),n.length+i.length>0&&[n.length?n:null,i.length?i:null]}function r(e,t,n){for(var i=0,a=t.length;a>i;++i){var o=t[i];e[o]=n}}function s(){return c||(c=e.defer(),t(function(){c.resolve(),c=null})),c.promise}function l(e,t){if(Qi.isObject(t)){var n=u(t.from||{},t.to||{});e.css(n)}}var c;return{animate:function(e,t,n){return l(e,{from:t,to:n}),s()},enter:function(e,t,n,i){return l(e,i),n?n.after(e):t.prepend(e),s()},leave:function(e){return e.remove(),s()},move:function(e,t,n,i){return this.enter(e,t,n,i)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=Vi(e),t=b(t)?t:na(t)?t.join(" "):"",o(e,function(e){Mt(e,t)}),l(e,n),s()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=Vi(e),t=b(t)?t:na(t)?t.join(" "):"",o(e,function(e){Ct(e,t)}),l(e,n),s()},setClass:function(e,t,n,o){var s=this,l="$$animateClasses",c=!1;e=Vi(e);var d=e.data(l);d?o&&d.options&&(d.options=Qi.extend(d.options||{},o)):(d={classes:{},options:o},c=!0);var u=d.classes;return t=na(t)?t:t.split(" "),n=na(n)?n:n.split(" "),r(u,t,!0),r(u,n,!1),c&&(d.promise=i(function(t){var n=e.data(l);if(e.removeData(l),n){var i=a(e,n.classes);i&&s.$$setClassImmediately(e,i[0],i[1],n.options)}t()}),e.data(l,d)),d.promise},$$setClassImmediately:function(e,t,n,i){return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),l(e,i),s()},enabled:h,cancel:h}}]}],Ra=i("$compile");Gt.$inject=["$provide","$$sanitizeUriProvider"];var Fa=/^((?:x|data)[\:\-_])/i,qa="application/json",Ha={"Content-Type":qa+";charset=utf-8"},ja=/^\s*(\[|\{[^\{])/,za=/[\}\]]\s*$/,Va=/^\)\]\}',?\n/,Wa=i("$interpolate"),Ga=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Ka={http:80,https:443,ftp:21},Za=i("$location"),Xa={$$html5:!1,$$replace:!1,absUrl:kn("$$absUrl"),url:function(e){if(_(e))return this.$$url;var t=Ga.exec(e);return t[1]&&this.path(decodeURIComponent(t[1])),(t[2]||t[1])&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:kn("$$protocol"),host:kn("$$host"),port:kn("$$port"),path:Sn("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(b(e)||w(e))e=e.toString(),this.$$search=W(e);else{if(!v(e))throw Za("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=L(e,{}),o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:_(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Sn("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};o([$n,wn,bn],function(e){e.prototype=Object.create(Xa),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==bn||!this.$$html5)throw Za("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=_(t)?null:t,this}});var Ya=i("$parse"),Ja=Function.prototype.call,Qa=Function.prototype.apply,eo=Function.prototype.bind,to=lt();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,to[t]=e}),to["this"]=function(e){return e},to["this"].sharedGetter=!0;var no=u(lt(),{"+":function(e,t,i,a){return i=i(e,t),a=a(e,t),y(i)?y(a)?i+a:i:y(a)?a:n},"-":function(e,t,n,i){return n=n(e,t),i=i(e,t),(y(n)?n:0)-(y(i)?i:0)},"*":function(e,t,n,i){return n(e,t)*i(e,t)},"/":function(e,t,n,i){return n(e,t)/i(e,t)},"%":function(e,t,n,i){return n(e,t)%i(e,t)},"===":function(e,t,n,i){return n(e,t)===i(e,t)},"!==":function(e,t,n,i){return n(e,t)!==i(e,t)},"==":function(e,t,n,i){return n(e,t)==i(e,t)},"!=":function(e,t,n,i){return n(e,t)!=i(e,t)},"<":function(e,t,n,i){return n(e,t)":function(e,t,n,i){return n(e,t)>i(e,t)},"<=":function(e,t,n,i){return n(e,t)<=i(e,t)},">=":function(e,t,n,i){return n(e,t)>=i(e,t)},"&&":function(e,t,n,i){return n(e,t)&&i(e,t)},"||":function(e,t,n,i){return n(e,t)||i(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),io={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},ao=function(e){this.options=e};ao.prototype={constructor:ao,lex:function(e){for(this.text=e,this.index=0,this.ch=n,this.tokens=[];this.index="0"&&"9">=e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||""===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=y(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Ya("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index0){var a=this.tokens[0],o=a.text;if(o===e||o===t||o===n||o===i||!e&&!t&&!n&&!i)return a}return!1},expect:function(e,t,n,i){var a=this.peek(e,t,n,i);return a?(this.tokens.shift(),a):!1},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return u(function(n,i){return e(n,i,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,i){return u(function(i,a){return t(i,a,e,n)},{constant:e.constant&&n.constant,inputs:!i&&[e,n]})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var i,a=0,o=e.length;o>a;a++)i=e[a](t,n);return i}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},filter:function(e){var t,i,a=this.expect(),o=this.$filter(a.text);if(this.peek(":"))for(t=[],i=[];this.expect(":");)t.push(this.expression());var r=[e].concat(t||[]);return u(function(a,r){var s=e(a,r);if(i){i[0]=s;for(var l=t.length;l--;)i[l+1]=t[l](a,r);return o.apply(n,i)}return o(s)},{constant:!o.$stateful&&r.every(En),inputs:!o.$stateful&&r})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),u(function(t,i){return n.assign(t,e(t,i),i)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if(t=this.expect("?")){if(e=this.assignment(),t=this.expect(":")){var i=this.assignment();
+return u(function(t,a){return n(t,a)?e(t,a):i(t,a)},{constant:n.constant&&e.constant&&i.constant})}this.throwError("expected :",t)}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.fn,this.logicalAND(),!0);return t},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND(),!0)),t},equality:function(){var e,t=this.relational();return(e=this.expect("==","!=","===","!=="))&&(t=this.binaryFn(t,e.fn,this.equality())),t},relational:function(){var e,t=this.additive();return(e=this.expect("<",">","<=",">="))&&(t=this.binaryFn(t,e.fn,this.relational())),t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.fn,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.fn,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(oo.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this.text,n=this.expect().text,i=Ln(n,this.options,t);return u(function(t,n,a){return i(a||e(t,n))},{assign:function(i,a,o){var r=e(i,o);return r||e.assign(i,r={}),In(r,n,a,t)}})},objectIndex:function(e){var t=this.text,i=this.expression();return this.consume("]"),u(function(a,o){var r,s=e(a,o),l=i(a,o);return xn(l,t),s?r=An(s[l],t):n},{assign:function(n,a,o){var r=xn(i(n,o),t),s=An(e(n,o),t);return s||e.assign(n,s={}),s[r]=a}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,a=n.length?[]:null;return function(o,r){var s=t?t(o,r):o,l=e(o,r,s)||h;if(a)for(var c=n.length;c--;)a[c]=An(n[c](o,r),i);An(s,i),Tn(l,i);var d=l.apply?l.apply(s,a):l(a[0],a[1],a[2],a[3],a[4]);return An(d,i)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var t=this.expression();e.push(t)}while(this.expect(","));return this.consume("]"),u(function(t,n){for(var i=[],a=0,o=e.length;o>a;a++)i.push(e[a](t,n));return i},{literal:!0,constant:e.every(En),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect();e.push(n.string||n.text),this.consume(":");var i=this.expression();t.push(i)}while(this.expect(","));return this.consume("}"),u(function(n,i){for(var a={},o=0,r=t.length;r>o;o++)a[e[o]]=t[o](n,i);return a},{literal:!0,constant:t.every(En),inputs:t})}};var ro=lt(),so=lt(),lo=Object.prototype.valueOf,co=i("$sce"),uo={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Ra=i("$compile"),po=t.createElement("a"),mo=Jn(e.location.href,!0);ti.$inject=["$provide"],ii.$inject=["$locale"],ai.$inject=["$locale"];var ho=".",fo={yyyy:si("FullYear",4),yy:si("FullYear",2,0,!0),y:si("FullYear",1),MMMM:li("Month"),MMM:li("Month",!0),MM:si("Month",2,1),M:si("Month",1,1),dd:si("Date",2),d:si("Date",1),HH:si("Hours",2),H:si("Hours",1),hh:si("Hours",2,-12),h:si("Hours",1,-12),mm:si("Minutes",2),m:si("Minutes",1),ss:si("Seconds",2),s:si("Seconds",1),sss:si("Milliseconds",3),EEEE:li("Day"),EEE:li("Day",!0),a:mi,Z:ci,ww:pi(2),w:pi(1)},go=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,_o=/^\-?\d+$/;hi.$inject=["$locale"];var yo=g(Ri),vo=g(qi);_i.$inject=["$parse"];var bo=g({restrict:"E",compile:function(e,t){return t.href||t.xlinkHref||t.name?void 0:function(e,t){var n="[object SVGAnimatedString]"===Yi.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),wo={};o(Ta,function(e,t){if("multiple"!=e){var n=Kt("ng-"+t);wo[n]=function(){return{restrict:"A",priority:100,link:function(e,i,a){e.$watch(a[n],function(e){a.$set(t,!!e)})}}}}}),o(Ia,function(e,t){wo[t]=function(){return{priority:100,link:function(e,n,i){if("ngPattern"===t&&"/"==i.ngPattern.charAt(0)){var a=i.ngPattern.match(Ui);if(a)return void i.$set("ngPattern",new RegExp(a[1],a[2]))}e.$watch(i[t],function(e){i.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=Kt("ng-"+e);wo[t]=function(){return{priority:99,link:function(n,i,a){var o=e,r=e;"href"===e&&"[object SVGAnimatedString]"===Yi.call(i.prop("href"))&&(r="xlinkHref",a.$attr[r]="xlink:href",o=null),a.$observe(t,function(t){return t?(a.$set(r,t),void(zi&&o&&i.prop(o,a[r]))):void("href"===e&&a.$set(r,null))})}}}});var $o={$addControl:h,$$renameControl:vi,$removeControl:h,$setValidity:h,$setDirty:h,$setPristine:h,$setSubmitted:h},ko="ng-submitted";bi.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var So=function(e){return["$timeout",function(t){var i={name:"form",restrict:e?"EAC":"E",controller:bi,compile:function(e){return e.addClass(Ho).addClass(Fo),{pre:function(e,i,a,o){if(!("action"in a)){var r=function(t){e.$apply(function(){o.$commitViewValue(),o.$setSubmitted()}),t.preventDefault?t.preventDefault():t.returnValue=!1};_a(i[0],"submit",r),i.on("$destroy",function(){t(function(){ya(i[0],"submit",r)},0,!1)})}var s=o.$$parentForm,l=o.$name;l&&(In(e,l,o,l),a.$observe(a.name?"name":"ngForm",function(t){l!==t&&(In(e,l,n,l),l=t,In(e,l,o,l),s.$$renameControl(o,l))})),i.on("$destroy",function(){s.$removeControl(o),l&&In(e,l,n,l),u(o,$o)})}}}};return i}]},Co=So(),Mo=So(!0),xo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Ao=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,To=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Eo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Io=/^(\d{4})-(\d{2})-(\d{2})$/,Do=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Po=/^(\d{4})-W(\d\d)$/,No=/^(\d{4})-(\d\d)$/,Lo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oo=/(\s+|^)default(\s+|$)/,Uo=new i("ngModel"),Bo={text:$i,date:Mi("date",Io,Ci(Io,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Mi("datetimelocal",Do,Ci(Do,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Mi("time",Lo,Ci(Lo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Mi("week",Po,Si,"yyyy-Www"),month:Mi("month",No,Ci(No,["yyyy","MM"]),"yyyy-MM"),number:Ai,url:Ti,email:Ei,radio:Ii,checkbox:Pi,hidden:h,button:h,submit:h,reset:h,file:h},Ro=["$browser","$sniffer","$filter","$parse",function(e,t,n,i){return{restrict:"E",require:["?ngModel"],link:{pre:function(a,o,r,s){s[0]&&(Bo[Ri(r.type)]||Bo.text)(a,o,r,s[0],t,e,n,i)}}}}],Fo="ng-valid",qo="ng-invalid",Ho="ng-pristine",jo="ng-dirty",zo="ng-untouched",Vo="ng-touched",Wo="ng-pending",Go=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,i,a,r,s,l,c,d,u){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,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=n,this.$name=u(i.name||"",!1)(e);var p=r(i.ngModel),m=null,f=this,g=function(){var t=p(e);return f.$options&&f.$options.getterSetter&&k(t)&&(t=t()),t},v=function(){var t;f.$options&&f.$options.getterSetter&&k(t=p(e))?t(f.$modelValue):p.assign(e,f.$modelValue)};this.$$setOptions=function(e){if(f.$options=e,!(p.assign||e&&e.getterSetter))throw Uo("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,z(a))},this.$render=h,this.$isEmpty=function(e){return _(e)||""===e||null===e||e!==e};var b=a.inheritedData("$formController")||$o,$=0;Ni({ctrl:this,$element:a,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:b,$animate:s}),this.$setPristine=function(){f.$dirty=!1,f.$pristine=!0,s.removeClass(a,jo),s.addClass(a,Ho)},this.$setUntouched=function(){f.$touched=!1,f.$untouched=!0,s.setClass(a,zo,Vo)},this.$setTouched=function(){f.$touched=!0,f.$untouched=!1,s.setClass(a,Vo,zo)},this.$rollbackViewValue=function(){l.cancel(m),f.$viewValue=f.$$lastCommittedViewValue,f.$render()},this.$validate=function(){w(f.$modelValue)&&isNaN(f.$modelValue)||this.$$parseAndValidate()},this.$$runValidators=function(e,t,i,a){function r(e){var t=f.$$parserName||"parse";if(e===n)c(t,null);else if(c(t,e),!e)return o(f.$validators,function(e,t){c(t,null)}),o(f.$asyncValidators,function(e,t){c(t,null)}),!1;return!0}function s(){var e=!0;return o(f.$validators,function(n,a){var o=n(t,i);e=e&&o,c(a,o)}),e?!0:(o(f.$asyncValidators,function(e,t){c(t,null)}),!1)}function l(){var e=[],a=!0;o(f.$asyncValidators,function(o,r){var s=o(t,i);if(!E(s))throw Uo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);c(r,n),e.push(s.then(function(){c(r,!0)},function(){a=!1,c(r,!1)}))}),e.length?d.all(e).then(function(){u(a)},h):u(!0)}function c(e,t){p===$&&f.$setValidity(e,t)}function u(e){p===$&&a(e)}$++;var p=$;return r(e)&&s()?void l():void u(!1)},this.$commitViewValue=function(){var e=f.$viewValue;l.cancel(m),(f.$$lastCommittedViewValue!==e||""===e&&f.$$hasNativeValidators)&&(f.$$lastCommittedViewValue=e,f.$pristine&&(f.$dirty=!0,f.$pristine=!1,s.removeClass(a,Ho),s.addClass(a,jo),b.$setDirty()),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){f.$modelValue!==r&&f.$$writeModelToScope()}var t=f.$$lastCommittedViewValue,i=t,a=_(i)?n:!0;if(a)for(var o=0;o0&&(e=new RegExp(e)),e&&!e.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,z(t));r=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||_(r)||r.test(e)}}}}},Jo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var a=0;n.$observe("maxlength",function(e){a=p(e)||0,i.$validate()}),i.$validators.maxlength=function(e,t){return i.$isEmpty(e)||t.length<=a}}}}},Qo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){var a=0;n.$observe("minlength",function(e){a=p(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){return i.$isEmpty(e)||t.length>=a}}}}},er=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,a){var r=t.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,l=s?ia(r):r,c=function(e){if(!_(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?ia(e):e)}),t}};a.$parsers.push(c),a.$formatters.push(function(e){return na(e)?e.join(r):n}),a.$isEmpty=function(e){return!e||!e.length}}}},tr=/^(true|false|\d+)$/,nr=function(){return{restrict:"A",priority:100,compile:function(e,t){return tr.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},ir=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var i=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=ia(this.$options.updateOn.replace(Oo,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ar=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,i,a){e.$$addBindingInfo(i,a.ngBind),i=i[0],t.$watch(a.ngBind,function(e){i.textContent=e===n?"":e})}}}}],or=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,a,o){var r=e(a.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(a,r.expressions),a=a[0],o.$observe("ngBindTemplate",function(e){a.textContent=e===n?"":e})}}}}],rr=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,a){var o=t(a.ngBindHtml),r=t(a.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(i),function(t,i,a){n.$$addBindingInfo(i,a.ngBindHtml),t.$watch(r,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],sr=Oi("",!0),lr=Oi("Odd",0),cr=Oi("Even",1),dr=yi({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),ur=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],pr={},mr={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Kt("ng-"+e);pr[t]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(a,o){var r=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var a=function(){r(t,{$event:n})};mr[e]&&i.$$phase?t.$evalAsync(a):t.$apply(a)})}}}}]});var hr=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,a,o,r){var s,l,c;n.$watch(a.ngIf,function(n){n?l||r(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+a.ngIf+" "),s={clone:n},e.enter(n,i.parent(),i)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),s&&(c=st(s.clone),e.leave(c).then(function(){c=null}),s=null))})}}}],fr=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,i){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Qi.noop,compile:function(a,o){var r=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(a,o,c,d,u){var p,m,h,f=0,g=function(){m&&(m.remove(),m=null),p&&(p.$destroy(),p=null),h&&(n.leave(h).then(function(){m=null}),m=h,h=null)};a.$watch(i.parseAsResourceUrl(r),function(i){var r=function(){!y(l)||l&&!a.$eval(l)||t()},c=++f;i?(e(i,!0).then(function(e){if(c===f){var t=a.$new();d.template=e;var l=u(t,function(e){g(),n.enter(e,null,o).then(r)});p=t,h=l,p.$emit("$includeContentLoaded",i),a.$eval(s)}},function(){c===f&&(g(),a.$emit("$includeContentError",i))}),a.$emit("$includeContentRequested",i)):(g(),d.template=null)})}}}}],gr=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,i,a,o){return/SVG/.test(i[0].toString())?(i.empty(),void e(ft(o.template,t).childNodes)(n,function(e){i.append(e)},{futureParentElement:i})):(i.html(o.template),void e(i.contents())(n))}}}],_r=yi({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),yr=yi({terminal:!0,priority:1e3}),vr=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,a,r){var s=r.count,l=r.$attr.when&&a.attr(r.$attr.when),c=r.offset||0,d=i.$eval(l)||{},u={},p=t.startSymbol(),m=t.endSymbol(),h=/^when(Minus)?(.+)$/;o(r,function(e,t){h.test(t)&&(d[Ri(t.replace("when","").replace("Minus","-"))]=a.attr(r.$attr[t]))}),o(d,function(e,i){u[i]=t(e.replace(n,p+s+"-"+c+m))}),i.$watch(function(){var t=parseFloat(i.$eval(s));return isNaN(t)?"":(t in d||(t=e.pluralCat(t-c)),u[t](i))},function(e){a.text(e)})}}}],br=["$parse","$animate",function(e,r){var s="$$NG_REMOVED",l=i("ngRepeat"),c=function(e,t,n,i,a,o,r){e[n]=i,a&&(e[a]=o),e.$index=t,e.$first=0===t,e.$last=t===r-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},d=function(e){return e.clone[0]},u=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(i,p){var m=p.ngRepeat,h=t.createComment(" end ngRepeat: "+m+" "),f=m.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!f)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",m);var g=f[1],_=f[2],y=f[3],v=f[4];if(f=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!f)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=f[3]||f[1],w=f[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(y)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var $,k,S,C,M={$id:Ot};return v?$=e(v):(S=function(e,t){return Ot(t)},C=function(e){return e}),function(e,t,i,p,f){$&&(k=function(t,n,i){return w&&(M[w]=t),M[b]=n,M.$index=i,$(e,M)});var g=lt();e.$watchCollection(_,function(i){var p,_,v,$,M,x,A,T,E,I,D,P,N=t[0],L=lt();if(y&&(e[y]=i),a(i))E=i,T=k||S;else{T=k||C,E=[];for(var O in i)i.hasOwnProperty(O)&&"$"!=O.charAt(0)&&E.push(O);E.sort()}for($=E.length,D=new Array($),p=0;$>p;p++)if(M=i===E?p:E[p],x=i[M],A=T(M,x,p),g[A])I=g[A],delete g[A],L[A]=I,D[p]=I;else{if(L[A])throw o(D,function(e){e&&e.scope&&(g[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",m,A,H(x));D[p]={id:A,scope:n,clone:n},L[A]=!0}for(var U in g){if(I=g[U],P=st(I.clone),r.leave(P),P[0].parentNode)for(p=0,_=P.length;_>p;p++)P[p][s]=!0;I.scope.$destroy()}for(p=0;$>p;p++)if(M=i===E?p:E[p],x=i[M],I=D[p],I.scope){v=N;do v=v.nextSibling;while(v&&v[s]);d(I)!=v&&r.move(st(I.clone),null,Vi(N)),N=u(I),c(I.scope,p,b,x,w,M,$)}else f(function(e,t){I.scope=t;var n=h.cloneNode(!1);e[e.length++]=n,r.enter(e,null,Vi(N)),N=n,I.clone=e,L[I.id]=I,c(I.scope,p,b,x,w,M,$)});g=L})}}}}],wr="ng-hide",$r="ng-hide-animate",kr=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,wr,{tempClasses:$r})})}}}],Sr=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,wr,{tempClasses:$r})})}}}],Cr=yi(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Mr=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,a,r){var s=a.ngSwitch||a.on,l=[],c=[],d=[],u=[],p=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,a;for(i=0,a=d.length;a>i;++i)e.cancel(d[i]);for(d.length=0,i=0,a=u.length;a>i;++i){var s=st(c[i].clone);u[i].$destroy();var m=d[i]=e.leave(s);m.then(p(d,i))}c.length=0,u.length=0,(l=r.cases["!"+n]||r.cases["?"])&&o(l,function(n){n.transclude(function(i,a){u.push(a);var o=n.element;i[i.length++]=t.createComment(" end ngSwitchWhen: ");var r={clone:i};c.push(r),e.enter(i,o.parent(),o)})})})}}}],xr=yi({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,a){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:a,element:t})}}),Ar=yi({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,a){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:a,element:t})}}),Tr=yi({restrict:"EAC",link:function(e,t,n,a,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(t));o(function(e){t.empty(),t.append(e)})}}),Er=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,a=t[0].text;e.put(i,a)}}}}],Ir=i("ngOptions"),Dr=g({restrict:"A",terminal:!0}),Pr=["$compile","$parse",function(e,i){var a=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\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]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var i,a,o=this,r={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,i=t,a=n},o.addOption=function(t,n){ot(t,'"option value"'),r[t]=!0,l.$viewValue==t&&(e.val(t),a.parent()&&a.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete r[e],l.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Ot(t)+" ?";a.val(n),e.prepend(a),e.val(n),a.prop("selected",!0)},o.hasOption=function(e){return r.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=h})}],link:function(s,l,c,d){function u(e,t,n,i){n.$render=function(){var e=n.$viewValue;i.hasOption(e)?(C.parent()&&C.remove(),t.val(e),""===e&&h.prop("selected",!0)):_(e)&&h?t.val(""):i.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(t.val())})})}function p(e,t,n){var i;n.$render=function(){var e=new Ut(n.$viewValue);o(t.find("option"),function(t){t.selected=y(e.get(t.value))})},e.$watch(function(){U(i,n.$viewValue)||(i=O(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function m(t,s,l){function c(e,n,i){return B[x]=i,E&&(B[E]=n),e(t,B)}function d(){t.$apply(function(){var e,n=P(t)||[];if(v)e=[],o(s.val(),function(t){t=L?O[t]:t,e.push(u(t,n[t]))});else{var i=L?O[s.val()]:s.val();e=u(i,n[i])}l.$setViewValue(e),_()})}function u(e,t){if("?"===e)return n;if(""===e)return null;var i=T?T:D;return c(i,e,t)}function p(){var e,n=P(t);if(n&&na(n)){e=new Array(n.length);for(var i=0,a=n.length;a>i;i++)e[i]=c(M,i,n[i]);return e}if(n){e={};for(var o in n)n.hasOwnProperty(o)&&(e[o]=c(M,o,n[o]))}return e}function m(e){var t;if(v)if(L&&na(e)){t=new Ut([]);for(var n=0;nx;x++)p=x,E&&(p=z[x],"$"===p.charAt(0))||(h=j[p],e=c(I,p,h)||"",(n=F[e])||(n=F[e]=[],q.push(e)),A=W(p,h),G=G||A,N=c(M,p,h),N=y(N)?N:"",R=L?L(t,B):E?z[x]:x,L&&(O[R]=p),n.push({id:R,label:N,selected:A}));for(v||(w||null===H?F[""].unshift({id:"",label:"",selected:!G}):G||F[""].unshift({id:"?",label:"",selected:!0})),C=0,_=q.length;_>C;C++){for(e=q[C],n=F[e],U.length<=C?(a={element:S.clone().attr("label",e),label:n.label},d=[a],U.push(d),s.append(a.element)):(d=U[C],a=d[0],a.label!=e&&a.element.attr("label",a.label=e)),T=null,x=0,b=n.length;b>x;x++)i=n[x],(u=d[x+1])?(T=u.element,u.label!==i.label&&(g(V,u.label,!1),g(V,i.label,!0),T.text(u.label=i.label)),u.id!==i.id&&T.val(u.id=i.id),T[0].selected!==i.selected&&(T.prop("selected",u.selected=i.selected),zi&&T.prop("selected",u.selected))):(""===i.id&&w?D=w:(D=k.clone()).val(i.id).prop("selected",i.selected).attr("selected",i.selected).text(i.label),d.push(u={element:D,label:i.label,id:i.id,selected:i.selected}),g(V,i.label,!0),T?T.after(D):a.element.append(D),T=D);for(x++;d.length>x;)i=d.pop(),g(V,i.label,!1),i.element.remove();o(V,function(e,t){e>0?f.addOption(t):0>e&&f.removeOption(t)})}for(;U.length>C;)U.pop()[0].element.remove()}var C;if(!(C=b.match(a)))throw Ir("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,z(s));var M=i(C[2]||C[1]),x=C[4]||C[6],A=/ as /.test(C[0])&&C[1],T=A?i(A):null,E=C[5],I=i(C[3]||""),D=i(C[2]?C[1]:x),P=i(C[7]),N=C[8],L=N?i(C[8]):null,O={},U=[[{element:s,label:""}]],B={};w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",d),l.$render=_,t.$watchCollection(P,h),t.$watchCollection(p,h),v&&t.$watchCollection(function(){return l.$modelValue},h)}if(d[1]){for(var h,f=d[0],g=d[1],v=c.multiple,b=c.ngOptions,w=!1,$=!1,k=Vi(t.createElement("option")),S=Vi(t.createElement("optgroup")),C=k.clone(),M=0,x=l.children(),A=x.length;A>M;M++)if(""===x[M].value){h=w=x.eq(M);break}f.init(g,w,C),v&&(g.$isEmpty=function(e){return!e||0===e.length}),b?m(s,l,g):v?p(s,l,g):u(s,l,g,f)}}}}],Nr=["$interpolate",function(e){var t={addOption:h,removeOption:h};return{restrict:"E",priority:100,compile:function(n,i){if(_(i.value)){var a=e(n.text(),!0);a||i.$set("value",n.text())}return function(e,n,i){var o="$selectController",r=n.parent(),s=r.data(o)||r.parent().data(o);s&&s.databound||(s=t),a?e.$watch(a,function(e,t){i.$set("value",e),t!==e&&s.removeOption(t),s.addOption(e,n)}):s.addOption(i.value,n),n.on("$destroy",function(){s.removeOption(i.value)})}}}}],Lr=g({restrict:"E",terminal:!1});return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(nt(),dt(Qi),void Vi(t).ready(function(){Y(t,J)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend(''),function(e,t){"use strict";function n(){function e(e,n){return t.extend(new(t.extend(function(){},{prototype:e})),n)}function n(e,t){var n=t.caseInsensitiveMatch,i={originalPath:e,regexp:e},a=i.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,i){var o="?"===i?i:null,r="*"===i?i:null;return a.push({name:n,optional:!!o}),t=t||"",""+(o?"":t)+"(?:"+(o?t:"")+(r&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+e+"$",n?"i":""),i}var i={};this.when=function(e,a){var o=t.copy(a);if(t.isUndefined(o.reloadOnSearch)&&(o.reloadOnSearch=!0),i[e]=t.extend(o,e&&n(e,o)),e){var r="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";i[r]=t.extend({redirectTo:e},n(r,o))}return this},this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,a,o,r,l,c,d){function u(e,t){var n=t.keys,i={};if(!t.regexp)return null;var a=t.regexp.exec(e);if(!a)return null;for(var o=1,r=a.length;r>o;++o){var s=n[o-1],l=a[o];s&&l&&(i[s.name]=l)}return i}function p(e){var i=v.current;g=h(),_=g&&i&&g.$$route===i.$$route&&t.equals(g.pathParams,i.pathParams)&&!g.reloadOnSearch&&!y,_||!i&&!g||n.$broadcast("$routeChangeStart",g,i).defaultPrevented&&e&&e.preventDefault()}function m(){var e=v.current,i=g;_?(e.params=i.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e)):(i||e)&&(y=!1,v.current=i,i&&i.redirectTo&&(t.isString(i.redirectTo)?a.path(f(i.redirectTo,i.params)).search(i.params).replace():a.url(i.redirectTo(i.pathParams,a.path(),a.search())).replace()),r.when(i).then(function(){if(i){var e,n,a=t.extend({},i.resolve);return t.forEach(a,function(e,n){a[n]=t.isString(e)?l.get(e):l.invoke(e,null,null,n)}),t.isDefined(e=i.template)?t.isFunction(e)&&(e=e(i.params)):t.isDefined(n=i.templateUrl)&&(t.isFunction(n)&&(n=n(i.params)),n=d.getTrustedResourceUrl(n),t.isDefined(n)&&(i.loadedTemplateUrl=n,e=c(n))),t.isDefined(e)&&(a.$template=e),r.all(a)}}).then(function(a){i==v.current&&(i&&(i.locals=a,t.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,e))},function(t){i==v.current&&n.$broadcast("$routeChangeError",i,e,t)}))}function h(){var n,o;return t.forEach(i,function(i){!o&&(n=u(a.path(),i))&&(o=e(i,{params:t.extend({},a.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&e(i[null],{params:{},pathParams:{}})}function f(e,n){var i=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)i.push(e);else{var a=e.match(/(\w+)(.*)/),o=a[1];i.push(n[o]),i.push(a[2]||""),delete n[o]}}),i.join("")}var g,_,y=!1,v={routes:i,reload:function(){y=!0,n.$evalAsync(function(){p(),m()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw s("norout","Tried updating route when with no current route");var n={},i=this;t.forEach(Object.keys(e),function(t){i.current.pathParams[t]||(n[t]=e[t])}),e=t.extend({},this.current.params,e),a.path(f(this.current.$$route.originalPath,e)),a.search(t.extend({},a.search(),n))}};return n.$on("$locationChangeStart",p),n.$on("$locationChangeSuccess",m),v}]}function i(){this.$get=function(){return{}}}function a(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,o,r,s,l){function c(){m&&(i.cancel(m),m=null),u&&(u.$destroy(),u=null),p&&(m=i.leave(p),m.then(function(){m=null}),p=null)}function d(){var r=e.current&&e.current.locals,s=r&&r.$template;if(t.isDefined(s)){var d=a.$new(),m=e.current,g=l(d,function(e){i.enter(e,null,p||o).then(function(){!t.isDefined(h)||h&&!a.$eval(h)||n()}),c()});p=g,u=m.scope=d,u.$emit("$viewContentLoaded"),u.$eval(f)}else c()}var u,p,m,h=r.autoscroll,f=r.onload||"";a.$on("$routeChangeSuccess",d),d()}}}function o(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,a){var o=n.current,r=o.locals;a.html(r.$template);var s=e(a.contents());if(o.controller){r.$scope=i;var l=t(o.controller,r);o.controllerAs&&(i[o.controllerAs]=l),a.data("$ngControllerController",l),a.children().data("$ngControllerController",l)}s(i)}}}var r=t.module("ngRoute",["ng"]).provider("$route",n),s=t.$$minErr("ngRoute");r.provider("$routeParams",i),r.directive("ngView",a),r.directive("ngView",o),a.$inject=["$route","$anchorScroll","$animate"],o.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var e="$$ngAnimateChildren";return function(n,i,a){var o=a.ngAnimateChildren;t.isString(o)&&0===o.length?i.data(e,!0):n.$watch(o,function(t){i.data(e,!!t)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,t){var n=t[0].body;return function(t){return e(function(){n.offsetWidth+1;t()})}}]).config(["$provide","$animateProvider",function(i,a){function o(e){for(var t=0;t0&&[o.join(" "),r.join(" ")]}function T(e){if(e){var t=[],n={},a=e.substr(1).split(".");(f.transitions||f.animations)&&t.push(i.get(u[""]));for(var o=0;o0&&w(function(){i.triggerHandler(a,{event:e,className:n})})}function p(){u("before")}function m(){u("after")}function h(){u("close"),l()}function f(){f.hasBeenRun||(f.hasBeenRun=!0,r())}function _(){if(!_.hasBeenRun){b&&b.applyStyles(),_.hasBeenRun=!0,s&&s.tempClasses&&d(s.tempClasses,function(e){i.removeClass(e)});var t=i.data(g);t&&(b&&b.isClassBased?P(i,n):(w(function(){var t=i.data(g)||{};D==t.index&&P(i,n,e)}),i.data(g,t))),h()}}var v=c,b=E(i,e,n,s);if(!b)return f(),p(),m(),_(),v;e=b.event,n=b.className;var $=t.element._data(b.node);if($=$&&$.events,a||(a=o?o.parent():i.parent()),N(i,a))return f(),p(),m(),_(),v;var k=i.data(g)||{},S=k.active||{},C=k.totalActive||0,M=k.last,x=!1;if(C>0){var A=[];if(b.isClassBased){if("setClass"==M.event)A.push(M),P(i,n);else if(S[n]){var T=S[n];T.event==e?x=!0:(A.push(T),P(i,n))}}else if("leave"==e&&S["ng-leave"])x=!0;else{for(var I in S)A.push(S[I]);k={},P(i,!0)}A.length>0&&d(A,function(e){e.cancel()})}if(!b.isClassBased||b.isSetClassOperation||"animate"==e||x||(x="addClass"==e==i.hasClass(n)),x)return f(),p(),m(),h(),v;S=k.active||{},C=k.totalActive||0,"leave"==e&&i.one("$destroy",function(){var e=t.element(this),n=e.data(g);if(n){var i=n.active["ng-leave"];i&&(i.cancel(),P(e,"ng-leave"))}}),i.addClass(y),s&&s.tempClasses&&d(s.tempClasses,function(e){i.addClass(e)});var D=O++;return C++,S[n]=b,i.data(g,{last:b,active:S,index:D,totalActive:C}),p(),b.before(function(t){var a=i.data(g);t=t||!a||!a.active[n]||b.isClassBased&&a.active[n].event!=e,f(),t===!0?_():(m(),b.after(_))}),b.cancel}function D(e){var n=o(e);if(n){var i=t.isFunction(n.getElementsByClassName)?n.getElementsByClassName(y):n.querySelectorAll("."+y);d(i,function(e){e=t.element(e);var n=e.data(g);n&&n.active&&d(n.active,function(e){e.cancel()})})}}function P(e,t){if(l(e,b))v.disabled||(v.running=!1,v.structural=!1);else if(t){var n=e.data(g)||{},i=t===!0;!i&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),(i||!n.totalActive)&&(e.removeClass(y),e.removeData(g))}}function N(e,n){if(v.disabled)return!0;if(l(e,b))return v.running;var i,a,o;do{if(0===n.length)break;var r=l(n,b),s=r?v:n.data(g)||{};if(s.disabled)return!0;if(r&&(o=!0),i!==!1){var c=n.data(_);t.isDefined(c)&&(i=c)}a=a||s.running||s.last&&!s.last.isClassBased}while(n=n.parent());return!o||!i&&a}b.data(g,v);var L=$.$watch(function(){return S.totalPendingRequests},function(e){0===e&&(L(),$.$$postDigest(function(){$.$$postDigest(function(){v.running=!1})}))}),O=0,U=a.classNameFilter(),B=U?function(e){return U.test(e)}:function(){return!0};return{animate:function(e,t,n,i,a){return i=i||"ng-inline-animate",a=x(a)||{},a.from=n?t:null,a.to=n?n:t,M(function(t){return I("animate",i,s(e),null,null,c,a,t)})},enter:function(n,i,a,o){return o=x(o),n=t.element(n),i=r(i),a=r(a),C(n,!0),e.enter(n,i,a),M(function(e){return I("enter","ng-enter",s(n),i,a,c,o,e)})},leave:function(n,i){return i=x(i),n=t.element(n),D(n),C(n,!0),M(function(t){return I("leave","ng-leave",s(n),null,null,function(){e.leave(n)},i,t)})},move:function(n,i,a,o){return o=x(o),n=t.element(n),i=r(i),a=r(a),D(n),C(n,!0),e.move(n,i,a),M(function(e){return I("move","ng-move",s(n),i,a,c,o,e)})},addClass:function(e,t,n){return this.setClass(e,t,[],n)},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},setClass:function(n,i,a,r){r=x(r);var l="$$animateClasses";if(n=t.element(n),n=s(n),C(n))return e.$$setClassImmediately(n,i,a,r);var c,u=n.data(l),m=!!u;return u||(u={},u.classes={}),c=u.classes,i=p(i)?i:i.split(" "),d(i,function(e){e&&e.length&&(c[e]=!0)}),a=p(a)?a:a.split(" "),d(a,function(e){e&&e.length&&(c[e]=!1)}),m?(r&&u.options&&(u.options=t.extend(u.options||{},r)),u.promise):(n.data(l,u={classes:c,options:r}),u.promise=M(function(t){var i=n.parent(),a=o(n),r=a.parentNode;if(!r||r.$$NG_REMOVED||a.$$NG_REMOVED)return void t();var s=n.data(l);n.removeData(l);var c=n.data(g)||{},d=A(n,s,c.active);return d?I("setClass",d,n,i,null,function(){d[0]&&e.$$addClassImmediately(n,d[0]),d[1]&&e.$$removeClassImmediately(n,d[1])},s.options,t):t()}))},cancel:function(e){e.$$cancelFn()},enabled:function(e,t){switch(arguments.length){case 2:if(e)P(t);else{var n=t.data(g)||{};n.disabled=!0,t.data(g,n)}break;case 1:v.disabled=!e;break;default:e=!v.disabled}return!!e}}}]),a.register("",["$window","$sniffer","$timeout","$$animateReflow",function(i,a,r,s){function l(){N||(N=s(function(){G=[],N=null,V={}}))}function u(e,t){N&&N(),G.push(t),N=s(function(){d(G,function(e){e()}),G=[],N=null,V={}})}function h(e,n){var i=o(e);e=t.element(i),X.push(e);var a=Date.now()+n;Z>=a||(r.cancel(K),Z=a,K=r(function(){g(X),X=[]},n,!1))}function g(e){d(e,function(e){var t=e.data(q);t&&d(t.closeAnimationFns,function(e){e()})})}function _(e,t){var n=t?V[t]:null;if(!n){var a=0,o=0,r=0,s=0;d(e,function(e){if(e.nodeType==f){var t=i.getComputedStyle(e)||{},n=t[T+L];a=Math.max(y(n),a);var l=t[T+U];o=Math.max(y(l),o);{t[I+U]}s=Math.max(y(t[I+U]),s);var c=y(t[I+L]);c>0&&(c*=parseInt(t[I+B],10)||1),r=Math.max(c,r)}}),n={total:0,transitionDelay:o,transitionDuration:a,animationDelay:s,animationDuration:r},t&&(V[t]=n)}return n}function y(e){var t=0,n=m(e)?e.split(/\s*,\s*/):[];return d(n,function(e){t=Math.max(parseFloat(e)||0,t)}),t}function v(e){var t=e.parent(),n=t.data(F);return n||(t.data(F,++W),n=W),n+"-"+o(e).getAttribute("class")}function b(e,t,n,i){var a=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,r=v(t),s=r+" "+n,l=V[s]?++V[s].total:0,c={};if(l>0){var d=n+"-stagger",u=r+" "+d,p=!V[u];p&&t.addClass(d),c=_(t,u),p&&t.removeClass(d)}t.addClass(n);var m=t.data(q)||{},h=_(t,s),f=h.transitionDuration,g=h.animationDuration;if(a&&0===f&&0===g)return t.removeClass(n),!1;var y=i||a&&f>0,b=g>0&&c.animationDelay>0&&0===c.animationDuration,w=m.closeAnimationFns||[];t.data(q,{stagger:c,cacheKey:s,running:m.running||0,itemIndex:l,blockTransition:y,closeAnimationFns:w});var S=o(t);return y&&($(S,!0),i&&t.css(i)),b&&k(S,!0),!0}function w(e,t,n,i,a){function s(){t.off(U,l),t.removeClass(p),t.removeClass(m),L&&r.cancel(L),x(t,n);var e=o(t);for(var i in g)e.style.removeProperty(g[i])}function l(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),a=parseFloat(t.elapsedTime.toFixed(H));Math.max(n-O,0)>=I&&a>=A&&i()}var c=o(t),u=t.data(q);if(-1==c.getAttribute("class").indexOf(n)||!u)return void i();var p="",m="";d(n.split(" "),function(e,t){var n=(t>0?" ":"")+e;p+=n+"-active",m+=n+"-pending"});var f="",g=[],y=u.itemIndex,v=u.stagger,b=0;if(y>0){var w=0;v.transitionDelay>0&&0===v.transitionDuration&&(w=v.transitionDelay*y);var S=0;v.animationDelay>0&&0===v.animationDuration&&(S=v.animationDelay*y,g.push(P+"animation-play-state")),b=Math.round(100*Math.max(w,S))/100}b||(t.addClass(p),u.blockTransition&&$(c,!1));var C=u.cacheKey+" "+p,M=_(t,C),A=Math.max(M.transitionDuration,M.animationDuration);if(0===A)return t.removeClass(p),x(t,n),void i();!b&&a&&(M.transitionDuration||(t.css("transition",M.animationDuration+"s linear all"),g.push("transition")),t.css(a));var T=Math.max(M.transitionDelay,M.animationDelay),I=T*z;if(g.length>0){var N=c.getAttribute("style")||"";";"!==N.charAt(N.length-1)&&(N+=";"),c.setAttribute("style",N+" "+f)}var L,O=Date.now(),U=D+" "+E,B=(T+A)*j,R=(b+B)*z;return b>0&&(t.addClass(m),L=r(function(){L=null,M.transitionDuration>0&&$(c,!1),M.animationDuration>0&&k(c,!1),t.addClass(p),t.removeClass(m),a&&(0===M.transitionDuration&&t.css("transition",M.animationDuration+"s linear all"),t.css(a),g.push("transition"))},b*z,!1)),t.on(U,l),u.closeAnimationFns.push(function(){s(),i()}),u.running++,h(t,R),s}function $(e,t){e.style[T+O]=t?"none":""}function k(e,t){e.style[I+R]=t?"paused":""}function S(e,t,n,i){return b(e,t,n,i)?function(e){e&&x(t,n)}:void 0}function C(e,t,n,i,a){return t.data(q)?w(e,t,n,i,a):(x(t,n),void i())}function M(e,t,n,i,a){var o=S(e,t,n,a.from);if(!o)return l(),void i();var r=o;return u(t,function(){r=C(e,t,n,i,a.to)}),function(e){(r||c)(e)}}function x(e,t){e.removeClass(t);var n=e.data(q);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(q))}function A(e,t){var n="";return e=p(e)?e:e.split(/\s+/),d(e,function(e,i){e&&e.length>0&&(n+=(i>0?" ":"")+e+t)}),n}var T,E,I,D,P="";e.ontransitionend===n&&e.onwebkittransitionend!==n?(P="-webkit-",T="WebkitTransition",E="webkitTransitionEnd transitionend"):(T="transition",E="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(P="-webkit-",I="WebkitAnimation",D="webkitAnimationEnd animationend"):(I="animation",D="animationend");var N,L="Duration",O="Property",U="Delay",B="IterationCount",R="PlayState",F="$$ngAnimateKey",q="$$ngAnimateCSS3Data",H=3,j=1.5,z=1e3,V={},W=0,G=[],K=null,Z=0,X=[];return{animate:function(e,t,n,i,a,o){return o=o||{},o.from=n,o.to=i,M("animate",e,t,a,o)},enter:function(e,t,n){return n=n||{},M("enter",e,"ng-enter",t,n)},leave:function(e,t,n){return n=n||{},M("leave",e,"ng-leave",t,n)},move:function(e,t,n){return n=n||{},M("move",e,"ng-move",t,n)},beforeSetClass:function(e,t,n,i,a){a=a||{};var o=A(n,"-remove")+" "+A(t,"-add"),r=S("setClass",e,o,a.from);return r?(u(e,i),r):(l(),void i())},beforeAddClass:function(e,t,n,i){i=i||{};var a=S("addClass",e,A(t,"-add"),i.from);return a?(u(e,n),a):(l(),void n())},beforeRemoveClass:function(e,t,n,i){i=i||{};var a=S("removeClass",e,A(t,"-remove"),i.from);return a?(u(e,n),a):(l(),void n())},setClass:function(e,t,n,i,a){a=a||{},n=A(n,"-remove"),t=A(t,"-add");var o=n+" "+t;return C("setClass",e,o,i,a.to)},addClass:function(e,t,n,i){return i=i||{},C("addClass",e,A(t,"-add"),n,i.to)},removeClass:function(e,t,n,i){return i=i||{},C("removeClass",e,A(t,"-remove"),n,i.to)}}}])}])}(window,window.angular),function(e,t){"use strict";function n(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return o(t,l(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}function i(e){var n=[],i=l(n,t.noop);return i.chars(e),n.join("")}function a(e){var t,n={},i=e.split(",");for(t=0;t=0&&v[o]!=i;o--);if(o>=0){for(a=v.length-1;a>=o;a--)n.end&&n.end(v[a]);v.length=o}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var o,s,l,y,v=[],w=e;for(v.last=function(){return v[v.length-1]};e;){if(y="",s=!0,v.last()&&x[v.last()]?(e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+v.last()+"[^>]*>","i"),function(e,t){return t=t.replace(f,"$1").replace(_,"$1"),n.chars&&n.chars(r(t)),""}),a("",v.last())):(0===e.indexOf("",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),s=!1)):g.test(e)?(l=e.match(g),l&&(e=e.replace(l[0],""),s=!1)):h.test(e)?(l=e.match(u),l&&(e=e.substring(l[0].length),l[0].replace(u,a),s=!1)):m.test(e)&&(l=e.match(d),l?(l[4]&&(e=e.substring(l[0].length),l[0].replace(d,i)),s=!1):(y+="<",e=e.substring(1))),s&&(o=e.indexOf("<"),y+=0>o?e:e.substring(0,o),e=0>o?"":e.substring(o),n.chars&&n.chars(r(y)))),e==w)throw c("badparse","The sanitizer was unable to parse the following block of html: {0}",e);w=e}a()}function r(e){if(!e)return"";var t=N.exec(e),n=t[1],i=t[3],a=t[2];return a&&(P.innerHTML=a.replace(//g,">")}function l(e,n){var i=!1,a=t.bind(e,e.push);return{start:function(e,o,r){e=t.lowercase(e),!i&&x[e]&&(i=e),i||A[e]!==!0||(a("<"),a(e),t.forEach(o,function(i,o){var r=t.lowercase(o),l="img"===e&&"src"===r||"background"===r;D[r]!==!0||T[r]===!0&&!n(i,l)||(a(" "),a(o),a('="'),a(s(i)),a('"'))}),a(r?"/>":">"))},end:function(e){e=t.lowercase(e),i||A[e]!==!0||(a(""),a(e),a(">")),e==i&&(i=!1)},chars:function(e){i||a(s(e))}}}var c=t.$$minErr("$sanitize"),d=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,u=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,m=/^,h=/^<\//,f=//g,g=/]*?)>/i,_=//g,y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v=/([^\#-~| |!])/g,b=a("area,br,col,hr,img,wbr"),w=a("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$=a("rp,rt"),k=t.extend({},$,w),S=t.extend({},w,a("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),C=t.extend({},$,a("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),M=a("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use"),x=a("script,style"),A=t.extend({},b,S,C,k,M),T=a("background,cite,href,longdesc,src,usemap,xlink:href"),E=a("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"),I=a("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"),D=t.extend({},T,I,E),P=document.createElement("pre"),N=/^(\s*)([\s\S]*?)(\s*)$/;t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,a=/^mailto:/;return function(o,r){function s(e){e&&m.push(i(e))}function l(e,n){m.push("'),s(n),m.push(" ")}if(!o)return o;for(var c,d,u,p=o,m=[];c=p.match(n);)d=c[0],c[2]==c[3]&&(d="mailto:"+d),u=c.index,s(p.substr(0,u)),l(d,c[0].replace(a,"")),p=p.substring(u+c[0].length);return s(p),e(m.join(""))}}])}(window,window.angular),function(e,t){"use strict";function n(e,n,a){i.directive(e,["$parse","$swipe",function(i,o){var r=75,s=.3,l=30;return function(c,d,u){function p(e){if(!m)return!1;var t=Math.abs(e.y-m.y),i=(e.x-m.x)*n;return h&&r>t&&i>0&&i>l&&s>t/i}var m,h,f=i(u[e]),g=["touch"];t.isDefined(u.ngSwipeDisableMouse)||g.push("mouse"),o.bind(d,{start:function(e){m=e,h=!0},cancel:function(){h=!1},end:function(e,t){p(e)&&c.$apply(function(){d.triggerHandler(a),f(c,{$event:t})})}},g)}}])}var i=t.module("ngTouch",[]);i.factory("$swipe",[function(){function e(e){var t=e.touches&&e.touches.length?e.touches:[e],n=e.changedTouches&&e.changedTouches[0]||e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]||t[0].originalEvent||t[0];return{x:n.clientX,y:n.clientY}}function n(e,n){var i=[];return t.forEach(e,function(e){var t=a[e][n];t&&i.push(t)}),i.join(" ")}var i=10,a={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(t,a,o){var r,s,l,c,d=!1;o=o||["mouse","touch"],t.on(n(o,"start"),function(t){l=e(t),d=!0,r=0,s=0,c=l,a.start&&a.start(l,t)});var u=n(o,"cancel");u&&t.on(u,function(e){d=!1,a.cancel&&a.cancel(e)}),t.on(n(o,"move"),function(t){if(d&&l){var n=e(t);if(r+=Math.abs(n.x-c.x),s+=Math.abs(n.y-c.y),c=n,!(i>r&&i>s))return s>r?(d=!1,void(a.cancel&&a.cancel(t))):(t.preventDefault(),void(a.move&&a.move(n,t)))}}),t.on(n(o,"end"),function(t){d&&(d=!1,a.end&&a.end(e(t),t))})}}}]),i.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]),i.directive("ngClick",["$parse","$timeout","$rootElement",function(e,n,i){function a(e,t,n,i){return Math.abs(e-n)h)){var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].clientX,i=t[0].clientY;1>n&&1>i||u&&u[0]===n&&u[1]===i||(u&&(u=null),"label"===e.target.tagName.toLowerCase()&&(u=[n,i]),o(d,n,i)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur()))}}function s(e){var t=e.touches&&e.touches.length?e.touches:[e],i=t[0].clientX,a=t[0].clientY;d.push(i,a),n(function(){for(var e=0;en&&m>y&&(l(g,_),r&&r.blur(),t.isDefined(a.disabled)&&a.disabled!==!1||i.triggerHandler("click",[e])),o()}),i.onclick=function(){},i.on("click",function(e,t){n.$apply(function(){u(n,{$event:t||e})})}),i.on("mousedown",function(){i.addClass(g)}),i.on("mousemove mouseup",function(){i.removeClass(g)})}}]),n("ngSwipeLeft",-1,"swipeleft"),n("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.dropdown","ui.bootstrap.tooltip","ui.bootstrap.position","ui.bootstrap.bindHtml","ui.bootstrap.modal","ui.bootstrap.transition"]),angular.module("ui.bootstrap.tpls",["template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/modal/backdrop.html","template/modal/window.html"]),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(a){t||(e.bind("click",n),e.bind("keydown",i)),t&&t!==a&&(t.isOpen=!1),t=a},this.close=function(a){t===a&&(t=null,e.unbind("click",n),e.unbind("keydown",i))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},i=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,i,a,o){var r,s=this,l=e.$new(),c=i.openClass,d=angular.noop,u=t.onToggle?n(t.onToggle):angular.noop;this.init=function(i){s.$element=i,t.isOpen&&(r=n(t.isOpen),d=r.assign,e.$watch(r,function(e){l.isOpen=!!e}))},this.toggle=function(e){return l.isOpen=arguments.length?!!e:!l.isOpen},this.isOpen=function(){return l.isOpen},l.getToggleElement=function(){return s.toggleElement},l.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},l.$watch("isOpen",function(t,n){o[t?"addClass":"removeClass"](s.$element,c),t?(l.focusToggleElement(),a.open(l)):a.close(l),d(e,t),angular.isDefined(t)&&t!==n&&u(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){l.isOpen=!1}),e.$on("$destroy",function(){l.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,i){i.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,i){if(i){i.toggleElement=t;var a=function(a){a.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){i.toggle()})};t.bind("click",a),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(i.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",a)})}}}}),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$document","$position","$interpolate",function(a,o,r,s,l,c){return function(a,d,u){function p(e){var t=e||m.trigger||u,i=n[t]||t;return{show:t,hide:i}}var m=angular.extend({},t,i),h=e(a),f=c.startSymbol(),g=c.endSymbol(),_="
';return{restrict:"EA",compile:function(){var e=o(_);return function(t,n,i){function o(){T.isOpen?u():c()}function c(){(!A||t.$eval(i[d+"Enable"]))&&(y(),T.popupDelay?C||(C=r(h,T.popupDelay,!1),C.then(function(e){e()})):h()())}function u(){t.$apply(function(){f()})}function h(){return C=null,S&&(r.cancel(S),S=null),T.content?(g(),$.css({top:0,left:0,display:"block"}),M?s.find("body").append($):n.after($),E(),T.isOpen=!0,T.$digest(),E):angular.noop}function f(){T.isOpen=!1,r.cancel(C),C=null,T.animation?S||(S=r(_,500)):_()}function g(){$&&_(),k=T.$new(),$=e(k,angular.noop)}function _(){S=null,$&&($.remove(),$=null),k&&(k.$destroy(),k=null)}function y(){v(),b()}function v(){var e=i[d+"Placement"];T.placement=angular.isDefined(e)?e:m.placement}function b(){var e=i[d+"PopupDelay"],t=parseInt(e,10);T.popupDelay=isNaN(t)?m.popupDelay:t}function w(){var e=i[d+"Trigger"];I(),x=p(e),x.show===x.hide?n.bind(x.show,o):(n.bind(x.show,c),n.bind(x.hide,u))}var $,k,S,C,M=angular.isDefined(m.appendToBody)?m.appendToBody:!1,x=p(void 0),A=angular.isDefined(i[d+"Enable"]),T=t.$new(!0),E=function(){var e=l.positionElements(n,$,T.placement,M);e.top+="px",e.left+="px",$.css(e)};T.isOpen=!1,i.$observe(a,function(e){T.content=e,!e&&T.isOpen&&f()}),i.$observe(d+"Title",function(e){T.title=e});var I=function(){n.unbind(x.show,c),n.unbind(x.hide,u)};w();var D=t.$eval(i[d+"Animation"]);T.animation=angular.isDefined(D)?!!D:m.animation;var P=t.$eval(i[d+"AppendToBody"]);M=angular.isDefined(P)?P:M,M&&t.$on("$locationChangeSuccess",function(){T.isOpen&&f()}),t.$on("$destroy",function(){r.cancel(S),r.cancel(C),I(),_(),T=null})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var a=function(t){for(var n=e[0],a=t.offsetParent||n;a&&a!==n&&i(a);)a=a.offsetParent;return a||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=a(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var r=t[0].getBoundingClientRect();return{width:r.width||t.prop("offsetWidth"),height:r.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,i){var a,o,r,s,l=n.split("-"),c=l[0],d=l[1]||"center";a=i?this.offset(e):this.position(e),o=t.prop("offsetWidth"),r=t.prop("offsetHeight");var u={center:function(){return a.left+a.width/2-o/2},left:function(){return a.left},right:function(){return a.left+a.width}},p={center:function(){return a.top+a.height/2-r/2},top:function(){return a.top},bottom:function(){return a.top+a.height}};switch(c){case"right":s={top:p[d](),left:u[c]()};break;case"left":s={top:p[d](),left:a.left-o};break;case"bottom":s={top:p[c](),left:u[d]()};break;default:s={top:a.top-r,left:u[d]()}}return s}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n0),l()})}function l(){if(d&&-1==r()){var e=u;c(d,u,0,function(){e.$destroy(),e=null}),d=void 0,u=void 0}}function c(n,i,a,o){function r(){r.done||(r.done=!0,n.remove(),o&&o())}i.animate=!1;var s=e.transitionEndEventName;if(s){var l=t(r,a);n.bind(s,function(){t.cancel(l),r(),i.$apply()})}else t(r)}var d,u,p="modal-open",m=o.createNew(),h={};return a.$watch(r,function(e){u&&(u.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=m.top(),t&&t.value.keyboard&&(e.preventDefault(),a.$apply(function(){h.dismiss(t.key,"escape key press")})))}),h.open=function(e,t){m.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=r();if(s>=0&&!d){u=a.$new(!0),u.index=s;var l=angular.element("
");l.attr("backdrop-class",t.backdropClass),d=i(l)(u),o.append(d)}var c=angular.element("
");c.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:m.length()-1,animate:"animate"}).html(t.content);var h=i(c)(t.scope);m.top().value.modalDomEl=h,o.append(h),o.addClass(p)},h.close=function(e,t){var n=m.get(e);n&&(n.value.deferred.resolve(t),s(e))},h.dismiss=function(e,t){var n=m.get(e);
n&&(n.value.deferred.reject(t),s(e))},h.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},h.getTop=function(){return m.top()},h}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,a,o,r,s){function l(e){return e.template?i.when(e.template):a.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:o}).then(function(e){return e.data})}function c(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}var d={};return d.open=function(t){var a=i.defer(),o=i.defer(),d={result:a.promise,opened:o.promise,close:function(e){s.close(d,e)},dismiss:function(e){s.dismiss(d,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var u=i.all([l(t)].concat(c(t.resolve)));return u.then(function(e){var i=(t.scope||n).$new();i.$close=d.close,i.$dismiss=d.dismiss;var o,l={},c=1;t.controller&&(l.$scope=i,l.$modalInstance=d,angular.forEach(t.resolve,function(t,n){l[n]=e[c++]}),o=r(t.controller,l),t.controllerAs&&(i[t.controllerAs]=o)),s.open(d,{scope:i,deferred:a,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){a.reject(e)}),u.then(function(){o.resolve(!0)},function(){o.reject(!1)}),d},d}]};return e}),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var a=function(i,o,r){r=r||{};var s=e.defer(),l=a[r.animation?"animationEndEventName":"transitionEndEventName"],c=function(){n.$apply(function(){i.unbind(l,c),s.resolve(i)})};return l&&i.bind(l,c),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),l||s.resolve(i)}),s.promise.cancel=function(){l&&i.unbind(l,c),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return a.transitionEndEventName=i(r),a.animationEndEventName=i(s),a}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'
\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'')}]),angular.module("mediaPlayer",["mediaPlayer.helpers"]).constant("mp.playerDefaults",{currentTrack:0,ended:void 0,network:void 0,playing:!1,seeking:!1,tracks:0,volume:1,formatDuration:"00:00",formatTime:"00:00",loadPercent:0}).directive("mediaPlayer",["$rootScope","$interpolate","$timeout","mp.throttle","mp.playerDefaults",function(e,t,n,i,a){function o(e){return function(t,i){var a,o=null;if(e.$attachPlaylist(t),void 0===t&&void 0!==i)return e.pause();if(e.currentTrack){a=i?i[e.currentTrack-1]:-1;for(var r=0;re?(this.currentTrack=e+1,this.load(this.$playlist[e],!0)):(!this.currentTrack&&this.$domEl.readyState&&this.currentTrack++,void(this.ended?this.load(!0):this.$domEl.play()))},playPause:function(e,t){"boolean"==typeof e&&(t=e,e=void 0),t&&(this.$selective=!0),"number"==typeof e&&e+1!==this.currentTrack?this.play(e):this.playing?this.pause():this.play()},pause:function(){this.$domEl.pause()},stop:function(){this.reset()},toggleMute:function(){this.muted=this.$domEl.muted=!this.$domEl.muted},next:function(e){var t=this;if(t.currentTrack&&t.currentTracki?"0"+i:i)+":"+(10>a?"0"+a:a);return t=n>0?(10>n?"0"+n:n)+":"+o:o},$attachPlaylist:function(e){void 0===e||null===e?this.playlist=[]:this.$playlist=e}},s=function(e,t,n){var a={playing:function(){e.$apply(function(e){e.playing=!0,e.ended=!1})},pause:function(){e.$apply(function(e){e.playing=!1})},ended:function(){!e.$selective&&e.currentTrack/ type tag");var c=[],d=t.find("source");1===d.length?s.unshift({src:d[0].src,type:d[0].type,media:d[0].media}):d.length>1&&(angular.forEach(d,function(e){c.push({src:e.src,type:e.type,media:e.media})}),s.unshift(c)),void 0===i?r.$attachPlaylist(s):s.length?(o(r)(s,void 0,e),e.$watch(i,o(r),!0)):e.$watch(i,o(r),!0)}}}]),angular.module("mediaPlayer.helpers",[]).factory("mp.throttle",["$timeout",function(e){return function(t,n,i,a){var o,r=0;"boolean"!=typeof n&&(a=i,i=n,n=void 0);var s=function(){var s=this,l=+new Date-r,c=arguments,d=function(){r=+new Date,i.apply(s,c)},u=function(){o=void 0};a&&!o&&d(),o&&e.cancel(o),void 0===a&&l>t?d():n!==!0&&(o=e(a?u:d,void 0===a?t-l:t))};return s}}]);var dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary);j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=am2,dbits=30):j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=am1,dbits=26):(BigInteger.prototype.am=am3,dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<=vv;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;36>vv;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;36>vv;++vv)BI_RC[rr++]=vv;Classic.prototype.convert=cConvert,Classic.prototype.revert=cRevert,Classic.prototype.reduce=cReduce,Classic.prototype.mulTo=cMulTo,Classic.prototype.sqrTo=cSqrTo,Montgomery.prototype.convert=montConvert,Montgomery.prototype.revert=montRevert,Montgomery.prototype.reduce=montReduce,Montgomery.prototype.mulTo=montMulTo,Montgomery.prototype.sqrTo=montSqrTo,BigInteger.prototype.copyTo=bnpCopyTo,BigInteger.prototype.fromInt=bnpFromInt,BigInteger.prototype.fromString=bnpFromString,BigInteger.prototype.clamp=bnpClamp,BigInteger.prototype.dlShiftTo=bnpDLShiftTo,BigInteger.prototype.drShiftTo=bnpDRShiftTo,BigInteger.prototype.lShiftTo=bnpLShiftTo,BigInteger.prototype.rShiftTo=bnpRShiftTo,BigInteger.prototype.subTo=bnpSubTo,BigInteger.prototype.multiplyTo=bnpMultiplyTo,BigInteger.prototype.squareTo=bnpSquareTo,BigInteger.prototype.divRemTo=bnpDivRemTo,BigInteger.prototype.invDigit=bnpInvDigit,BigInteger.prototype.isEven=bnpIsEven,BigInteger.prototype.exp=bnpExp,BigInteger.prototype.toString=bnToString,BigInteger.prototype.negate=bnNegate,BigInteger.prototype.abs=bnAbs,BigInteger.prototype.compareTo=bnCompareTo,BigInteger.prototype.bitLength=bnBitLength,BigInteger.prototype.mod=bnMod,BigInteger.prototype.modPowInt=bnModPowInt,BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1),NullExp.prototype.convert=nNop,NullExp.prototype.revert=nNop,NullExp.prototype.mulTo=nMulTo,NullExp.prototype.sqrTo=nSqrTo,Barrett.prototype.convert=barrettConvert,Barrett.prototype.revert=barrettRevert,Barrett.prototype.reduce=barrettReduce,Barrett.prototype.mulTo=barrettMulTo,Barrett.prototype.sqrTo=barrettSqrTo;var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1];BigInteger.prototype.chunkSize=bnpChunkSize,BigInteger.prototype.toRadix=bnpToRadix,BigInteger.prototype.fromRadix=bnpFromRadix,BigInteger.prototype.fromNumber=bnpFromNumber,BigInteger.prototype.bitwiseTo=bnpBitwiseTo,BigInteger.prototype.changeBit=bnpChangeBit,BigInteger.prototype.addTo=bnpAddTo,BigInteger.prototype.dMultiply=bnpDMultiply,BigInteger.prototype.dAddOffset=bnpDAddOffset,BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo,BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo,BigInteger.prototype.modInt=bnpModInt,BigInteger.prototype.millerRabin=bnpMillerRabin,BigInteger.prototype.clone=bnClone,BigInteger.prototype.intValue=bnIntValue,BigInteger.prototype.byteValue=bnByteValue,BigInteger.prototype.shortValue=bnShortValue,BigInteger.prototype.signum=bnSigNum,BigInteger.prototype.toByteArray=bnToByteArray,BigInteger.prototype.equals=bnEquals,BigInteger.prototype.min=bnMin,BigInteger.prototype.max=bnMax,BigInteger.prototype.and=bnAnd,BigInteger.prototype.or=bnOr,BigInteger.prototype.xor=bnXor,BigInteger.prototype.andNot=bnAndNot,BigInteger.prototype.not=bnNot,BigInteger.prototype.shiftLeft=bnShiftLeft,BigInteger.prototype.shiftRight=bnShiftRight,BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit,BigInteger.prototype.bitCount=bnBitCount,BigInteger.prototype.testBit=bnTestBit,BigInteger.prototype.setBit=bnSetBit,BigInteger.prototype.clearBit=bnClearBit,BigInteger.prototype.flipBit=bnFlipBit,BigInteger.prototype.add=bnAdd,BigInteger.prototype.subtract=bnSubtract,BigInteger.prototype.multiply=bnMultiply,BigInteger.prototype.divide=bnDivide,BigInteger.prototype.remainder=bnRemainder,BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder,BigInteger.prototype.modPow=bnModPow,BigInteger.prototype.modInverse=bnModInverse,BigInteger.prototype.pow=bnPow,BigInteger.prototype.gcd=bnGCD,BigInteger.prototype.isProbablePrime=bnIsProbablePrime,BigInteger.prototype.square=bnSquare;var rng_state,rng_pool,rng_pptr;if(null==rng_pool){rng_pool=new Array,rng_pptr=0;var global="undefined"!=typeof window?window:this,t;if(global&&global.crypto&&global.crypto.getRandomValues){var ua=new Uint8Array(32);for(global.crypto.getRandomValues(ua),t=0;32>t;++t)rng_pool[rng_pptr++]=ua[t]}if("Netscape"==navigator.appName&&navigator.appVersion<"5"&&global&&global.crypto){var z=global.crypto.random(32);for(t=0;trng_pptr;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}SecureRandom.prototype.nextBytes=rng_get_bytes,Arcfour.prototype.init=ARC4init,Arcfour.prototype.next=ARC4next;var rng_psize=256,CryptoJS=CryptoJS||function(e,t){var n={},i=n.lib={},a=i.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var n=new e;return t&&n.mixIn(t),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=i.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes,a=e.sigBytes;if(this.clamp(),i%4)for(var o=0;a>o;o++){var r=n[o>>>2]>>>24-o%4*8&255;t[i+o>>>2]|=r<<24-(i+o)%4*8}else if(n.length>65535)for(var o=0;a>o;o+=4)t[i+o>>>2]=n[o>>>2];else for(var o=0;o>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;t>i;i+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),r=n.enc={},s=r.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],a=0;n>a;a++){var o=t[a>>>2]>>>24-a%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;t>i;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new o.init(n,t/2)}},l=r.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],a=0;n>a;a++){var o=t[a>>>2]>>>24-a%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;t>i;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new o.init(n,t)}},c=r.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,a=n.sigBytes,r=this.blockSize,s=4*r,l=a/s;l=t?e.ceil(l):e.max((0|l)-this._minBufferSize,0);var c=l*r,d=e.min(4*c,a);if(c){for(var u=0;c>u;u+=r)this._doProcessBlock(i,u);var p=i.splice(0,c);n.sigBytes-=d}return new o.init(p,d)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),u=(i.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new u.HMAC.init(e,n).finalize(t)}}}),n.algo={});return n}(Math);CryptoJS.lib.Cipher||function(e){var t=CryptoJS,n=t.lib,i=n.Base,a=n.WordArray,o=n.BufferedBlockAlgorithm,r=t.enc,s=(r.Utf8,r.Base64),l=t.algo,c=l.EvpKDF,d=n.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?$:v}return function(t){return{encrypt:function(n,i,a){return e(i).encrypt(t,n,i,a)},decrypt:function(n,i,a){return e(i).decrypt(t,n,i,a)}}}}()}),u=(n.StreamCipher=d.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),p=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=u.CBC=function(){function t(t,n,i){var a=this._iv;if(a){var o=a;this._iv=e}else var o=this._prevBlock;for(var r=0;i>r;r++)t[n+r]^=o[r]}var n=p.extend();return n.Encryptor=n.extend({processBlock:function(e,n){var i=this._cipher,a=i.blockSize;t.call(this,e,n,a),i.encryptBlock(e,n),this._prevBlock=e.slice(n,n+a)}}),n.Decryptor=n.extend({processBlock:function(e,n){var i=this._cipher,a=i.blockSize,o=e.slice(n,n+a);i.decryptBlock(e,n),t.call(this,e,n,a),this._prevBlock=o}}),n}(),h=(u.IGE=function(){function t(e,t,n,i){for(var a=0;i>a;a++)e[n+a]^=t[a]}var n=p.extend();return n.Encryptor=n.extend({processBlock:function(n,i){var a=this._cipher,o=a.blockSize;this._ivp===e&&(this._ivp=this._iv.slice(0,o),this._iv2p=this._iv.slice(o,o+o));var r=n.slice(i,i+o);t(n,this._ivp,i,o),a.encryptBlock(n,i),t(n,this._iv2p,i,o),this._ivp=n.slice(i,i+o),this._iv2p=r}}),n.Decryptor=n.extend({processBlock:function(n,i){var a=this._cipher,o=a.blockSize;this._ivp===e&&(this._ivp=this._iv.slice(0,o),this._iv2p=this._iv.slice(o,2*o));var r=n.slice(i,i+o);t(n,this._iv2p,i,o),a.decryptBlock(n,i),t(n,this._ivp,i,o),this._ivp=r,this._iv2p=n.slice(i,i+o)}}),n}(),t.pad={}),f=h.Pkcs7={pad:function(e,t){for(var n=4*t,i=n-e.sigBytes%n,o=i<<24|i<<16|i<<8|i,r=[],s=0;i>s;s+=4)r.push(o);var l=a.create(r,i);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},g=(h.NoPadding={pad:function(){},unpad:function(){}},n.BlockCipher=d.extend({cfg:d.cfg.extend({mode:m,padding:f}),reset:function(){d.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=n.createEncryptor;else{var i=n.createDecryptor;this._minBufferSize=1}this._mode=i.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),_=t.format={},y=_.OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var i=a.create([1398893684,1701076831]).concat(n).concat(t);else var i=t;return i.toString(s)},parse:function(e){var t=s.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var i=a.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return g.create({ciphertext:t,salt:i})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var a=e.createEncryptor(n,i),o=a.finalize(t),r=a.cfg;return g.create({ciphertext:o,key:n,iv:r.iv,algorithm:e,mode:r.mode,padding:r.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var a=e.createDecryptor(n,i).finalize(t.ciphertext);return a},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=t.kdf={},w=b.OpenSSL={execute:function(e,t,n,i){i||(i=a.random(8));var o=c.create({keySize:t+n}).compute(e,i),r=a.create(o.words.slice(t),4*n);return o.sigBytes=4*t,g.create({key:o,iv:r,salt:i})}},$=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:w}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var a=i.kdf.execute(n,e.keySize,e.ivSize);i.iv=a.iv;var o=v.encrypt.call(this,e,t,a.key,i);return o.mixIn(a),o},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var a=i.kdf.execute(n,e.keySize,e.ivSize,t.salt);i.iv=a.iv;var o=v.decrypt.call(this,e,t,a.key,i);return o}})}(),function(){var e=CryptoJS,t=e.lib,n=t.BlockCipher,i=e.algo,a=[],o=[],r=[],s=[],l=[],c=[],d=[],u=[],p=[],m=[];!function(){for(var e=[],t=0;256>t;t++)e[t]=128>t?t<<1:t<<1^283;for(var n=0,i=0,t=0;256>t;t++){var h=i^i<<1^i<<2^i<<3^i<<4;h=h>>>8^255&h^99,a[n]=h,o[h]=n;var f=e[n],g=e[f],_=e[g],y=257*e[h]^16843008*h;r[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y;var y=16843009*_^65537*g^257*f^16843008*n;d[h]=y<<24|y>>>8,u[h]=y<<16|y>>>16,p[h]=y<<8|y>>>24,m[h]=y,n?(n=f^e[e[e[_^f]]],i^=e[e[i]]):n=i=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],f=i.AES=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,i=this._nRounds=n+6,o=4*(i+1),r=this._keySchedule=[],s=0;o>s;s++)if(n>s)r[s]=t[s];else{var l=r[s-1];s%n?n>6&&s%n==4&&(l=a[l>>>24]<<24|a[l>>>16&255]<<16|a[l>>>8&255]<<8|a[255&l]):(l=l<<8|l>>>24,l=a[l>>>24]<<24|a[l>>>16&255]<<16|a[l>>>8&255]<<8|a[255&l],l^=h[s/n|0]<<24),r[s]=r[s-n]^l}for(var c=this._invKeySchedule=[],f=0;o>f;f++){var s=o-f;if(f%4)var l=r[s];else var l=r[s-4];c[f]=4>f||4>=s?l:d[a[l>>>24]]^u[a[l>>>16&255]]^p[a[l>>>8&255]]^m[a[255&l]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,r,s,l,c,a)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,d,u,p,m,o);var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,a,o,r,s){for(var l=this._nRounds,c=e[t]^n[0],d=e[t+1]^n[1],u=e[t+2]^n[2],p=e[t+3]^n[3],m=4,h=1;l>h;h++){var f=i[c>>>24]^a[d>>>16&255]^o[u>>>8&255]^r[255&p]^n[m++],g=i[d>>>24]^a[u>>>16&255]^o[p>>>8&255]^r[255&c]^n[m++],_=i[u>>>24]^a[p>>>16&255]^o[c>>>8&255]^r[255&d]^n[m++],y=i[p>>>24]^a[c>>>16&255]^o[d>>>8&255]^r[255&u]^n[m++];c=f,d=g,u=_,p=y}var f=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&p])^n[m++],g=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^n[m++],_=(s[u>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[m++],y=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^n[m++];e[t]=f,e[t+1]=g,e[t+2]=_,e[t+3]=y},keySize:8});e.AES=n._createHelper(f)}();var sha1;!function(e){function t(e){for(var t,n="",i=7;i>=0;--i)t=e>>>(i<<2)&15,n+=t.toString(16);return n}function n(e){for(var t,n=[],i=3;i>=0;--i)t=e>>8*i&255,n.push(t);return n}function i(e,t){return e<>>32-t}function a(e){e=e.replace(/[\u0080-\u07ff]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(192|t>>6,128|63&t)}),e=e.replace(/[\u0080-\uffff]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(224|t>>12,128|t>>6&63,128|63&t)});for(var t=e.length,n=new Uint8Array(t),i=0;t>i;++i)n[i]=e.charCodeAt(i);return n.buffer}function o(e){for(var t=e.length,n=new Uint8Array(t),i=0;t>i;++i)n[i]=e[i];return n.buffer}function r(e,r){var s;s=e instanceof ArrayBuffer?e:"[object Array]"==Object.prototype.toString.apply(e)?o(e):a(String(e));var d,u,p=1732584193,m=4023233417,h=2562383102,f=271733878,g=3285377520,_=s.byteLength,y=_<<3,v=y+65,b=Math.ceil(v/512)<<9,w=b>>>3,$=w>>>2,k=new c($),S=k.bytes,C=new Uint32Array(80),M=new Uint8Array(s);for(d=0;_>d;++d)S[d]=M[d];for(S[_]=128,k.set($-2,Math.floor(y/l)),k.set($-1,4294967295&y),d=0;$>d;d+=16){for(u=0;16>u;++u)C[u]=k.get(d+u);for(;80>u;++u)C[u]=i(C[u-3]^C[u-8]^C[u-14]^C[u-16],1);var x,A,T,E=p,I=m,D=h,P=f,N=g;for(u=0;80>u;++u)20>u?(x=I&D|~I&P,A=1518500249):40>u?(x=I^D^P,A=1859775393):60>u?(x=I&D^I&P^D&P,A=2400959708):(x=I^D^P,A=3395469782),T=i(E,5)+x+N+A+C[u]&4294967295,N=P,P=D,D=i(I,30),I=E,E=T;p=p+E&4294967295,m=m+I&4294967295,h=h+D&4294967295,f=f+P&4294967295,g=g+N&4294967295}return r?n(p).concat(n(m),n(h),n(f),n(g)):t(p)+t(m)+t(h)+t(f)+t(g)}var s=Math.pow(2,24),l=Math.pow(2,32),c=function(){function e(e){this.bytes=new Uint8Array(e<<2)}return e.prototype.get=function(e){return e<<=2,this.bytes[e]*s+(this.bytes[e+1]<<16|this.bytes[e+2]<<8|this.bytes[e+3])},e.prototype.set=function(e,t){var n=Math.floor(t/s),i=t-n*s;e<<=2,this.bytes[e]=n,this.bytes[e+1]=i>>16,this.bytes[e+2]=i>>8&255,this.bytes[e+3]=255&i},e}();e.hash=r}(sha1||(sha1={})),function(e){function t(e){"use strict";var t={fill:0},i=function(e){for(e+=9;e%64>0;e+=1);return e},a=function(e,t){for(var n=t>>2;n>2]|=128<<24-(t%4<<3),e[((t>>2)+2&-16)+15]=n<<3},s=function(e,t,n,i,a){var o,r=this,s=a%4,l=i%4,c=i-l;if(c>0)switch(s){case 0:e[a+3|0]=r.charCodeAt(n);case 1:e[a+2|0]=r.charCodeAt(n+1);case 2:e[a+1|0]=r.charCodeAt(n+2);case 3:e[0|a]=r.charCodeAt(n+3)}for(o=s;c>o;o=o+4|0)t[a+o>>2]=r.charCodeAt(n+o)<<24|r.charCodeAt(n+o+1)<<16|r.charCodeAt(n+o+2)<<8|r.charCodeAt(n+o+3);switch(l){case 3:e[a+c+1|0]=r.charCodeAt(n+c+2);case 2:e[a+c+2|0]=r.charCodeAt(n+c+1);case 1:e[a+c+3|0]=r.charCodeAt(n+c)}},l=function(e,t,n,i,a){var o,r=this,s=a%4,l=i%4,c=i-l;if(c>0)switch(s){case 0:e[a+3|0]=r[n];case 1:e[a+2|0]=r[n+1];case 2:e[a+1|0]=r[n+2];case 3:e[0|a]=r[n+3]}for(o=4-s;c>o;o=o+=4)t[a+o>>2]=r[n+o]<<24|r[n+o+1]<<16|r[n+o+2]<<8|r[n+o+3];switch(l){case 3:e[a+c+1|0]=r[n+c+2];case 2:e[a+c+2|0]=r[n+c+1];case 1:e[a+c+3|0]=r[n+c]}},c=function(e){switch(o.getDataType(e)){case"string":return s.bind(e);case"array":return l.bind(e);case"buffer":return l.bind(e);case"arraybuffer":return l.bind(new Uint8Array(e));case"view":return l.bind(new Uint8Array(e.buffer))}},d=function(e){var t,n,i="0123456789abcdef",a=[],o=new Uint8Array(e);for(t=0;t>4&15)+i.charAt(n>>0&15);return a.join("")},u=function(e){var t;if(65536>=e)return 65536;if(16777216>e)for(t=1;e>t;t<<=1);else for(t=16777216;e>t;t+=16777216);return t},p=function(e){if(e%64>0)throw new Error("Chunk size must be a multiple of 128 bit");t.maxChunkLen=e,t.padMaxChunkLen=i(e),t.heap=new ArrayBuffer(u(t.padMaxChunkLen+320+20)),t.h32=new Int32Array(t.heap),t.h8=new Int8Array(t.heap),t.core=n({Int32Array:Int32Array,DataView:DataView},{},t.heap),t.buffer=null};p(e||65536);var m=function(e,t){var n=new Int32Array(e,t+320,5);n[0]=1732584193,n[1]=-271733879,n[2]=-1732584194,n[3]=271733878,n[4]=-1009589776},h=function(e,n){var o=i(e),s=new Int32Array(t.heap,0,o>>2);return a(s,e),r(s,e,n),o},f=function(e,n,i){c(e)(t.h8,t.h32,n,i,0)},g=function(e,n,i,a,o){var r=i;o&&(r=h(i,a)),f(e,n,i),t.core.hash(r,t.padMaxChunkLen)},_=function(e,t){var n=new Int32Array(e,t+320,5),i=new Int32Array(5),a=new DataView(i.buffer);return a.setInt32(0,n[0],!1),a.setInt32(4,n[1],!1),a.setInt32(8,n[2],!1),a.setInt32(12,n[3],!1),a.setInt32(16,n[4],!1),i},y=this.rawDigest=function(e){var n=e.byteLength||e.length;m(t.heap,t.padMaxChunkLen);var i=0,a=t.maxChunkLen;for(i=0;n>i+a;i+=a)g(e,i,a,n,!1);return g(e,i,n-i,n,!0),_(t.heap,t.padMaxChunkLen)};this.digest=this.digestFromString=this.digestFromBuffer=this.digestFromArrayBuffer=function(e){return d(y(e).buffer)}}function n(e,t,n){"use asm";function i(e,t){e|=0,t|=0;var n=0,i=0,o=0,r=0,s=0,l=0,c=0,d=0,u=0,p=0,m=0,h=0,f=0,g=0;for(o=a[t+320>>2]|0,s=a[t+324>>2]|0,c=a[t+328>>2]|0,u=a[t+332>>2]|0,m=a[t+336>>2]|0,n=0;(n|0)<(e|0);n=n+64|0){for(r=o,l=s,d=c,p=u,h=m,i=0;(i|0)<64;i=i+4|0)g=a[n+i>>2]|0,f=((o<<5|o>>>27)+(s&c|~s&u)|0)+((g+m|0)+1518500249|0)|0,m=u,u=c,c=s<<30|s>>>2,s=o,o=f,a[e+i>>2]=g;for(i=e+64|0;(i|0)<(e+80|0);i=i+4|0)g=(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])<<1|(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])>>>31,f=((o<<5|o>>>27)+(s&c|~s&u)|0)+((g+m|0)+1518500249|0)|0,m=u,u=c,c=s<<30|s>>>2,s=o,o=f,a[i>>2]=g;for(i=e+80|0;(i|0)<(e+160|0);i=i+4|0)g=(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])<<1|(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])>>>31,f=((o<<5|o>>>27)+(s^c^u)|0)+((g+m|0)+1859775393|0)|0,m=u,u=c,c=s<<30|s>>>2,s=o,o=f,a[i>>2]=g;for(i=e+160|0;(i|0)<(e+240|0);i=i+4|0)g=(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])<<1|(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])>>>31,f=((o<<5|o>>>27)+(s&c|s&u|c&u)|0)+((g+m|0)-1894007588|0)|0,m=u,u=c,c=s<<30|s>>>2,s=o,o=f,a[i>>2]=g;for(i=e+240|0;(i|0)<(e+320|0);i=i+4|0)g=(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])<<1|(a[i-12>>2]^a[i-32>>2]^a[i-56>>2]^a[i-64>>2])>>>31,f=((o<<5|o>>>27)+(s^c^u)|0)+((g+m|0)-899497514|0)|0,m=u,u=c,c=s<<30|s>>>2,s=o,o=f,a[i>>2]=g;o=o+r|0,s=s+l|0,c=c+d|0,u=u+p|0,m=m+h|0}a[t+320>>2]=o,a[t+324>>2]=s,a[t+328>>2]=c,a[t+332>>2]=u,a[t+336>>2]=m}var a=new e.Int32Array(n);return{hash:i}}if("undefined"!=typeof module&&(module.exports=t),"undefined"!=typeof e&&(e.Rusha=t),"undefined"!=typeof FileReaderSync){var i=new FileReaderSync,a=new t(4194304);self.onmessage=function(e){var t,n=e.data.data;if(n instanceof Blob)try{n=i.readAsBinaryString(n)}catch(o){return void self.postMessage({id:e.data.id,error:o.name})
}t=a.digest(n),self.postMessage({id:e.data.id,hash:t})}}var o={getDataType:function(t){if("string"==typeof t)return"string";if(t instanceof Array)return"array";if("undefined"!=typeof e&&e.Buffer&&e.Buffer.isBuffer(t))return"buffer";if(t instanceof ArrayBuffer)return"arraybuffer";if(t.buffer instanceof ArrayBuffer)return"view";throw new Error("Unsupported data type.")}}}(this),function(){"use strict";function e(e){throw e}function t(e,t){var n=e.split("."),i=u;!(n[0]in i)&&i.execScript&&i.execScript("var "+n[0]);for(var a;n.length&&(a=n.shift());)n.length||t===d?i=i[a]?i[a]:i[a]={}:i[a]=t}function n(e,t,n){var i,a="number"==typeof t?t:t=0,o="number"==typeof n?n:e.length;for(i=-1,a=7&o;a--;++t)i=i>>>8^_[255&(i^e[t])];for(a=o>>3;a--;t+=8)i=i>>>8^_[255&(i^e[t])],i=i>>>8^_[255&(i^e[t+1])],i=i>>>8^_[255&(i^e[t+2])],i=i>>>8^_[255&(i^e[t+3])],i=i>>>8^_[255&(i^e[t+4])],i=i>>>8^_[255&(i^e[t+5])],i=i>>>8^_[255&(i^e[t+6])],i=i>>>8^_[255&(i^e[t+7])];return(4294967295^i)>>>0}function i(){}function a(e){var t,n,i,a,o,r,s,l,c,d=e.length,u=0,m=Number.POSITIVE_INFINITY;for(l=0;d>l;++l)e[l]>u&&(u=e[l]),e[l]=i;){for(l=0;d>l;++l)if(e[l]===i){for(r=0,s=a,c=0;i>c;++c)r=r<<1|1&s,s>>=1;for(c=r;t>c;c+=o)n[c]=i<<16|l;++a}++i,a<<=1,o<<=1}return[n,u,m]}function o(t,n){switch(this.i=[],this.j=32768,this.d=this.f=this.c=this.n=0,this.input=p?new Uint8Array(t):t,this.o=!1,this.k=$,this.w=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.j=n.bufferSize),n.bufferType&&(this.k=n.bufferType),n.resize&&(this.w=n.resize)),this.k){case w:this.a=32768,this.b=new(p?Uint8Array:Array)(32768+this.j+258);break;case $:this.a=0,this.b=new(p?Uint8Array:Array)(this.j),this.e=this.D,this.q=this.A,this.l=this.C;break;default:e(Error("invalid inflate mode"))}}function r(t,n){for(var i,a=t.f,o=t.d,r=t.input,s=t.c;n>o;)i=r[s++],i===d&&e(Error("input buffer is broken")),a|=i<>>n,t.d=o-n,t.c=s,i}function s(e,t){for(var n,i,a,o=e.f,r=e.d,s=e.input,l=e.c,c=t[0],u=t[1];u>r&&(n=s[l++],n!==d);)o|=n<>>16,e.f=o>>a,e.d=r-a,e.c=l,65535&i}function l(e){function t(e,t,n){var i,a,o,l;for(l=0;e>l;)switch(i=s(this,t)){case 16:for(o=3+r(this,2);o--;)n[l++]=a;break;case 17:for(o=3+r(this,3);o--;)n[l++]=0;a=0;break;case 18:for(o=11+r(this,7);o--;)n[l++]=0;a=0;break;default:a=n[l++]=i}return n}var n,i,o,l,c=r(e,5)+257,d=r(e,5)+1,u=r(e,4)+4,m=new(p?Uint8Array:Array)(M.length);for(l=0;u>l;++l)m[M[l]]=r(e,3);n=a(m),i=new(p?Uint8Array:Array)(c),o=new(p?Uint8Array:Array)(d),e.l(a(t.call(e,c,n,i)),a(t.call(e,d,n,o)))}function c(e){this.input=e,this.c=0,this.m=[],this.s=!1}var d=void 0,u=this,p="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;new(p?Uint8Array:Array)(256);var m;for(m=0;256>m;++m)for(var h=m,f=7,h=h>>>1;h;h>>>=1)--f;var g=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],_=p?new Uint32Array(g):g;i.prototype.getName=function(){return this.name},i.prototype.getData=function(){return this.data},i.prototype.G=function(){return this.H},t("Zlib.GunzipMember",i),t("Zlib.GunzipMember.prototype.getName",i.prototype.getName),t("Zlib.GunzipMember.prototype.getData",i.prototype.getData),t("Zlib.GunzipMember.prototype.getMtime",i.prototype.G);var y,v=[];for(y=0;288>y;y++)switch(!0){case 143>=y:v.push([y+48,8]);break;case 255>=y:v.push([y-144+400,9]);break;case 279>=y:v.push([y-256+0,7]);break;case 287>=y:v.push([y-280+192,8]);break;default:e("invalid literal: "+y)}var b=function(){function t(t){switch(!0){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:e("invalid length: "+t)}}var n,i,a=[];for(n=3;258>=n;n++)i=t(n),a[n]=i[2]<<24|i[1]<<16|i[0];return a}();p&&new Uint32Array(b);var w=0,$=1;o.prototype.g=function(){for(;!this.o;){var t=r(this,3);switch(1&t&&(this.o=!0),t>>>=1){case 0:var n=this.input,i=this.c,a=this.b,o=this.a,s=d,c=d,u=d,m=a.length,h=d;switch(this.d=this.f=0,s=n[i++],s===d&&e(Error("invalid uncompressed block header: LEN (first byte)")),c=s,s=n[i++],s===d&&e(Error("invalid uncompressed block header: LEN (second byte)")),c|=s<<8,s=n[i++],s===d&&e(Error("invalid uncompressed block header: NLEN (first byte)")),u=s,s=n[i++],s===d&&e(Error("invalid uncompressed block header: NLEN (second byte)")),u|=s<<8,c===~u&&e(Error("invalid uncompressed block header: length verify")),i+c>n.length&&e(Error("input buffer is broken")),this.k){case w:for(;o+c>a.length;){if(h=m-o,c-=h,p)a.set(n.subarray(i,i+h),o),o+=h,i+=h;else for(;h--;)a[o++]=n[i++];this.a=o,a=this.e(),o=this.a}break;case $:for(;o+c>a.length;)a=this.e({t:2});break;default:e(Error("invalid inflate mode"))}if(p)a.set(n.subarray(i,i+c),o),o+=c,i+=c;else for(;c--;)a[o++]=n[i++];this.c=i,this.a=o,this.b=a;break;case 1:this.l(B,F);break;case 2:l(this);break;default:e(Error("unknown BTYPE: "+t))}}return this.q()};var k,S,C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=p?new Uint16Array(C):C,x=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],A=p?new Uint16Array(x):x,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],E=p?new Uint8Array(T):T,I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],D=p?new Uint16Array(I):I,P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=p?new Uint8Array(P):P,L=new(p?Uint8Array:Array)(288);for(k=0,S=L.length;S>k;++k)L[k]=143>=k?8:255>=k?9:279>=k?7:8;var O,U,B=a(L),R=new(p?Uint8Array:Array)(30);for(O=0,U=R.length;U>O;++O)R[O]=5;var F=a(R);o.prototype.l=function(e,t){var n=this.b,i=this.a;this.r=e;for(var a,o,l,c,d=n.length-258;256!==(a=s(this,e));)if(256>a)i>=d&&(this.a=i,n=this.e(),i=this.a),n[i++]=a;else for(o=a-257,c=A[o],0=d&&(this.a=i,n=this.e(),i=this.a);c--;)n[i]=n[i++-l];for(;8<=this.d;)this.d-=8,this.c--;this.a=i},o.prototype.C=function(e,t){var n=this.b,i=this.a;this.r=e;for(var a,o,l,c,d=n.length;256!==(a=s(this,e));)if(256>a)i>=d&&(n=this.e(),d=n.length),n[i++]=a;else for(o=a-257,c=A[o],0d&&(n=this.e(),d=n.length);c--;)n[i]=n[i++-l];for(;8<=this.d;)this.d-=8,this.c--;this.a=i},o.prototype.e=function(){var e,t,n=new(p?Uint8Array:Array)(this.a-32768),i=this.a-32768,a=this.b;if(p)n.set(a.subarray(32768,n.length));else for(e=0,t=n.length;t>e;++e)n[e]=a[e+32768];if(this.i.push(n),this.n+=n.length,p)a.set(a.subarray(i,i+32768));else for(e=0;32768>e;++e)a[e]=a[i+e];return this.a=32768,a},o.prototype.D=function(e){var t,n,i,a,o=this.input.length/this.c+1|0,r=this.input,s=this.b;return e&&("number"==typeof e.t&&(o=e.t),"number"==typeof e.z&&(o+=e.z)),2>o?(n=(r.length-this.c)/this.r[2],a=258*(n/2)|0,i=at;++t)for(e=s[t],i=0,a=e.length;a>i;++i)l[o++]=e[i];for(t=32768,n=this.a;n>t;++t)l[o++]=r[t];return this.i=[],this.buffer=l},o.prototype.A=function(){var e,t=this.a;return p?this.w?(e=new Uint8Array(t),e.set(this.b.subarray(0,t))):e=this.b.subarray(0,t):(this.b.length>t&&(this.b.length=t),e=this.b),this.buffer=e},c.prototype.F=function(){return this.s||this.g(),this.m.slice()},c.prototype.g=function(){for(var t=this.input.length;this.c>>0,n(l,d,d)!==g&&e(Error("invalid CRC-32 checksum: 0x"+n(l,d,d).toString(16)+" / 0x"+g.toString(16))),a.L=r=(_[y++]|_[y++]<<8|_[y++]<<16|_[y++]<<24)>>>0,(4294967295&l.length)!==r&&e(Error("invalid input size: "+(4294967295&l.length)+" / "+r)),this.m.push(a),this.c=y}this.s=!0;var v,b,w,$=this.m,k=0,S=0;for(v=0,b=$.length;b>v;++v)S+=$[v].data.length;if(p)for(w=new Uint8Array(S),v=0;b>v;++v)w.set($[v].data,k),k+=$[v].data.length;else{for(w=[],v=0;b>v;++v)w[v]=$[v].data;w=Array.prototype.concat.apply([],w)}return w},t("Zlib.Gunzip",c),t("Zlib.Gunzip.prototype.decompress",c.prototype.g),t("Zlib.Gunzip.prototype.getMembers",c.prototype.F)}.call(this),this.goog={provide:function(){},math:{}},goog.provide("goog.math.Long"),goog.math.Long=function(e,t){this.low_=0|e,this.high_=0|t},goog.math.Long.IntCache_={},goog.math.Long.fromInt=function(e){if(e>=-128&&128>e){var t=goog.math.Long.IntCache_[e];if(t)return t}var n=new goog.math.Long(0|e,0>e?-1:0);return e>=-128&&128>e&&(goog.math.Long.IntCache_[e]=n),n},goog.math.Long.fromNumber=function(e){return isNaN(e)||!isFinite(e)?goog.math.Long.ZERO:e<=-goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MIN_VALUE:e+1>=goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MAX_VALUE:0>e?goog.math.Long.fromNumber(-e).negate():new goog.math.Long(e%goog.math.Long.TWO_PWR_32_DBL_|0,e/goog.math.Long.TWO_PWR_32_DBL_|0)},goog.math.Long.fromBits=function(e,t){return new goog.math.Long(e,t)},goog.math.Long.fromString=function(e,t){if(0==e.length)throw Error("number format error: empty string");var n=t||10;if(2>n||n>36)throw Error("radix out of range: "+n);if("-"==e.charAt(0))return goog.math.Long.fromString(e.substring(1),n).negate();if(e.indexOf("-")>=0)throw Error('number format error: interior "-" character: '+e);for(var i=goog.math.Long.fromNumber(Math.pow(n,8)),a=goog.math.Long.ZERO,o=0;or){var l=goog.math.Long.fromNumber(Math.pow(n,r));a=a.multiply(l).add(goog.math.Long.fromNumber(s))}else a=a.multiply(i),a=a.add(goog.math.Long.fromNumber(s))}return a},goog.math.Long.TWO_PWR_16_DBL_=65536,goog.math.Long.TWO_PWR_24_DBL_=1<<24,goog.math.Long.TWO_PWR_32_DBL_=goog.math.Long.TWO_PWR_16_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_31_DBL_=goog.math.Long.TWO_PWR_32_DBL_/2,goog.math.Long.TWO_PWR_48_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_64_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_32_DBL_,goog.math.Long.TWO_PWR_63_DBL_=goog.math.Long.TWO_PWR_64_DBL_/2,goog.math.Long.ZERO=goog.math.Long.fromInt(0),goog.math.Long.ONE=goog.math.Long.fromInt(1),goog.math.Long.NEG_ONE=goog.math.Long.fromInt(-1),goog.math.Long.MAX_VALUE=goog.math.Long.fromBits(-1,2147483647),goog.math.Long.MIN_VALUE=goog.math.Long.fromBits(0,-2147483648),goog.math.Long.TWO_PWR_24_=goog.math.Long.fromInt(1<<24),goog.math.Long.prototype.toInt=function(){return this.low_},goog.math.Long.prototype.toNumber=function(){return this.high_*goog.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()},goog.math.Long.prototype.toString=function(e){var t=e||10;if(2>t||t>36)throw Error("radix out of range: "+t);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){var n=goog.math.Long.fromNumber(t),i=this.div(n),a=i.multiply(n).subtract(this);return i.toString(t)+a.toInt().toString(t)}return"-"+this.negate().toString(t)}for(var o=goog.math.Long.fromNumber(Math.pow(t,6)),a=this,r="";;){var s=a.div(o),l=a.subtract(s.multiply(o)).toInt(),c=l.toString(t);if(a=s,a.isZero())return c+r;for(;c.length<6;)c="0"+c;r=""+c+r}},goog.math.Long.prototype.getHighBits=function(){return this.high_},goog.math.Long.prototype.getLowBits=function(){return this.low_},goog.math.Long.prototype.getLowBitsUnsigned=function(){return this.low_>=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_},goog.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(goog.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!=this.high_?this.high_:this.low_,t=31;t>0&&0==(e&1<0},goog.math.Long.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},goog.math.Long.prototype.compare=function(e){if(this.equals(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.subtract(e).isNegative()?-1:1},goog.math.Long.prototype.negate=function(){return this.equals(goog.math.Long.MIN_VALUE)?goog.math.Long.MIN_VALUE:this.not().add(goog.math.Long.ONE)},goog.math.Long.prototype.add=function(e){var t=this.high_>>>16,n=65535&this.high_,i=this.low_>>>16,a=65535&this.low_,o=e.high_>>>16,r=65535&e.high_,s=e.low_>>>16,l=65535&e.low_,c=0,d=0,u=0,p=0;return p+=a+l,u+=p>>>16,p&=65535,u+=i+s,d+=u>>>16,u&=65535,d+=n+r,c+=d>>>16,d&=65535,c+=t+o,c&=65535,goog.math.Long.fromBits(u<<16|p,c<<16|d)},goog.math.Long.prototype.subtract=function(e){return this.add(e.negate())},goog.math.Long.prototype.multiply=function(e){if(this.isZero())return goog.math.Long.ZERO;if(e.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE))return e.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(e.equals(goog.math.Long.MIN_VALUE))return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&e.lessThan(goog.math.Long.TWO_PWR_24_))return goog.math.Long.fromNumber(this.toNumber()*e.toNumber());var t=this.high_>>>16,n=65535&this.high_,i=this.low_>>>16,a=65535&this.low_,o=e.high_>>>16,r=65535&e.high_,s=e.low_>>>16,l=65535&e.low_,c=0,d=0,u=0,p=0;return p+=a*l,u+=p>>>16,p&=65535,u+=i*l,d+=u>>>16,u&=65535,u+=a*s,d+=u>>>16,u&=65535,d+=n*l,c+=d>>>16,d&=65535,d+=i*s,c+=d>>>16,d&=65535,d+=a*r,c+=d>>>16,d&=65535,c+=t*l+n*s+i*r+a*o,c&=65535,goog.math.Long.fromBits(u<<16|p,c<<16|d)},goog.math.Long.prototype.div=function(e){if(e.isZero())throw Error("division by zero");if(this.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE)){if(e.equals(goog.math.Long.ONE)||e.equals(goog.math.Long.NEG_ONE))return goog.math.Long.MIN_VALUE;if(e.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ONE;var t=this.shiftRight(1),n=t.div(e).shiftLeft(1);if(n.equals(goog.math.Long.ZERO))return e.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE;var i=this.subtract(e.multiply(n)),a=n.add(i.div(e));return a}if(e.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().div(e.negate()):this.negate().div(e).negate();if(e.isNegative())return this.div(e.negate()).negate();for(var o=goog.math.Long.ZERO,i=this;i.greaterThanOrEqual(e);){for(var n=Math.max(1,Math.floor(i.toNumber()/e.toNumber())),r=Math.ceil(Math.log(n)/Math.LN2),s=48>=r?1:Math.pow(2,r-48),l=goog.math.Long.fromNumber(n),c=l.multiply(e);c.isNegative()||c.greaterThan(i);)n-=s,l=goog.math.Long.fromNumber(n),c=l.multiply(e);l.isZero()&&(l=goog.math.Long.ONE),o=o.add(l),i=i.subtract(c)}return o},goog.math.Long.prototype.modulo=function(e){return this.subtract(this.div(e).multiply(e))},goog.math.Long.prototype.not=function(){return goog.math.Long.fromBits(~this.low_,~this.high_)},goog.math.Long.prototype.and=function(e){return goog.math.Long.fromBits(this.low_&e.low_,this.high_&e.high_)},goog.math.Long.prototype.or=function(e){return goog.math.Long.fromBits(this.low_|e.low_,this.high_|e.high_)},goog.math.Long.prototype.xor=function(e){return goog.math.Long.fromBits(this.low_^e.low_,this.high_^e.high_)},goog.math.Long.prototype.shiftLeft=function(e){if(e&=63,0==e)return this;var t=this.low_;if(32>e){var n=this.high_;return goog.math.Long.fromBits(t<>>32-e)}return goog.math.Long.fromBits(0,t<e){var n=this.low_;return goog.math.Long.fromBits(n>>>e|t<<32-e,t>>e)}return goog.math.Long.fromBits(t>>e-32,t>=0?0:-1)},goog.math.Long.prototype.shiftRightUnsigned=function(e){if(e&=63,0==e)return this;var t=this.high_;if(32>e){var n=this.low_;return goog.math.Long.fromBits(n>>>e|t<<32-e,t>>>e)}return 32==e?goog.math.Long.fromBits(t,0):goog.math.Long.fromBits(t>>>e-32,0)},bpe=0,mask=0,radix=mask+1,digitsStr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\'\"+-";for(bpe=0;1<1<>=1,mask=(1<>>",e.toString(16),e,t),this.checkLength(4),this.intView[this.offset/4]=e,this.offset+=4},TLSerialization.prototype.storeInt=function(e,t){this.writeInt(e,(t||"")+":int")},TLSerialization.prototype.storeBool=function(e,t){e?this.writeInt(2574415285,(t||"")+":bool"):this.writeInt(3162085175,(t||"")+":bool")},TLSerialization.prototype.storeLongP=function(e,t,n){this.writeInt(t,(n||"")+":long[low]"),this.writeInt(e,(n||"")+":long[high]")},TLSerialization.prototype.storeLong=function(e,t){if(angular.isArray(e))return 2==e.length?this.storeLongP(e[0],e[1],t):this.storeIntBytes(e,64,t);var n=bigStringInt(e).divideAndRemainder(bigint(4294967296));this.writeInt(intToUint(n[1].intValue()),(t||"")+":long[low]"),this.writeInt(intToUint(n[0].intValue()),(t||"")+":long[high]")},TLSerialization.prototype.storeDouble=function(e){var t=new ArrayBuffer(8),n=new Int32Array(t),i=new Float64Array(t);i[0]=e,this.writeInt(n[0],(field||"")+":double[low]"),this.writeInt(n[1],(field||"")+":double[high]")},TLSerialization.prototype.storeString=function(e,t){this.debug&&console.log(">>>",e,(t||"")+":string");var n=unescape(encodeURIComponent(e));this.checkLength(n.length+8);var i=n.length;253>=i?this.byteView[this.offset++]=i:(this.byteView[this.offset++]=254,this.byteView[this.offset++]=255&i,this.byteView[this.offset++]=(65280&i)>>8,this.byteView[this.offset++]=(16711680&i)>>16);for(var a=0;i>a;a++)this.byteView[this.offset++]=n.charCodeAt(a);for(;this.offset%4;)this.byteView[this.offset++]=0},TLSerialization.prototype.storeBytes=function(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e)),this.debug&&console.log(">>>",bytesToHex(e),(t||"")+":bytes");var n=e.byteLength||e.length;for(this.checkLength(n+8),253>=n?this.byteView[this.offset++]=n:(this.byteView[this.offset++]=254,this.byteView[this.offset++]=255&n,this.byteView[this.offset++]=(65280&n)>>8,this.byteView[this.offset++]=(16711680&n)>>16),this.byteView.set(e,this.offset),this.offset+=n;this.offset%4;)this.byteView[this.offset++]=0},TLSerialization.prototype.storeIntBytes=function(e,t,n){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var i=e.length;if(t%32||8*i!=t)throw new Error("Invalid bits: "+t+", "+e.length);this.debug&&console.log(">>>",bytesToHex(e),(n||"")+":int"+t),this.checkLength(i),this.byteView.set(e,this.offset),this.offset+=i},TLSerialization.prototype.storeRawBytes=function(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n=e.length;this.debug&&console.log(">>>",bytesToHex(e),t||""),this.checkLength(n),this.byteView.set(e,this.offset),this.offset+=n},TLSerialization.prototype.storeMethod=function(e,t){var n,i=this.mtproto?Config.Schema.MTProto:Config.Schema.API,a=!1;for(n=0;n=4*this.intView.length)throw new Error("Nothing to fetch: "+e);var t=this.intView[this.offset/4];return this.debug&&console.log("<<<",t.toString(16),t,e),this.offset+=4,t},TLDeserialization.prototype.fetchInt=function(e){return this.readInt((e||"")+":int")},TLDeserialization.prototype.fetchDouble=function(e){var t=new ArrayBuffer(8),n=new Int32Array(t),i=new Float64Array(t);return n[0]=this.readInt((e||"")+":double[low]"),n[1]=this.readInt((e||"")+":double[high]"),i[0]},TLDeserialization.prototype.fetchLong=function(e){var t=this.readInt((e||"")+":long[low]"),n=this.readInt((e||"")+":long[high]"),i=bigint(n).shiftLeft(32).add(bigint(t)).toString();return i},TLDeserialization.prototype.fetchBool=function(e){var t=this.readInt((e||"")+":bool");return 2574415285==t?!0:3162085175==t?!1:(this.offset-=4,this.fetchObject("Object",e))},TLDeserialization.prototype.fetchString=function(e){var t=this.byteView[this.offset++];if(254==t)var t=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16;for(var n="",i=0;t>i;i++)n+=String.fromCharCode(this.byteView[this.offset++]);for(;this.offset%4;)this.offset++;try{var a=decodeURIComponent(escape(n))}catch(o){var a=n}return this.debug&&console.log("<<<",a,(e||"")+":string"),a},TLDeserialization.prototype.fetchBytes=function(e){var t=this.byteView[this.offset++];if(254==t)var t=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16;var n=this.byteView.subarray(this.offset,this.offset+t);for(this.offset+=t;this.offset%4;)this.offset++;return this.debug&&console.log("<<<",bytesToHex(n),(e||"")+":bytes"),n},TLDeserialization.prototype.fetchIntBytes=function(e,t,n){if(e%32)throw new Error("Invalid bits: "+e);var i=e/8;if(t){var a=this.byteView.subarray(this.offset,this.offset+i);return this.offset+=i,a}for(var o=[],r=0;i>r;r++)o.push(this.byteView[this.offset++]);return this.debug&&console.log("<<<",bytesToHex(o),(n||"")+":int"+e),o},TLDeserialization.prototype.fetchRawBytes=function(e,t,n){if(e===!1&&(e=this.readInt((n||"")+"_length")),t){var i=new Uint8Array(e);return i.set(this.byteView.subarray(this.offset,this.offset+e)),this.offset+=e,i}for(var i=[],a=0;e>a;a++)i.push(this.byteView[this.offset++]);return this.debug&&console.log("<<<",bytesToHex(i),n||""),i},TLDeserialization.prototype.fetchObject=function(e,t){switch(e){case"int":return this.fetchInt(t);case"long":return this.fetchLong(t);case"int128":return this.fetchIntBytes(128,!1,t);case"int256":return this.fetchIntBytes(256,!1,t);case"int512":return this.fetchIntBytes(512,!1,t);case"string":return this.fetchString(t);case"bytes":return this.fetchBytes(t);case"double":return this.fetchDouble(t);case"Bool":return this.fetchBool(t)}if(t=t||e||"Object","Vector"==e.substr(0,6)||"vector"==e.substr(0,6)){if("V"==e.charAt(0)){var n=this.readInt(t+"[id]");if(481674261!=n)throw new Error("Invalid vector constructor "+n)}var i=this.readInt(t+"[count]"),a=[];if(i>0)for(var o=e.substr(7,e.length-8),r=0;i>r;r++)a.push(this.fetchObject(o,t+"["+r+"]"));return a}var s=this.mtproto?Config.Schema.MTProto:Config.Schema.API,l=!1,c=!1;if("%"==e.charAt(0)){var d=e.substr(1);for(r=0;r=97&&e.charAt(0)<=122){for(r=0;r=n?i.resolve(e):i.reject(new Error("FILE_NOT_FOUND"))},function(e){console.log(dT(),"error",e),i.reject(e)})},function(){i.reject(new Error("FILE_NOT_FOUND"))}),i.promise})}function r(e,t){return s(e).then(function(e){return n.write(e,t).then(function(){return e.finalize()})})}function s(t){return i().then(function(){var i=e.defer();return cachedFs.root.getFile(t,{create:!0},function(e){n.getFileWriter(e).then(function(t){t.finalize=function(){return e},i.resolve(t)},function(e){c=!1,i.reject(e)})},function(e){c=!1,i.reject(e)}),i.promise})}t.requestFileSystem=t.requestFileSystem||t.webkitRequestFileSystem;var l,c=void 0!==t.requestFileSystem;return i(),{isAvailable:a,saveFile:r,getFile:o,getFileWriter:s}}]).service("MemoryFileStorage",["$q","FileManager",function(e,t){function n(){return!0}function i(t){return r[t]?e.when(r[t]):e.reject(new Error("FILE_NOT_FOUND"))}function a(t,n){return e.when(r[t]=n)}function o(n,i){var o=t.getFakeFileWriter(i,function(e){a(n,e)});return e.when(o)}var r={};return{isAvailable:n,saveFile:a,getFile:i,getFileWriter:o}}]).service("CryptoWorker",["$timeout","$q",function(e,t){function n(e,n,a){var s=t.defer();return r[o]=s,n.task=e,n.taskID=o,(a||i).postMessage(n),o++,s.promise}var i=!1,a=!1,o=0,r={},s=Config.Modes.webcrypto&&window.crypto&&(window.crypto.subtle||window.crypto.webkitSubtle),l=s&&void 0!==s.digest,c=function(e,t){var n=r[e];void 0!==n&&(n.resolve(t),delete r[e])};if(Config.Modes.nacl&&navigator.mimeTypes&&void 0!==navigator.mimeTypes["application/x-pnacl"]){var d=$('
').appendTo($("body"))[0];d.addEventListener("load",function(){a=d.firstChild,console.log(dT(),"NaCl ready")},!0),d.addEventListener("message",function(e){c(e.data.taskID,e.data.result)},!0),d.addEventListener("error",function(e){console.error("NaCl error",e)},!0)}if(window.Worker){var u=new Worker("js/lib/crypto_worker.js");u.onmessage=function(e){i?c(e.data.taskID,e.data.result):i=u},u.onerror=function(e){console.error("CW error",e,e.stack),i=!1}}return{sha1Hash:function(n){if(l){var i=t.defer(),a=Array.isArray(n)?convertToUint8Array(n):n;return s.digest({name:"SHA-1"},a).then(function(e){i.resolve(e)},function(e){console.error("Crypto digest error",e),l=!1,i.resolve(sha1HashSync(n))}),i.promise}return e(function(){return sha1HashSync(n)})},aesEncrypt:function(t,i,o){return a?n("aes-encrypt",{bytes:addPadding(convertToArrayBuffer(t)),keyBytes:convertToArrayBuffer(i),ivBytes:convertToArrayBuffer(o)},a):e(function(){return convertToArrayBuffer(aesEncryptSync(t,i,o))})},aesDecrypt:function(t,i,o){return a?n("aes-decrypt",{encryptedBytes:addPadding(convertToArrayBuffer(t)),keyBytes:convertToArrayBuffer(i),ivBytes:convertToArrayBuffer(o)},a):e(function(){return convertToArrayBuffer(aesDecryptSync(t,i,o))})},factorize:function(t){return t=convertToByteArray(t),a&&t.length<=8?n("factorize",{bytes:t},a):i?n("factorize",{bytes:t}):e(function(){return pqPrimeFactorization(t)})},modPow:function(t,a,o){return i?n("mod-pow",{x:t,y:a,m:o}):e(function(){return bytesModPow(t,a,o)})}}}]).service("SearchIndexManager",function(){function e(){return{shortIndexes:{},fullTexts:{}}}function t(e){e=e.replace(a," ").replace(o,"").toLowerCase();for(var t in r)r.hasOwnProperty(t)&&(e=e.replace(r[t],t));return e}function n(e,n,i){if(void 0!==i.fullTexts[e])return!1;if(n=t(n),!n.length)return!1;var a=i.shortIndexes;i.fullTexts[e]=n,angular.forEach(n.split(" "),function(t){var n,i,o=Math.min(t.length,3);for(i=1;o>=i;i++)n=t.substr(0,i),void 0===a[n]?a[n]=[e]:a[n].push(e)})}function i(e,n){var i=n.shortIndexes,a=n.fullTexts;e=t(e);var o,r,s,l,c,d=e.split(" "),u=!1;for(r=0;ro.length)&&(u=o)}for(o={},s=0;s,<\s]+/g,o=/^\s+|\s$/g,r={a:/[åáâäà]/g,e:/[éêëè]/g,i:/[íîïì]/g,o:/[óôöò]/g,u:/[úûüù]/g,c:/ç/g,ss:/ß/g};return{createIndex:e,indexObject:n,cleanSearchText:t,search:i}}).service("ExternalResourcesManager",["$q","$http",function(e,t){function n(e){return void 0!==i[e]?i[e]:i[e]=t.get(e,{responseType:"blob",transformRequest:null}).then(function(e){return window.URL=window.URL||window.webkitURL,window.URL.createObjectURL(e.data)})}var i={};return{downloadImage:n}}]).service("IdleManager",["$rootScope","$window","$timeout",function(e,t,n){function i(){r||(r=!0,$(t).on("blur focus keydown mousedown touchstart",a),setTimeout(function(){a({type:"blur"})},0))}function a(i){"mousemove"==i.type&&$(t).off("mousemove",a);var r="blur"==i.type||"timeout"==i.type?!0:!1;n.cancel(o),r||(o=n(function(){a({type:"timeout"})},3e4)),e.idle.isIDLE!=r&&(e.$apply(function(){e.idle.isIDLE=r}),r&&"timeout"==i.type&&$(t).on("mousemove",a))}e.idle={isIDLE:!1};var o,r=!1;return{start:i}}]).service("AppRuntimeManager",["$window",function(e){return{reload:function(){try{location.reload()}catch(t){}e.chrome&&chrome.runtime&&chrome.runtime.reload&&chrome.runtime.reload()},close:function(){try{e.close()}catch(t){}},focus:function(){window.navigator.mozApps&&document.hidden?window.navigator.mozApps.getSelf().onsuccess=function(){this.result.launch()}:(window.chrome&&chrome.app&&chrome.app.window&&chrome.app.window.current().focus(),window.focus())}}}]),angular.module("myApp.i18n",["izhukov.utils"]).factory("_",["$rootScope","$locale",function(e,t){function n(e,t){return e.replace(l,function(i,a,o){var r=t[a];return void 0===r?(console.warn("[i18n] missing param "+a+' for message "'+e+'"'),""):(void 0!==o&&(r=n(r,o.split("|"))),r.toString().trim())})}function i(e){return e=e.replace(/\*\*(.+?)\*\*/g,"$1 ").replace(/\n|
/g," ")}function a(e,t){var a=!1,l=e;if("_raw"===e.substr(-4)&&(a=!0,e=e.substr(0,e.length-4)),r.hasOwnProperty(e))l=r[e];else{if(!s.hasOwnProperty(e))return console.warn("[i18n] missing key "+e),e;l=s[e],console.warn("[i18n] missing locale key "+o+" / "+e)}return a||(l=encodeEntities(l)),"_md"==e.substr(-3)&&(l=i(l)),arguments.length>1&&("string"==typeof t?(Array.prototype.shift.apply(arguments),l=n(l,arguments)):l=n(l,t)),l}var o=Config.I18n.locale,r=Config.I18n.messages,s=Config.I18n.fallback_messages,l=/\{\s*([a-zA-Z\d\-_]+)(?:\s*:\s*(.*?))?\s*\}/g;return a.locale=function(){return o},a.pluralize=function(n){var i=e.$eval(a(n+"_raw"));return function(e){return(i[t.pluralCat(e)]||"").replace("{}",e)}},a}]).filter("i18n",["_",function(e){return function(t,n){return e(t+"_raw",n)}}]).directive("ngPluralize",["_",function(e){return{restrict:"EA",priority:1,compile:function(t){var n=t.attr("when"),i=e(n+"_raw");t.attr("when",i)}}}]).directive("myI18n",["_",function(e){return{restrict:"EA",compile:function(t){var n=t.children('my-i18n-param:not([name]), [my-i18n-param=""]:not([name])').map(function(e,t){return t.outerHTML}).toArray();t.children('my-i18n-param[name], [my-i18n-param]:not([my-i18n-param=""]), [my-i18n-param][name]').each(function(e,t){n[angular.element(t).attr("my-i18n-param")||angular.element(t).attr("name")]=t.outerHTML}),t.children("my-i18n-param").remove();var i=t.attr("my-i18n")||t.attr("msgid")?t:t.children("my-i18n-format, [my-i18n-format]");i.each(function(t,i){var a=angular.element(i),o=a.attr("my-i18n")||a.attr("msgid")||a.attr("my-i18n-format")||a.html().replace(/\s+/g," ").trim(),r=e(o,n);a.html(r)})}}}]),angular.module("izhukov.mtproto",["izhukov.utils"]).factory("MtpDcConfigurator",function(){function e(e,a){if(void 0===i[e]){var o,r,s=!1;if(Config.Modes.ssl){var l=t[e-1]+(a?"-1":""),c=Config.Modes.test?"apiw_test1":"apiw1";return s="https://"+l+".web.telegram.org/"+c}for(o=0;or[0]||i[0]==r[0]&&i[1]>=r[1])&&(r=[i[0],i[1]+4]),i=r,longFromInts(r[0],r[1])}function n(t,n){var o=t-Math.floor((n||tsNow())/1e3),r=Math.abs(a-o)>10;return e.set({server_time_offset:o}),i=[0,0],a=o,console.log(dT(),"Apply server time",t,n,o,r),r}var i=[0,0],a=0;return e.get("server_time_offset").then(function(e){e&&(a=e)}),{generateID:t,applyServerTime:n}}]).factory("MtpAuthorizer",["MtpDcConfigurator","MtpRsaKeysManager","MtpSecureRandom","MtpTimeManager","CryptoWorker","$http","$q","$timeout",function(e,t,n,i,a,o,r,s){function l(t,n){var a=n.byteLength,s=new Int32Array(n),l=new TLSerialization;l.storeLongP(0,0,"auth_key_id"),l.storeLong(i.generateID(),"msg_id"),l.storeInt(a,"request_length");var c=l.getBuffer(),d=new Int32Array(c),u=c.byteLength,p=new ArrayBuffer(u+a),m=new Int32Array(p);m.set(d),m.set(s,d.length);var h,f=g?p:m;try{h=o.post(e.chooseServer(t),f,{responseType:"arraybuffer",transformRequest:null})}catch(_){h=r.reject({code:406,type:"NETWORK_BAD_RESPONSE",originalError:_})}return h.then(function(e){if(!e.data||!e.data.byteLength)return r.reject({code:406,type:"NETWORK_BAD_RESPONSE"});try{{var t=new TLDeserialization(e.data,{mtproto:!0});t.fetchLong("auth_key_id"),t.fetchLong("msg_id"),t.fetchInt("msg_len")}}catch(n){return r.reject({code:406,type:"NETWORK_BAD_RESPONSE",originalError:n})}return t},function(e){return e.message||e.type||(e={code:406,type:"NETWORK_BAD_REQUEST",originalError:e}),r.reject(e)})}function c(e){var n=e.deferred,i=new TLSerialization({mtproto:!0});i.storeMethod("req_pq",{nonce:e.nonce}),console.log(dT(),"Send req_pq",bytesToHex(e.nonce)),l(e.dcID,i.getBuffer()).then(function(i){var o=i.fetchObject("ResPQ");if("resPQ"!=o._)throw new Error("resPQ response invalid: "+o._);if(!bytesCmp(e.nonce,o.nonce))throw new Error("resPQ nonce mismatch");if(e.serverNonce=o.server_nonce,e.pq=o.pq,e.fingerprints=o.server_public_key_fingerprints,console.log(dT(),"Got ResPQ",bytesToHex(e.serverNonce),bytesToHex(e.pq),e.fingerprints),e.publicKey=t.select(e.fingerprints),!e.publicKey)throw new Error("No public key found");console.log(dT(),"PQ factorization start",e.pq),a.factorize(e.pq).then(function(t){e.p=t[0],e.q=t[1],console.log(dT(),"PQ factorization done",t[2]),d(e)},function(e){console.log("Worker error",e,e.stack),n.reject(e)})},function(e){console.log(dT(),"req_pq error",e.message),n.reject(e)}),s(function(){t.prepare()})}function d(e){var t=e.deferred;e.newNonce=new Array(32),n.nextBytes(e.newNonce);var i=new TLSerialization({mtproto:!0});i.storeObject({_:"p_q_inner_data",pq:e.pq,p:e.p,q:e.q,nonce:e.nonce,server_nonce:e.serverNonce,new_nonce:e.newNonce},"P_Q_inner_data","DECRYPTED_DATA");var a=sha1BytesSync(i.getBuffer()).concat(i.getBytes()),o=new TLSerialization({mtproto:!0});o.storeMethod("req_DH_params",{nonce:e.nonce,server_nonce:e.serverNonce,p:e.p,q:e.q,public_key_fingerprint:e.publicKey.fingerprint,encrypted_data:rsaEncrypt(e.publicKey,a)}),console.log(dT(),"Send req_DH_params"),l(e.dcID,o.getBuffer()).then(function(n){var i=n.fetchObject("Server_DH_Params","RESPONSE");if("server_DH_params_fail"!=i._&&"server_DH_params_ok"!=i._)return t.reject(new Error("Server_DH_Params response invalid: "+i._)),!1;if(!bytesCmp(e.nonce,i.nonce))return t.reject(new Error("Server_DH_Params nonce mismatch")),!1;if(!bytesCmp(e.serverNonce,i.server_nonce))return t.reject(new Error("Server_DH_Params server_nonce mismatch")),!1;if("server_DH_params_fail"==i._){var a=sha1BytesSync(e.newNonce).slice(-16);return bytesCmp(a,i.new_nonce_hash)?(t.reject(new Error("server_DH_params_fail")),!1):(t.reject(new Error("server_DH_params_fail new_nonce_hash mismatch")),!1)}try{u(e,i.encrypted_answer)}catch(o){return t.reject(o),!1}p(e)},function(e){t.reject(e)})}function u(e,t){e.localTime=tsNow(),e.tmpAesKey=sha1BytesSync(e.newNonce.concat(e.serverNonce)).concat(sha1BytesSync(e.serverNonce.concat(e.newNonce)).slice(0,12)),e.tmpAesIv=sha1BytesSync(e.serverNonce.concat(e.newNonce)).slice(12).concat(sha1BytesSync([].concat(e.newNonce,e.newNonce)),e.newNonce.slice(0,4));var n=aesDecryptSync(t,e.tmpAesKey,e.tmpAesIv),a=n.slice(0,20),o=n.slice(20),r=bytesToArrayBuffer(o),s=new TLDeserialization(r,{mtproto:!0}),l=s.fetchObject("Server_DH_inner_data");if("server_DH_inner_data"!=l._)throw new Error("server_DH_inner_data response invalid: "+constructor);if(!bytesCmp(e.nonce,l.nonce))throw new Error("server_DH_inner_data nonce mismatch");if(!bytesCmp(e.serverNonce,l.server_nonce))throw new Error("server_DH_inner_data serverNonce mismatch");console.log(dT(),"Done decrypting answer"),e.g=l.g,e.dhPrime=l.dh_prime,e.gA=l.g_a,e.serverTime=l.server_time,e.retry=0;var c=s.getOffset();if(!bytesCmp(a,sha1BytesSync(o.slice(0,c))))throw new Error("server_DH_inner_data SHA1-hash mismatch");i.applyServerTime(e.serverTime,e.localTime)}function p(e){var t=e.deferred,i=bytesFromHex(e.g.toString(16));e.b=new Array(256),n.nextBytes(e.b),a.modPow(i,e.b,e.dhPrime).then(function(n){var i=new TLSerialization({mtproto:!0});i.storeObject({_:"client_DH_inner_data",nonce:e.nonce,server_nonce:e.serverNonce,retry_id:[0,e.retry++],g_b:n},"Client_DH_Inner_Data");var o=sha1BytesSync(i.getBuffer()).concat(i.getBytes()),r=aesEncryptSync(o,e.tmpAesKey,e.tmpAesIv),s=new TLSerialization({mtproto:!0});s.storeMethod("set_client_DH_params",{nonce:e.nonce,server_nonce:e.serverNonce,encrypted_data:r}),console.log(dT(),"Send set_client_DH_params"),l(e.dcID,s.getBuffer()).then(function(n){var i=n.fetchObject("Set_client_DH_params_answer");return"dh_gen_ok"!=i._&&"dh_gen_retry"!=i._&&"dh_gen_fail"!=i._?(t.reject(new Error("Set_client_DH_params_answer response invalid: "+i._)),!1):bytesCmp(e.nonce,i.nonce)?bytesCmp(e.serverNonce,i.server_nonce)?void a.modPow(e.gA,e.b,e.dhPrime).then(function(n){var a=sha1BytesSync(n),o=a.slice(0,8),r=a.slice(-8);switch(console.log(dT(),"Got Set_client_DH_params_answer",i._),i._){case"dh_gen_ok":var s=sha1BytesSync(e.newNonce.concat([1],o)).slice(-16);if(!bytesCmp(s,i.new_nonce_hash1))return t.reject(new Error("Set_client_DH_params_answer new_nonce_hash1 mismatch")),!1;var l=bytesXor(e.newNonce.slice(0,8),e.serverNonce.slice(0,8));e.authKeyID=r,e.authKey=n,e.serverSalt=l,t.resolve(e);break;case"dh_gen_retry":var c=sha1BytesSync(e.newNonce.concat([2],o)).slice(-16);return bytesCmp(c,i.new_nonce_hash2)?p(e):(t.reject(new Error("Set_client_DH_params_answer new_nonce_hash2 mismatch")),!1);case"dh_gen_fail":var d=sha1BytesSync(e.newNonce.concat([3],o)).slice(-16);return bytesCmp(d,i.new_nonce_hash3)?(t.reject(new Error("Set_client_DH_params_answer fail")),!1):(t.reject(new Error("Set_client_DH_params_answer new_nonce_hash3 mismatch")),!1)}},function(e){t.reject(e)}):(t.reject(new Error("Set_client_DH_params_answer server_nonce mismatch")),!1):(t.reject(new Error("Set_client_DH_params_answer nonce mismatch")),!1)},function(e){t.reject(e)})},function(e){t.reject(e)})}function m(t){if(void 0!==_[t])return _[t];for(var n=[],i=0;16>i;i++)n.push(nextRandomInt(255));if(!e.chooseServer(t))return r.reject(new Error("No server found for dc "+t));var a={dcID:t,nonce:n,deferred:r.defer()};return s(function(){c(a)}),_[t]=a.deferred.promise,_[t]["catch"](function(){delete _[t]}),_[t]}var h=navigator.userAgent.match(/Chrome\/(\d+(\.\d+)?)/),f=h&&parseFloat(h[1])||!1,g=!("ArrayBufferView"in window)&&(!f||30>f);delete o.defaults.headers.post["Content-Type"],delete o.defaults.headers.common.Accept;var _={};return{auth:m}}]).factory("MtpNetworkerFactory",["MtpDcConfigurator","MtpTimeManager","MtpSecureRandom","Storage","CryptoWorker","AppRuntimeManager","$http","$q","$timeout","$interval","$rootScope",function(e,t,n,i,a,o,r,s,l,c,d){function u(e,t,n,i){i=i||{},this.dcID=e,this.iii=f++,this.authKey=t,this.authKeyUint8=convertToUint8Array(t),this.authKeyBuffer=convertToArrayBuffer(t),this.authKeyID=sha1BytesSync(t).slice(-8),this.serverSalt=n,this.upload=i.fileUpload||i.fileDownload||!1,this.updateSession(),this.currentRequests=0,this.checkConnectionPeriod=0,this.sentMessages={},this.serverMessages=[],this.clientMessages=[],this.pendingMessages={},this.pendingAcks=[],this.pendingResends=[],this.connectionInited=!1,this.pendingTimeouts=[],this.longPollInt=c(this.checkLongPoll.bind(this),1e4),this.checkLongPoll(),g||(g=!0,d.offline=!0,d.offlineConnecting=!0),Config.Navigator.mobile&&this.setupMobileSleep()}function p(){_&&(_=!1,h({_:"new_session_created"}))}function m(){_=!0}var h,f=0,g=!1,_=!1,y=navigator.userAgent.match(/Chrome\/(\d+(\.\d+)?)/),v=y&&parseFloat(y[1])||!1,b=!("ArrayBufferView"in window)&&(!v||30>v);return delete r.defaults.headers.post["Content-Type"],delete r.defaults.headers.common.Accept,d.retryOnline=function(){$(document.body).trigger("online")},u.prototype.updateSession=function(){this.seqNo=0,this.sessionID=new Array(8),n.nextBytes(this.sessionID)},u.prototype.setupMobileSleep=function(){var e=this;d.$watch("idle.isIDLE",function(t){t?e.sleepAfter=tsNow()+3e4:(delete e.sleepAfter,e.checkLongPoll())}),d.$on("push_received",function(){e.sleepAfter&&(e.sleepAfter=tsNow()+3e4,e.checkLongPoll())})},u.prototype.updateSentMessage=function(e){var n=this.sentMessages[e];if(!n)return!1;var i=this;if(n.container){var a=[];angular.forEach(n.inner,function(e){var t=i.updateSentMessage(e);t&&a.push(t.msg_id)}),n.inner=a}return n.msg_id=t.generateID(),n.seq_no=this.generateSeqNo(n.notContentRelated||n.container),this.sentMessages[n.msg_id]=n,delete i.sentMessages[e],n},u.prototype.generateSeqNo=function(e){var t=2*this.seqNo;return e||(t++,this.seqNo++),t},u.prototype.wrapMtpCall=function(e,n,i){var a=new TLSerialization({mtproto:!0});a.storeMethod(e,n);var o=t.generateID(),r=this.generateSeqNo(),s={msg_id:o,seq_no:r,body:a.getBytes()};return Config.Modes.debug&&console.log(dT(),"MT call",e,n,o,r),this.pushMessage(s,i)},u.prototype.wrapMtpMessage=function(e,n){n=n||{};var i=new TLSerialization({mtproto:!0});i.storeObject(e,"Object");var a=t.generateID(),o=this.generateSeqNo(n.notContentRelated),r={msg_id:a,seq_no:o,body:i.getBytes()};return Config.Modes.debug&&console.log(dT(),"MT message",e,a,o),this.pushMessage(r,n)},u.prototype.wrapApiCall=function(e,n,i){var a=new TLSerialization(i);this.connectionInited||(a.storeInt(3667594509,"invokeWithLayer"),a.storeInt(Config.Schema.API.layer,"layer"),a.storeInt(1769565673,"initConnection"),a.storeInt(Config.App.id,"api_id"),a.storeString(navigator.userAgent||"Unknown UserAgent","device_model"),a.storeString(navigator.platform||"Unknown Platform","system_version"),a.storeString(Config.App.version,"app_version"),a.storeString(navigator.language||"en","lang_code")),i.afterMessageID&&(a.storeInt(3416209197,"invokeAfterMsg"),a.storeLong(i.afterMessageID,"msg_id")),i.resultType=a.storeMethod(e,n);var o=t.generateID(),r=this.generateSeqNo(),s={msg_id:o,seq_no:r,body:a.getBytes(!0),isAPI:!0};return Config.Modes.debug?console.log(dT(),"Api call",e,n,o,r,i):console.log(dT(),"Api call",e),this.pushMessage(s,i)},u.prototype.checkLongPoll=function(){var e=this.cleanupSent();if(this.longPollPending&&tsNow()t.sleepAfter)||t.sendLongPoll()})},u.prototype.sendLongPoll=function(){var e=25e3,t=this;this.longPollPending=tsNow()+e,this.wrapMtpCall("http_wait",{max_delay:0,wait_after:0,max_wait:e},{noResponse:!0,longPoll:!0}).then(function(){delete t.longPollPending,setZeroTimeout(t.checkLongPoll.bind(t))},function(){console.log("Long-poll failed")})},u.prototype.pushMessage=function(e,t){var n=s.defer();return this.sentMessages[e.msg_id]=angular.extend(e,t||{},{deferred:n}),this.pendingMessages[e.msg_id]=0,t&&t.noShedule||this.sheduleRequest(),angular.isObject(t)&&(t.messageID=e.msg_id),n.promise},u.prototype.pushResend=function(e,t){var n=t?tsNow()+t:0,i=this.sentMessages[e];if(i.container)for(var a=0;a=l){if(o=m.sentMessages[t]){var n=(o.body.byteLength||o.body.length)+32;if(!o.notContentRelated&&u)return;if(!o.notContentRelated&&s&&s+n>655360)return void(u=!0);if(o.singleInRequest&&(p++,p>1))return;r.push(o),s+=n,o.isAPI?c=!0:o.longPoll&&(d=!0)}delete m.pendingMessages[t]}}),c&&!d){var h=new TLSerialization({mtproto:!0});h.storeMethod("http_wait",{max_delay:0,wait_after:0,max_wait:1e3}),r.push({msg_id:t.generateID(),seq_no:this.generateSeqNo(),body:h.getBytes()})}if(r.length){var f=[];if(r.length>1){var g=new TLSerialization({mtproto:!0,startMaxLength:s+64});g.storeInt(1945237724,"CONTAINER[id]"),g.storeInt(r.length,"CONTAINER[count]");for(var y=[],n=0;n1)&&this.sheduleRequest()}},u.prototype.getEncryptedMessage=function(e){var t=this;return a.sha1Hash(e).then(function(n){var i=new Uint8Array(n).subarray(4,20);return t.getMsgKeyIv(i,!0).then(function(t){return a.aesEncrypt(e,t[0],t[1]).then(function(e){return{bytes:e,msgKey:i}})})})},u.prototype.getDecryptedMessage=function(e,t){return this.getMsgKeyIv(e,!1).then(function(e){return a.aesDecrypt(t,e[0],e[1])})},u.prototype.sendEncryptedRequest=function(t,n){var a=this;n=n||{};var l=new TLSerialization({startMaxLength:t.body.length+64});return l.storeIntBytes(this.serverSalt,64,"salt"),l.storeIntBytes(this.sessionID,64,"session_id"),l.storeLong(t.msg_id,"message_id"),l.storeInt(t.seq_no,"seq_no"),l.storeInt(t.body.length,"message_data_length"),l.storeRawBytes(t.body,"message_data"),this.getEncryptedMessage(l.getBuffer()).then(function(t){var l=new TLSerialization({startMaxLength:t.bytes.byteLength+256});l.storeIntBytes(a.authKeyID,64,"auth_key_id"),l.storeIntBytes(t.msgKey,128,"msg_key"),l.storeRawBytes(t.bytes,"encrypted_data");var c,d=b?l.getBuffer():l.getArray();try{n=angular.extend(n||{},{responseType:"arraybuffer",transformRequest:null}),c=r.post(e.chooseServer(a.dcID,a.upload),d,n)}catch(u){c=s.reject(u)}return c.then(function(e){return e.data&&e.data.byteLength?e:s.reject({code:406,type:"NETWORK_BAD_RESPONSE"})},function(e){return 404==e.status&&-1!=(e.data||"").indexOf("nginx/0.3.33")&&i.remove("dc"+a.dcID+"_server_salt","dc"+a.dcID+"_auth_key").then(function(){o.reload()}),e.message||e.type||(e={code:406,type:"NETWORK_BAD_REQUEST"}),s.reject(e)})})},u.prototype.parseResponse=function(e){var t=this,n=new TLDeserialization(e),i=n.fetchIntBytes(64,!1,"auth_key_id");if(!bytesCmp(i,this.authKeyID))throw new Error("Invalid server auth_key_id: "+bytesToHex(i));var o=n.fetchIntBytes(128,!0,"msg_key"),r=n.fetchRawBytes(e.byteLength-n.getOffset(),!0,"encrypted_data");return this.getDecryptedMessage(o,r).then(function(e){var n=new TLDeserialization(e,{mtproto:!0}),i=(n.fetchIntBytes(64,!1,"salt"),n.fetchIntBytes(64,!1,"session_id")),r=n.fetchLong("message_id"),s=n.fetchInt("seq_no"),l=n.fetchRawBytes(!1,!0,"message_data"),c=convertToUint8Array(e).subarray(0,n.getOffset());return a.sha1Hash(c).then(function(e){if(!bytesCmp(o,bytesFromArrayBuffer(e).slice(-16)))throw console.warn(o,bytesFromArrayBuffer(e)),new Error("server msgKey mismatch");var n=bytesToArrayBuffer(l),a={mtproto:!0,override:{mt_message:function(e,t){e.msg_id=this.fetchLong(t+"[msg_id]"),e.seqno=this.fetchInt(t+"[seqno]"),e.bytes=this.fetchInt(t+"[bytes]");var n=this.getOffset();try{e.body=this.fetchObject("Object",t+"[body]")}catch(i){console.error(dT(),"parse error",i.message,i.stack),e.body={_:"parse_error",error:i}}this.offset!=n+e.bytes&&(console.warn(dT(),"set offset",this.offset,n,e.bytes),this.offset=n+e.bytes)},mt_rpc_result:function(e,n){e.req_msg_id=this.fetchLong(n+"[req_msg_id]");var i=t.sentMessages[e.req_msg_id],a=i&&i.resultType||"Object";e.result=this.fetchObject(a,n+"[result]")}}},c=new TLDeserialization(n,a),d=c.fetchObject("","INPUT");return{response:d,messageID:r,sessionID:i,seqNo:s}})})},u.prototype.applyServerSalt=function(e){var t=longToBytes(e),n={};return n["dc"+this.dcID+"_server_salt"]=bytesToHex(t),i.set(n),this.serverSalt=t,!0},u.prototype.sheduleRequest=function(e){this.offline&&this.checkConnection("forced shedule");var t=tsNow()+e;return e&&this.nextReq&&this.nextReq<=t?!1:(l.cancel(this.nextReqPromise),e>0?this.nextReqPromise=l(this.performSheduledRequest.bind(this),e||0):setZeroTimeout(this.performSheduledRequest.bind(this)),void(this.nextReq=t))},u.prototype.ackMessage=function(e){this.pendingAcks.push(e),this.sheduleRequest(3e4)},u.prototype.reqResendMessage=function(e){console.log(dT(),"Req resend",e),this.pendingResends.push(e),this.sheduleRequest(100)},u.prototype.cleanupSent=function(){var e=this,t=!1;return angular.forEach(this.sentMessages,function(n,i){if(n.notContentRelated&&void 0===e.pendingMessages[i])delete e.sentMessages[i];else if(n.container){for(var a=0;ar;r++)this.processMessage(e.messages[r],n,a);break;case"bad_server_salt":console.log(dT(),"Bad server salt",e);var s=this.sentMessages[e.bad_msg_id];if(!s||s.seq_no!=e.bad_msg_seqno)throw console.log(e.bad_msg_id,e.bad_msg_seqno),new Error("Bad server salt for invalid message");this.applyServerSalt(e.new_server_salt),this.pushResend(e.bad_msg_id),this.ackMessage(n);break;case"bad_msg_notification":console.log(dT(),"Bad msg notification",e);var s=this.sentMessages[e.bad_msg_id];if(!s||s.seq_no!=e.bad_msg_seqno)throw console.log(e.bad_msg_id,e.bad_msg_seqno),new Error("Bad msg notification for invalid message");if(16==e.error_code||17==e.error_code){t.applyServerTime(bigStringInt(n).shiftRight(32).toString(10))&&(console.log(dT(),"Update session"),this.updateSession());var l=this.updateSentMessage(e.bad_msg_id);this.pushResend(l.msg_id),this.ackMessage(n)}break;case"message":this.serverMessages.push(e.msg_id),this.processMessage(e.body,e.msg_id,a);break;case"new_session_created":this.ackMessage(n),this.processMessageAck(e.first_msg_id),this.applyServerSalt(e.server_salt);var c=this;i.get("dc").then(function(t){t==c.dcID&&!c.upload&&h&&h(e)});break;case"msgs_ack":for(var r=0;r5?"[.."+e.result.length+"..]":e.result),console.log(dT(),"Rpc response",g)}s.deferred.resolve(e.result)}s.isAPI&&(this.connectionInited=!0)}delete this.sentMessages[p]}break;default:this.ackMessage(n),h&&h(e)}},{getNetworker:function(e,t,n,i){return new u(e,t,n,i)},setUpdatesProcessor:function(e){h=e},stopAll:m,startAll:p}}]),angular.module("izhukov.mtproto.wrapper",["izhukov.utils","izhukov.mtproto"]).factory("MtpApiManager",["Storage","MtpAuthorizer","MtpNetworkerFactory","MtpSingleInstanceService","ErrorService","qSync","$q","TelegramMeWebService",function(e,t,n,i,a,o,r,s){function l(e){f!==e&&(f=e,s.setAuthorized(f))}function c(t,n){e.set({dc:t,user_auth:angular.extend({dcID:t},n)}),l(!0),v=t}function d(){for(var t=[],n=1;5>=n;n++)t.push("dc"+n+"_auth_key");return e.get.apply(e,t).then(function(n){for(var i=[],a=0;a0||!1),e.id||0})}function h(){return v||!1}var f,g={},_={},y={},v=!1;return i.start(),e.get("dc").then(function(e){e&&(v=e)}),{getBaseDcID:h,getUserID:m,invokeApi:p,getNetworker:u,setUserAuth:c,logOut:d}}]).factory("MtpApiFileManager",["MtpApiManager","$q","FileManager","IdbFileStorage","TmpfsFileStorage","MemoryFileStorage",function(e,t,n,i,a,o){function r(e,n,i){void 0===v[e]&&(v[e]=[],b[e]=0);var a=v[e],o=t.defer();return a.push({cb:n,deferred:o,activeDelta:i}),setZeroTimeout(function(){s(e)}),o.promise}function s(e){var t=v[e],n="upload"==e?11:5;if(b[e]>=n||!t||!t.length)return!1;var i=t.shift(),a=i.activeDelta||1;b[e]+=a;w++;i.cb().then(function(t){b[e]-=a,s(e),i.deferred.resolve(t)},function(t){b[e]-=a,s(e),i.deferred.reject(t)})}function l(e){switch(e._){case"inputVideoFileLocation":return"video"+e.id+".mp4";case"inputDocumentFileLocation":return"doc"+e.id;case"inputAudioFileLocation":return"audio"+e.id}return e.volume_id||console.trace("Empty location",e),e.volume_id+"_"+e.local_id+"_"+e.secret+".jpg"}function c(e){if(!e)return!1;var t=l(e);return y[t]||!1}function d(){return a.isAvailable()?a:i.isAvailable()?i:o}function u(e,t){var n=l(e);return g[n]||(g[n]=d().saveFile(n,t).then(function(e){return y[n]=e})),g[n]}function p(i){if(!n.isAvailable())return t.reject({type:"BROWSER_BLOB_NOT_SUPPORTED"});var a=l(i),o="image/jpeg",s=g[a]||_[a];if(s)return s;var c=d();return _[a]=c.getFile(a).then(function(e){return y[a]=e},function(){var t=r(i.dc_id,function(){var t=i;return t._&&"fileLocation"!=t._||(t=angular.extend({},i,{_:"inputFileLocation"})),e.invokeApi("upload.getFile",{location:t,offset:0,limit:1048576},{dcID:i.dc_id,fileDownload:!0,createNetworker:!0})});return c.getFileWriter(a,o).then(function(e){return t.then(function(t){return n.write(e,t.bytes).then(function(){return y[a]=e.finalize()})})})})}function m(e,t){var n=d(),i=l(e);return n.getFile(i,t)}function h(i,a,o,s){if(!n.isAvailable())return t.reject({type:"BROWSER_BLOB_NOT_SUPPORTED"});s=s||{};var c=l(a),u=s.toFileEntry||null,p=g[c]||_[c],m=d();if(p)return u?p.then(function(e){return n.copy(e,u)}):p;var h,f=t.defer(),v=!1,b=!1,w=s.mime||"image/jpeg",$=function(e){f.reject(e),$=angular.noop,!h||e&&"DOWNLOAD_CANCELED"==e.type||h.truncate(0)};return m.getFile(c,o).then(function(e){u?n.copy(e,u).then(function(){f.resolve()},$):f.resolve(y[c]=e)},function(){var s=u?n.getFileWriter(u):m.getFileWriter(c,w);s.then(function(s){h=s;var l,d,p=524288,m=0,g=t.when();for(s.length&&(m=s.length,s.seek(m),f.notify({done:m,total:o})),l=m;o>l;l+=p)d=t.defer(),function(l,d,m,h){return r(i,function(){return v?t.when():e.invokeApi("upload.getFile",{location:a,offset:d,limit:p},{dcID:i,fileDownload:!0,createNetworker:!0})},2).then(function(e){h.then(function(){return v?t.when():n.write(s,e.bytes).then(function(){m.resolve()},$).then(function(){l?(b=!0,u?f.resolve():f.resolve(y[c]=s.finalize())):f.notify({done:d+p,total:o})})})})}(l+p>=o,l,d,g),g=d.promise})}),f.promise.cancel=function(){v||b||(v=!0,delete _[c],$({type:"DOWNLOAD_CANCELED"}))},u||(_[c]=f.promise),f.promise}function f(n){var i=n.size,a=i>=10485760,o=!1,s=!1,l=0,c=262144,d=2;i>67108864?(c=524288,d=4):102400>i&&(c=32768,d=1);var u=Math.ceil(i/c);if(u>1500)return t.reject({type:"FILE_TOO_BIG"});var p,m=[nextRandomInt(4294967295),nextRandomInt(4294967295)],h=t.defer(),f=function(e){h.reject(e),o=!0,f=angular.noop},g=0,_={_:a?"inputFileBig":"inputFile",id:m,parts:u,name:n.name,md5_checksum:""};for(p=0;i>p;p+=c)!function(p,g){r("upload",function(){var r=t.defer(),d=new FileReader,y=n.slice(p,p+c);return d.onloadend=function(t){return o?void r.reject():void(t.target.readyState==FileReader.DONE&&e.invokeApi(a?"upload.saveBigFilePart":"upload.saveFilePart",{file_id:m,file_part:g,file_total_parts:u,bytes:t.target.result},{startMaxLength:c+256,fileUpload:!0,singleInRequest:!0}).then(function(){l++,r.resolve(),l>=u?(h.resolve(_),s=!0):(console.log(dT(),"Progress",l*c/i),h.notify({done:l*c,total:i}))},f))},d.readAsArrayBuffer(y),r.promise},d)}(p,g++);return h.promise.cancel=function(){console.log("cancel upload",o,s),o||s||(o=!0,f({type:"UPLOAD_CANCELED"}))},h.promise}var g={},_={},y={},v={},b={},w=0;return{getCachedFile:c,getDownloadedFile:m,downloadFile:h,downloadSmallFile:p,saveSmallFile:u,uploadFile:f}}]).service("MtpSingleInstanceService",["_","$rootScope","$interval","Storage","AppRuntimeManager","IdleManager","ErrorService","MtpNetworkerFactory",function(e,t,n,i,a,o,r,s){function l(){if(!p&&!Config.Navigator.mobile&&!Config.Modes.packed){p=!0,o.start(),h=tsNow(),t.$watch("idle.isIDLE",d),n(d,5e3),d();try{$($window).on("beforeunload",c)}catch(e){}}}function c(){i.remove(m?"xt_instance":"xt_idle_instance")}function d(){var n=tsNow(),a=t.idle&&t.idle.isIDLE,o={id:u,idle:a,time:n};i.get("xt_instance","xt_idle_instance").then(function(t){var l=t[0],c=t[1];!l||l.timen-1e4&&n>f&&(r.alert(e("error_modal_warning_title_raw"),e("error_modal_multiple_open_tabs_raw")),f+=tsNow()+6e4)),i.set({xt_instance:o}),m||s.startAll(),m=!0):(i.set({xt_idle_instance:o}),m&&s.stopAll(),m=!1)})}var u=nextRandomInt(4294967295),p=!1,m=!1,h=tsNow(),f=0;return{start:l}}]),angular.module("myApp",["ngRoute","ngSanitize","ngTouch","ui.bootstrap","mediaPlayer","izhukov.utils","izhukov.mtproto","izhukov.mtproto.wrapper","myApp.filters","myApp.services","myApp.templates","myApp.directives","myApp.controllers"]).config(["$locationProvider","$routeProvider","$compileProvider","StorageProvider",function(e,t,n,i){var a,o,r,s,l,c,d,u={},p={};for(o=0;o=1e3?void o.resolve(r):void this["continue"]()},t.onerror=function(e){console.log("phonebook error",e,e.type,e.message),o.reject(e)},o.promise}return{isAvailable:a,openPhonebookImport:o,getPhonebookContacts:r}}]).service("AppChatsManager",["$rootScope","$modal","_","MtpApiFileManager","MtpApiManager","AppUsersManager","RichTextProcessor","SearchIndexManager",function(e,t,n,i,a,o,r,s){function l(e){angular.forEach(e,c)}function c(t){if(angular.isObject(t)){t.rTitle=r.wrapRichText(t.title,{noLinks:!0,noLinebreaks:!0})||n("chat_title_deleted");var i=s.cleanSearchText(t.title||"").split(" "),a=i.shift(),o=i.pop();t.initials=a.charAt(0)+(o?o.charAt(0):a.charAt(1)),t.num=Math.abs(t.id>>1)%(Config.Mobile?4:8)+1,void 0===g[t.id]?g[t.id]=t:(safeReplaceObject(g[t.id],t),e.$broadcast("chat_update",t.id)),void 0!==_[t.id]&&safeReplaceObject(_[t.id],t&&t.photo&&t.photo.photo_small||{empty:!0})}}function d(e){return g[e]||{id:e,deleted:!0}}function u(e){return angular.isObject(g[e])}function p(e,t){var n=d(e);return void 0===_[e]&&(_[e]=n&&n.photo&&n.photo.photo_small||{empty:!0}),{placeholder:"img/placeholders/"+t+"Avatar"+n.num+"@2x.png",location:_[e]}}function m(e){d(e);return"g"+e}function h(e,t){var n=angular.copy(t),i=d(e);return n.participants&&"chatParticipants"==n.participants._&&a.getUserID().then(function(e){angular.forEach(n.participants.participants,function(t){t.user=o.getUser(t.user_id),t.canLeave=e==t.user_id,t.canKick=!t.canLeave&&(e==n.participants.admin_id||e==t.inviter_id)})}),n.thumb={placeholder:"img/placeholders/GroupAvatar"+(Math.abs(e)%4+1)+"@2x.png",location:i&&i.photo&&i.photo.photo_small,width:72,height:72,size:0},n.peerString=m(e),n.chat=i,n}function f(n){var i=e.$new();i.chatID=n;t.open({templateUrl:templateUrl("chat_modal"),controller:"ChatModalController",scope:i,windowClass:"chat_modal_window mobile_modal"})}var g={},_={};return{saveApiChats:l,saveApiChat:c,getChat:d,getChatPhoto:p,getChatString:m,hasChat:u,wrapForFull:h,openChat:f}}]).service("AppPeersManager",["AppUsersManager","AppChatsManager","MtpApiManager",function(e,t){return{getInputPeer:function(e){var t="u"==e.charAt(0),n=e.substr(1).split("_");return t?{_:"inputPeerForeign",user_id:n[0],access_hash:n[1]}:{_:"inputPeerChat",chat_id:n[0]}},getInputPeerByID:function(t){return t>0?{_:"inputPeerForeign",user_id:t,access_hash:e.getUser(t).access_hash||0}:0>t?{_:"inputPeerChat",chat_id:-t}:void 0},getPeerSearchText:function(n){var i;if(n>0)i=e.getUserSearchText(n);else if(0>n){var a=t.getChat(-n);i=a.title||""}return i},getPeerString:function(n){return n>0?e.getUserString(n):t.getChatString(-n)},getOutputPeer:function(e){return e>0?{_:"peerUser",user_id:e}:{_:"peerChat",chat_id:-e}},getPeerID:function(e){if(angular.isObject(e))return e.user_id?e.user_id:-e.chat_id;var t="u"==e.charAt(0),n=e.substr(1).split("_");return t?n[0]:-n[0]||0},getPeer:function(n){return n>0?e.getUser(n):t.getChat(-n)},getPeerPhoto:function(n,i,a){return n>0?e.getUserPhoto(n,i):t.getChatPhoto(-n,a)}}}]).service("AppMessagesManager",["$q","$rootScope","$location","$filter","ApiUpdatesManager","AppUsersManager","AppChatsManager","AppPeersManager","AppPhotosManager","AppVideoManager","AppDocsManager","AppAudioManager","MtpApiManager","MtpApiFileManager","RichTextProcessor","NotificationsManager","SearchIndexManager","PeersSelectService","Storage","FileManager","TelegramMeWebService","StatusManager","_",function(e,t,n,i,a,o,r,s,l,c,d,u,p,m,h,f,g,_,y,v,b,w,$){function k(t,n,i){var a=J;if(angular.isString(t)&&t.length){if(!i||ot.query!==t){ot.query=t;var l=g.search(t,at);ot.dialogs=[],angular.forEach(J.dialogs,function(e){l[e.peerID]&&ot.dialogs.push(e)}),ot.count=ot.dialogs.length}a=ot}else ot.query=!1;var c=0;if(n>0)for(c=0;ca.dialogs[c].top_message);c++);return null!==a.count&&a.dialogs.length==a.count||a.dialogs.length>=c+(i||1)?e.when({count:a.count,dialogs:a.dialogs.slice(c,c+(i||20))}):(i=i||20,p.invokeApi("messages.getDialogs",{offset:c,limit:i,max_id:n||0}).then(function(e){if(b.setAuthorized(!0),o.saveApiUsers(e.users),r.saveApiChats(e.chats),P(e.messages),n>0)for(c=0;ca.dialogs[c].top_message);c++);return a.count=e.count||e.dialogs.length,a.dialogs.splice(c,a.dialogs.length-c),angular.forEach(e.dialogs,function(e){var t=s.getPeerID(e.peer),n=s.getPeerSearchText(t);g.indexObject(t,n,at),a.dialogs.push({peerID:t,top_message:e.top_message,unread_count:e.unread_count}),void 0===Y[t]&&(Y[t]={count:null,history:[e.top_message],pending:[]}),f.savePeerSettings(t,e.notify_settings)}),{count:a.count,dialogs:a.dialogs.slice(c,c+i)}}))}function S(e,t,n,i){return p.invokeApi("messages.getHistory",{peer:e,offset:i||0,limit:n||0,max_id:t||0},{noErrorBox:!0}).then(function(e){return o.saveApiUsers(e.users),r.saveApiChats(e.chats),P(e.messages),e})}function C(e,t,n,i){return S(e,t,n).then(function(a){i.count=a.count||a.messages.length;var o=0;if(t>0)for(o=0;oi.history[o]);o++);return i.history.splice(o,i.history.length-o),angular.forEach(a.messages,function(e){i.history.push(e.id)}),n-=a.messages.length,n>0&&i.history.length