}functionn(){c=!0}functioni(){returnc?(c=!1,""):s}functiona(){vare,t,n,a=Array.prototype.slice.call(arguments),o=a.pop(),r=[],s=1==a.length,c=!0,p=i();for(t=0;t<a.length;t++)if(n=a[t]=p+a[t],void0!==l[n])r.push(l[n]);elseif(u){try{e=localStorage.getItem(n)}catch(m){u=!1}try{e=void0===e||null===e?!1:JSON.parse(e)}catch(m){e=!1}r.push(l[n]=e)}elsed?c=!1:r.push(l[n]=!1);returnc?o(s?r[0]:r):voidchrome.storage.local.get(a,function(e){vari;for(r=[],t=0;t<a.length;t++)n=a[t],i=e[n],i=void0===i||null===i?!1:JSON.parse(i),r.push(l[n]=i);o(s?r[0]:r)})}functiono(e,t){varn,a,o={},r=i();for(nine)if(e.hasOwnProperty(n))if(a=e[n],n=r+n,l[n]=a,a=JSON.stringify(a),u)try{localStorage.setItem(n,a)}catch(s){u=!1}elseo[n]=a;returnu||!d?void(t&&t()):voidchrome.storage.local.set(o,t)}functionr(){vare,t,n,a=Array.prototype.slice.call(arguments),o=i();for("function"==typeofa[a.length-1]&&(n=a.pop()),e=0;e<a.length;e++)if(t=a[e]=o+a[e],deletel[t],u)try{localStorage.removeItem(t)}catch(r){u=!1}d?chrome.storage.local.remove(a,n):n&&n()}vars="",c=!1,l={},d=!!(e.chrome&&chrome.storage&&chrome.storage.local),u=!d&&!!e.localStorage;e.ConfigStorage={prefix:t,noPrefix:n,get:a,set:o,remove:r}}(this),function(){try{window==window.top||window.chrome&&chrome.app&&chrome.app.window?document.documentElement.style.display="block":top.location=self.location}catch(e){console.error("CJ protection",e)}if(window.safeConfirm=function(e,t){"string"==typeofe&&(e={message:e});varn=!1;try{n=confirm(e.message)}catch(i){n=!0}setTimeout(function(){t(n)},10)},window.applicationCache&&!Config.Modes.packed&&window.addEventListener){vart=window.applicationCache,n=!1,i=!1,a=function(e){clearTimeout(i),i=setTimeout(function(){try{t.update()}catch(e){console.log("appCache.update: "+e)}},e||3e5)},o=function(){t.addEventListener("updateready",function(){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("current_layout","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(t){case"mobile":Config.Mobile=!0;break;case"desktop":Config.Mobile=!1;break;default:Config.Mobile=Config.Navigator.mobile||$(window).width()<480}$("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,r,s,c,l,d,u,p,m,h,f,g,_,y,v,b,w,$,k,C,S,M,x,A,T,E,I,D,P;S={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",v="scroll",u="mousedown",p="mouseenter",m="mousemove",f="mousewheel",h="mouseup",y="resize",s="drag",
}varn=i("$injector"),a=i("ng"),o=t(e,"angular",Object);returno.$$minErr=o.$$minErr||i,t(o,"module",function(){vare={};returnfunction(i,o,r){vars=function(e,t){if("hasOwnProperty"===e)throwa("badname","hasOwnProperty is not a valid {0} name",t)};returns(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){functione(e,n,i,a){returna||(a=t),function(){returna[i||"push"]([e,n,arguments]),l}}if(!o)thrown("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);vart=[],a=[],s=[],c=e("$injector","invoke","push",a),l={_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:c,run:function(e){returns.push(e),this}};returnr&&c(r),l})}})}functiondt(t){u(t,{bootstrap:J,copy:L,extend:u,equals:O,element:Ri,forEach:o,injector:Bt,noop:h,bind:R,toJson:H,fromJson:j,identity:f,isUndefined:_,isDefined:y,isString:b,isFunction:k,isObject:v,isNumber:w,isElement:I,isArray:Zi,version:na,isDate:$,lowercase:Ni,uppercase:Ui,callbacks:{counter:0},getTestability:et,$$minErr:i,$$csp:Ji,reloadWithDebugInfo:Q,$$hasClass:Ct}),Hi=lt(e);try{Hi("ngLocale")}catch(n){Hi("ngLocale",[]).provider("$locale",ln)}Hi("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:On}),e.provider("$compile",Wt).directive({a:Qa,input:vo,textarea:vo,form:ao,script:cr,select:ur,style:mr,option:pr,ngBind:Fo,ngBindHtml:Ro,ngBindTemplate:Bo,ngClass:qo,ngClassEven:jo,ngClassOdd:Ho,ngCloak:zo,ngController:Vo,ngForm:oo,ngHide:nr,ngIf:Ko,ngInclude:Xo,ngInit:Yo,ngNonBindable:Jo,ngPluralize:Qo,ngRepeat:er,ngShow:tr,ngStyle:ir,ngSwitch:ar,ngSwitchWhen:or,ngSwitchDefault:rr,ngOptions:dr,ngTransclude:sr,ngModel:Ao,ngList:No,ngChange:To,pattern:Io,ngPattern:Io,required:Eo,ngRequired:Eo,minlength:Po,ngMinlength:Po,maxlength:Do,ngMaxlength:Do,ngValue:Uo,ngModelOptions:Oo}).directive({ngInclude:Zo}).directive(eo).directive(Wo),e.provider({$anchorScroll:Rt,$animate:Ma,$browser:jt,$cacheFactory:zt,$controller:Xt,$document:Zt,$exceptionHandler:Yt,$filter:Zn,$interpolate:sn,$interval:cn,$http:nn,$httpBackend:on,$location:$n,$log:kn,$parse:In,$rootScope:Un,$q:Dn,$$q:Pn,$sce:Hn,$sceDelegate:qn,$sniffer:jn,$templateCache:Vt,$templateRequest:zn,$$testability:Vn,$timeout:Wn,$window:Xn,$$rAF:Ln,$$asyncCallback:qt})}])}functionut(){return++aa}functionpt(e){returne.replace(sa,function(e,t,n,i){returni?n.toUpperCase():n}).replace(ca,"Moz$1")}functionmt(e){return!pa.test(e)}functionht(e){vart=e.nodeType;return1===t||!t||9===t}functionft(e,t){varn,i,a,r,s=t.createDocumentFragment(),c=[];if(mt(e))c.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(ma.exec(e)||["",""])[1].toLowerCase(),a=fa[i]||fa._default,n.innerHTML=a[1]+e.replace(ha,"<$1></$2>")+a[2],r=a[0];r--;)n=n.lastChild;c=F(c,n.childNodes),n=s.firstChild,n.textContent=""}returns.textContent="",s.innerHTML="",o(c,function(e){s.appendChild(e)}),s}functiongt(e,n){n=n||t;vari;return(i=ua.exec(e))?[n.createElement(i[1])]:(i=ft(e,n))?i.childNodes:[]}function_t(e){if(einstanceof_t)returne;vart;if(b(e)&&(e=Yi(e),t=!0),!(thisinstanceof_t)){if(t&&"<"!=e.charAt(0))throwda("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");returnnew_t(e)}t?xt(this,gt(e)):xt(this,e)}functionyt(e){returne.cloneNode(!0)}functionvt(e,t){if(t||wt(e),e.querySelectorAll)for(varn=e.querySelectorAll("*"),i=0,a=n.length;a>i;i++)wt(n[i])}functionbt(e,t,n,i){if(y(i))throwda("offargs","jqLite#off() does not support the `selector` argument");vara=$t(e),r=a&&a.events,s=a&&a.handle;if(s)if(t)o(t.split(" "),function(t){_(n)?(ra(e,t,r[t]),delete
}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}varC=i("$http"),S=[];returno(l,function(e){S.unshift(b(e)?p.get(e):p.invoke(e))}),m.pendingRequests=[],h("get","delete","head","jsonp"),f("post","put","patch"),m.defaults=r,m}]}functionan(t){if(8>=Bi&&(!t.match(/^(get|post|head|put|delete|options)$/i)||!e.XMLHttpRequest))returnnewe.ActiveXObject("Microsoft.XMLHTTP");if(e.XMLHttpRequest)returnnewe.XMLHttpRequest;throwi("$httpBackend")("noxhr","This browser does not support XMLHttpRequest.")}functionon(){this.$get=["$browser","$window","$document",function(e,t,n){returnrn(e,an,e.defer,t.angular.callbacks,n[0])}]}functionrn(e,t,n,i,a){functionr(e,t,n){varo=a.createElement("script"),r=null;returno.type="text/javascript",o.src=e,o.async=!0,r=function(e){ra(o,"load",r),ra(o,"error",r),a.body.removeChild(o),o=null;vars=-1,c="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),c=e.type,s="error"===e.type?404:200),n&&n(s,c)},oa(o,"load",r),oa(o,"error",r),a.body.appendChild(o),r}vars=-1;returnfunction(a,c,l,d,u,p,m,f){functiong(){v=s,w&&w(),$&&$.abort()}function_(t,i,a,o,r){C&&n.cancel(C),w=$=null,0===i&&(i=a?200:"file"==Gn(c).protocol?404:0),i=1223===i?204:i,r=r||"",t(i,a,o,r),e.$$completeOutstandingRequest(h)}varv;if(e.$$incOutstandingRequestCount(),c=c||e.url(),"jsonp"==Ni(a)){varb="_"+(i.counter++).toString(36);i[b]=function(e){i[b].data=e,i[b].called=!0};varw=r(c.replace("JSON_CALLBACK","angular.callbacks."+b),b,function(e,t){_(d,e,i[b].data,"",t),i[b]=h})}else{var$=t(a);if($.open(a,c,!0),o(u,function(e,t){y(e)&&$.setRequestHeader(t,e)}),$.onreadystatechange=function(){if($&&4==$.readyState){vare=null,t=null,n="";v!==s&&(e=$.getAllResponseHeaders(),t="response"in$?$.response:$.responseText),v===s&&10>Bi||(n=$.statusText),_(d,v||$.status,t,e,n)}},m&&($.withCredentials=!0),f)try{$.responseType=f}catch(k){if("json"!==f)throwk}$.send(l||null)}if(p>0)varC=n(g,p);elseE(p)&&p.then(g)}}functionsn(){vare="{{",t="}}";this.startSymbol=function(t){returnt?(e=t,this):e},this.endSymbol=function(e){returne?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,i,a){functiono(e){return"\\\\\\"+e}functionr(o,r,p,m){functionh(n){returnn.replace(l,e).replace(d,t)}functionf(e){try{returnT(A(e))}catch(t){varn=Ta("interr","Can't interpolate: {0}\n{1}",o,t.toString());i(n)}}m=!!m;for(varg,y,v,b=0,w=[],$=[],C=o.length,S=[],M=[];C>b;){if(-1==(g=o.indexOf(e,b))||-1==(y=o.indexOf(t,g+s))){b!==C&&S.push(h(o.substring(b)));break}b!==g&&S.push(h(o.substring(b,g))),v=o.substring(g+s,y),w.push(v),$.push(n(v,f)),b=y+c,M.push(S.length),S.push("")}if(p&&S.length>1)throwTa("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){varx=function(e){for(vart=0,n=w.length;n>t;t++){if(m&&_(e[t]))return;S[M[t]]=e[t]}returnS.join("")},A=function(e){returnp?a.getTrusted(p,e):a.valueOf(e)},T=function(e){if(null==e)return"";switch(typeofe){case"string":break;case"number":e=""+e;break;default:e=H(e)}returne};returnu(function(e){vart=0,n=w.length,a=newArray(n);try{for(;n>t;t++)a[t]=$[t](e);returnx(a)}catch(r){vars=Ta("interr","Can't interpolate: {0}\n{1}",o,r.toString());i(s)}},{exp:o,expressions:w,$$watchDelegate:function(e,t,n){vari;returne.$watchGroup($,function(n,a){varo=x(n);k(t)&&t.call(this,o,n!==a?i:o,e),i=o},n)}})}}vars=e.length,c=t.length,l=newRegExp(e.replace(/./g,o),"g"),d=newRegExp(t.replace(/./g,o),"g");returnr.startSymbol=function(){returne},r.endSymbol=function(){returnt},r}]}functioncn(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,i){functiona(a,r,s,c){varl=t.setInterval,d=t.clearInterval,u=0,p=y(c)&&!c,m=(p?i:n).defer(),h=m.promise;returns=y(s)?s:0,h.then(null,null,a),h.$$intervalId=l(function(){m.notify(u++),s>0&&u>=s&&(m.resolve(u),d(h.$$intervalId),deleteo[h.$$intervalId]),p||e.$apply()},r),o[h.$$intervalId]=m,h}varo={};returna.cancel=function(e){returne&
returns(n,t[0],t),n};return{scope:!1,link:function(e,t,n){vari=n.playlist,a=n.mediaPlayer||n.playerControl,r=newc(t),s=e[i];if(s=void0===i?[]:void0===e[i]?e[i]=[]:e[i],void0!==a&&e.$eval(a+" = player",{player:r}),"AUDIO"!==t[0].tagName&&"VIDEO"!==t[0].tagName)returnnewError("player directive works only when attached to an <audio>/<video> type tag");varl=[],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){l.push({src:e.src,type:e.type,media:e.media})}),s.unshift(l)),void0===i?r.$attachPlaylist(s):s.length?(o(r)(s,void0,e),e.$watch(i,o(r),!0)):e.$watch(i,o(r),!0)}}}]),angular.module("mediaPlayer.helpers",[]).factory("mp.throttle",["$timeout",function(e){returnfunction(t,n,i,a){varo,r=0;"boolean"!=typeofn&&(a=i,i=n,n=void0);vars=function(){vars=this,c=+newDate-r,l=arguments,d=function(){r=+newDate,i.apply(s,l)},u=function(){o=void0};a&&!o&&d(),o&&e.cancel(o),void0===a&&c>t?d():n!==!0&&(o=e(a?u:d,void0===a?t-c:t))};returns}}]);vardbits,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<<dbits)-1,BigInteger.prototype.DV=1<<dbits;varBI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;varBI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=newArray,rr,vv;for(rr="0".charCodeAt(0),vv=0;9>=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;varlowprimes=[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];BigIntege
for(vari=goog.math.Long.fromNumber(Math.pow(n,8)),a=goog.math.Long.ZERO,o=0;o<e.length;o+=8){varr=Math.min(8,e.length-o),s=parseInt(e.substring(o,o+r),n);if(8>r){varc=goog.math.Long.fromNumber(Math.pow(n,r));a=a.multiply(c).add(goog.math.Long.fromNumber(s))}elsea=a.multiply(i),a=a.add(goog.math.Long.fromNumber(s))}returna},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(){returnthis.low_},goog.math.Long.prototype.toNumber=function(){returnthis.high_*goog.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()},goog.math.Long.prototype.toString=function(e){vart=e||10;if(2>t||t>36)throwError("radix out of range: "+t);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){varn=goog.math.Long.fromNumber(t),i=this.div(n),a=i.multiply(n).subtract(this);returni.toString(t)+a.toInt().toString(t)}return"-"+this.negate().toString(t)}for(varo=goog.math.Long.fromNumber(Math.pow(t,6)),a=this,r="";;){vars=a.div(o),c=a.subtract(s.multiply(o)).toInt(),l=c.toString(t);if(a=s,a.isZero())returnl+r;for(;l.length<6;)l="0"+l;r=""+l+r}},goog.math.Long.prototype.getHighBits=function(){returnthis.high_},goog.math.Long.prototype.getLowBits=function(){returnthis.low_},goog.math.Long.prototype.getLowBitsUnsigned=function(){returnthis.low_>=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_},goog.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())returnthis.equals(goog.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(vare=0!=this.high_?this.high_:this.low_,t=31;t>0&&0==(e&1<<t);t--);return0!=this.high_?t+33:t+1},goog.math.Long.prototype.isZero=function(){return0==this.high_&&0==this.low_},goog.math.Long.prototype.isNegative=function(){returnthis.high_<0},goog.math.Long.prototype.isOdd=function(){return1==(1&this.low_)},goog.math.Long.prototype.equals=function(e){returnthis.high_==e.high_&&this.low_==e.low_},goog.math.Long.prototype.notEquals=function(e){returnthis.high_!=e.high_||this.low_!=e.low_},goog.math.Long.prototype.lessThan=function(e){returnthis.compare(e)<0},goog.math.Long.prototype.lessThanOrEqual=function(e){returnthis.compare(e)<=0},goog.math.Long.prototype.greaterThan=function(e){returnthis.compare(e)>0},goog.math.Long.prototype.greaterThanOrEqual=function(e){returnthis.compare(e)>=0},goog.math.Long.prototype.compare=function(e){if(this.equals(e))return0;vart=this.isNegative(),n=e.isNegative();returnt&&!n?-1:!t&&n?1:this.subtract(e).isNegative()?-1:1},goog.math.Long.prototype.negate=function(){returnthis.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){vart=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,c=65535&e.low_,l=0,d=0,u=0,p=0;returnp+=a+c,u+=p>>>16,p&=65535,u+=i+s,d+=u>>>16,u&=65535,d+=n+r,l+=d>>>16,d&=65535,l+=t+o,l&=65535,goog.math.Long.fromBits(u<<16|p,l<<16|d)},goog.math.Long.prototype.subtract=function(e){returnthis.add(e.negate())},goog.math.Long.prototype.multiply=function(e){if(this.isZero())returngoog.math.Long.ZERO;if(e.isZero())returngoog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE))returne.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(e.equals(goog.math.Long.MIN_VA
}},function(e){t.reject(e)}):(t.reject(newError("Set_client_DH_params_answer server_nonce mismatch")),!1):(t.reject(newError("Set_client_DH_params_answer nonce mismatch")),!1)},function(e){t.reject(e)})},function(e){t.reject(e)})}functionm(t){if(void0!==g[t])returng[t];for(varn=[],i=0;16>i;i++)n.push(nextRandomInt(255));if(!e.chooseServer(t))returnr.reject(newError("No server found for dc "+t));vara={dcID:t,nonce:n,deferred:r.defer()};returns(function(){l(a)}),g[t]=a.deferred.promise,g[t]["catch"](function(){deleteg[t]}),g[t]}varh=navigator.userAgent.match(/Chrome\/(\d+(\.\d+)?)/),f=h&&parseFloat(h[1])||!1,g={};return{auth:m}}]).factory("MtpNetworkerFactory",["MtpDcConfigurator","MtpTimeManager","MtpSecureRandom","Storage","CryptoWorker","$http","$q","$timeout","$interval","$rootScope",function(e,t,n,i,a,o,r,s,c,l){functiond(e,t,n,i){i=i||{},this.dcID=e,this.iii=p++,this.authKey=t,this.authKeyID=sha1Hash(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(),m||(m=!0,l.offline=!0,l.offlineConnecting=!0),Config.Navigator.mobile&&this.setupMobileSleep()}varu,p=0,m=!1,h=navigator.userAgent.match(/Chrome\/(\d+(\.\d+)?)/),f=h&&parseFloat(h[1])||!1;returnl.retryOnline=function(){$(document.body).trigger("online")},d.prototype.updateSession=function(){this.seqNo=0,this.sessionID=newArray(8),n.nextBytes(this.sessionID)},d.prototype.setupMobileSleep=function(){vare=this;l.$watch("idle.isIDLE",function(t){t?e.sleepAfter=tsNow()+3e4:(deletee.sleepAfter,e.checkLongPoll())}),l.$on("push_received",function(){e.sleepAfter&&(e.sleepAfter=tsNow()+3e4,e.checkLongPoll())})},d.prototype.updateSentMessage=function(e){varn=this.sentMessages[e];if(!n)return!1;vari=this;if(n.container){vara=[];angular.forEach(n.inner,function(e){vart=i.updateSentMessage(e);t&&a.push(t.msg_id)}),n.inner=a}returnn.msg_id=t.generateID(),n.seq_no=this.generateSeqNo(n.notContentRelated||n.container),this.sentMessages[n.msg_id]=n,deletei.sentMessages[e],n},d.prototype.generateSeqNo=function(e){vart=2*this.seqNo;returne||(t++,this.seqNo++),t},d.prototype.wrapMtpCall=function(e,n,i){vara=newTLSerialization({mtproto:!0});a.storeMethod(e,n);varo=t.generateID(),r=this.generateSeqNo(),s={msg_id:o,seq_no:r,body:a.getBytes()};returnConfig.Modes.debug&&console.log(dT(),"MT call",e,n,o,r),this.pushMessage(s,i)},d.prototype.wrapMtpMessage=function(e,n){n=n||{};vari=newTLSerialization({mtproto:!0});i.storeObject(e,"Object");vara=t.generateID(),o=this.generateSeqNo(n.notContentRelated),r={msg_id:a,seq_no:o,body:i.getBytes()};returnConfig.Modes.debug&&console.log(dT(),"MT message",e,a,o),this.pushMessage(r,n)},d.prototype.wrapApiCall=function(e,n,i){vara=newTLSerialization(i);this.connectionInited||(a.storeInt(479200567,"invokeWithLayer18"),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);varo=t.generateID(),r=this.generateSeqNo(),s={msg_id:o,seq_no:r,body:a.getBytes(),isAPI:!0};returnConfig.Modes.debug?console.log(dT(),"Api call",e,n,o,r,i):console.log(dT(),"Api call",e),this.pushMessage(s,i)},d.prototype.checkLongPoll=function(){vare=this.cleanupSent();if(this.longPollPending&&tsNow()<this.longPollPending||this.offline)return!1;vart=this;i.get("dc").then(function(n){e&&(n!=t.dcID||t.upload||t.sleepAfter&&tsNow()>t.sleepAfter)||t.sendLongPoll()})},d.prototype.sendLongPoll=function(){vare=25e3,t=this;t