}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(e,t,n){"use strict";vari,a,o,r,s,c,l,u,d,p,h,f,g,m,v,y,_,b,w,$,C,S,k,x,M,T,E,A,D,I,P;k={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",_="scroll",d="mousedown",p="mouseenter",h="mousemove",g="mousewheel",f="mouseup",y="resize",s="drag",c="enter",$="up",v="panedown",o="DOMMouseScroll",r="down",C="wheel",l="keydown",u="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,D=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",tinD)returni[e].substr(0,i[e].length-1);return!1}(),I=function(e){returnP===!1?!1:""===P?e:P+e.charAt(0).toUpperCase()+e.substr(1)},A=I("transform"),M=A!==!1,x=function(){vare,t,i;returne=n.createElement("div"),t=e.style,t.position="absolute",t.width="100px",t.height="100px",t.overflow=_,t.top="-9999px",n.body.appendChild(e),i=e.offsetWidth-e.clientWidth,n.body.removeChild(e),i},T=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},m=function(){functionl(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()}returnl.prototype.preventScrolling=function(e,t){if(this.isActive)if(e.type===o)(t===r&&e.originalEvent.detail>0||t===$&&e.originalEvent.detail<0)&&e.preventDefault();elseif(e.type===g){if(!e.originalEvent||!e.originalEvent.wheelDelta)return;(t===r&&e.originalEvent.wheelDelta<0||t===$&&e.originalEvent.wheelDelta>0)&&e.preventDefault()}},l.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},l.prototype.updateScrollValues=function(){vare,t;e=this.content,this.maxScrollTop=e.scrollHeight-e.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=e.scrollTop,t=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==t&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:t}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},l.prototype.setOnScrollStyles=function(){vare;M?(e={},e[A]="translate(0, "+this.sliderTop+"px)"):e={top:this.sliderTop},E?(S&&thi
}functionft(e){returne.replace(oa,function(e,t,n,i){returni?n.toUpperCase():n}).replace(ra,"Moz$1")}functiongt(e){return!ua.test(e)}functionmt(e){vart=e.nodeType;return1===t||!t||9===t}functionvt(e,t){varn,i,a,r,s=t.createDocumentFragment(),c=[];if(gt(e))c.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(da.exec(e)||["",""])[1].toLowerCase(),a=ha[i]||ha._default,n.innerHTML=a[1]+e.replace(pa,"<$1></$2>")+a[2],r=a[0];r--;)n=n.lastChild;c=R(c,n.childNodes),n=s.firstChild,n.textContent=""}returns.textContent="",s.innerHTML="",o(c,function(e){s.appendChild(e)}),s}functionyt(e,n){n=n||t;vari;return(i=la.exec(e))?[n.createElement(i[1])]:(i=vt(e,n))?i.childNodes:[]}function_t(e){if(einstanceof_t)returne;vart;if(b(e)&&(e=Xi(e),t=!0),!(thisinstanceof_t)){if(t&&"<"!=e.charAt(0))throwca("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");returnnew_t(e)}t?Et(this,yt(e)):Et(this,e)}functionbt(e){returne.cloneNode(!0)}functionwt(e,t){if(t||Ct(e),e.querySelectorAll)for(varn=e.querySelectorAll("*"),i=0,a=n.length;a>i;i++)Ct(n[i])}function$t(e,t,n,i){if(y(i))throwca("offargs","jqLite#off() does not support the `selector` argument");vara=St(e),r=a&&a.events,s=a&&a.handle;if(s)if(t)o(t.split(" "),function(t){v(n)?(aa(e,t,r[t]),deleter[t]):F(r[t]||[],n)});elsefor(tinr)"$destroy"!==t&&aa(e,t,r[t]),deleter[t]}functionCt(e,t){vari=e.ng339,a=i&&ta[i];if(a){if(t)returnvoiddeletea.data[t];a.handle&&(a.events.$destroy&&a.handle({},"$destroy"),$t(e)),deleteta[i],e.ng339=n}}functionSt(e,t){vari=e.ng339,a=i&&ta[i];returnt&&!a&&(e.ng339=i=ht(),a=ta[i]={events:{},data:{},handle:n}),a}functionkt(e,t,n){if(mt(e)){vari=y(n),a=!i&&t&&!_(t),o=!t,r=St(e,!a),s=r&&r.data;if(i)s[t]=n;else{if(o)returns;if(a)returns&&s[t];d(s,t)}}}functionxt(e,t){returne.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}functionMt(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Xi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Xi(t)+" "," ")))})}functionTt(e,t){if(t&&e.setAttribute){varn=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Xi(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Xi(n))}}functionEt(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{varn=t.length;if("number"==typeofn&&t.window!==t){if(n)for(vari=0;n>i;i++)e[e.length++]=t[i]}elsee[e.length++]=t}}functionAt(e,t){returnDt(e,"$"+(t||"ngController")+"Controller")}functionDt(e,t,i){9==e.nodeType&&(e=e.documentElement);for(vara=Ki(t)?t:[t];e;){for(varo=0,r=a.length;r>o;o++)if((i=Oi.data(e,a[o]))!==n)returni;e=e.parentNode||11===e.nodeType&&e.host}}functionIt(e){for(wt(e,!0);e.firstChild;)e.removeChild(e.firstChild)}functionPt(e,t){t||wt(e);varn=e.parentNode;n&&n.removeChild(e)}functionNt(e,t){varn=ga[t.toLowerCase()];returnn&&ma[I(e)]&&n}functionLt(e,t){varn=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&va[t]}functionFt(e,t){varn=function(n,i){n.isDefaultPrevented=function(){returnn.defaultPrevented};vara=t[i||n.type],o=a?a.length:0;if(o){o>1&&(a=O(a));for(varr=0;o>r;r++)a[r].call(e,n)}};returnn.elem=e,n}functionBt(e,t){varn=e&&e.$$hashKey;if(n)return"function"==typeofn&&(n=e.$$hashKey()),n;vari=typeofe;returnn="function"==i||"object"==i&&null!==e?e.$$hashKey=i+":"+(t||l)():i+":"+e}functionOt(e,t){if(t){varn=0;this.nextUid=function(){return++n}}o(e,this.put,this)}functionUt(e){vart=e.toString().replace(wa,""),n=t.match(ya);returnn?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}functionRt(e,t,n){vari,a,r,s;if("function"==typeofe){if(!(i=e.$inject)){if(i=[],e.length){if(t)throwb(n)&&n||(n=e.name||Ut(e)),$a("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);a=e.toString().replace(wa,""),r=a.match(ya),o(r[1].split(_a),function(e){e.replace(ba,function(e,t,n){i.push(n)})})}e.$inject=i}}elseKi(e)?(s=e.length-1,rt(e[s],"
d&&(a=L(d,i)>=0,a&&(F(d,i),u--,0===d.length&&deletes.$pending[e]));varh=s.$pending&&0===u;if(h&&(s.$pending=n),t)(o||a)&&(o&&F(o,i),o&&o.length||(p[e]&&l--,l?h&&(r(!1),s.$valid=!1,s.$invalid=!0):s.$pending||(r(t),s.$valid=!0,s.$invalid=!1),p[e]=!1,r(!0,e),c.$setValidity(e,!0,s)));else{if(s.$pending||(s.$valid=!1,s.$invalid=!0),l||r(t),o){if(N(o,i))return}elsep[e]=o=[],l++,r(!1,e),c.$setValidity(e,!1,s);o.push(i)}},s.$setDirty=function(){a.removeClass(e,yo),a.addClass(e,_o),s.$dirty=!0,s.$pristine=!1,c.$setDirty()},s.$setPristine=function(){a.setClass(e,yo,_o+" "+Ja),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(d,function(e){e.$setPristine()})},s.$setSubmitted=function(){a.addClass(e,Ja),s.$submitted=!0,c.$setSubmitted()}}functionmi(e){e.$formatters.push(function(t){returne.$isEmpty(t)?t:t.toString()})}functionvi(e,t,n,i,a,o){yi(e,t,n,i,a,o),mi(i)}functionyi(e,t,n,i,a,o){varr=t.prop(Di),s=t[0].placeholder,c={},l=Ii(t[0].type);if(i.$$validityState=r,!a.android){varu=!1;t.on("compositionstart",function(){u=!0}),t.on("compositionend",function(){u=!1,d()})}vard=function(a){if(!u){varo=t.val(),d=a&&a.type;if(Bi&&"input"===(a||c).type&&t[0].placeholder!==s)returnvoid(s=t[0].placeholder);"password"===l||n.ngTrim&&"false"===n.ngTrim||(o=Xi(o));varp=r&&i.$$hasNativeValidators;(i.$viewValue!==o||""===o&&p)&&(e.$$phase?i.$setViewValue(o,d,p):e.$apply(function(){i.$setViewValue(o,d,p)}))}};if(a.hasEvent("input"))t.on("input",d);else{varp,h=function(e){p||(p=o.defer(function(){d(e),p=null}))};t.on("keydown",function(e){vart=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||h(e)}),a.hasEvent("paste")&&t.on("paste cut",h)}t.on("change",d),i.$render=function(){t.val(i.$isEmpty(i.$viewValue)?"":i.$viewValue)}}function_i(e){if($(e))returne;if(b(e)){co.lastIndex=0;vart=co.exec(e);if(t){varn=+t[1],i=+t[2],a=ri(n),o=7*(i-1);returnnewDate(n,0,a.getDate()+o)}}return0/0}functionbi(e,t){returnfunction(n){vari,a;return$(n)?n:b(n)&&(e.lastIndex=0,i=e.exec(n))?(i.shift(),a={yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0},o(i,function(e,n){n<t.length&&(a[t[n]]=+e)}),newDate(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0)):0/0}}functionwi(e,t,i,a){returnfunction(o,r,s,c,l,u,d){$i(o,r,s,c),yi(o,r,s,c,l,u);varp=c&&c.$options&&c.$options.timezone;c.$$parserName=e,c.$parsers.push(function(e){if(c.$isEmpty(e))returnnull;if(t.test(e)){vara=i(e);return"UTC"===p&&a.setMinutes(a.getMinutes()-a.getTimezoneOffset()),a}returnn}),c.$formatters.push(function(e){return$(e)?d("date")(e,a,p):""}),s.min&&(c.$validators.min=function(e){returnc.$isEmpty(e)||v(s.min)||i(e)>=i(s.min)}),s.max&&(c.$validators.max=function(e){returnc.$isEmpty(e)||v(s.max)||i(e)<=i(s.max)})}}function$i(e,t,i,a){varo=t[0],r=a.$$hasNativeValidators=_(o.validity);r&&a.$parsers.push(function(e){vari=t.prop(Di)||{};returni.badInput||i.typeMismatch?n:e})}functionCi(e,t,i,a,o,r){$i(e,t,i,a),yi(e,t,i,a,o,r),a.$$parserName="number",a.$parsers.push(function(e){returna.$isEmpty(e)?null:oo.test(e)?parseFloat(e):n}),a.$formatters.push(function(e){if(!a.$isEmpty(e)){if(!w(e))throwho("numfmt","Expected `{0}` to be a number",e);e=e.toString()}returne}),i.min&&(a.$validators.min=function(e){returna.$isEmpty(e)||v(i.min)||e>=parseFloat(i.min)}),i.max&&(a.$validators.max=function(e){returna.$isEmpty(e)||v(i.max)||e<=parseFloat(i.max)})}functionSi(e,t,n,i,a,o){$i(e,t,n,i),yi(e,t,n,i,a,o),mi(i),i.$$parserName="url",i.$validators.url=function(e,t){varn=e||t;returni.$isEmpty(n)||io.test(n)}}functionki(e,t,n,i,a,o){$i(e,t,n,i),yi(e,t,n,i,a,o),mi(i),i.$$parserName="email",i.$validators.email=function(e,t){varn=e||t;returni.$isEmpty(n)||ao.test(n)}}functionxi(e,t,n,i){v(n.name)&&t.attr("name",l());vara=function(a){t[0].checked&&e.$apply(function(){i.$setViewValue(n.value,a&&a.type)})};t.on("click",a),i.$render=function(){vare=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}functionMi(e,t,n,a,o){varr;if(y(a)){if(r=e(a),!r.constant)throwi("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,a);returnr(t)}returno}functionTi(e,t,n,i,a,o,r,s)
},i):h.$commitViewValue(t)},e.$watch(function(){vart=u(e);if(h.$options&&h.$options.getterSetter&&C(t)&&(t=t()),h.$modelValue!==t&&(v(h.$$invalidModelValue)||h.$$invalidModelValue!=t)){for(varn=h.$formatters,i=n.length,a=t;i--;)a=n[i](a);h.$$runValidators(t,a),h.$viewValue!==a&&(h.$viewValue=h.$$lastCommittedViewValue=a,h.$render())}returnt})}],So=function(){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Co,link:{pre:function(e,t,n,i){vara=i[0],o=i[1]||Qa;a.$$setOptions(i[2]&&i[2].$options),o.$addControl(a),e.$on("$destroy",function(){o.$removeControl(a)})},post:function(e,t,n,i){vara=i[0];a.$options&&a.$options.updateOn&&t.on(a.$options.updateOn,function(t){e.$apply(function(){a.$$debounceViewValueCommit(t&&t.type)})}),t.on("blur",function(){a.$touched||e.$apply(function(){a.$setTouched()})})}}}},ko=m({restrict:"A",require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),xo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){i&&(n.required=!0,i.$validators.required=function(e,t){return!n.required||!i.$isEmpty(t)},n.$observe("required",function(){i.$validate()}))}}},Mo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,a,o){if(o){varr,s=a.ngPattern||a.pattern;a.$observe("pattern",function(e){if(b(e)&&e.length>0&&(e=newRegExp(e)),e&&!e.test)throwi("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,W(t));r=e||n,o.$validate()}),o.$validators.pattern=function(e){returno.$isEmpty(e)||v(r)||r.test(e)}}}}},To=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){vara=0;n.$observe("maxlength",function(e){a=p(e)||0,i.$validate()}),i.$validators.maxlength=function(e,t){returni.$isEmpty(t)||t.length<=a}}}}},Eo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,i){if(i){vara=0;n.$observe("minlength",function(e){a=p(e)||0,i.$validate()}),i.$validators.minlength=function(e,t){returni.$isEmpty(t)||t.length>=a}}}}},Ao=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,i,a){varr=t.attr(i.$attr.ngList)||", ",s="false"!==i.ngTrim,c=s?Xi(r):r,l=function(e){if(!v(e)){vart=[];returne&&o(e.split(c),function(e){e&&t.push(s?Xi(e):e)}),t}};a.$parsers.push(l),a.$formatters.push(function(e){returnKi(e)?e.join(r):n}),a.$isEmpty=function(e){return!e||!e.length}}}},Do=/^(true|false|\d+)$/,Io=function(){return{restrict:"A",priority:100,compile:function(e,t){returnDo.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)})}}}},Po=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){vari=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Xi(this.$options.updateOn.replace(po,function(){returni.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},No=["$compile",function(e){return{restrict:"AC",compile:function(t){returne.$$addBindingClass(t),function(t,i,a){e.$$addBindingInfo(i,a.ngBind),t.$watch(a.ngBind,function(e){i.text(e==n?"":e)})}}}}],Lo=["$interpolate","$compile",function(e,t){return{compile:function(n){returnt.$$addBindingClass(n),function(n,i,a){varo=e(i.attr(a.$attr.ngBindTemplate));t.$$addBindingInfo(i,o.expressions),a.$observe("ngBindTemplate",function(e){i.text(e)})}}}}],Fo=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,a){varo=t(a.ngBindHtml),r=t(a.ngBindHtml,function(e){return(e||"").toString()});returnn.$$addBindingClass(i),function(t,i,a){n.$$addBindingInfo(i,a.ngBindHtml),t.$watch(r,function(){i.html(e.getTrustedHtml(o(t))||"")})}}}}],Bo=Ei("",!0),Oo=Ei("Odd",0),Uo=Ei("Even",1),Ro=fi({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),qo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ho={},jo={blur:!0,focus:!0};o("clickdblclickmousedownmouseupmouseovermouseoutmousemovemouseentermouseleavekeydownkeyupkeypress
returni.chars(e),n.join("")}functiona(e){vart,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;returnn}functiono(e,n){functioni(e,i,o,s){if(i=t.lowercase(i),S[i])for(;_.last()&&k[_.last()];)a("",_.last());C[i]&&_.last()==i&&a("",i),s=b[i]||!!s,s||_.push(i);varc={};o.replace(p,function(e,t,n,i,a){varo=n||i||a||"";c[t]=r(o)}),n.start&&n.start(i,c,s)}functiona(e,i){vara,o=0;if(i=t.lowercase(i))for(o=_.length-1;o>=0&&_[o]!=i;o--);if(o>=0){for(a=_.length-1;a>=o;a--)n.end&&n.end(_[a]);_.length=o}}"string"!=typeofe&&(e=null===e||"undefined"==typeofe?"":""+e);varo,s,c,y,_=[],w=e;for(_.last=function(){return_[_.length-1]};e;){if(y="",s=!0,_.last()&&x[_.last()]?(e=e.replace(newRegExp("(.*)<\\s*\\/\\s*"+_.last()+"[^>]*>","i"),function(e,t){returnt=t.replace(g,"$1").replace(v,"$1"),n.chars&&n.chars(r(t)),""}),a("",_.last())):(0===e.indexOf("<!--")?(o=e.indexOf("--",4),o>=0&&e.lastIndexOf("-->",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),s=!1)):m.test(e)?(c=e.match(m),c&&(e=e.replace(c[0],""),s=!1)):f.test(e)?(c=e.match(d),c&&(e=e.substring(c[0].length),c[0].replace(d,a),s=!1)):h.test(e)&&(c=e.match(u),c?(c[4]&&(e=e.substring(c[0].length),c[0].replace(u,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)throwl("badparse","The sanitizer was unable to parse the following block of html: {0}",e);w=e}a()}functionr(e){if(!e)return"";vart=D.exec(e),n=t[1],i=t[3],a=t[2];returna&&(A.innerHTML=a.replace(/</g,"<"),a="textContent"inA?A.textContent:A.innerText),n+a+i}functions(e){returne.replace(/&/g,"&").replace(y,function(e){vart=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(_,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}functionc(e,n){vari=!1,a=t.bind(e,e.push);return{start:function(e,o,r){e=t.lowercase(e),!i&&x[e]&&(i=e),i||M[e]!==!0||(a("<"),a(e),t.forEach(o,function(i,o){varr=t.lowercase(o),c="img"===e&&"src"===r||"background"===r;E[r]!==!0||T[r]===!0&&!n(i,c)||(a(" "),a(o),a('="'),a(s(i)),a('"'))}),a(r?"/>":">"))},end:function(e){e=t.lowercase(e),i||M[e]!==!0||(a("</"),a(e),a(">")),e==i&&(i=!1)},chars:function(e){i||a(s(e))}}}varl=t.$$minErr("$sanitize"),u=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,d=/^<\/\s*([\w:-]+)[^>]*>/,p=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,h=/^</,f=/^<\//,g=/<!--(.*?)-->/g,m=/<!DOCTYPE([^>]*?)>/i,v=/<!\[CDATA\[(.*?)]]>/g,y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_=/([^\#-~| |!])/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"),C=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")),k=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")),x=a("script,style"),M=t.extend({},b,S,k,C),T=a("background,cite,href,longdesc,src,usemap"),E=t.extend({},T,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")),A=document.createElement("pre"),D=/^(\s*)([\s\S]*?)(\s*)$/;t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){varn=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,a=/^mailto:/;returnfunction(o,r){functions(e){e&&h.push(i(e))}functionc(e,n){h.push("<a "),t.isDefined(r)&&(h.push('target="'),h.push(r),h.push('" ')),h.push('href="'),h.push(e),h.push('">'),s(n),h.push("</a>")}if(!o)returno;for(varl,u,d,p=o,h=[];l=p.match(n);)u=l[0],l[2]==l[3]&&(u="mailto:
vara,o=this.mtproto?Config.Schema.MTProto:Config.Schema.API,r=e._,s=!1,c=!1;for((s="%"==t.charAt(0))&&(t=t.substr(1)),a=0;a<o.constructors.length;a++)if(o.constructors[a].predicate==r){c=o.constructors[a];break}if(!c)thrownewError("No predicate "+r+" found");r==t&&(s=!0),s||this.writeInt(intToUint(c.id),n+"["+r+"][id]");varl=this;returnangular.forEach(c.params,function(t){l.storeObject(e[t.name],t.type,n+"["+r+"]["+t.name+"]")}),c.type},TLDeserialization.prototype.readInt=function(e){if(this.offset>=4*this.intView.length)thrownewError("Nothing to fetch: "+e);vart=this.intView[this.offset/4];returnthis.debug&&console.log("<<<",t.toString(16),t,e),this.offset+=4,t},TLDeserialization.prototype.fetchInt=function(e){returnthis.readInt((e||"")+":int")},TLDeserialization.prototype.fetchDouble=function(e){vart=newArrayBuffer(8),n=newInt32Array(t),i=newFloat64Array(t);returnn[0]=this.readInt((e||"")+":double[low]"),n[1]=this.readInt((e||"")+":double[high]"),i[0]},TLDeserialization.prototype.fetchLong=function(e){vart=this.readInt((e||"")+":long[low]"),n=this.readInt((e||"")+":long[high]"),i=bigint(n).shiftLeft(32).add(bigint(t)).toString();returni},TLDeserialization.prototype.fetchBool=function(e){vart=this.readInt((e||"")+":bool");return2574415285==t?!0:3162085175==t?!1:(this.offset-=4,this.fetchObject("Object",e))},TLDeserialization.prototype.fetchString=function(e){vart=this.byteView[this.offset++];if(254==t)vart=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16;for(varn="",i=0;t>i;i++)n+=String.fromCharCode(this.byteView[this.offset++]);for(;this.offset%4;)this.offset++;try{vara=decodeURIComponent(escape(n))}catch(o){vara=n}returnthis.debug&&console.log("<<<",a,(e||"")+":string"),a},TLDeserialization.prototype.fetchBytes=function(e){vart=this.byteView[this.offset++];if(254==t)vart=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16;for(varn=[],i=0;t>i;i++)n.push(this.byteView[this.offset++]);for(;this.offset%4;)this.offset++;returnthis.debug&&console.log("<<<",bytesToHex(n),(e||"")+":bytes"),n},TLDeserialization.prototype.fetchIntBytes=function(e,t){if(e%32)thrownewError("Invalid bits: "+e);for(varn=e/8,i=[],a=0;n>a;a++)i.push(this.byteView[this.offset++]);returnthis.debug&&console.log("<<<",bytesToHex(i),(t||"")+":int"+e),i},TLDeserialization.prototype.fetchRawBytes=function(e,t){e===!1&&(e=this.readInt((t||"")+"_length"));for(varn=[],i=0;e>i;i++)n.push(this.byteView[this.offset++]);returnthis.debug&&console.log("<<<",bytesToHex(n),t||""),n},TLDeserialization.prototype.fetchObject=function(e,t){switch(e){case"int":returnthis.fetchInt(t);case"long":returnthis.fetchLong(t);case"int128":returnthis.fetchIntBytes(128,t);case"int256":returnthis.fetchIntBytes(256,t);case"int512":returnthis.fetchIntBytes(512,t);case"string":returnthis.fetchString(t);case"bytes":returnthis.fetchBytes(t);case"double":returnthis.fetchDouble(t);case"Bool":returnthis.fetchBool(t)}if(t=t||e||"Object","Vector"==e.substr(0,6)||"vector"==e.substr(0,6)){if("V"==e.charAt(0)){varn=this.readInt(t+"[id]");if(481674261!=n)thrownewError("Invalid vector constructor "+n)}vari=this.readInt(t+"[count]"),a=[];if(i>0)for(varo=e.substr(7,e.length-8),r=0;i>r;r++)a.push(this.fetchObject(o,t+"["+r+"]"));returna}vars=this.mtproto?Config.Schema.MTProto:Config.Schema.API,c=!1,l=!1;if("%"==e.charAt(0)){varu=e.substr(1);for(r=0;r<s.constructors.length;r++)if(s.constructors[r].type==u){l=s.constructors[r];break}if(!l)thrownewError("Constructor not found for type: "+e)}elseif(e.charAt(0)>=97&&e.charAt(0)<=122){for(r=0;r<s.constructors.length;r++)if(s.constructors[r].predicate==e){l=s.constructors[r];break}if(!l)thrownewError("Constructor not found for predicate: "+e)}else{varn=this.readInt(t+"[id]"),d=uintToInt(n);if(812830625==d){varp=this.fetchBytes(t+"[packed_string]"),h=gzipUncompress(p),f=bytesToArrayBuffer(h),g=newTLDeserialization(f);returng.fetchObject(e,t)}for(r=0;r<s.constructors.length;r++)if(s.constructors[r].id==d){l=s.cons
returna.sha1Hash(e.slice(0,u)).then(function(e){if(!bytesCmp(o,e.slice(-16)))thrownewError("server msgKey mismatch");varn=bytesToArrayBuffer(l),i={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]");varn=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),console.log(dT(),e),this.offset=n+e.bytes)},mt_rpc_result:function(e,n){e.req_msg_id=this.fetchLong(n+"[req_msg_id]");vari=t.sentMessages[e.req_msg_id],a=i&&i.resultType||"Object";e.result=this.fetchObject(a,n+"[result]")}}},a=newTLDeserialization(n,i),u=a.fetchObject("","INPUT");return{response:u,messageID:s,sessionID:r,seqNo:c}})})},u.prototype.applyServerSalt=function(e){vart=longToBytes(e),n={};returnn["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");vart=tsNow()+e;returne&&this.nextReq&&this.nextReq<=t?!1:(s.cancel(this.nextReqPromise),this.nextReqPromise=s(this.performSheduledRequest.bind(this),e||0),void(this.nextReq=t))},u.prototype.onSessionCreate=function(){},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(){vare=this,t=!1;returnangular.forEach(this.sentMessages,function(n,i){if(n.notContentRelated&&void0===e.pendingMessages[i])deletee.sentMessages[i];elseif(n.container){for(vara=0;a<n.inner.length;a++)if(void0!==e.sentMessages[n.inner[a]])returnvoid(t=!0);deletee.sentMessages[i]}elset=!0}),!t},u.prototype.processMessageAck=function(e){vart=this.sentMessages[e];returnt&&!t.acked?(deletet.body,t.acked=!0,!0):!1},u.prototype.processError=function(e){vart=(e.error_message||"").match(/^([A-Z_0-9]+\b)(: (.+))?/)||[];returne.error_code=uintToInt(e.error_code),{code:!e.error_code||e.error_code<=0?500:e.error_code,type:t[1]||"UNKNOWN",description:t[3]||"CODE#"+e.error_code+" "+e.error_message,originalError:e}},u.prototype.processMessage=function(e,n,i){switch(e._){case"msg_container":for(vara=e.messages.length,o=0;a>o;o++)this.processMessage(e.messages[o],n,i);break;case"bad_server_salt":console.log(dT(),"Bad server salt",e);varr=this.sentMessages[e.bad_msg_id];if(!r||r.seq_no!=e.bad_msg_seqno)throwconsole.log(e.bad_msg_id,e.bad_msg_seqno),newError("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);varr=this.sentMessages[e.bad_msg_id];if(!r||r.seq_no!=e.bad_msg_seqno)throwconsole.log(e.bad_msg_id,e.bad_msg_seqno),newError("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());vars=this.updateSentMessage(e.bad_msg_id);this.pushResend(s.msg_id),this.ackMessage(n)}break;case"message":this.serverMessages.push(e.msg_id),this.processMessage(e.body,e.msg_id,i);break;case"new_session_created":this.ackMessage(n),this.processMessageAck(e.first_msg_id),this.applyServerSalt(e.server_salt),this.onSessionCreate(i,n);break;case"msgs_ack":for(varo=0;o<e.msg_ids.length;o++)this.processMessageAck(e.msg_ids[o]);break;case"msg_detailed_info":if(!this.sentMessages[e.msg_id]){this.ackMessage(e.answer_msg_id);break}case"msg_new_detailed_info":this.reqResendMessage(e.answer_msg_id);break;case"msgs_state_info":if(this.ackMessage(e.answer_msg_id),this.lastResendReq&&this.lastResendReq.req_msg_id==e.req_msg_id&&this.pendingResends.length){varo,c,l;for(o=0;o<this.lastResendReq.resend_msg_ids.length;o++)c=this.lastResendReq.resend_msg_ids[o],l=this.pendingResends.inde