null!=a&&l.push(a);returnZ.apply([],l)},guid:1,proxy:function(e,t){varn,i,a;return"string"==typeoft&&(a=e[t],t=e,e=a),ae.isFunction(e)?(n=Y.call(arguments,2),i=function(){returne.apply(t||this,n.concat(Y.call(arguments)))},i.guid=e.guid=e.guid||ae.guid++,i):void0},now:function(){return+newDate},support:ne}),ae.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()});varce=function(e){functiont(e,t,n,i){vara,o,s,r,l,c,u,m,h,g;if((t?t.ownerDocument||t:B)!==D&&T(t),t=t||D,n=n||[],!e||"string"!=typeofe)returnn;if(1!==(r=t.nodeType)&&9!==r)return[];if(N&&!i){if(a=ve.exec(e))if(s=a[1]){if(9===r){if(o=t.getElementById(s),!o||!o.parentNode)returnn;if(o.id===s)returnn.push(o),n}elseif(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&R(t,o)&&o.id===s)returnn.push(o),n}else{if(a[2])returnQ.apply(n,t.getElementsByTagName(e)),n;if((s=a[3])&&w.getElementsByClassName&&t.getElementsByClassName)returnQ.apply(n,t.getElementsByClassName(s)),n}if(w.qsa&&(!F||!F.test(e))){if(m=u=L,h=t,g=9===r&&e,1===r&&"object"!==t.nodeName.toLowerCase()){for(c=C(e),(u=t.getAttribute("id"))?m=u.replace(be,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=c.length;l--;)c[l]=m+p(c[l]);h=ye.test(e)&&d(t.parentNode)||t,g=c.join(",")}if(g)try{returnQ.apply(n,h.querySelectorAll(g)),n}catch(f){}finally{u||t.removeAttribute("id")}}}returnM(e.replace(le,"$1"),t,n,i)}functionn(){functione(n,i){returnt.push(n+" ")>k.cacheLength&&deletee[t.shift()],e[n+" "]=i}vart=[];returne}functioni(e){returne[L]=!0,e}functiona(e){vart=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}functiono(e,t){for(varn=e.split("|"),i=e.length;i--;)k.attrHandle[n[i]]=t}functions(e,t){varn=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(i)returni;if(n)for(;n=n.nextSibling;)if(n===t)return-1;returne?1:-1}functionr(e){returnfunction(t){varn=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}functionl(e){returnfunction(t){varn=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}functionc(e){returni(function(t){returnt=+t,i(function(n,i){for(vara,o=e([],n.length,t),s=o.length;s--;)n[a=o[s]]&&(n[a]=!(i[a]=n[a]))})})}functiond(e){returne&&typeofe.getElementsByTagName!==G&&e}functionu(){}functionp(e){for(vart=0,n=e.length,i="";n>t;t++)i+=e[t].value;returni}functionm(e,t,n){vari=t.dir,a=n&&"parentNode"===i,o=q++;returnt.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||a)returne(t,n,o)}:function(t,n,s){varr,l,c=[j,o];if(s){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,s))return!0}elsefor(;t=t[i];)if(1===t.nodeType||a){if(l=t[L]||(t[L]={}),(r=l[i])&&r[0]===j&&r[1]===o)returnc[2]=r[2];if(l[i]=c,c[2]=e(t,n,s))return!0}}}functionh(e){returne.length>1?function(t,n,i){for(vara=e.length;a--;)if(!e[a](t,n,i))return!1;return!0}:e[0]}functiong(e,n,i){for(vara=0,o=n.length;o>a;a++)t(e,n[a],i);returni}functionf(e,t,n,i,a){for(varo,s=[],r=0,l=e.length,c=null!=t;l>r;r++)(o=e[r])&&(!n||n(o,i,a))&&(s.push(o),c&&t.push(r));returns}function_(e,t,n,a,o,s){returna&&!a[L]&&(a=_(a)),o&&!o[L]&&(o=_(o,s)),i(function(i,s,r,l){varc,d,u,p=[],m=[],h=s.length,_=i||g(t||"*",r.nodeType?[r]:r,[]),v=!e||!i&&t?_:f(_,p,e,r,l),y=n?o||(i?e:h||a)?[]:s:v;if(n&&n(v,y,r,l),a)for(c=f(y,m),a(c,[],r,l),d=c.length;d--;)(u=c[d])&&(y[m[d]]=!(v[m[d]]=u));if(i){if(o||e){if(o){for(c=[],d=y.length;d--;)(u=y[d])&&c.push(v[d]=u);o(null,y=[],c,l)}for(d=y.length;d--;)(u=y[d])&&(c=o?te.call(i,u):p[d])>-1&&(i[c]=!(s[c]=u))}}elsey=f(y===s?y.splice(h,y.length):y),o?o(null,s,y,l):Q.apply(s,y)})}functionv(e){for(vart,n,i,a=e.length,o=k.relative[e[0].type],s=o||k.relative[" "],r=o?1:0,l=m(function(e){returne===t},s,!0),c=m(function(e){returnte.call(t,e)>-1},s,!0),d=[function(e,n,i){return!o&&(i||n!==A)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];a>r;r++)if(n=k.relative[e[r].type])d=[m(h(d),n)];else{if(n=k.filter[e[r].type].apply(null,e[r].matches),n[L]){for(i=++r;a>i&&!k.relative[e[i].typ
clearTimeout(i),i=setTimeout(function(){try{t.update()}catch(e){console.log("appCache.update: "+e)}},e||3e5)},o=function(){t.addEventListener("updateready",function(e){t.status==t.UPDATEREADY&&(n||(safeConfirm({type:"WEBOGRAM_UPDATED_RELOAD",message:"A new version of Webogram is downloaded. Launch it?"},function(e){e?window.location.reload():n=!0}),a()))},!1),t.addEventListener("noupdate",function(){a()},!1),t.addEventListener("error",function(){a()},!1)};a(3e3),window.addEventListener("load",o)}}(),function(){vare=[Config.Navigator.osX?"osx":"non_osx",Config.Navigator.retina?"is_2x":"is_1x"];Config.Modes.ios_standalone&&e.push("ios_standalone"),$(document.body).addClass(e.join(" ")),ConfigStorage.get("layout_selected","i18n_locale",function(e){vart=e[0],n=e[1],i="en-us",a={dom:!1,i18n_ng:!1,i18n_messages:!1,i18n_fallback:!1},o=function(){vare,t=!0;for(eina)if(a.hasOwnProperty(e)&&a[e]===!1){t=!1;break}t&&(a.boot=!1,angular.bootstrap(document,["myApp"]))};switch(Config.Modes.force_mobile?t="mobile":Config.Modes.force_desktop&&(t="desktop"),t){case"mobile":Config.Mobile=!0;break;case"desktop":Config.Mobile=!1;break;default:vars=$(window).width();Config.Mobile=Config.Navigator.mobile||s>10&&480>s}$("head").append('<link rel="stylesheet" href="css/'+(Config.Mobile?"mobile.css":"desktop.css")+'" />'),n||(n=(navigator.language||"").toLowerCase(),n=Config.I18n.aliases[n]||n);for(varr=0;r<Config.I18n.supported.length;r++)if(Config.I18n.supported[r]==n){Config.I18n.locale=n;break}a.i18n_ng=Config.I18n.locale==i,$.getJSON("js/locales/"+Config.I18n.locale+".json").success(function(e){Config.I18n.messages=e,a.i18n_messages=!0,Config.I18n.locale==i&&(a.i18n_fallback=!0),o()}),Config.I18n.locale!=i&&$.getJSON("js/locales/"+i+".json").success(function(e){Config.I18n.fallback_messages=e,a.i18n_fallback=!0,o()}),$(document).ready(function(){a.dom=!0,a.i18n_ng?o():$("<script>").appendTo("body").on("load",function(){a.i18n_ng=!0,o()}).attr("src","vendor/angular/i18n/angular-locale_"+Config.I18n.locale+".js")})})}(),function(e,t,n){"use strict";vari,a,o,s,r,l,c,d,u,p,m,h,g,f,_,v,y,b,w,k,$,S,C,x,M,A,E,I,T,D,P;C={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},b="scrollbar",y="scroll",u="mousedown",p="mouseenter",m="mousemove",g="mousewheel",h="mouseup",v="resize",r="drag",l="enter",k="up",_="panedown",o="DOMMouseScroll",s="down",$="wheel",c="keydown",d="keyup",w="touchmove",i="Microsoft Internet Explorer"===t.navigator.appName&&/msie 7./i.test(t.navigator.appVersion)&&t.ActiveXObject,a=null,E=t.requestAnimationFrame,S=t.cancelAnimationFrame,T=n.createElement("div").style,P=function(){vare,t,n,i,a,o;for(i=["t","webkitT","MozT","msT","OT"],e=a=0,o=i.length;o>a;e=++a)if(n=i[e],t=i[e]+"ransform",tinT)returni[e].substr(0,i[e].length-1);return!1}(),D=function(e){returnP===!1?!1:""===P?e:P+e.charAt(0).toUpperCase()+e.substr(1)},I=D("transform"),M=I!==!1,x=function(){vare,t,i;returne=n.createElement("div"),t=e.style,t.position="absolute",t.width="100px",t.height="100px",t.overflow=y,t.top="-9999px",n.body.appendChild(e),i=e.offsetWidth-e.clientWidth,n.body.removeChild(e),i},A=function(){vare,n,i;returnn=t.navigator.userAgent,(e=/(?=.+Mac OS X)(?=.+Firefox)/.test(n))?(i=/Firefox\/\d{2}\./.exec(n),i&&(i=i[0].replace(/\D+/g,"")),e&&+i>23):!1},f=function(){functionc(i,o){this.el=i,this.options=o,a||(a=x()),this.$el=e(this.el),this.doc=e(this.options.documentContext||n),this.win=e(this.options.windowContext||t),this.body=this.doc.find("body"),this.$content=this.$el.children("."+o.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&(null!=this.el.style.WebkitOverflowScrolling||navigator.userAgent.match(/mobi.+Gecko/i))?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}returnc.prototype.preven
e&&M.invoke(e)}),M}functionQe(){vare=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){functiona(e){vart=null;returnArray.prototype.some.call(e,function(e){return"a"===R(e)?(t=e,!0):void0}),t}functiono(){vare=r.yOffset;if(x(e))e=e();elseif(O(e)){varn=e[0],i=t.getComputedStyle(n);e="fixed"!==i.position?0:n.getBoundingClientRect().bottom}elseS(e)||(e=0);returne}functions(e){if(e){e.scrollIntoView();varn=o();if(n){vari=e.getBoundingClientRect().top;t.scrollBy(0,i-n)}}elset.scrollTo(0,0)}functionr(e){e=$(e)?e:n.hash();vart;e?(t=l.getElementById(e))?s(t):(t=a(l.getElementsByName(e)))?s(t):"top"===e&&s(null):s(null)}varl=t.document;returne&&i.$watch(function(){returnn.hash()},function(e,t){(e!==t||""!==e)&&He(function(){i.$evalAsync(r)})}),r}]}functionet(e,t){returne||t?e?t?(Ri(e)&&(e=e.join(" ")),Ri(t)&&(t=t.join(" ")),e+" "+t):e:t:""}functiontt(e){for(vart=0;t<e.length;t++){varn=e[t];if(n.nodeType===Sa)returnn}}functionnt(e){$(e)&&(e=e.split(" "));vart=fe();returno(e,function(e){e.length&&(t[e]=!0)}),t}functionit(e){returnw(e)?e:{}}functionat(e,t,n,i){functiona(e){try{e.apply(null,V(arguments,1))}finally{if(v--,0===v)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}functions(e){vart=e.indexOf("#");return-1===t?"":e.substr(t)}functionr(){C=null,c(),d()}functionl(){try{returnm.state}catch(e){}}functionc(){w=l(),w=y(w)?null:w,q(w,A)&&(w=A),A=w}functiond(){($!==u.url()||k!==w)&&($=u.url(),k=w,o(x,function(e){e(u.url(),w)}))}varu=this,p=(t[0],e.location),m=e.history,h=e.setTimeout,f=e.clearTimeout,_={};u.isMock=!1;varv=0,b=[];u.$$completeOutstandingRequest=a,u.$$incOutstandingRequestCount=function(){v++},u.notifyWhenNoOutstandingRequests=function(e){0===v?e():b.push(e)};varw,k,$=p.href,S=t.find("base"),C=null;c(),k=w,u.url=function(t,n,a){if(y(a)&&(a=null),p!==e.location&&(p=e.location),m!==e.history&&(m=e.history),t){varo=k===a;if($===t&&(!i.history||o))returnu;varr=$&&Ft($)===Ft(t);return$=t,k=a,!i.history||r&&o?((!r||C)&&(C=t),n?p.replace(t):r?p.hash=s(t):p.href=t,p.href!==t&&(C=t)):(m[n?"replaceState":"pushState"](a,"",t),c(),k=w),u}returnC||p.href.replace(/%27/g,"'")},u.state=function(){returnw};varx=[],M=!1,A=null;u.onUrlChange=function(t){returnM||(i.history&&xi(e).on("popstate",r),xi(e).on("hashchange",r),M=!0),x.push(t),t},u.$$applicationDestroyed=function(){xi(e).off("hashchange popstate",r)},u.$$checkUrlChange=d,u.baseHref=function(){vare=S.attr("href");returne?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},u.defer=function(e,t){varn;returnv++,n=h(function(){delete_[n],a(e)},t||0),_[n]=!0,n},u.defer.cancel=function(e){return_[e]?(delete_[e],f(e),a(g),!0):!1}}functionot(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){returnnewat(e,i,t,n)}]}functionst(){this.$get=function(){functione(e,n){functiona(e){e!=p&&(m?m==e&&(m=e.n):m=e,o(e.n,e.p),o(e,p),p=e,p.n=null)}functiono(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(eint)throwi("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);vars=0,r=u({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,d={},p=null,m=null;returnt[e]={put:function(e,t){if(!y(t)){if(c<Number.MAX_VALUE){varn=d[e]||(d[e]={key:e});a(n)}returneinl||s++,l[e]=t,s>c&&this.remove(m.key),t}},get:function(e){if(c<Number.MAX_VALUE){vart=d[e];if(!t)return;a(t)}returnl[e]},remove:function(e){if(c<Number.MAX_VALUE){vart=d[e];if(!t)return;t==p&&(p=t.p),t==m&&(m=t.n),o(t.n,t.p),deleted[e]}deletel[e],s--},removeAll:function(){l={},s=0,d={},p=m=null},destroy:function(){l=null,r=null,d=null,deletet[e]},info:function(){returnu({},r,{size:s})}}}vart={};returne.info=function(){vare={};returno(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){returnt[e]},e}}functionrt(){this.$get=["$cacheFactory",function(e){returne("templates")}]}functionlt(e,i){functiona(e,t,n){vari=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,a={};returno(e,function(e,o){vars=e.match(i);if(!s)throwIa("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,o,e,n?"control
this.$$url=Tt(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){returnFt(e)==Ft(t)?(this.$$parse(t),!0):!1}}functionjt(e,t,n){this.$$html5=!0,Bt.apply(this,arguments),this.$$parseLinkUrl=function(i,a){if(a&&"#"===a[0])returnthis.hash(a.slice(1)),!0;varo,s;returne==Ft(i)?o=i:(s=Nt(t,i))?o=e+n+s:t===i+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){vart=te(this.$$search),i=this.$$hash?"#"+ne(this.$$hash):"";this.$$url=Tt(this.$$path)+(t?"?"+t:"")+i,this.$$absUrl=e+n+this.$$url}}functionqt(e){returnfunction(){returnthis[e]}}functionHt(e,t){returnfunction(n){returny(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}functionVt(){vare="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){returnb(t)?(e=t,this):e},this.html5Mode=function(e){returnP(e)?(t.enabled=e,this):w(e)?(P(e.enabled)&&(t.enabled=e.enabled),P(e.requireBase)&&(t.requireBase=e.requireBase),P(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,i,a,o,s){functionr(e,t,n){vara=c.url(),o=c.$$state;try{i.url(e,t,n),c.$$state=i.state()}catch(s){throwc.url(a),c.$$state=o,s}}functionl(e,t){n.$broadcast("$locationChangeSuccess",c.absUrl(),e,c.$$state,t)}varc,d,u,p=i.baseHref(),m=i.url();if(t.enabled){if(!p&&t.requireBase)throwza("nobase","$location in HTML5 mode requires a <base> tag to be present!");u=Rt(m)+(p||"/"),d=a.history?Lt:jt}elseu=Ft(m),d=Bt;varh=Ut(u);c=newd(u,h,"#"+e),c.$$parseLinkUrl(m,m),c.$$state=i.state();varg=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(vara=xi(e.target);"a"!==R(a[0]);)if(a[0]===o[0]||!(a=a.parent())[0])return;varr=a.prop("href"),l=a.attr("href")||a.attr("xlink:href");w(r)&&"[object SVGAnimatedString]"===r.toString()&&(r=xn(r.animVal).href),g.test(r)||!r||a.attr("target")||e.isDefaultPrevented()||c.$$parseLinkUrl(r,l)&&(e.preventDefault(),c.absUrl()!=i.url()&&(n.$apply(),s.angular["ff-684208-preventDefault"]=!0))}}),Ot(c.absUrl())!=Ot(m)&&i.url(c.absUrl(),!0);varf=!0;returni.onUrlChange(function(e,t){returny(Nt(h,e))?void(s.location.href=e):(n.$evalAsync(function(){vari,a=c.absUrl(),o=c.$$state;c.$$parse(e),c.$$state=t,i=n.$broadcast("$locationChangeStart",e,a,t,o).defaultPrevented,c.absUrl()===e&&(i?(c.$$parse(a),c.$$state=o,r(a,!1,o)):(f=!1,l(a,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){vare=Ot(i.url()),t=Ot(c.absUrl()),o=i.state(),s=c.$$replace,d=e!==t||c.$$html5&&a.history&&o!==c.$$state;(f||d)&&(f=!1,n.$evalAsync(function(){vart=c.absUrl(),i=n.$broadcast("$locationChangeStart",t,e,c.$$state,o).defaultPrevented;c.absUrl()===t&&(i?(c.$$parse(e),c.$$state=o):(d&&r(t,s,o===c.$$state?null:c.$$state),l(e,o)))})),c.$$replace=!1}),c}]}functionzt(){vare=!0,t=this;this.debugEnabled=function(t){returnb(t)?(e=t,this):e},this.$get=["$window",function(n){functioni(e){returneinstanceofError&&(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}functiona(e){vart=n.console||{},a=t[e]||t.log||g,s=!1;try{s=!!a.apply}catch(r){}returns?function(){vare=[];returno(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(){varn=a("debug");returnfunction(){e&&n.apply(t,arguments)}}()}}]}functionWt(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throwGa("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);returne}functionGt(e,t){if(e+="",!$(e))throwGa("iseccst","Cannot convert object to primitive value! Expression: {0}",t);returne}functionKt(e,t){if(e){if(e.constructor===e)throwGa("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throwGa("isecwi
returnn}if(!a(e))returne;Ri(n)||(n=[n]),0===n.length&&(n=["+"]);varc=t(n,i);c.push({get:function(){return{}},descending:i?-1:1});vard=Array.prototype.map.call(e,r);returnd.sort(l),e=d.map(function(e){returne.value})}}functionQn(e){returnx(e)&&(e={link:e}),e.restrict=e.restrict||"AC",_(e)}functionei(e,t){e.$name=t}functionti(e,t,i,a,s){varr=this,l=[];r.$error={},r.$$success={},r.$pending=n,r.$name=s(t.name||t.ngForm||"")(i),r.$dirty=!1,r.$pristine=!0,r.$valid=!0,r.$invalid=!1,r.$submitted=!1,r.$$parentForm=fo,r.$rollbackViewValue=function(){o(l,function(e){e.$rollbackViewValue()})},r.$commitViewValue=function(){o(l,function(e){e.$commitViewValue()})},r.$addControl=function(e){me(e.$name,"input"),l.push(e),e.$name&&(r[e.$name]=e),e.$$parentForm=r},r.$$renameControl=function(e,t){varn=e.$name;r[n]===e&&deleter[n],r[t]=e,e.$name=t},r.$removeControl=function(e){e.$name&&r[e.$name]===e&&deleter[e.$name],o(r.$pending,function(t,n){r.$setValidity(n,null,e)}),o(r.$error,function(t,n){r.$setValidity(n,null,e)}),o(r.$$success,function(t,n){r.$setValidity(n,null,e)}),L(l,e),e.$$parentForm=fo},fi({ctrl:this,$element:e,set:function(e,t,n){vari=e[t];if(i){vara=i.indexOf(n);-1===a&&i.push(n)}elsee[t]=[n]},unset:function(e,t,n){vari=e[t];i&&(L(i,n),0===i.length&&deletee[t])},$animate:a}),r.$setDirty=function(){a.removeClass(e,Jo),a.addClass(e,Qo),r.$dirty=!0,r.$pristine=!1,r.$$parentForm.$setDirty()},r.$setPristine=function(){a.setClass(e,Jo,Qo+" "+_o),r.$dirty=!1,r.$pristine=!0,r.$submitted=!1,o(l,function(e){e.$setPristine()})},r.$setUntouched=function(){o(l,function(e){e.$setUntouched()})},r.$setSubmitted=function(){a.addClass(e,_o),r.$submitted=!0,r.$$parentForm.$setSubmitted()}}functionni(e){e.$formatters.push(function(t){returne.$isEmpty(t)?t:t.toString()})}functionii(e,t,n,i,a,o){ai(e,t,n,i,a,o),ni(i)}functionai(e,t,n,i,a,o){vars=bi(t[0].type);if(!a.android){varr=!1;t.on("compositionstart",function(e){r=!0}),t.on("compositionend",function(){r=!1,l()})}varl=function(e){if(c&&(o.defer.cancel(c),c=null),!r){vara=t.val(),l=e&&e.type;"password"===s||n.ngTrim&&"false"===n.ngTrim||(a=Bi(a)),(i.$viewValue!==a||""===a&&i.$$hasNativeValidators)&&i.$setViewValue(a,l)}};if(a.hasEvent("input"))t.on("input",l);else{varc,d=function(e,t,n){c||(c=o.defer(function(){c=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){vart=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||d(e,this,this.value)}),a.hasEvent("paste")&&t.on("paste cut",d)}t.on("change",l),i.$render=function(){vare=i.$isEmpty(i.$viewValue)?"":i.$viewValue;t.val()!==e&&t.val(e)}}functionoi(e,t){if(C(e))returne;if($(e)){Mo.lastIndex=0;varn=Mo.exec(e);if(n){vari=+n[1],a=+n[2],o=0,s=0,r=0,l=0,c=Hn(i),d=7*(a-1);returnt&&(o=t.getHours(),s=t.getMinutes(),r=t.getSeconds(),l=t.getMilliseconds()),newDate(i,0,c.getDate()+d,o,s,r,l)}}return0/0}functionsi(e,t){returnfunction(n,i){vara,s;if(C(n))returnn;if($(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),wo.test(n))returnnewDate(n);if(e.lastIndex=0,a=e.exec(n))returna.shift(),s=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<t.length&&(s[t[n]]=+e)}),newDate(s.yyyy,s.MM-1,s.dd,s.HH,s.mm,s.ss||0,1e3*s.sss||0)}return0/0}}functionri(e,t,i,a){returnfunction(o,s,r,l,c,d,u){functionp(e){returne&&!(e.getTime&&e.getTime()!==e.getTime())}functionm(e){returnb(e)&&!C(e)?i(e)||n:e}li(o,s,r,l),ai(o,s,r,l,c,d);varh,g=l&&l.$options&&l.$options.timezone;if(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))returnnull;if(t.test(e)){vara=i(e,h);returng&&(a=X(a,g)),a}returnn}),l.$formatters.push(function(e){if(e&&!C(e))throwis("datefmt","Expected `{0}` to be a date",e);returnp(e)?(h=e,h&&g&&(h=X(h,g,!0)),u("date")(e,a,g)):(h=null,"")}),b(r.min)||r.ngMin){varf;l.$validators.min=function(e){return!p(e)||y(f)||i(e)>=f},r.$observe("min",function(e){f=m(e),l.$validate()})}if(b(r.max)||r.ngMax){var_;l.$validators.max=fu
caseeo.Literal:u=this.escape(e.value),this.assign(t,u),a(u);break;caseeo.UnaryExpression:this.recurse(e.argument,n,n,function(e){c=e}),u=e.operator+"("+this.ifDefined(c,0)+")",this.assign(t,u),a(u);break;caseeo.BinaryExpression:this.recurse(e.left,n,n,function(e){l=e}),this.recurse(e.right,n,n,function(e){c=e}),u="+"===e.operator?this.plus(l,c):"-"===e.operator?this.ifDefined(l,0)+e.operator+this.ifDefined(c,0):"("+l+")"+e.operator+"("+c+")",this.assign(t,u),a(u);break;caseeo.LogicalExpression:t=t||this.nextId(),p.recurse(e.left,t),p.if_("&&"===e.operator?t:p.not(t),p.lazyRecurse(e.right,t)),a(t);break;caseeo.ConditionalExpression:t=t||this.nextId(),p.recurse(e.test,t),p.if_(t,p.lazyRecurse(e.alternate,t),p.lazyRecurse(e.consequent,t)),a(t);break;caseeo.Identifier:t=t||this.nextId(),i&&(i.context="inputs"===p.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),i.computed=!1,i.name=e.name),Wt(e.name),p.if_("inputs"===p.stage||p.not(p.getHasOwnProperty("l",e.name)),function(){p.if_("inputs"===p.stage||"s",function(){s&&1!==s&&p.if_(p.not(p.nonComputedMember("s",e.name)),p.lazyAssign(p.nonComputedMember("s",e.name),"{}")),p.assign(t,p.nonComputedMember("s",e.name))})},t&&p.lazyAssign(t,p.nonComputedMember("l",e.name))),(p.state.expensiveChecks||cn(e.name))&&p.addEnsureSafeObject(t),a(t);break;caseeo.MemberExpression:l=i&&(i.context=this.nextId())||this.nextId(),t=t||this.nextId(),p.recurse(e.object,l,n,function(){p.if_(p.notNull(l),function(){e.computed?(c=p.nextId(),p.recurse(e.property,c),p.getStringValue(c),p.addEnsureSafeMemberName(c),s&&1!==s&&p.if_(p.not(p.computedMember(l,c)),p.lazyAssign(p.computedMember(l,c),"{}")),u=p.ensureSafeObject(p.computedMember(l,c)),p.assign(t,u),i&&(i.computed=!0,i.name=c)):(Wt(e.property.name),s&&1!==s&&p.if_(p.not(p.nonComputedMember(l,e.property.name)),p.lazyAssign(p.nonComputedMember(l,e.property.name),"{}")),u=p.nonComputedMember(l,e.property.name),(p.state.expensiveChecks||cn(e.property.name))&&(u=p.ensureSafeObject(u)),p.assign(t,u),i&&(i.computed=!1,i.name=e.property.name))},function(){p.assign(t,"undefined")}),a(t)},!!s);break;caseeo.CallExpression:t=t||this.nextId(),e.filter?(c=p.filter(e.callee.name),d=[],o(e.arguments,function(e){vart=p.nextId();p.recurse(e,t),d.push(t)}),u=c+"("+d.join(",")+")",p.assign(t,u),a(t)):(c=p.nextId(),l={},d=[],p.recurse(e.callee,c,l,function(){p.if_(p.notNull(c),function(){p.addEnsureSafeFunction(c),o(e.arguments,function(e){p.recurse(e,p.nextId(),n,function(e){d.push(p.ensureSafeObject(e))})}),l.name?(p.state.expensiveChecks||p.addEnsureSafeObject(l.context),u=p.member(l.context,l.name,l.computed)+"("+d.join(",")+")"):u=c+"("+d.join(",")+")",u=p.ensureSafeObject(u),p.assign(t,u)},function(){p.assign(t,"undefined")}),a(t)}));break;caseeo.AssignmentExpression:if(c=this.nextId(),l={},!nn(e.left))throwGa("lval","Trying to assing a value to a non l-value");this.recurse(e.left,n,l,function(){p.if_(p.notNull(l.context),function(){p.recurse(e.right,c),p.addEnsureSafeObject(p.member(l.context,l.name,l.computed)),p.addEnsureSafeAssignContext(l.context),u=p.member(l.context,l.name,l.computed)+e.operator+c,p.assign(t,u),a(t||u)})},1);break;caseeo.ArrayExpression:d=[],o(e.elements,function(e){p.recurse(e,p.nextId(),n,function(e){d.push(e)})}),u="["+d.join(",")+"]",this.assign(t,u),a(u);break;caseeo.ObjectExpression:d=[],o(e.properties,function(e){p.recurse(e.value,p.nextId(),n,function(t){d.push(p.escape(e.key.type===eo.Identifier?e.key.name:""+e.key.value)+":"+t)})}),u="{"+d.join(",")+"}",this.assign(t,u),a(u);break;caseeo.ThisExpression:this.assign(t,"s"),a("s");break;caseeo.NGValueParameter:this.assign(t,"v"),a("v")}},getHasOwnProperty:function(e,t){varn=e+"."+t,i=this.current().own;returni.hasOwnProperty(n)||(i[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),i[n]},assign:function(e,t){returne?(this.current().body.push(e,"=",t,";"),e):void0},filter:function(e){returnthis.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefi
D=newArray(k),p=0;k>p;p++)if(x=i===I?p:I[p],M=i[x],A=E(x,M,p),f[A])T=f[A],deletef[A],F[A]=T,D[p]=T;else{if(F[A])throwo(D,function(e){e&&e.scope&&(f[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,M);D[p]={id:A,scope:n,clone:n},F[A]=!0}for(varUinf){if(T=f[U],P=ge(T.clone),s.leave(P),P[0].parentNode)for(p=0,_=P.length;_>p;p++)P[p][r]=!0;T.scope.$destroy()}for(p=0;k>p;p++)if(x=i===I?p:I[p],M=i[x],T=D[p],T.scope){y=N;doy=y.nextSibling;while(y&&y[r]);d(T)!=y&&s.move(ge(T.clone),null,xi(N)),N=u(T),c(T.scope,p,b,M,w,x,k)}elseg(function(e,t){T.scope=t;varn=h.cloneNode(!1);e[e.length++]=n,s.enter(e,null,xi(N)),N=n,T.clone=e,F[T.id]=T,c(T.scope,p,b,M,w,x,k)});f=F})}}}}],hs="ng-hide",gs="ng-hide-animate",fs=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngShow,function(t){e[t?"removeClass":"addClass"](n,hs,{tempClasses:gs})})}}}],_s=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,i){t.$watch(i.ngHide,function(t){e[t?"addClass":"removeClass"](n,hs,{tempClasses:gs})})}}}],vs=Qn(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)}),ys=["$animate",function(e){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,a,s){varr=a.ngSwitch||a.on,l=[],c=[],d=[],u=[],p=function(e,t){returnfunction(){e.splice(t,1)}};n.$watch(r,function(n){vari,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){varr=ge(c[i].clone);u[i].$destroy();varm=d[i]=e.leave(r);m.then(p(d,i))}c.length=0,u.length=0,(l=s.cases["!"+n]||s.cases["?"])&&o(l,function(n){n.transclude(function(i,a){u.push(a);varo=n.element;i[i.length++]=t.createComment(" end ngSwitchWhen: ");vars={clone:i};c.push(s),e.enter(i,o.parent(),o)})})})}}}],bs=Qn({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})}}),ws=Qn({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})}}),ks=Qn({restrict:"EAC",link:function(e,t,n,a,o){if(!o)throwi("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",J(t));o(function(e){t.empty(),t.append(e)})}}),$s=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){vari=n.id,a=t[0].text;e.put(i,a)}}}}],Ss={$setViewValue:g,$render:g},Cs=["$element","$scope","$attrs",function(e,i,a){varo=this,s=newYe;o.ngModelCtrl=Ss,o.unknownOption=xi(t.createElement("option")),o.renderUnknownOption=function(t){varn="? "+Ke(t)+" ?";o.unknownOption.val(n),e.prepend(o.unknownOption),e.val(n)},i.$on("$destroy",function(){o.renderUnknownOption=g}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){returno.removeUnknownOption(),e.val()},o.writeValue=function(t){o.hasOption(t)?(o.removeUnknownOption(),e.val(t),""===t&&o.emptyOption.prop("selected",!0)):null==t&&o.emptyOption?(o.removeUnknownOption(),e.val("")):o.renderUnknownOption(t)},o.addOption=function(e,t){me(e,'"option value"'),""===e&&(o.emptyOption=t);varn=s.get(e)||0;s.put(e,n+1)},o.removeOption=function(e){vart=s.get(e);t&&(1===t?(s.remove(e),""===e&&(o.emptyOption=n)):s.put(e,t-1))},o.hasOption=function(e){return!!s.get(e)}}],xs=function(){return{restrict:"E",require:["select","?ngModel"],controller:Cs,link:function(e,t,n,i){vara=i[1];if(a){vars=i[0];if(s.ngModelCtrl=a,a.$render=function(){s.writeValue(a.$viewValue)},t.on("change",function(){e.$apply(function(){a.$setViewValue(s.readValue())})}),n.multiple){s.readValue=function(){vare=[];returno(t.find("option"),function(t){t.selected&&e.push(t.value)}),e}
vari=y(e);i.setAttribute(xe,t);vara=N.get(i),o=a?L(a,n):n;N.put(i,o)}varN=newg,F=newg,O=null,U=r.$watch(function(){return0===k.totalPendingRequests},function(e){e&&(U(),r.$$postDigest(function(){r.$$postDigest(function(){null===O&&(O=!0)})}))}),R={},G=e.classNameFilter(),Z=G?function(e){returnG.test(e)}:function(){return!0},X=p($);return{on:function(e,t,n){vari=c(t);R[e]=R[e]||[],R[e].push({node:i,callback:n})},off:function(e,t,n){functioni(e,t,n){vari=c(t);returne.filter(function(e){vart=e.node===i&&(!n||e.callback===n);return!t})}vara=R[e];a&&(R[e]=1===arguments.length?null:i(a,t,n))},pin:function(e,t){i(K(e),"element","not an element"),i(K(t),"parentElement","not an element"),e.data(Me,t)},push:function(e,t,n,i){returnn=n||{},n.domOperation=i,A(e,t,n)},enabled:function(e,t){varn=arguments.length;if(0===n)t=!!O;else{vari=K(e);if(i){vara=y(e),o=F.get(a);1===n?t=!o:(t=!!t,t?o&&F.remove(a):F.put(a,!0))}elset=O=!!e}returnt}}}]}],Ee=["$$rAF",function(e){functiont(t){n.push(t),n.length>1||e(function(){for(vare=0;e<n.length;e++)n[e]();n=[]})}varn=[];returnfunction(){vare=!1;returnt(function(){e=!0}),function(n){e?n():t(n)}}}],Ie=["$q","$sniffer","$$animateAsyncRun",function(e,t,n){functioni(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=n(),this._state=0}vara=0,o=1,s=2;returni.chain=function(e,t){functionn(){returni===e.length?voidt(!0):voide[i](function(e){returne===!1?voidt(!1):(i++,voidn())})}vari=0;n()},i.all=function(e,t){functionn(n){a=a&&n,++i===e.length&&t(a)}vari=0,a=!0;j(e,function(e){e.done(n)})},i.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===s?e():this._doneCallbacks.push(e)},progress:R,getPromise:function(){if(!this.promise){vart=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}returnthis.promise},then:function(e,t){returnthis.getPromise().then(e,t)},"catch":function(e){returnthis.getPromise()["catch"](e)},"finally":function(e){returnthis.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){vart=this;t._state===a&&(t._state=o,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(e){this._state!==s&&(j(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=s)}},i}],Te=["$animateProvider",function(e){functiont(e,t){e.data(r,t)}functionn(e){e.removeData(r)}functioni(e){returne.data(r)}varo="ng-animate-ref",s=this.drivers=[],r="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(e,r,l,c,d,u){functiong(e){functiont(e){if(e.processed)returne;e.processed=!0;varn=e.domNode,i=n.parentNode;o.put(n,e);for(vars;i;){if(s=o.get(i)){s.processed||(s=t(s));break}i=i.parentNode}return(s||a).children.push(e),e}functionn(e){vart,n=[],i=[];for(t=0;t<e.children.length;t++)i.push(e.children[t]);vara=i.length,o=0,s=[];for(t=0;t<i.length;t++){varr=i[t];0>=a&&(a=o,o=0,n.push(s),s=[]),s.push(r.fn),r.children.forEach(function(e){o++,i.push(e)}),a--}returns.length&&n.push(s),n}vari,a={children:[]},o=newd;for(i=0;i<e.length;i++){vars=e[i];o.put(s.domNode,e[i]={domNode:s.domNode,fn:s.fn,children:[]})}for(i=0;i<e.length;i++)t(e[i]);returnn(a)}varf=[],_=p(e);returnfunction(d,p,v){functionb(e){vart="["+o+"]",n=e.hasAttribute(o)?[e]:e.querySelectorAll(t),i=[];returnj(n,function(e){vart=e.getAttribute(o);t&&t.length&&i.push(e)}),i}functionw(e){vart=[],n={};j(e,function(e,i){vara=e.element,s=y(a),r=e.event,l=["enter","move"].indexOf(r)>=0,c=e.structural?b(s):[];if(c.length){vard=l?"to":"from";j(c,function(e){vart=e.getAttribute(o);n[t]=n[t]||{},n[t][d]={animationID:i,element:B(e)}})}elset.push(e)});vari={},a={};returnj(n,function(n,o){vars=n.from,r=n.to;if(!s||!r){varl=s?s.animationID:r.animationID,c=l.toString();returnvoid(i[c]||(i[c]=!0,t.push
this.reset()},toggleMute:function(){this.muted=this.$domEl.muted=!this.$domEl.muted},next:function(e){vart=this;if(t.currentTrack&&t.currentTrack<t.tracks){vari=e||t.playing;t.pause(),n(function(){t.$clearSourceList(),t.$addSourceList(t.$playlist[t.currentTrack]),t.load(i),t.currentTrack++})}},prev:function(e){vart=this;if(t.currentTrack&&t.currentTrack-1){vari=e||t.playing;t.pause(),n(function(){t.$clearSourceList(),t.$addSourceList(t.$playlist[t.currentTrack-2]),t.load(i),t.currentTrack--})}},setPlaybackRate:function(e){this.$domEl.playbackRate=e},setVolume:function(e){this.$domEl.volume=e},seek:function(e){vart,n=0;return"string"!=typeofe?this.$domEl.currentTime=e:(t=e.split(":"),n+=parseInt(t.pop(),10),t.length&&(n+=60*parseInt(t.pop(),10)),t.length&&(n+=3600*parseInt(t.pop(),10)),isNaN(n)?void0:this.$domEl.currentTime=n)},on:function(e,t){returnthis.$element.on(e,t)},off:function(e,t){returnthis.$element.off(e,t)},one:function(e,t){returnthis.$element.one(e,t)},$addSourceList:function(e){vart=this;if(angular.isArray(e))angular.forEach(e,function(e,n){vari=document.createElement("SOURCE");["src","type","media"].forEach(function(t){void0!==e[t]&&i.setAttribute(t,e[t])}),t.$element.append(i)});elseif(angular.isObject(e)){varn=document.createElement("SOURCE");["src","type","media"].forEach(function(t){void0!==e[t]&&n.setAttribute(t,e[t])}),t.$element.append(n)}},$clearSourceList:function(){this.$element.contents().remove()},$formatTime:function(e){if(e===1/0)return"∞";vart,n=parseInt(e/3600,10)%24,i=parseInt(e/60,10)%60,a=parseInt(e%60,10),o=(10>i?"0"+i:i)+":"+(10>a?"0"+a:a);returnt=n>0?(10>n?"0"+n:n)+":"+o:o},$attachPlaylist:function(e){void0===e||null===e?this.playlist=[]:this.$playlist=e}},r=function(e,t,n){vara={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<e.tracks?e.next(!0):e.$apply(function(e){e.ended=!0,e.playing=!1})},timeupdate:i(1e3,!1,function(){e.$apply(function(e){e.currentTime=t.currentTime,e.formatTime=e.$formatTime(e.currentTime)})}),loadedmetadata:function(){e.$apply(function(e){e.currentTrack||e.currentTrack++,e.duration=t.duration,e.formatDuration=e.$formatTime(e.duration),t.buffered.length&&(e.loadPercent=Math.round(t.buffered.end(t.buffered.length-1)/e.duration*100))})},progress:function(){e.$domEl.buffered.length&&e.$apply(function(e){e.loadPercent=Math.round(t.buffered.end(t.buffered.length-1)/e.duration*100),e.network="progress"})},volumechange:function(){e.$apply(function(e){e.volume=t.volume,e.muted=t.muted})},seeked:function(){e.$apply(function(e){e.seeking=!1})},seeking:function(){e.$apply(function(e){e.seeking=!0})},ratechange:function(){e.$apply(function(e){e.playbackRate=t.playbackRate})},stalled:function(){e.$apply(function(e){e.network="stalled"})},suspend:function(){e.$apply(function(e){e.network="suspend"})}};angular.forEach(a,function(e,t){n.on(t,e)})},l=function(t){varn=angular.extend(e.$new(!0),{$element:t,$domEl:t[0],$playlist:void0,buffered:t[0].buffered,played:t[0].played,seekable:t[0].seekable},a,s);returnr(n,t[0],t),n};return{scope:!1,link:function(e,t,n,i){vara=n.playlist,s=n.mediaPlayer||n.playerControl,r=newl(t),c=e[a];if(c=void0===a?[]:void0===e[a]?e[a]=[]:e[a],void0!==s&&e.$eval(s+" = player",{player:r}),"AUDIO"!==t[0].tagName&&"VIDEO"!==t[0].tagName)returnnewError("player directive works only when attached to an <audio>/<video> type tag");vard=[],u=t.find("source");1===u.length?c.unshift({src:u[0].src,type:u[0].type,media:u[0].media}):u.length>1&&(angular.forEach(u,function(e){d.push({src:e.src,type:e.type,media:e.media})}),c.unshift(d)),void0===a?r.$attachPlaylist(c):c.length?(o(r)(c,void0,e),e.$watch(a,o(r),!0)):e.$watch(a,o(r),!0)}}}]),angular.module("mediaPlayer.helpers",[]).factory("mp.throttle",["$timeout",function(e){returnfunction(t,n,i,a){varo,s=0;"boolean"!=typeofn&&(a=i,i=n,n=void0);varr=function(){varr=this,l=+newDate-s,c=arguments,d=function(){s=+newDate,i.apply(r,c)},u=function(){o=void0};a&&
}),a.checkUpdate(),o.start()}]).controller("AppLoginController",["$scope","$rootScope","$location","$timeout","$modal","$modalStack","MtpApiManager","ErrorService","NotificationsManager","PasswordManager","ChangelogNotifyService","IdleManager","LayoutSwitchService","TelegramMeWebService","_",function(e,t,n,i,a,o,s,r,l,c,d,u,p,m,h){functiong(){vart=(navigator.language||"").toLowerCase(),n=Config.LangCountries[t],i=!Config.Navigator.mobile;if(f(-1==["en","en-us","en-uk"].indexOf(t)?void0!==n?n:t.indexOf("-")>0?t.split("-")[1].toUpperCase():"US":"US"),i){vara=e.credentials.phone_country;s.invokeApi("help.getNearestDc",{},{dcID:2,createNetworker:!0}).then(function(t){a==e.credentials.phone_country&&f(t.country),t.nearest_dc!=t.this_dc&&s.getNetworker(t.nearest_dc,{createNetworker:!0})})}}functionf(e){if(e){vart,n;for(t=0;t<Config.CountryCodes.length;t++)if(n=Config.CountryCodes[t],n[0]==e)return_({name:h(n[1]+"_raw"),code:n[2]})}return_({name:h("country_select_modal_country_us_raw"),code:"+1"})}function_(t){$=t,e.credentials.phone_country!=t.code?e.credentials.phone_country=t.code:v(),e.$broadcast("country_selected"),e.$broadcast("value_updated")}functionv(){vart,n,i,a=((e.credentials.phone_country||"")+(e.credentials.phone_number||"")).replace(/\D+/g,""),o=0,s=!1;if(a.length)if($&&!a.indexOf($.code.replace(/\D+/g,"")))s=$.name;elsefor(t=0;t<Config.CountryCodes.length;t++)for(n=2;n<Config.CountryCodes[t].length;n++)i=Config.CountryCodes[t][n].replace(/\D+/g,""),i.length>o&&!a.indexOf(i)&&(o=i.length,s=h(Config.CountryCodes[t][1]+"_raw"));e.credentials.phone_full=a,e.credentials.phone_country_name=s||h("login_controller_unknown_country_raw")}functiony(e){s.setUserAuth(k.dcID,{id:e.user.id}),i.cancel(S),n.url("/im")}functionb(){i.cancel(S),e.credentials.viaApp||(--e.callPending.remaining?S=i(b,1e3):(e.callPending.success=!1,s.invokeApi("auth.sendCall",{phone_number:e.credentials.phone_full,phone_code_hash:e.credentials.phone_code_hash},k).then(function(){e.callPending.success=!0})))}functionw(){returnc.getState(k).then(function(t){returne.password=t})}o.dismissAll(),u.start(),s.getUserID().then(function(e){returne?voidn.url("/im"):"http:"!=location.protocol||Config.Modes.http||-1==Config.App.domains.indexOf(location.hostname)?voidm.setAuthorized(!1):void(location.href=location.href.replace(/^http:/,"https:"))});vark={dcID:2,createNetworker:!0},$=!1;e.credentials={phone_country:"",phone_country_name:"",phone_number:"",phone_full:""},e.progress={},e.callPending={},e.about={},e.chooseCountry=function(){vare=a.open({templateUrl:templateUrl("country_select_modal"),controller:"CountrySelectModalController",windowClass:"countries_modal_window mobile_modal",backdrop:"single"});e.result.then(_)},e.$watch("credentials.phone_country",v),e.$watch("credentials.phone_number",v),g();varS;e.sendCode=function(){i.cancel(S),r.confirm({type:"LOGIN_PHONE_CORRECT",country_code:e.credentials.phone_country,phone_number:e.credentials.phone_number}).then(function(){e.progress.enabled=!0,onContentLoaded(function(){e.$broadcast("ui_height")});varn=tsNow();s.invokeApi("auth.sendCode",{phone_number:e.credentials.phone_full,api_id:Config.App.id,api_hash:Config.App.hash,lang_code:navigator.language||"en"},k).then(function(t){e.progress.enabled=!1,e.credentials.phone_code_hash=t.phone_code_hash,e.credentials.phone_occupied=t.phone_registered,e.credentials.viaApp="auth.sentAppCode"==t._,e.callPending.remaining=t.send_call_timeout||60,e.error={},e.about={},b(),onContentLoaded(function(){e.$broadcast("ui_height")})},function(t){switch(e.progress.enabled=!1,console.log("sendCode error",t),t.type){case"PHONE_NUMBER_INVALID":e.error={field:"phone"},t.handled=!0}})["finally"](function(){(t.idle.isIDLE||tsNow()-n>6e4)&&l.notify({title:"Telegram",message:"Your authorization key was successfully generated! Open the app to log in.",tag:"auth_key"})})})},e.sendSms=function(){e.credentials.viaApp&&(deletee.credentials.viaApp,s.invokeApi("auth.sendSms",{phone_number:e.credentials.phone_full,phone_code_hash:e.credentials.phone_code_hash},k).then(b