function BigInteger ( e , t , n ) { null != e && ( "number" == typeof e ? this . fromNumber ( e , t , n ) : null == t && "string" != typeof e ? this . fromString ( e , 256 ) : this . fromString ( e , t ) ) } function nbi ( ) { return new BigInteger ( null ) } function am1 ( e , t , n , a , i , s ) { for ( ; -- s >= 0 ; ) { var o = t * this [ e ++ ] + n [ a ] + i ; i = Math . floor ( o / 67108864 ) , n [ a ++ ] = 67108863 & o } return i } function am2 ( e , t , n , a , i , s ) { for ( var o = 32767 & t , r = t >> 15 ; -- s >= 0 ; ) { var l = 32767 & this [ e ] , c = this [ e ++ ] >> 15 , d = r * l + c * o ; l = o * l + ( ( 32767 & d ) << 15 ) + n [ a ] + ( 1073741823 & i ) , i = ( l >>> 30 ) + ( d >>> 15 ) + r * c + ( i >>> 30 ) , n [ a ++ ] = 1073741823 & l } return i } function am3 ( e , t , n , a , i , s ) { for ( var o = 16383 & t , r = t >> 14 ; -- s >= 0 ; ) { var l = 16383 & this [ e ] , c = this [ e ++ ] >> 14 , d = r * l + c * o ; l = o * l + ( ( 16383 & d ) << 14 ) + n [ a ] + i , i = ( l >> 28 ) + ( d >> 14 ) + r * c , n [ a ++ ] = 268435455 & l } return i } function int2char ( e ) { return BI _RM . charAt ( e ) } function intAt ( e , t ) { var n = BI _RC [ e . charCodeAt ( t ) ] ; return null == n ? - 1 : n } function bnpCopyTo ( e ) { for ( var t = this . t - 1 ; t >= 0 ; -- t ) e [ t ] = this [ t ] ; e . t = this . t , e . s = this . s } function bnpFromInt ( e ) { this . t = 1 , this . s = e < 0 ? - 1 : 0 , e > 0 ? this [ 0 ] = e : e < - 1 ? this [ 0 ] = e + this . DV : this . t = 0 } function nbv ( e ) { var t = nbi ( ) ; return t . fromInt ( e ) , t } function bnpFromString ( e , t , n ) { var a ; if ( 16 == t ) a = 4 ; else if ( 8 == t ) a = 3 ; else if ( 256 == t ) a = 8 ; else if ( 2 == t ) a = 1 ; else if ( 32 == t ) a = 5 ; else { if ( 4 != t ) return void this . fromRadix ( e , t ) ; a = 2 } this . t = 0 , this . s = 0 ; for ( var i = e . length , s = ! 1 , o = 0 ; -- i >= 0 ; ) { var r = 8 == a ? 255 & e [ i ] : intAt ( e , i ) ; r < 0 ? "-" == e . charAt ( i ) && ( s = ! 0 ) : ( s = ! 1 , 0 == o ? this [ this . t ++ ] = r : o + a > this . DB ? ( this [ this . t - 1 ] |= ( r & ( 1 << this . DB - o ) - 1 ) << o , this [ this . t ++ ] = r >> this . DB - o ) : this [ this . t - 1 ] |= r << o , o += a , o >= this . DB && ( o -= this . DB ) ) } 8 == a && 0 != ( 128 & e [ 0 ] ) && n && ( this . s = - 1 , o > 0 && ( this [ this . t - 1 ] |= ( 1 << this . DB - o ) - 1 << o ) ) , this . clamp ( ) , s && BigInteger . ZERO . subTo ( this , this ) } function bnpClamp ( ) { for ( var e = this . s & this . DM ; this . t > 0 && this [ this . t - 1 ] == e ; ) -- this . t } function bnToString ( e ) { if ( this . s < 0 ) return "-" + this . negate ( ) . toString ( e ) ; var t ; if ( 16 == e ) t = 4 ; else if ( 8 == e ) t = 3 ; else if ( 2 == e ) t = 1 ; else if ( 32 == e ) t = 5 ; else { if ( 4 != e ) return this . toRadix ( e ) ; t = 2 } var n , a = ( 1 << t ) - 1 , i = ! 1 , s = "" , o = this . t , r = this . DB - o * this . DB % t ; if ( o -- > 0 ) for ( r < this . DB && ( n = this [ o ] >> r ) > 0 && ( i = ! 0 , s = int2char ( n ) ) ; o >= 0 ; ) r < t ? ( n = ( this [ o ] & ( 1 << r ) - 1 ) << t - r , n |= this [ -- o ] >> ( r += this . DB - t ) ) : ( n = this [ o ] >> ( r -= t ) & a , r <= 0 && ( r += this . DB , -- o ) ) , n > 0 && ( i = ! 0 ) , i && ( s += int2char ( n ) ) ; return i ? s : "0" } function bnNegate ( ) { var e = nbi ( ) ; return BigInteger . ZERO . subTo ( this , e ) , e } function bnAbs ( ) { return this . s < 0 ? this . negate ( ) : this } function bnCompareTo ( e ) { var t = this . s - e . s ; if ( 0 != t ) return t ; var n = this . t ; if ( t = n - e . t , 0 != t ) return this . s < 0 ? - t : t ; for ( ; -- n >= 0 ; ) if ( 0 != ( t = this [ n ] - e [ n ] ) ) return t ; return 0 } function nbits ( e ) { var t , n = 1 ; return 0 != ( t = e >>> 16 ) && ( e = t , n += 16 ) , 0 != ( t = e >> 8 ) && ( e = t , n += 8 ) , 0 != ( t = e >> 4 ) && ( e = t , n += 4 ) , 0 != ( t = e >> 2 ) && ( e = t , n += 2 ) , 0 != ( t = e >> 1 ) && ( e = t , n += 1 ) , n } function bnBitLength ( ) { return this . t <= 0 ? 0 : this . DB * ( this . t - 1 ) + nbits ( this [ this . t - 1 ] ^ this . s & this . DM ) } function bnpDLShiftTo ( e , t ) { var n ; for ( n = this . t - 1 ; n >= 0 ; -- n ) t [ n + e ] = this [ n ] ; for ( n = e - 1 ; n >= 0 ; -- n ) t [ n ] = 0 ; t . t = this . t + e , t . s = this . s } function bnpDRShiftTo ( e , t ) { for ( var n = e ; n < this . t ; ++ n ) t [ n - e ] = this [ n ] ; t . t = Math . max ( this . t - e , 0 ) , t . s = this . s } function bnpLShiftTo ( e , t ) { var n , a = e % this . DB , i = this . DB - a , s = ( 1 << i ) - 1 , o = Math . floor ( e / this . DB ) , r = this . s << a & this . DM ; for ( n = this . t - 1 ; n >= 0 ; -- n ) t [ n + o + 1 ] = this [ n ] >> i | r , r = ( this [ n ] & s ) << a ; for ( n = o - 1 ; n >= 0 ; -- n ) t [ n ] = 0 ; t [ o ] = r , t . t = this . t + o + 1 , t . s = this . s , t . clamp ( ) } function bnpRShiftTo ( e , t ) { t . s = this . s ; var n = Math . floor ( e / this . DB ) ; if ( n >= this . t ) return void ( t . t = 0 ) ; var a = e % this . DB , i = this . DB - a , s = ( 1 << a ) - 1 ; t [ 0 ] = this [ n ] >> a ; for ( var o = n + 1 ; o < this . t ; ++ o ) t [ o - n - 1 ] |= ( this [ o ] & s ) << i , t [ o - n ] = this [ o ] >> a ; a > 0 && ( t [ this . t - n - 1 ] |= ( this . s & s ) << i ) , t . t = this . t - n , t . clamp ( ) } function bnpSubTo ( e , t ) { for ( var n = 0 , a = 0 , i = Math . min ( e . t , this . t ) ; n < i ; ) a += this [ n ] - e [ n ] , t [ n ++ ] = a & this . DM , a >>= this . DB ; if ( e . t < this . t ) { for ( a -= e . s ; n < this . t ; ) a += this [ n ] , t [ n ++ ] = a & this . DM , a >>= this . DB ; a += this . s } else { for ( a += this . s ; n < e . t ; ) a -= e [ n ] , t [ n ++ ] = a & this . DM , a >>= this . DB ; a -= e . s } t . s = a < 0 ? - 1 : 0 , a < - 1 ? t [ n ++ ] = this . DV + a : a > 0 && ( t [ n ++ ] = a ) , t . t = n , t . clamp ( ) } function bnpMultiplyTo ( e , t ) { var n = this . abs ( ) , a = e . abs ( ) , i = n . t ; for ( t . t = i + a . t ; -- i >= 0 ; ) t [ i ] = 0 ; for ( i = 0 ; i < a . t ; ++ i ) t [ i + n . t ] = n . am ( 0 , a [ i ] , t , i , 0 , n . t ) ; t . s = 0 , t . clamp ( ) , this . s != e . s && BigInteger . ZERO . subTo ( t , t ) } function bnpSquareTo ( e ) { for ( var t = this . abs ( ) , n = e . t = 2 * t . t ; -- n >= 0 ; ) e [ n ] = 0 ; for ( n = 0 ; n < t . t - 1 ; ++ n ) { var a = t .
return ! 1 } function cancelEvent ( e ) { return e = e || window . event , e && ( e = e . originalEvent || e , e . stopPropagation && e . stopPropagation ( ) , e . preventDefault && e . preventDefault ( ) , e . returnValue = ! 1 , e . cancelBubble = ! 0 ) , ! 1 } function hasOnclick ( e ) { if ( e . onclick || e . getAttribute ( "ng-click" ) ) return ! 0 ; var t = $ . _data ( e , "events" ) ; return ! ( ! t || ! t . click && ! t . mousedown ) } function getScrollWidth ( ) { var e = $ ( "<div>" ) . css ( { position : "absolute" , width : 100 , height : 100 , overflow : "scroll" , top : - 9999 } ) . appendTo ( $ ( document . body ) ) , t = e [ 0 ] . offsetWidth - e [ 0 ] . clientWidth ; return e . remove ( ) , t } function onCtrlEnter ( e , t ) { $ ( e ) . on ( "keydown" , function ( e ) { if ( 13 == e . keyCode && ( e . ctrlKey || e . metaKey ) ) return t ( ) , cancelEvent ( e ) } ) } function setFieldSelection ( e , t , n ) { e = $ ( e ) [ 0 ] ; try { if ( e . focus ( ) , void 0 !== t && t !== ! 1 || ( t = e . value . length ) , void 0 !== n && n !== ! 1 || ( n = t ) , e . createTextRange ) { var a = e . createTextRange ( ) ; a . collapse ( ! 0 ) , a . moveEnd ( "character" , n ) , a . moveStart ( "character" , t ) , a . select ( ) } else e . setSelectionRange && e . setSelectionRange ( t , n ) } catch ( i ) { } } function getFieldSelection ( e ) { if ( e . selectionStart ) return e . selectionStart ; if ( ! document . selection ) return 0 ; var t = " " , n = document . selection . createRange ( ) , a = n . text , i = n . duplicate ( ) , s = 0 ; try { i . moveToElementText ( e ) } catch ( o ) { return 0 } return n . text = a + t , s = i . text . indexOf ( t ) , n . moveStart ( "character" , - 1 ) , n . text = "" , s } function getRichValue ( e ) { if ( ! e ) return "" ; var t = [ ] , n = [ ] ; getRichElementValue ( e , t , n ) , n . length && t . push ( n . join ( "" ) ) ; var a = t . join ( "\n" ) ; return a = a . replace ( /\u00A0/g , " " ) } function getRichValueWithCaret ( e ) { if ( ! e ) return [ ] ; var t , n , a = [ ] , i = [ ] , s = ! ! window . getSelection && window . getSelection ( ) ; if ( s && s . rangeCount ) { var o = s . getRangeAt ( 0 ) ; o . startContainer && o . startContainer == o . endContainer && o . startOffset == o . endOffset && ( t = o . startContainer , n = o . startOffset ) } getRichElementValue ( e , a , i , t , n ) , i . length && a . push ( i . join ( "" ) ) ; var r = a . join ( "\n" ) , l = r . indexOf ( " " ) ; return l != - 1 && ( r = r . substr ( 0 , l ) + r . substr ( l + 1 ) ) , r = r . replace ( /\u00A0/g , " " ) , [ r , l ] } function getRichElementValue ( e , t , n , a , i ) { if ( 3 != e . nodeType ) { if ( 1 == e . nodeType ) { var s , o = a === e , r = "DIV" == e . tagName || "P" == e . tagName ; r && n . length || "BR" == e . tagName ? ( t . push ( n . join ( "" ) ) , n . splice ( 0 , n . length ) ) : "IMG" == e . tagName && e . alt && n . push ( e . alt ) , o && ! i && n . push ( " " ) ; for ( var s = e . firstChild ; s ; ) getRichElementValue ( s , t , n , a , i ) , s = s . nextSibling ; o && i && n . push ( " " ) , r && n . length && ( t . push ( n . join ( "" ) ) , n . splice ( 0 , n . length ) ) } } else if ( a === e ) { var l = e . nodeValue ; n . push ( l . substr ( 0 , i ) + " " + l . substr ( i ) ) } else n . push ( e . nodeValue ) } function setRichFocus ( e , t , n ) { if ( e . focus ( ) , ! t || t . parentNode != e || t . nextSibling || n || ( e . removeChild ( t ) , t = null ) , window . getSelection && document . createRange ) { var a = document . createRange ( ) ; t ? a . selectNode ( t ) : a . selectNodeContents ( e ) , n || a . collapse ( ! 1 ) ; var i = window . getSelection ( ) ; i . removeAllRanges ( ) , i . addRange ( a ) } else if ( void 0 !== document . body . createTextRange ) { var s = document . body . createTextRange ( ) ; s . moveToElementText ( t || e ) , n || s . collapse ( ! 1 ) , s . select ( ) } } function getSelectedText ( ) { var e = ( window . getSelection && window . getSelection ( ) || document . getSelection && document . getSelection ( ) || document . selection && document . selection . createRange ( ) . text || "" ) . toString ( ) . replace ( /^\s+|\s+$/g , "" ) ; return e } function scrollToNode ( e , t , n ) { var a = t . offsetTop - 15 , i = t . offsetHeight + 30 , s = e . scrollTop , o = e . clientHeight ; s > a ? ( e . scrollTop = a , $ ( n ) . nanoScroller ( { flash : ! 0 } ) ) : s < a + i - o && ( e . scrollTop = a + i - o , $ ( n ) . nanoScroller ( { flash : ! 0 } ) ) } function onContentLoaded ( e ) { e = onAnimationFrameCallback ( e ) , setZeroTimeout ( e ) } function tsNow ( e ) { var t = + new Date + ( window . tsOffset || 0 ) ; return e ? Math . floor ( t / 1e3 ) : t } function safeReplaceObject ( e , t ) { for ( var n in e ) t . hasOwnProperty ( n ) || "$" == n . charAt ( 0 ) || delete e [ n ] ; for ( var n in t ) t . hasOwnProperty ( n ) && ( e [ n ] = t [ n ] ) } function listMergeSorted ( e , t ) { e = e || [ ] , t = t || [ ] ; for ( var n = angular . copy ( e ) , a = e . length ? e [ e . length - 1 ] : 4294967295 , i = 0 ; i < t . length ; i ++ ) t [ i ] < a && n . push ( t [ i ] ) ; return n } function listUniqSorted ( e ) { e = e || [ ] ; for ( var t = [ ] , n = ! 1 , a = 0 ; a < e . length ; a ++ ) e [ a ] !== n && t . push ( e [ a ] ) , n = e [ a ] ; return t } function templateUrl ( e ) { var t = { confirm _modal : "desktop" , error _modal : "desktop" , media _modal _layout : "desktop" , slider : "desktop" , reply _message : "desktop" , message _body : "desktop" , message _media : "desktop" , message _attach _game : "desktop" , forwarded _messages : "desktop"
a } , inArray : function ( e , t , n ) { var a ; if ( t ) { if ( J ) return J . call ( t , e , n ) ; for ( a = t . length , n = n ? 0 > n ? Math . max ( 0 , a + n ) : n : 0 ; a > n ; n ++ ) if ( n in t && t [ n ] === e ) return n } return - 1 } , merge : function ( e , t ) { for ( var n = + t . length , a = 0 , i = e . length ; n > a ; ) e [ i ++ ] = t [ a ++ ] ; if ( n !== n ) for ( ; void 0 !== t [ a ] ; ) e [ i ++ ] = t [ a ++ ] ; return e . length = i , e } , grep : function ( e , t , n ) { for ( var a , i = [ ] , s = 0 , o = e . length , r = ! n ; o > s ; s ++ ) a = ! t ( e [ s ] , s ) , a !== r && i . push ( e [ s ] ) ; return i } , map : function ( e , t , a ) { var i , s = 0 , o = e . length , r = n ( e ) , l = [ ] ; if ( r ) for ( ; o > s ; s ++ ) i = t ( e [ s ] , s , a ) , null != i && l . push ( i ) ; else for ( s in e ) i = t ( e [ s ] , s , a ) , null != i && l . push ( i ) ; return Z . apply ( [ ] , l ) } , guid : 1 , proxy : function ( e , t ) { var n , a , i ; return "string" == typeof t && ( i = e [ t ] , t = e , e = i ) , ie . isFunction ( e ) ? ( n = Y . call ( arguments , 2 ) , a = function ( ) { return e . apply ( t || this , n . concat ( Y . call ( arguments ) ) ) } , a . guid = e . guid = e . guid || ie . guid ++ , a ) : void 0 } , now : function ( ) { return + new Date } , support : ne } ) , ie . each ( "Boolean Number String Function Array Date RegExp Object Error" . split ( " " ) , function ( e , t ) { Q [ "[object " + t + "]" ] = t . toLowerCase ( ) } ) ; var ce = function ( e ) { function t ( e , t , n , a ) { var i , s , o , r , l , c , p , m , g , h ; if ( ( t ? t . ownerDocument || t : L ) !== D && T ( t ) , t = t || D , n = n || [ ] , ! e || "string" != typeof e ) return n ; if ( 1 !== ( r = t . nodeType ) && 9 !== r ) return [ ] ; if ( F && ! a ) { if ( i = ve . exec ( e ) ) if ( o = i [ 1 ] ) { if ( 9 === r ) { if ( s = t . getElementById ( o ) , ! s || ! s . parentNode ) return n ; if ( s . id === o ) return n . push ( s ) , n } else if ( t . ownerDocument && ( s = t . ownerDocument . getElementById ( o ) ) && U ( t , s ) && s . id === o ) return n . push ( s ) , n } else { if ( i [ 2 ] ) return Q . apply ( n , t . getElementsByTagName ( e ) ) , n ; if ( ( o = i [ 3 ] ) && w . getElementsByClassName && t . getElementsByClassName ) return Q . apply ( n , t . getElementsByClassName ( o ) ) , n } if ( w . qsa && ( ! R || ! R . test ( e ) ) ) { if ( m = p = O , g = t , h = 9 === r && e , 1 === r && "object" !== t . nodeName . toLowerCase ( ) ) { for ( c = S ( e ) , ( p = t . getAttribute ( "id" ) ) ? m = p . replace ( be , "\\$&" ) : t . setAttribute ( "id" , m ) , m = "[id='" + m + "'] " , l = c . length ; l -- ; ) c [ l ] = m + u ( c [ l ] ) ; g = ye . test ( e ) && d ( t . parentNode ) || t , h = c . join ( "," ) } if ( h ) try { return Q . apply ( n , g . querySelectorAll ( h ) ) , n } catch ( f ) { } finally { p || t . removeAttribute ( "id" ) } } } return x ( e . replace ( le , "$1" ) , t , n , a ) } function n ( ) { function e ( n , a ) { return t . push ( n + " " ) > k . cacheLength && delete e [ t . shift ( ) ] , e [ n + " " ] = a } var t = [ ] ; return e } function a ( e ) { return e [ O ] = ! 0 , e } function i ( e ) { var t = D . createElement ( "div" ) ; try { return ! ! e ( t ) } catch ( n ) { return ! 1 } finally { t . parentNode && t . parentNode . removeChild ( t ) , t = null } } function s ( e , t ) { for ( var n = e . split ( "|" ) , a = e . length ; a -- ; ) k . attrHandle [ n [ a ] ] = t } function o ( e , t ) { var n = t && e , a = n && 1 === e . nodeType && 1 === t . nodeType && ( ~ t . sourceIndex || K ) - ( ~ e . sourceIndex || K ) ; if ( a ) return a ; if ( n ) for ( ; n = n . nextSibling ; ) if ( n === t ) return - 1 ; return e ? 1 : - 1 } function r ( e ) { return function ( t ) { var n = t . nodeName . toLowerCase ( ) ; return "input" === n && t . type === e } } function l ( e ) { return function ( t ) { var n = t . nodeName . toLowerCase ( ) ; return ( "input" === n || "button" === n ) && t . type === e } } function c ( e ) { return a ( function ( t ) { return t = + t , a ( function ( n , a ) { for ( var i , s = e ( [ ] , n . length , t ) , o = s . length ; o -- ; ) n [ i = s [ o ] ] && ( n [ i ] = ! ( a [ i ] = n [ i ] ) ) } ) } ) } function d ( e ) { return e && typeof e . getElementsByTagName !== G && e } function p ( ) { } function u ( e ) { for ( var t = 0 , n = e . length , a = "" ; n > t ; t ++ ) a += e [ t ] . value ; return a } function m ( e , t , n ) { var a = t . dir , i = n && "parentNode" === a , s = H ++ ; return t . first ? function ( t , n , s ) { for ( ; t = t [ a ] ; ) if ( 1 === t . nodeType || i ) return e ( t , n , s ) } : function ( t , n , o ) { var r , l , c = [ j , s ] ; if ( o ) { for ( ; t = t [ a ] ; ) if ( ( 1 === t . nodeType || i ) && e ( t , n , o ) ) return ! 0 } else for ( ; t = t [ a ] ; ) if ( 1 === t . nodeType || i ) { if ( l = t [ O ] || ( t [ O ] = { } ) , ( r = l [ a ] ) && r [ 0 ] === j && r [ 1 ] === s ) return c [ 2 ] = r [ 2 ] ; if ( l [ a ] = c , c [ 2 ] = e ( t , n , o ) ) return ! 0 } } } function g ( e ) { return e . length > 1 ? function ( t , n , a ) { for ( var i = e . length ; i -- ; ) if ( ! e [ i ] ( t , n , a ) ) return ! 1 ; return ! 0 } : e [ 0 ] } function h ( e , n , a ) { for ( var i = 0 , s = n . length ; s > i ; i ++ ) t ( e , n [ i ] , a ) ; return a } function f ( e , t , n , a , i ) { for ( var s , o = [ ] , r = 0 , l = e . length , c = null != t ; l > r ; r ++ ) ( s = e [ r ] ) && ( ! n || n ( s , a , i ) ) && ( o . push ( s ) , c && t . push ( r ) ) ; return o } function _ ( e , t , n , i , s , o ) { return i && ! i [ O ] && ( i = _ ( i ) ) , s && ! s [ O ] && ( s = _ ( s , o ) ) , a ( function ( a , o , r , l ) { var c , d , p , u = [ ] , m = [ ] , g = o . length , _ = a || h ( t || "*" , r . nodeType ? [ r ] : r , [ ] ) , v = ! e || ! a && t ? _ : f ( _ , u , e , r , l ) , y = n ? s || ( a ? e : g || i ) ? [ ] : o : v ; if ( n && n ( v , y , r , l ) , i ) for ( c = f ( y , m ) , i ( c , [ ] , r , l ) , d = c . length ; d -- ; ) ( p = c [ d ] ) && ( y [ m [ d ] ] = ! ( v [ m [ d ] ] = p ) ) ; if ( a ) { if ( s || e ) { if ( s ) { for ( c = [ ] , d = y . length ; d -- ; ) ( p = y [ d ] ) && c . push ( v [ d ] = p ) ; s ( null , y = [ ] , c , l ) } for ( d = y . l
m = h = s [ 1 ] , g = ( s [ 2 ] || "" ) . split ( "." ) . sort ( ) , m && ( c = ie . event . special [ m ] || { } , m = ( i ? c . delegateType : c . bindType ) || m , c = ie . event . special [ m ] || { } , p = ie . extend ( { type : m , origType : h , data : a , handler : n , guid : n . guid , selector : i , needsContext : i && ie . expr . match . needsContext . test ( i ) , namespace : g . join ( "." ) } , l ) , ( u = o [ m ] ) || ( u = o [ m ] = [ ] , u . delegateCount = 0 , c . setup && c . setup . call ( e , a , g , d ) !== ! 1 || ( e . addEventListener ? e . addEventListener ( m , d , ! 1 ) : e . attachEvent && e . attachEvent ( "on" + m , d ) ) ) , c . add && ( c . add . call ( e , p ) , p . handler . guid || ( p . handler . guid = n . guid ) ) , i ? u . splice ( u . delegateCount ++ , 0 , p ) : u . push ( p ) , ie . event . global [ m ] = ! 0 ) ; e = null } } , remove : function ( e , t , n , a , i ) { var s , o , r , l , c , d , p , u , m , g , h , f = ie . hasData ( e ) && ie . _data ( e ) ; if ( f && ( d = f . events ) ) { for ( t = ( t || "" ) . match ( ye ) || [ "" ] , c = t . length ; c -- ; ) if ( r = Re . exec ( t [ c ] ) || [ ] , m = h = r [ 1 ] , g = ( r [ 2 ] || "" ) . split ( "." ) . sort ( ) , m ) { for ( p = ie . event . special [ m ] || { } , m = ( a ? p . delegateType : p . bindType ) || m , u = d [ m ] || [ ] , r = r [ 2 ] && new RegExp ( "(^|\\.)" + g . join ( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) , l = s = u . length ; s -- ; ) o = u [ s ] , ! i && h !== o . origType || n && n . guid !== o . guid || r && ! r . test ( o . namespace ) || a && a !== o . selector && ( "**" !== a || ! o . selector ) || ( u . splice ( s , 1 ) , o . selector && u . delegateCount -- , p . remove && p . remove . call ( e , o ) ) ; l && ! u . length && ( p . teardown && p . teardown . call ( e , g , f . handle ) !== ! 1 || ie . removeEvent ( e , m , f . handle ) , delete d [ m ] ) } else for ( m in d ) ie . event . remove ( e , m + t [ c ] , n , a , ! 0 ) ; ie . isEmptyObject ( d ) && ( delete f . handle , ie . _removeData ( e , "events" ) ) } } , trigger : function ( t , n , a , i ) { var s , o , r , l , c , d , p , u = [ a || ge ] , m = te . call ( t , "type" ) ? t . type : t , g = te . call ( t , "namespace" ) ? t . namespace . split ( "." ) : [ ] ; if ( r = d = a = a || ge , 3 !== a . nodeType && 8 !== a . nodeType && ! Fe . test ( m + ie . event . triggered ) && ( m . indexOf ( "." ) >= 0 && ( g = m . split ( "." ) , m = g . shift ( ) , g . sort ( ) ) , o = m . indexOf ( ":" ) < 0 && "on" + m , t = t [ ie . expando ] ? t : new ie . Event ( m , "object" == typeof t && t ) , t . isTrigger = i ? 2 : 3 , t . namespace = g . join ( "." ) , t . namespace _re = t . namespace ? new RegExp ( "(^|\\.)" + g . join ( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null , t . result = void 0 , t . target || ( t . target = a ) , n = null == n ? [ t ] : ie . makeArray ( n , [ t ] ) , c = ie . event . special [ m ] || { } , i || ! c . trigger || c . trigger . apply ( a , n ) !== ! 1 ) ) { if ( ! i && ! c . noBubble && ! ie . isWindow ( a ) ) { for ( l = c . delegateType || m , Fe . test ( l + m ) || ( r = r . parentNode ) ; r ; r = r . parentNode ) u . push ( r ) , d = r ; d === ( a . ownerDocument || ge ) && u . push ( d . defaultView || d . parentWindow || e ) } for ( p = 0 ; ( r = u [ p ++ ] ) && ! t . isPropagationStopped ( ) ; ) t . type = p > 1 ? l : c . bindType || m , s = ( ie . _data ( r , "events" ) || { } ) [ t . type ] && ie . _data ( r , "handle" ) , s && s . apply ( r , n ) , s = o && r [ o ] , s && s . apply && ie . acceptData ( r ) && ( t . result = s . apply ( r , n ) , t . result === ! 1 && t . preventDefault ( ) ) ; if ( t . type = m , ! i && ! t . isDefaultPrevented ( ) && ( ! c . _default || c . _default . apply ( u . pop ( ) , n ) === ! 1 ) && ie . acceptData ( a ) && o && a [ m ] && ! ie . isWindow ( a ) ) { d = a [ o ] , d && ( a [ o ] = null ) , ie . event . triggered = m ; try { a [ m ] ( ) } catch ( h ) { } ie . event . triggered = void 0 , d && ( a [ o ] = d ) } return t . result } } , dispatch : function ( e ) { e = ie . event . fix ( e ) ; var t , n , a , i , s , o = [ ] , r = Y . call ( arguments ) , l = ( ie . _data ( this , "events" ) || { } ) [ e . type ] || [ ] , c = ie . event . special [ e . type ] || { } ; if ( r [ 0 ] = e , e . delegateTarget = this , ! c . preDispatch || c . preDispatch . call ( this , e ) !== ! 1 ) { for ( o = ie . event . handlers . call ( this , e , l ) , t = 0 ; ( i = o [ t ++ ] ) && ! e . isPropagationStopped ( ) ; ) for ( e . currentTarget = i . elem , s = 0 ; ( a = i . handlers [ s ++ ] ) && ! e . isImmediatePropagationStopped ( ) ; ) ( ! e . namespace _re || e . namespace _re . test ( a . namespace ) ) && ( e . handleObj = a , e . data = a . data , n = ( ( ie . event . special [ a . origType ] || { } ) . handle || a . handler ) . apply ( i . elem , r ) , void 0 !== n && ( e . result = n ) === ! 1 && ( e . preventDefault ( ) , e . stopPropagation ( ) ) ) ; return c . postDispatch && c . postDispatch . call ( this , e ) , e . result } } , handlers : function ( e , t ) { var n , a , i , s , o = [ ] , r = t . delegateCount , l = e . target ; if ( r && l . nodeType && ( ! e . button || "click" !== e . type ) ) for ( ; l != this ; l = l . parentNode || this ) if ( 1 === l . nodeType && ( l . disabled !== ! 0 || "click" !== e . type ) ) { for ( i = [ ] , s = 0 ; r > s ; s ++ ) a = t [ s ] , n = a . selector + " " , void 0 === i [ n ] && ( i [ n ] = a . needsContext ? ie ( n , this ) . index ( l ) >= 0 : ie . find ( n , this , null , [ l ] ) . length ) , i [ n ] && i . push ( a ) ; i . length && o . push ( { elem : l , handlers : i } ) } return r < t . length && o . push ( { elem : this , handlers : t . slice ( r ) } ) , o } , fix : function ( e ) { if ( e [ ie . expando ] ) return e ; var t , n , a , i = e . type , s = e , o = this . fixHooks [ i ] ; for ( o || ( this . fixHooks [ i ] = o = Pe . test ( i ) ? this . mouseHooks : De . test ( i ) ? this . keyHooks : { } ) , a = o . props ? this . props . concat ( o . props ) : this . props , e = new ie . Event ( s ) , t = a . length ; t -- ; ) n = a [ t
} , set : wt . set } , ie . attrHooks . contenteditable = { set : function ( e , t , n ) { wt . set ( e , "" !== t && t , n ) } } , ie . each ( [ "width" , "height" ] , function ( e , t ) { ie . attrHooks [ t ] = { set : function ( e , n ) { return "" === n ? ( e . setAttribute ( t , "auto" ) , n ) : void 0 } } } ) ) , ne . style || ( ie . attrHooks . style = { get : function ( e ) { return e . style . cssText || void 0 } , set : function ( e , t ) { return e . style . cssText = t + "" } } ) ; var xt = /^(?:input|select|textarea|button|object)$/i , It = /^(?:a|area)$/i ; ie . fn . extend ( { prop : function ( e , t ) { return Ae ( this , ie . prop , e , t , arguments . length > 1 ) } , removeProp : function ( e ) { return e = ie . propFix [ e ] || e , this . each ( function ( ) { try { this [ e ] = void 0 , delete this [ e ] } catch ( t ) { } } ) } } ) , ie . extend ( { propFix : { "for" : "htmlFor" , "class" : "className" } , prop : function ( e , t , n ) { var a , i , s , o = e . nodeType ; if ( e && 3 !== o && 8 !== o && 2 !== o ) return s = 1 !== o || ! ie . isXMLDoc ( e ) , s && ( t = ie . propFix [ t ] || t , i = ie . propHooks [ t ] ) , void 0 !== n ? i && "set" in i && void 0 !== ( a = i . set ( e , n , t ) ) ? a : e [ t ] = n : i && "get" in i && null !== ( a = i . get ( e , t ) ) ? a : e [ t ] } , propHooks : { tabIndex : { get : function ( e ) { var t = ie . find . attr ( e , "tabindex" ) ; return t ? parseInt ( t , 10 ) : xt . test ( e . nodeName ) || It . test ( e . nodeName ) && e . href ? 0 : - 1 } } } } ) , ne . hrefNormalized || ie . each ( [ "href" , "src" ] , function ( e , t ) { ie . propHooks [ t ] = { get : function ( e ) { return e . getAttribute ( t , 4 ) } } } ) , ne . optSelected || ( ie . propHooks . selected = { get : function ( e ) { var t = e . parentNode ; return t && ( t . selectedIndex , t . parentNode && t . parentNode . selectedIndex ) , null } } ) , ie . each ( [ "tabIndex" , "readOnly" , "maxLength" , "cellSpacing" , "cellPadding" , "rowSpan" , "colSpan" , "useMap" , "frameBorder" , "contentEditable" ] , function ( ) { ie . propFix [ this . toLowerCase ( ) ] = this } ) , ne . enctype || ( ie . propFix . enctype = "encoding" ) ; var At = /[\t\r\n\f]/g ; ie . fn . extend ( { addClass : function ( e ) { var t , n , a , i , s , o , r = 0 , l = this . length , c = "string" == typeof e && e ; if ( ie . isFunction ( e ) ) return this . each ( function ( t ) { ie ( this ) . addClass ( e . call ( this , t , this . className ) ) } ) ; if ( c ) for ( t = ( e || "" ) . match ( ye ) || [ ] ; l > r ; r ++ ) if ( n = this [ r ] , a = 1 === n . nodeType && ( n . className ? ( " " + n . className + " " ) . replace ( At , " " ) : " " ) ) { for ( s = 0 ; i = t [ s ++ ] ; ) a . indexOf ( " " + i + " " ) < 0 && ( a += i + " " ) ; o = ie . trim ( a ) , n . className !== o && ( n . className = o ) } return this } , removeClass : function ( e ) { var t , n , a , i , s , o , r = 0 , l = this . length , c = 0 === arguments . length || "string" == typeof e && e ; if ( ie . isFunction ( e ) ) return this . each ( function ( t ) { ie ( this ) . removeClass ( e . call ( this , t , this . className ) ) } ) ; if ( c ) for ( t = ( e || "" ) . match ( ye ) || [ ] ; l > r ; r ++ ) if ( n = this [ r ] , a = 1 === n . nodeType && ( n . className ? ( " " + n . className + " " ) . replace ( At , " " ) : "" ) ) { for ( s = 0 ; i = t [ s ++ ] ; ) for ( ; a . indexOf ( " " + i + " " ) >= 0 ; ) a = a . replace ( " " + i + " " , " " ) ; o = e ? ie . trim ( a ) : "" , n . className !== o && ( n . className = o ) } return this } , toggleClass : function ( e , t ) { var n = typeof e ; return "boolean" == typeof t && "string" === n ? t ? this . addClass ( e ) : this . removeClass ( e ) : this . each ( ie . isFunction ( e ) ? function ( n ) { ie ( this ) . toggleClass ( e . call ( this , n , this . className , t ) , t ) } : function ( ) { if ( "string" === n ) for ( var t , a = 0 , i = ie ( this ) , s = e . match ( ye ) || [ ] ; t = s [ a ++ ] ; ) i . hasClass ( t ) ? i . removeClass ( t ) : i . addClass ( t ) ; else ( n === $e || "boolean" === n ) && ( this . className && ie . _data ( this , "__className__" , this . className ) , this . className = this . className || e === ! 1 ? "" : ie . _data ( this , "__className__" ) || "" ) } ) } , hasClass : function ( e ) { for ( var t = " " + e + " " , n = 0 , a = this . length ; a > n ; n ++ ) if ( 1 === this [ n ] . nodeType && ( " " + this [ n ] . className + " " ) . replace ( At , " " ) . indexOf ( t ) >= 0 ) return ! 0 ; return ! 1 } } ) , ie . each ( "blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu" . split ( " " ) , function ( e , t ) { ie . fn [ t ] = function ( e , n ) { return arguments . length > 0 ? this . on ( t , null , e , n ) : this . trigger ( t ) } } ) , ie . fn . extend ( { hover : function ( e , t ) { return this . mouseenter ( e ) . mouseleave ( t || e ) } , bind : function ( e , t , n ) { return this . on ( e , null , t , n ) } , unbind : function ( e , t ) { return this . off ( e , null , t ) } , delegate : function ( e , t , n , a ) { return this . on ( t , e , n , a ) } , undelegate : function ( e , t , n ) { return 1 === arguments . length ? this . off ( e , "**" ) : this . off ( t , e || "**" , n ) } } ) ; var Et = ie . now ( ) , Tt = /\?/ , Dt = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g ; ie . parseJSON = function ( t ) { if ( e . JSON && e . JSON . parse ) return e . JSON . parse ( t + "" ) ; var n , a = null , i = ie . trim ( t + "" )
Config . Schema . API = { constructors : [ { id : "-1132882121" , predicate : "boolFalse" , params : [ ] , type : "Bool" } , { id : "-1720552011" , predicate : "boolTrue" , params : [ ] , type : "Bool" } , { id : "1072550713" , predicate : "true" , params : [ ] , type : "True" } , { id : "481674261" , predicate : "vector" , params : [ ] , type : "Vector t" } , { id : "-994444869" , predicate : "error" , params : [ { name : "code" , type : "int" } , { name : "text" , type : "string" } ] , type : "Error" } , { id : "1450380236" , predicate : "null" , params : [ ] , type : "Null" } , { id : "2134579434" , predicate : "inputPeerEmpty" , params : [ ] , type : "InputPeer" } , { id : "2107670217" , predicate : "inputPeerSelf" , params : [ ] , type : "InputPeer" } , { id : "396093539" , predicate : "inputPeerChat" , params : [ { name : "chat_id" , type : "int" } ] , type : "InputPeer" } , { id : "-1182234929" , predicate : "inputUserEmpty" , params : [ ] , type : "InputUser" } , { id : "-138301121" , predicate : "inputUserSelf" , params : [ ] , type : "InputUser" } , { id : "-208488460" , predicate : "inputPhoneContact" , params : [ { name : "client_id" , type : "long" } , { name : "phone" , type : "string" } , { name : "first_name" , type : "string" } , { name : "last_name" , type : "string" } ] , type : "InputContact" } , { id : "-181407105" , predicate : "inputFile" , params : [ { name : "id" , type : "long" } , { name : "parts" , type : "int" } , { name : "name" , type : "string" } , { name : "md5_checksum" , type : "string" } ] , type : "InputFile" } , { id : "-1771768449" , predicate : "inputMediaEmpty" , params : [ ] , type : "InputMedia" } , { id : "1661770481" , predicate : "inputMediaUploadedPhoto" , params : [ { name : "flags" , type : "#" } , { name : "file" , type : "InputFile" } , { name : "caption" , type : "string" } , { name : "stickers" , type : "flags.0?Vector<InputDocument>" } ] , type : "InputMedia" } , { id : "-373312269" , predicate : "inputMediaPhoto" , params : [ { name : "id" , type : "InputPhoto" } , { name : "caption" , type : "string" } ] , type : "InputMedia" } , { id : "-104578748" , predicate : "inputMediaGeoPoint" , params : [ { name : "geo_point" , type : "InputGeoPoint" } ] , type : "InputMedia" } , { id : "-1494984313" , predicate : "inputMediaContact" , params : [ { name : "phone_number" , type : "string" } , { name : "first_name" , type : "string" } , { name : "last_name" , type : "string" } ] , type : "InputMedia" } , { id : "480546647" , predicate : "inputChatPhotoEmpty" , params : [ ] , type : "InputChatPhoto" } , { id : "-1837345356" , predicate : "inputChatUploadedPhoto" , params : [ { name : "file" , type : "InputFile" } ] , type : "InputChatPhoto" } , { id : "-1991004873" , predicate : "inputChatPhoto" , params : [ { name : "id" , type : "InputPhoto" } ] , type : "InputChatPhoto" } , { id : "-457104426" , predicate : "inputGeoPointEmpty" , params : [ ] , type : "InputGeoPoint" } , { id : "-206066487" , predicate : "inputGeoPoint" , params : [ { name : "lat" , type : "double" } , { name : "long" , type : "double" } ] , type : "InputGeoPoint" } , { id : "483901197" , predicate : "inputPhotoEmpty" , params : [ ] , type : "InputPhoto" } , { id : "-74070332" , predicate : "inputPhoto" , params : [ { name : "id" , type : "long" } , { name : "access_hash" , type : "long" } ] , type : "InputPhoto" } , { id : "342061462" , predicate : "inputFileLocation" , params : [ { name : "volume_id" , type : "long" } , { name : "local_id" , type : "int" } , { name : "secret" , type : "long" } ] , type : "InputFileLocation" } , { id : "1996904104" , predicate : "inputAppEvent" , params : [ { name : "time" , type : "double" } , { name : "type" , type : "string" } , { name : "peer" , type : "long" } , { name : "data" , type : "string" } ] , type : "InputAppEvent" } , { id : "-1649296275" , predicate : "peerUser" , params : [ { name : "user_id" , type : "int" } ] , type : "Peer" } , { id : "-1160714821" , predicate : "peerChat" , params : [ { name : "chat_id" , type : "int" } ] , type : "Peer" } , { id : "-1432995067" , predicate : "storage.fileUnknown" , params : [ ] , type : "storage.FileType" } , { id : "8322574" , predicate : "storage.fileJpeg" , params : [ ] , type : "storage.FileType" } , { id : "-891180321" , predicate : "storage.fileGif" , params : [ ] , type : "storage.FileType" } , { id : "172975040" , predicate : "storage.filePng" , params : [ ] , type : "storage.FileType" } , { id : "-1373745011" , predicate : "storage.filePdf" , params : [ ] , type : "storage.FileType" } , { id : "1384777335" , predicate : "storage.fileMp3" , params : [ ] , type : "storage.FileType" } , { id : "1258941372" , predicate : "storage.fileMov" , params : [ ] , type : "storage.FileType" } , { id : "1086091090" , predicate : "storage.filePartial" , params : [ ] , type : "storage.FileType" } , { id : "-1278304028" , predicate : "storage.fileMp4" , params : [ ] , type : "storage.FileType" } , { id : "276907596" , predicate : "storage.fileWebp" , params : [ ] , type : "storage.FileType" } , { id : "2086234950" , predicate : "fileLocationUnavailable" , params : [ { name : "volume_id" , type : "long" } , { name : " local _id
} , { id : "-1094555409" , predicate : "updateNotifySettings" , params : [ { name : "peer" , type : "NotifyPeer" } , { name : "notify_settings" , type : "PeerNotifySettings" } ] , type : "Update" } , { id : "381645902" , predicate : "sendMessageTypingAction" , params : [ ] , type : "SendMessageAction" } , { id : "-44119819" , predicate : "sendMessageCancelAction" , params : [ ] , type : "SendMessageAction" } , { id : "-1584933265" , predicate : "sendMessageRecordVideoAction" , params : [ ] , type : "SendMessageAction" } , { id : "-378127636" , predicate : "sendMessageUploadVideoAction" , params : [ { name : "progress" , type : "int" } ] , type : "SendMessageAction" } , { id : "-718310409" , predicate : "sendMessageRecordAudioAction" , params : [ ] , type : "SendMessageAction" } , { id : "-212740181" , predicate : "sendMessageUploadAudioAction" , params : [ { name : "progress" , type : "int" } ] , type : "SendMessageAction" } , { id : "-774682074" , predicate : "sendMessageUploadPhotoAction" , params : [ { name : "progress" , type : "int" } ] , type : "SendMessageAction" } , { id : "-1441998364" , predicate : "sendMessageUploadDocumentAction" , params : [ { name : "progress" , type : "int" } ] , type : "SendMessageAction" } , { id : "393186209" , predicate : "sendMessageGeoLocationAction" , params : [ ] , type : "SendMessageAction" } , { id : "1653390447" , predicate : "sendMessageChooseContactAction" , params : [ ] , type : "SendMessageAction" } , { id : "446822276" , predicate : "contacts.found" , params : [ { name : "results" , type : "Vector<Peer>" } , { name : "chats" , type : "Vector<Chat>" } , { name : "users" , type : "Vector<User>" } ] , type : "contacts.Found" } , { id : "-337352679" , predicate : "updateServiceNotification" , params : [ { name : "flags" , type : "#" } , { name : "popup" , type : "flags.0?true" } , { name : "inbox_date" , type : "flags.1?int" } , { name : "type" , type : "string" } , { name : "message" , type : "string" } , { name : "media" , type : "MessageMedia" } , { name : "entities" , type : "Vector<MessageEntity>" } ] , type : "Update" } , { id : "-496024847" , predicate : "userStatusRecently" , params : [ ] , type : "UserStatus" } , { id : "129960444" , predicate : "userStatusLastWeek" , params : [ ] , type : "UserStatus" } , { id : "2011940674" , predicate : "userStatusLastMonth" , params : [ ] , type : "UserStatus" } , { id : "-298113238" , predicate : "updatePrivacy" , params : [ { name : "key" , type : "PrivacyKey" } , { name : "rules" , type : "Vector<PrivacyRule>" } ] , type : "Update" } , { id : "1335282456" , predicate : "inputPrivacyKeyStatusTimestamp" , params : [ ] , type : "InputPrivacyKey" } , { id : "-1137792208" , predicate : "privacyKeyStatusTimestamp" , params : [ ] , type : "PrivacyKey" } , { id : "218751099" , predicate : "inputPrivacyValueAllowContacts" , params : [ ] , type : "InputPrivacyRule" } , { id : "407582158" , predicate : "inputPrivacyValueAllowAll" , params : [ ] , type : "InputPrivacyRule" } , { id : "320652927" , predicate : "inputPrivacyValueAllowUsers" , params : [ { name : "users" , type : "Vector<InputUser>" } ] , type : "InputPrivacyRule" } , { id : "195371015" , predicate : "inputPrivacyValueDisallowContacts" , params : [ ] , type : "InputPrivacyRule" } , { id : "-697604407" , predicate : "inputPrivacyValueDisallowAll" , params : [ ] , type : "InputPrivacyRule" } , { id : "-1877932953" , predicate : "inputPrivacyValueDisallowUsers" , params : [ { name : "users" , type : "Vector<InputUser>" } ] , type : "InputPrivacyRule" } , { id : "-123988" , predicate : "privacyValueAllowContacts" , params : [ ] , type : "PrivacyRule" } , { id : "1698855810" , predicate : "privacyValueAllowAll" , params : [ ] , type : "PrivacyRule" } , { id : "1297858060" , predicate : "privacyValueAllowUsers" , params : [ { name : "users" , type : "Vector<int>" } ] , type : "PrivacyRule" } , { id : "-125240806" , predicate : "privacyValueDisallowContacts" , params : [ ] , type : "PrivacyRule" } , { id : "-1955338397" , predicate : "privacyValueDisallowAll" , params : [ ] , type : "PrivacyRule" } , { id : "209668535" , predicate : "privacyValueDisallowUsers" , params : [ { name : "users" , type : "Vector<int>" } ] , type : "PrivacyRule" } , { id : "1430961007" , predicate : "account.privacyRules" , params : [ { name : "rules" , type : "Vector<PrivacyRule>" } , { name : "users" , type : "Vector<User>" } ] , type : "account.PrivacyRules" } , { id : "-1194283041" , predicate : "accountDaysTTL" , params : [ { name : "days" , type : "int" } ] , type : "AccountDaysTTL" } , { id : "314130811" , predicate : "updateUserPhone" , params : [ { name : "user_id" , type : "int" } , { name : "phone" , type : "string" } ] , type : "Update" } , { id : "1815593308" , predicate : "documentAttributeImageSize" , params : [ { name : "w" , type : "int" } , { name : "h" , type : "int" } ] , type : "DocumentAttribute" } , { id : "297109817" , predicate : "documentAttributeAnimated" , params : [ ] , type : "DocumentAttribute" } , { id : "1662637586" , p
type : "#" } , { name : "query_id" , type : "long" } , { name : "user_id" , type : "int" } , { name : "peer" , type : "Peer" } , { name : "msg_id" , type : "int" } , { name : "chat_instance" , type : "long" } , { name : "data" , type : "flags.0?bytes" } , { name : "game_short_name" , type : "flags.1?string" } ] , type : "Update" } , { id : "649453030" , predicate : "messages.messageEditData" , params : [ { name : "flags" , type : "#" } , { name : "caption" , type : "flags.0?true" } ] , type : "messages.MessageEditData" } , { id : "-469536605" , predicate : "updateEditMessage" , params : [ { name : "message" , type : "Message" } , { name : "pts" , type : "int" } , { name : "pts_count" , type : "int" } ] , type : "Update" } , { id : "-190472735" , predicate : "inputBotInlineMessageMediaGeo" , params : [ { name : "flags" , type : "#" } , { name : "geo_point" , type : "InputGeoPoint" } , { name : "reply_markup" , type : "flags.2?ReplyMarkup" } ] , type : "InputBotInlineMessage" } , { id : "-1431327288" , predicate : "inputBotInlineMessageMediaVenue" , params : [ { name : "flags" , type : "#" } , { name : "geo_point" , type : "InputGeoPoint" } , { name : "title" , type : "string" } , { name : "address" , type : "string" } , { name : "provider" , type : "string" } , { name : "venue_id" , type : "string" } , { name : "reply_markup" , type : "flags.2?ReplyMarkup" } ] , type : "InputBotInlineMessage" } , { id : "766443943" , predicate : "inputBotInlineMessageMediaContact" , params : [ { name : "flags" , type : "#" } , { name : "phone_number" , type : "string" } , { name : "first_name" , type : "string" } , { name : "last_name" , type : "string" } , { name : "reply_markup" , type : "flags.2?ReplyMarkup" } ] , type : "InputBotInlineMessage" } , { id : "982505656" , predicate : "botInlineMessageMediaGeo" , params : [ { name : "flags" , type : "#" } , { name : "geo" , type : "GeoPoint" } , { name : "reply_markup" , type : "flags.2?ReplyMarkup" } ] , type : "BotInlineMessage" } , { id : "1130767150" , predicate : "botInlineMessageMediaVenue" , params : [ { name : "flags" , type : "#" } , { name : "geo" , type : "GeoPoint" } , { name : "title" , type : "string" } , { name : "address" , type : "string" } , { name : "provider" , type : "string" } , { name : "venue_id" , type : "string" } , { name : "reply_markup" , type : "flags.2?ReplyMarkup" } ] , type : "BotInlineMessage" } , { id : "904770772" , predicate : "botInlineMessageMediaContact" , params : [ { name : "flags" , type : "#" } , { name : "phone_number" , type : "string" } , { name : "first_name" , type : "string" } , { name : "last_name" , type : "string" } , { name : "reply_markup" , type : "flags.2?ReplyMarkup" } ] , type : "BotInlineMessage" } , { id : "-1462213465" , predicate : "inputBotInlineResultPhoto" , params : [ { name : "id" , type : "string" } , { name : "type" , type : "string" } , { name : "photo" , type : "InputPhoto" } , { name : "send_message" , type : "InputBotInlineMessage" } ] , type : "InputBotInlineResult" } , { id : "-459324" , predicate : "inputBotInlineResultDocument" , params : [ { name : "flags" , type : "#" } , { name : "id" , type : "string" } , { name : "type" , type : "string" } , { name : "title" , type : "flags.1?string" } , { name : "description" , type : "flags.2?string" } , { name : "document" , type : "InputDocument" } , { name : "send_message" , type : "InputBotInlineMessage" } ] , type : "InputBotInlineResult" } , { id : "400266251" , predicate : "botInlineMediaResult" , params : [ { name : "flags" , type : "#" } , { name : "id" , type : "string" } , { name : "type" , type : "string" } , { name : "photo" , type : "flags.0?Photo" } , { name : "document" , type : "flags.1?Document" } , { name : "title" , type : "flags.2?string" } , { name : "description" , type : "flags.3?string" } , { name : "send_message" , type : "BotInlineMessage" } ] , type : "BotInlineResult" } , { id : "-1995686519" , predicate : "inputBotInlineMessageID" , params : [ { name : "dc_id" , type : "int" } , { name : "id" , type : "long" } , { name : "access_hash" , type : "long" } ] , type : "InputBotInlineMessageID" } , { id : "-103646630" , predicate : "updateInlineBotCallbackQuery" , params : [ { name : "flags" , type : "#" } , { name : "query_id" , type : "long" } , { name : "user_id" , type : "int" } , { name : "msg_id" , type : "InputBotInlineMessageID" } , { name : "chat_instance" , type : "long" } , { name : "data" , type : "flags.0?bytes" } , { name : "game_short_name" , type : "flags.1?string" } ] , type : "Update" } , { id : "1008755359" , predicate : "inlineBotSwitchPM" , params : [ { name : "text" , type : "string" } , { name : "start_param" , type : "string" } ] , type : "InlineBotSwitchPM" } , { id : "863093588" , predicate : "messages.peerDialogs" , params : [ { name : "dialogs" , type : "Vector<Dialog>" } , { name : "messages" , type : "Vector<Message>" } , { name : "chats" , type : "Vector<Chat>" } , { name : "users" , type : "Vector<User>" } , { name : "state" , type : "updates.State" } ] , type : "messages.PeerDialogs" } , { id : "-305282981" , predicate : "topPeer" , params : [ { name : "peer" , type : "Peer"
params : [ { name : "key" , type : "InputPrivacyKey" } , { name : "rules" , type : "Vector<InputPrivacyRule>" } ] , type : "account.PrivacyRules" } , { id : "1099779595" , method : "account.deleteAccount" , params : [ { name : "reason" , type : "string" } ] , type : "Bool" } , { id : "150761757" , method : "account.getAccountTTL" , params : [ ] , type : "AccountDaysTTL" } , { id : "608323678" , method : "account.setAccountTTL" , params : [ { name : "ttl" , type : "AccountDaysTTL" } ] , type : "Bool" } , { id : "-627372787" , method : "invokeWithLayer" , params : [ { name : "layer" , type : "int" } , { name : "query" , type : "!X" } ] , type : "X" } , { id : "-113456221" , method : "contacts.resolveUsername" , params : [ { name : "username" , type : "string" } ] , type : "contacts.ResolvedPeer" } , { id : "149257707" , method : "account.sendChangePhoneCode" , params : [ { name : "flags" , type : "#" } , { name : "allow_flashcall" , type : "flags.0?true" } , { name : "phone_number" , type : "string" } , { name : "current_number" , type : "flags.0?Bool" } ] , type : "auth.SentCode" } , { id : "1891839707" , method : "account.changePhone" , params : [ { name : "phone_number" , type : "string" } , { name : "phone_code_hash" , type : "string" } , { name : "phone_code" , type : "string" } ] , type : "User" } , { id : "479598769" , method : "messages.getAllStickers" , params : [ { name : "hash" , type : "int" } ] , type : "messages.AllStickers" } , { id : "954152242" , method : "account.updateDeviceLocked" , params : [ { name : "period" , type : "int" } ] , type : "Bool" } , { id : "1738800940" , method : "auth.importBotAuthorization" , params : [ { name : "flags" , type : "int" } , { name : "api_id" , type : "int" } , { name : "api_hash" , type : "string" } , { name : "bot_auth_token" , type : "string" } ] , type : "auth.Authorization" } , { id : "623001124" , method : "messages.getWebPagePreview" , params : [ { name : "message" , type : "string" } ] , type : "MessageMedia" } , { id : "-484392616" , method : "account.getAuthorizations" , params : [ ] , type : "account.Authorizations" } , { id : "-545786948" , method : "account.resetAuthorization" , params : [ { name : "hash" , type : "long" } ] , type : "Bool" } , { id : "1418342645" , method : "account.getPassword" , params : [ ] , type : "account.Password" } , { id : "-1131605573" , method : "account.getPasswordSettings" , params : [ { name : "current_password_hash" , type : "bytes" } ] , type : "account.PasswordSettings" } , { id : "-92517498" , method : "account.updatePasswordSettings" , params : [ { name : "current_password_hash" , type : "bytes" } , { name : "new_settings" , type : "account.PasswordInputSettings" } ] , type : "Bool" } , { id : "174260510" , method : "auth.checkPassword" , params : [ { name : "password_hash" , type : "bytes" } ] , type : "auth.Authorization" } , { id : "-661144474" , method : "auth.requestPasswordRecovery" , params : [ ] , type : "auth.PasswordRecovery" } , { id : "1319464594" , method : "auth.recoverPassword" , params : [ { name : "code" , type : "string" } ] , type : "auth.Authorization" } , { id : "-1080796745" , method : "invokeWithoutUpdates" , params : [ { name : "query" , type : "!X" } ] , type : "X" } , { id : "2106086025" , method : "messages.exportChatInvite" , params : [ { name : "chat_id" , type : "int" } ] , type : "ExportedChatInvite" } , { id : "1051570619" , method : "messages.checkChatInvite" , params : [ { name : "hash" , type : "string" } ] , type : "ChatInvite" } , { id : "1817183516" , method : "messages.importChatInvite" , params : [ { name : "hash" , type : "string" } ] , type : "Updates" } , { id : "639215886" , method : "messages.getStickerSet" , params : [ { name : "stickerset" , type : "InputStickerSet" } ] , type : "messages.StickerSet" } , { id : "-946871200" , method : "messages.installStickerSet" , params : [ { name : "stickerset" , type : "InputStickerSet" } , { name : "archived" , type : "Bool" } ] , type : "messages.StickerSetInstallResult" } , { id : "-110209570" , method : "messages.uninstallStickerSet" , params : [ { name : "stickerset" , type : "InputStickerSet" } ] , type : "Bool" } , { id : "-421563528" , method : "messages.startBot" , params : [ { name : "bot" , type : "InputUser" } , { name : "peer" , type : "InputPeer" } , { name : "random_id" , type : "long" } , { name : "start_param" , type : "string" } ] , type : "Updates" } , { id : "-1189013126" , method : "help.getAppChangelog" , params : [ ] , type : "help.AppChangelog" } , { id : "-993483427" , method : "messages.getMessagesViews" , params : [ { name : "peer" , type : "InputPeer" } , { name : "id" , type : "Vector<int>" } , { name : "increment" , type : "Bool" } ] , type : "Vector<int>" } , { id : "-871347913" , method : "channels.readHistory" , params : [ { name : "channel" , type : "InputChannel" } , { name : "max_id" , type : "int" } ] , type : "Bool" } , { id : "-2067661490" , method : "channels.deleteMessages" , params : [ { name : "channel" , type : "InputChannel" } , { name : "id" , type : "Vector<int>" } ] , type : " messages . AffectedMessag
"1f4a6" : [ "💦" , [ "sweat_drops" ] ] , "1f4a7" : [ "💧" , [ "droplet" ] ] , "1f4a8" : [ "💨" , [ "dash" ] ] , "1f4a9" : [ "💩" , [ "hankey" , "poop" , "shit" ] ] , "1f4aa" : [ "💪" , [ "muscle" ] ] , "1f4ab" : [ "💫" , [ "dizzy" ] ] , "1f4ac" : [ "💬" , [ "speech_balloon" ] ] , "1f4ad" : [ "💭" , [ "thought_balloon" ] ] , "1f4ae" : [ "💮" , [ "white_flower" ] ] , "1f4af" : [ "💯" , [ "100" ] ] , "1f4b0" : [ "💰" , [ "moneybag" ] ] , "1f4b1" : [ "💱" , [ "currency_exchange" ] ] , "1f4b2" : [ "💲" , [ "heavy_dollar_sign" ] ] , "1f4b3" : [ "💳" , [ "credit_card" ] ] , "1f4b4" : [ "💴" , [ "yen" ] ] , "1f4b5" : [ "💵" , [ "dollar" ] ] , "1f4b6" : [ "💶" , [ "euro" ] ] , "1f4b7" : [ "💷" , [ "pound" ] ] , "1f4b8" : [ "💸" , [ "money_with_wings" ] ] , "1f4b9" : [ "💹" , [ "chart" ] ] , "1f4ba" : [ "💺" , [ "seat" ] ] , "1f4bb" : [ "💻" , [ "computer" ] ] , "1f4bc" : [ "💼" , [ "briefcase" ] ] , "1f4bd" : [ "💽" , [ "minidisc" ] ] , "1f4be" : [ "💾" , [ "floppy_disk" ] ] , "1f4bf" : [ "💿" , [ "cd" ] ] , "1f4c0" : [ "📀" , [ "dvd" ] ] , "1f4c1" : [ "📁" , [ "file_folder" ] ] , "1f4c2" : [ "📂" , [ "open_file_folder" ] ] , "1f4c3" : [ "📃" , [ "page_with_curl" ] ] , "1f4c4" : [ "📄" , [ "page_facing_up" ] ] , "1f4c5" : [ "📅" , [ "date" ] ] , "1f4c6" : [ "📆" , [ "calendar" ] ] , "1f4c7" : [ "📇" , [ "card_index" ] ] , "1f4c8" : [ "📈" , [ "chart_with_upwards_trend" ] ] , "1f4c9" : [ "📉" , [ "chart_with_downwards_trend" ] ] , "1f4ca" : [ "📊" , [ "bar_chart" ] ] , "1f4cb" : [ "📋" , [ "clipboard" ] ] , "1f4cc" : [ "📌" , [ "pushpin" ] ] , "1f4cd" : [ "📍" , [ "round_pushpin" ] ] , "1f4ce" : [ "📎" , [ "paperclip" ] ] , "1f4cf" : [ "📏" , [ "straight_ruler" ] ] , "1f4d0" : [ "📐" , [ "triangular_ruler" ] ] , "1f4d1" : [ "📑" , [ "bookmark_tabs" ] ] , "1f4d2" : [ "📒" , [ "ledger" ] ] , "1f4d3" : [ "📓" , [ "notebook" ] ] , "1f4d4" : [ "📔" , [ "notebook_with_decorative_cover" ] ] , "1f4d5" : [ "📕" , [ "closed_book" ] ] , "1f4d6" : [ "📖" , [ "book" , "open_book" ] ] , "1f4d7" : [ "📗" , [ "green_book" ] ] , "1f4d8" : [ "📘" , [ "blue_book" ] ] , "1f4d9" : [ "📙" , [ "orange_book" ] ] , "1f4da" : [ "📚" , [ "books" ] ] , "1f4db" : [ "📛" , [ "name_badge" ] ] , "1f4dc" : [ "📜" , [ "scroll" ] ] , "1f4dd" : [ "📝" , [ "memo" , "pencil" ] ] , "1f4de" : [ "📞" , [ "telephone_receiver" ] ] , "1f4df" : [ "📟" , [ "pager" ] ] , "1f4e0" : [ "📠" , [ "fax" ] ] , "1f4e1" : [ "📡" , [ "satellite" ] ] , "1f4e2" : [ "📢" , [ "loudspeaker" ] ] , "1f4e3" : [ "📣" , [ "mega" ] ] , "1f4e4" : [ "📤" , [ "outbox_tray" ] ] , "1f4e5" : [ "📥" , [ "inbox_tray" ] ] , "1f4e6" : [ "📦" , [ "package" ] ] , "1f4e7" : [ "📧" , [ "e-mail" ] ] , "1f4e8" : [ "📨" , [ "incoming_envelope" ] ] , "1f4e9" : [ "📩" , [ "envelope_with_arrow" ] ] , "1f4ea" : [ "📪" , [ "mailbox_closed" ] ] , "1f4eb" : [ "📫" , [ "mailbox" ] ] , "1f4ec" : [ "📬" , [ "mailbox_with_mail" ] ] , "1f4ed" : [ "📭" , [ "mailbox_with_no_mail" ] ] , "1f4ee" : [ "📮" , [ "postbox" ] ] , "1f4ef" : [ "📯" , [ "postal_horn" ] ] , "1f4f0" : [ "📰" , [ "newspaper" ] ] , "1f4f1" : [ "📱" , [ "iphone" ] ] , "1f4f2" : [ "📲" , [ "calling" ] ] , "1f4f3" : [ "📳" , [ "vibration_mode" ] ] , "1f4f4" : [ "📴" , [ "mobile_phone_off" ] ] , "1f4f5" : [ "📵" , [ "no_mobile_phones" ] ] , "1f4f6" : [ "📶" , [ "signal_strength" ] ] , "1f4f7" : [ "📷" , [ "camera" ] ] , "1f4f9" : [ "📹" , [ "video_camera" ] ] , "1f4fa" : [ "📺" , [ "tv" ] ] , "1f4fb" : [ "📻" , [ "radio" ] ] , "1f4fc" : [ "📼" , [ "vhs" ] ] , "1f500" : [ "🔀" , [ "twisted_rightwards_arrows" ] ] , "1f501" : [ "🔁" , [ "repeat" ] ] , "1f502" : [ "🔂" , [ "repeat_one" ] ] , "1f503" : [ "🔃" , [ "arrows_clockwise" ] ] , "1f504" : [ "🔄" , [ "arrows_counterclockwise" ] ] , "1f505" : [ "🔅" , [ "low_brightness" ] ] , "1f506" : [ "🔆" , [ "high_brightness" ] ] , "1f507" : [ "🔇" , [ "mute" ] ] , "1f508" : [ "🔉" , [ "speaker" ] ] , "1f509" : [ "🔉" , [ "sound" ] ] , "1f50a" : [ "🔊" , [ "loud_sound" ] ] , "1f50b" : [ "🔋" , [ "battery" ] ] , "1f50c" : [ "🔌" , [ "electric_plug" ] ] , "1f50d" : [ "🔍" , [ "mag" ] ] , "1f50e" : [ "🔎" , [ "mag_right" ] ] , "1f50f" : [ "🔏" , [ "lock_with_ink_pen" ] ] , "1f510" : [ "🔐" , [ "closed_lock_with_key" ] ] , "1f511" : [ "🔑" , [ "key" ] ] , "1f512" : [ "🔒" , [ "lock" ] ] , "1f513" : [ "🔓" , [ "unlock" ] ] , "1f514" : [ "🔔" , [ "bell" ] ] , "1f515" : [ "🔕" , [ "no_bell" ] ] , "1f516" : [ "🔖" , [ "bookmark" ] ] , "1f517" : [ "🔗" , [ "link" ] ] , "1f518" : [ "🔘" , [ "radio_button" ] ] , "1f519" : [ "🔙" , [ "back" ] ] , "1f51a" : [ "🔚" , [ "end" ] ] , "1f51b" : [ "🔛" , [ "on" ] ] , "1f51c" : [ "🔜" , [ "soon" ] ] , "1f51d" : [ "🔝" , [ "top" ] ] , "1f51e" : [ "🔞" , [ "underage" ] ] , "1f51f" : [ "🔟" , [ "keycap_ten" ] ] , "1f520" : [ "🔠" , [ "capital_abcd" ] ] , "1f521" : [ "🔡" , [ "abcd" ] ] , "1f522" : [ "🔢" , [ "1234" ] ] , "1f523" : [ "🔣" , [ "symbols" ] ] , "1f524" : [ "🔤" , [ "abc" ] ] , "1f525" : [ "🔥" , [ "fire" ] ] , "1f526" : [ "🔦" , [ "flashlight" ] ] , "1f527" : [ "🔧" , [ "wrench" ] ] , "1f528" : [ "🔨" , [ "hammer" ] ] , "1f529" : [ "🔩" , [ "nut_and_bolt" ] ] , "1f52a" : [ "🔪" , [ "hocho" ] ] , " 1 f52
Config . LangCountries = { es : "ES" , ru : "RU" , en : "US" , de : "DE" , it : "IT" , nl : "NL" , fr : "FR" , ca : "ES" , "es-419" : "MX" , ar : "SA" , he : "IL" , tr : "TR" , id : "ID" , pl : "PL" } , function ( e ) { function t ( e ) { l = e } function n ( ) { c = ! 0 } function a ( ) { return c ? ( c = ! 1 , "" ) : l } function i ( e , t ) { var n = ! 1 ; Array . isArray ( e ) || ( e = Array . prototype . slice . call ( arguments ) , t = e . pop ( ) , n = 1 == e . length ) ; var i , s , o , r = [ ] , l = ! 0 , c = a ( ) ; for ( s = 0 ; s < e . length ; s ++ ) if ( o = e [ s ] = c + e [ s ] , "xt_" != o . substr ( 0 , 3 ) && void 0 !== d [ o ] ) r . push ( d [ o ] ) ; else if ( u ) { try { i = localStorage . getItem ( o ) } catch ( m ) { u = ! 1 } try { i = void 0 !== i && null !== i && JSON . parse ( i ) } catch ( m ) { i = ! 1 } r . push ( d [ o ] = i ) } else p ? l = ! 1 : r . push ( d [ o ] = ! 1 ) ; return l ? t ( n ? r [ 0 ] : r ) : void chrome . storage . local . get ( e , function ( a ) { var i ; for ( r = [ ] , s = 0 ; s < e . length ; s ++ ) o = e [ s ] , i = a [ o ] , i = void 0 !== i && null !== i && JSON . parse ( i ) , r . push ( d [ o ] = i ) ; t ( n ? r [ 0 ] : r ) } ) } function s ( e , t ) { var n , i , s = { } , o = a ( ) ; for ( n in e ) if ( e . hasOwnProperty ( n ) ) if ( i = e [ n ] , n = o + n , d [ n ] = i , i = JSON . stringify ( i ) , u ) try { localStorage . setItem ( n , i ) } catch ( r ) { u = ! 1 } else s [ n ] = i ; return u || ! p ? void ( t && t ( ) ) : void chrome . storage . local . set ( s , t ) } function o ( e , t ) { Array . isArray ( e ) || ( e = Array . prototype . slice . call ( arguments ) , "function" == typeof e [ e . length - 1 ] && ( t = e . pop ( ) ) ) ; var n , i , s = a ( ) ; for ( n = 0 ; n < e . length ; n ++ ) if ( i = e [ n ] = s + e [ n ] , delete d [ i ] , u ) try { localStorage . removeItem ( i ) } catch ( o ) { u = ! 1 } p ? chrome . storage . local . remove ( e , t ) : t && t ( ) } function r ( e ) { if ( u ) try { localStorage . clear ( ) } catch ( t ) { u = ! 1 } p ? chrome . storage . local . clear ( function ( ) { d = { } , e ( ) } ) : ( d = { } , e ( ) ) } var l = "" , c = ! 1 , d = { } , p = ! ! ( e . chrome && chrome . storage && chrome . storage . local ) , u = ! p && ! ! e . localStorage ; e . ConfigStorage = { prefix : t , noPrefix : n , get : i , set : s , remove : o , clear : 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 ) } var t = [ Config . Navigator . osX ? "osx" : "non_osx" , Config . Navigator . msie ? "msie" : "non_msie" , Config . Navigator . retina ? "is_2x" : "is_1x" ] ; Config . Modes . ios _standalone && t . push ( "ios_standalone" ) , $ ( document . body ) . addClass ( t . join ( " " ) ) , ConfigStorage . get ( "layout_selected" , "i18n_locale" , function ( e ) { var t = e [ 0 ] , n = e [ 1 ] , a = "en-us" , i = { dom : ! 1 , i18n _ng : ! 1 , i18n _messages : ! 1 , i18n _fallback : ! 1 } , s = function ( ) { var e , t = ! 0 ; for ( e in i ) if ( i . hasOwnProperty ( e ) && i [ e ] === ! 1 ) { t = ! 1 ; break } t && ( i . 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 : var o = $ ( window ) . width ( ) ; Config . Mobile = Config . Navigator . mobile || o > 10 && o < 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 ( var r = 0 ; r < Config . I18n . supported . length ; r ++ ) if ( Config . I18n . supported [ r ] == n ) { Config . I18n . locale = n ; break } i . i18n _ng = Config . I18n . locale == a , $ . getJSON ( "js/locales/" + Config . I18n . locale + ".json" ) . success ( function ( e ) { Config . I18n . messages = e , i . i18n _messages = ! 0 , Config . I18n . locale == a && ( i . i18n _fallback = ! 0 ) , s ( ) } ) , Config . I18n . locale != a && $ . getJSON ( "js/locales/" + a + ".json" ) . success ( function ( e ) { Config . I18n . fallback _messages = e , i . i18n _fallback = ! 0 , s ( ) } ) , $ ( document ) . ready ( function ( ) { i . dom = ! 0 , i . i18n _ng ? s ( ) : $ ( "<script>" ) . appendTo ( "body" ) . on ( "load" , function ( ) { i . i18n _ng = ! 0 , s ( ) } ) . attr ( "src" , "vendor/angular/i18n/angular-locale_" + Config . I18n . locale + ".js" ) } ) } ) } ( ) , function ( ) { function e ( ) { t || safeConfirm ( { type : "WEBOGRAM_UPDATED_RELOAD" , message : "A new version of Webogram is downloaded. Launch it?" } , function ( e ) { e ? window . location . reload ( ) : t = ! 0 } ) } if ( window . safeConfirm = function ( e , t ) { "string" == typeof e && ( e = { message : e } ) ; var n = ! 1 ; try { n = confirm ( e . message ) } catch ( a ) { n = ! 0 } setTimeout ( function ( ) { t ( n ) } , 10 ) } , ( navigator . serviceWorker || window . applicationCache ) && ! Config . Modes . packed && window . addEventListener ) { var t = ! 1 ; if ( navigator . serviceWorker ) navigator . serviceWorker . register ( "service_worker.js" ) . then ( function ( t ) { console . log ( "Offline worker registered" ) , t . addEventListener ( "updatefound" , function ( ) { var t = this . installing ; t . addEventListener ( "statechange" , function ( ) { switch ( t . state ) { case "installed" : navigator . serviceWorker . controller &
} } ; return n . elem = e , n } function Ke ( e , t , n ) { n . call ( e , t ) } function Ye ( e , t , n ) { var a = t . relatedTarget ; a && ( a === e || Si . call ( e , a ) ) || n . call ( e , t ) } function Ze ( ) { this . $get = function ( ) { return c ( Ae , { hasClass : function ( e , t ) { return e . attr && ( e = e [ 0 ] ) , Ne ( e , t ) } , addClass : function ( e , t ) { return e . attr && ( e = e [ 0 ] ) , Ue ( e , t ) } , removeClass : function ( e , t ) { return e . attr && ( e = e [ 0 ] ) , Be ( e , t ) } } ) } } function Xe ( e , t ) { var n = e && e . $$hashKey ; if ( n ) return "function" == typeof n && ( n = e . $$hashKey ( ) ) , n ; var a = typeof e ; return n = "function" == a || "object" == a && null !== e ? e . $$hashKey = a + ":" + ( t || o ) ( ) : a + ":" + e } function Je ( e , t ) { if ( t ) { var n = 0 ; this . nextUid = function ( ) { return ++ n } } a ( e , this . put , this ) } function Qe ( e ) { return Function . prototype . toString . call ( e ) + " " } function et ( e ) { var t = Qe ( e ) . replace ( Ri , "" ) , n = t . match ( Ti ) || t . match ( Di ) ; return n } function tt ( e ) { var t = et ( e ) ; return t ? "function(" + ( t [ 1 ] || "" ) . replace ( /[\s\r\n]+/ , " " ) + ")" : "fn" } function nt ( e , t , n ) { var i , s , o ; if ( "function" == typeof e ) { if ( ! ( i = e . $inject ) ) { if ( i = [ ] , e . length ) { if ( t ) throw w ( n ) && n || ( n = e . name || tt ( e ) ) , Ni ( "strictdi" , "{0} is not using explicit annotation and cannot be invoked in strict mode" , n ) ; s = et ( e ) , a ( s [ 1 ] . split ( Pi ) , function ( e ) { e . replace ( Fi , function ( e , t , n ) { i . push ( n ) } ) } ) } e . $inject = i } } else Ya ( e ) ? ( o = e . length - 1 , de ( e [ o ] , "fn" ) , i = e . slice ( 0 , o ) ) : de ( e , "fn" , ! 0 ) ; return i } function at ( e , t ) { function n ( e ) { return function ( t , n ) { return y ( t ) ? void a ( t , s ( e ) ) : e ( t , n ) } } function i ( e , t ) { if ( pe ( e , "service" ) , ( C ( t ) || Ya ( t ) ) && ( t = $ . instantiate ( t ) ) , ! t . $get ) throw Ni ( "pget" , "Provider '{0}' must define $get factory method." , e ) ; return k [ e + f ] = t } function o ( e , t ) { return function ( ) { var n = x . invoke ( t , this ) ; if ( _ ( n ) ) throw Ni ( "undef" , "Provider '{0}' must return a value from $get factory method." , e ) ; return n } } function r ( e , t , n ) { return i ( e , { $get : n !== ! 1 ? o ( e , t ) : t } ) } function l ( e , t ) { return r ( e , [ "$injector" , function ( e ) { return e . instantiate ( t ) } ] ) } function c ( e , t ) { return r ( e , h ( t ) , ! 1 ) } function d ( e , t ) { pe ( e , "constant" ) , k [ e ] = t , S [ e ] = t } function p ( e , t ) { var n = $ . get ( e + f ) , a = n . $get ; n . $get = function ( ) { var e = x . invoke ( a , n ) ; return x . invoke ( t , null , { $delegate : e } ) } } function u ( e ) { ce ( _ ( e ) || Ya ( e ) , "modulesToLoad" , "not an array" ) ; var t , n = [ ] ; return a ( e , function ( e ) { function a ( e ) { var t , n ; for ( t = 0 , n = e . length ; t < n ; t ++ ) { var a = e [ t ] , i = $ . get ( a [ 0 ] ) ; i [ a [ 1 ] ] . apply ( i , a [ 2 ] ) } } if ( ! b . get ( e ) ) { b . put ( e , ! 0 ) ; try { w ( e ) ? ( t = La ( e ) , n = n . concat ( u ( t . requires ) ) . concat ( t . _runBlocks ) , a ( t . _invokeQueue ) , a ( t . _configBlocks ) ) : C ( e ) ? n . push ( $ . invoke ( e ) ) : Ya ( e ) ? n . push ( $ . invoke ( e ) ) : de ( e , "module" ) } catch ( i ) { throw Ya ( e ) && ( e = e [ e . length - 1 ] ) , i . message && i . stack && i . stack . indexOf ( i . message ) == - 1 && ( i = i . message + "\n" + i . stack ) , Ni ( "modulerr" , "Failed to instantiate module {0} due to:\n{1}" , e , i . stack || i . message || i ) } } } ) , n } function m ( e , n ) { function a ( t , a ) { if ( e . hasOwnProperty ( t ) ) { if ( e [ t ] === g ) throw Ni ( "cdep" , "Circular dependency found: {0}" , t + " <- " + v . join ( " <- " ) ) ; return e [ t ] } try { return v . unshift ( t ) , e [ t ] = g , e [ t ] = n ( t , a ) } catch ( i ) { throw e [ t ] === g && delete e [ t ] , i } finally { v . shift ( ) } } function i ( e , n , i ) { for ( var s = [ ] , o = at . $$annotate ( e , t , i ) , r = 0 , l = o . length ; r < l ; r ++ ) { var c = o [ r ] ; if ( "string" != typeof c ) throw Ni ( "itkn" , "Incorrect injection token! Expected service name as string, got {0}" , c ) ; s . push ( n && n . hasOwnProperty ( c ) ? n [ c ] : a ( c , i ) ) } return s } function s ( e ) { return ! ( Ba <= 11 ) && ( "function" == typeof e && /^(?:class\s|constructor\()/ . test ( Qe ( e ) ) ) } function o ( e , t , n , a ) { "string" == typeof n && ( a = n , n = null ) ; var o = i ( e , n , a ) ; return Ya ( e ) && ( e = e [ e . length - 1 ] ) , s ( e ) ? ( o . unshift ( null ) , new ( Function . prototype . bind . apply ( e , o ) ) ) : e . apply ( t , o ) } function r ( e , t , n ) { var a = Ya ( e ) ? e [ e . length - 1 ] : e , s = i ( e , t , n ) ; return s . unshift ( null ) , new ( Function . prototype . bind . apply ( a , s ) ) } return { invoke : o , instantiate : r , get : a , annotate : at . $$annotate , has : function ( t ) { return k . hasOwnProperty ( t + f ) || e . hasOwnProperty ( t ) } } } t = t === ! 0 ; var g = { } , f = "Provider" , v = [ ] , b = new Je ( [ ] , ( ! 0 ) ) , k = { $provide : { provider : n ( i ) , factory : n ( r ) , service : n ( l ) , value : n ( c ) , constant : n ( d ) , decorator : p } } , $ = k . $injector = m ( k , function ( e , t ) { throw Ga . isString ( t ) && v . push ( t ) , Ni ( "unpr" , "Unknown provider: {0}" , v . join ( " <- " ) ) } ) , S = { } , M = m ( S , function ( e , t ) { var n = $ . get ( e + f , t ) ; return x . invoke ( n . $get , n , void 0 , e ) } ) , x = M ; k [ "$injector" + f ] = { $get : h ( M ) } ; var I = u ( e ) ; return x = M . get ( "$injector" ) , x . strictDi = t , a ( I , function ( e ) { e && x . invoke ( e ) } ) , x } function it (
var l = c ( { method : "get" , transformRequest : e . transformRequest , transformResponse : e . transformResponse , paramSerializer : e . paramSerializer } , n ) ; l . headers = r ( n ) , l . method = Fa ( l . method ) , l . paramSerializer = w ( l . paramSerializer ) ? u . get ( l . paramSerializer ) : l . paramSerializer ; var d = function ( t ) { var n = t . headers , i = Et ( t . data , At ( n ) , void 0 , t . transformRequest ) ; return _ ( i ) && a ( n , function ( e , t ) { "content-type" === Pa ( t ) && delete n [ t ] } ) , _ ( t . withCredentials ) && ! _ ( e . withCredentials ) && ( t . withCredentials = e . withCredentials ) , f ( t , i ) . then ( s , s ) } , m = [ d , void 0 ] , g = p . when ( l ) ; for ( a ( $ , function ( e ) { ( e . request || e . requestError ) && m . unshift ( e . request , e . requestError ) , ( e . response || e . responseError ) && m . push ( e . response , e . responseError ) } ) ; m . length ; ) { var h = m . shift ( ) , v = m . shift ( ) ; g = g . then ( h , v ) } return i ? ( g . success = function ( e ) { return de ( e , "fn" ) , g . then ( function ( t ) { e ( t . data , t . status , t . headers , l ) } ) , g } , g . error = function ( e ) { return de ( e , "fn" ) , g . then ( null , function ( t ) { e ( t . data , t . status , t . headers , l ) } ) , g } ) : ( g . success = is ( "success" ) , g . error = is ( "error" ) ) , g } function g ( e ) { a ( arguments , function ( e ) { m [ e ] = function ( t , n ) { return m ( c ( { } , n || { } , { method : e , url : t } ) ) } } ) } function h ( e ) { a ( arguments , function ( e ) { m [ e ] = function ( t , n , a ) { return m ( c ( { } , a || { } , { method : e , url : t , data : n } ) ) } } ) } function f ( t , i ) { function s ( e ) { if ( e ) { var t = { } ; return a ( e , function ( e , a ) { t [ a ] = function ( t ) { function a ( ) { e ( t ) } n ? d . $applyAsync ( a ) : d . $$phase ? a ( ) : d . $apply ( a ) } } ) , t } } function l ( e , t , a , i ) { function s ( ) { c ( t , e , a , i ) } h && ( Tt ( e ) ? h . put ( S , [ e , t , It ( a ) , i ] ) : h . remove ( S ) ) , n ? d . $applyAsync ( s ) : ( s ( ) , d . $$phase || d . $apply ( ) ) } function c ( e , n , a , i ) { n = n >= - 1 ? n : 0 , ( Tt ( n ) ? w . resolve : w . reject ) ( { data : e , status : n , headers : At ( a ) , config : t , statusText : i } ) } function u ( e ) { c ( e . data , e . status , fe ( e . headers ( ) ) , e . statusText ) } function g ( ) { var e = m . pendingRequests . indexOf ( t ) ; e !== - 1 && m . pendingRequests . splice ( e , 1 ) } var h , f , w = p . defer ( ) , $ = w . promise , C = t . headers , S = b ( t . url , t . paramSerializer ( t . params ) ) ; if ( m . pendingRequests . push ( t ) , $ . then ( g , g ) , ! t . cache && ! e . cache || t . cache === ! 1 || "GET" !== t . method && "JSONP" !== t . method || ( h = y ( t . cache ) ? t . cache : y ( e . cache ) ? e . cache : k ) , h && ( f = h . get ( S ) , v ( f ) ? D ( f ) ? f . then ( u , u ) : Ya ( f ) ? c ( f [ 1 ] , f [ 0 ] , fe ( f [ 2 ] ) , f [ 3 ] ) : c ( f , 200 , { } , "OK" ) : h . put ( S , $ ) ) , _ ( f ) ) { var M = Rn ( t . url ) ? r ( ) [ t . xsrfCookieName || e . xsrfCookieName ] : void 0 ; M && ( C [ t . xsrfHeaderName || e . xsrfHeaderName ] = M ) , o ( t . method , S , i , l , C , t . timeout , t . withCredentials , t . responseType , s ( t . eventHandlers ) , s ( t . uploadEventHandlers ) ) } return $ } function b ( e , t ) { return t . length > 0 && ( e += ( e . indexOf ( "?" ) == - 1 ? "?" : "&" ) + t ) , e } var k = l ( "$http" ) ; e . paramSerializer = w ( e . paramSerializer ) ? u . get ( e . paramSerializer ) : e . paramSerializer ; var $ = [ ] ; return a ( s , function ( e ) { $ . unshift ( w ( e ) ? u . get ( e ) : u . invoke ( e ) ) } ) , m . pendingRequests = [ ] , g ( "get" , "delete" , "head" , "jsonp" ) , h ( "post" , "put" , "patch" ) , m . defaults = e , m } ] } function Pt ( ) { this . $get = function ( ) { return function ( ) { return new e . XMLHttpRequest } } } function Ft ( ) { this . $get = [ "$browser" , "$window" , "$document" , "$xhrFactory" , function ( e , t , n , a ) { return Rt ( e , a , e . defer , t . angular . callbacks , n [ 0 ] ) } ] } function Rt ( e , t , n , i , s ) { function o ( e , t , n ) { var a = s . createElement ( "script" ) , o = null ; return a . type = "text/javascript" , a . src = e , a . async = ! 0 , o = function ( e ) { hi ( a , "load" , o ) , hi ( a , "error" , o ) , s . body . removeChild ( a ) , a = null ; var r = - 1 , l = "unknown" ; e && ( "load" !== e . type || i [ t ] . called || ( e = { type : "error" } ) , l = e . type , r = "error" === e . type ? 404 : 200 ) , n && n ( r , l ) } , gi ( a , "load" , o ) , gi ( a , "error" , o ) , s . body . appendChild ( a ) , o } return function ( s , r , l , c , d , p , u , g , h , f ) { function y ( ) { k && k ( ) , $ && $ . abort ( ) } function b ( t , a , i , s , o ) { v ( M ) && n . cancel ( M ) , k = $ = null , t ( a , i , s , o ) , e . $$completeOutstandingRequest ( m ) } if ( e . $$incOutstandingRequestCount ( ) , r = r || e . url ( ) , "jsonp" == Pa ( s ) ) { var w = "_" + ( i . counter ++ ) . toString ( 36 ) ; i [ w ] = function ( e ) { i [ w ] . data = e , i [ w ] . called = ! 0 } ; var k = o ( r . replace ( "JSON_CALLBACK" , "angular.callbacks." + w ) , w , function ( e , t ) { b ( c , e , i [ w ] . data , "" , t ) , i [ w ] = m } ) } else { var $ = t ( s , r ) ; $ . open ( s , r , ! 0 ) , a ( d , function ( e , t ) { v ( e ) && $ . setRequestHeader ( t , e ) } ) , $ . onload = function ( ) { var e = $ . statusText || "" , t = "response" in $ ? $ . response : $ . responseText , n = 1223 === $ . status ? 204 : $ . status ; 0 === n && ( n = t ? 200 : "file" == Fn ( r ) . protocol ? 404 : 0 ) , b ( c , n , t , $ . getAllResponseHeaders ( ) , e ) } ; var C = function ( ) { b ( c , - 1 , null , null , "" ) } ; if ( $ . onerror = C , $ . onabort = C , a ( h , function ( e , t ) { $ . addEventListener ( t , e ) } ) , a ( f , function ( e , t ) { $ . upload
var n , a , i = { } , s = e . chrome && e . chrome . app && e . chrome . app . runtime , o = ! s && e . history && e . history . pushState , r = p ( ( /android (\d+)/ . exec ( Pa ( ( e . navigator || { } ) . userAgent ) ) || [ ] ) [ 1 ] ) , l = /Boxee/i . test ( ( e . navigator || { } ) . userAgent ) , c = t [ 0 ] || { } , d = /^(Moz|webkit|ms)(?=[A-Z])/ , u = c . body && c . body . style , m = ! 1 , g = ! 1 ; if ( u ) { for ( var h in u ) if ( a = d . exec ( h ) ) { n = a [ 0 ] , n = n [ 0 ] . toUpperCase ( ) + n . substr ( 1 ) ; break } n || ( n = "WebkitOpacity" in u && "webkit" ) , m = ! ! ( "transition" in u || n + "Transition" in u ) , g = ! ! ( "animation" in u || n + "Animation" in u ) , ! r || m && g || ( m = w ( u . webkitTransition ) , g = w ( u . webkitAnimation ) ) } return { history : ! ( ! o || r < 4 || l ) , hasEvent : function ( e ) { if ( "input" === e && Ba <= 11 ) return ! 1 ; if ( _ ( i [ e ] ) ) { var t = c . createElement ( "div" ) ; i [ e ] = "on" + e in t } return i [ e ] } , csp : Qa ( ) , vendorPrefix : n , transitions : m , animations : g , android : r } } ] } function Tn ( ) { var e ; this . httpOptions = function ( t ) { return t ? ( e = t , this ) : e } , this . $get = [ "$templateCache" , "$http" , "$q" , "$sce" , function ( t , n , a , i ) { function s ( o , r ) { function l ( e ) { if ( ! r ) throw ks ( "tpload" , "Failed to load template: {0} (HTTP status: {1} {2})" , o , e . status , e . statusText ) ; return a . reject ( e ) } s . totalPendingRequests ++ , w ( o ) && ! _ ( t . get ( o ) ) || ( o = i . getTrustedResourceUrl ( o ) ) ; var d = n . defaults && n . defaults . transformResponse ; return Ya ( d ) ? d = d . filter ( function ( e ) { return e !== Mt } ) : d === Mt && ( d = null ) , n . get ( o , c ( { cache : t , transformResponse : d } , e ) ) [ "finally" ] ( function ( ) { s . totalPendingRequests -- } ) . then ( function ( e ) { return t . put ( o , e . data ) , e . data } , l ) } return s . totalPendingRequests = 0 , s } ] } function Dn ( ) { this . $get = [ "$rootScope" , "$browser" , "$location" , function ( e , t , n ) { var i = { } ; return i . findBindings = function ( e , t , n ) { var i = e . getElementsByClassName ( "ng-binding" ) , s = [ ] ; return a ( i , function ( e ) { var i = Ga . element ( e ) . data ( "$binding" ) ; i && a ( i , function ( a ) { if ( n ) { var i = new RegExp ( "(^|\\s)" + Ja ( t ) + "(\\s|\\||$)" ) ; i . test ( a ) && s . push ( e ) } else a . indexOf ( t ) != - 1 && s . push ( e ) } ) } ) , s } , i . findModels = function ( e , t , n ) { for ( var a = [ "ng-" , "data-ng-" , "ng\\:" ] , i = 0 ; i < a . length ; ++ i ) { var s = n ? "=" : "*=" , o = "[" + a [ i ] + "model" + s + '"' + t + '"]' , r = e . querySelectorAll ( o ) ; if ( r . length ) return r } } , i . getLocation = function ( ) { return n . url ( ) } , i . setLocation = function ( t ) { t !== n . url ( ) && ( n . url ( t ) , e . $digest ( ) ) } , i . whenStable = function ( e ) { t . notifyWhenNoOutstandingRequests ( e ) } , i } ] } function Pn ( ) { this . $get = [ "$rootScope" , "$browser" , "$q" , "$$q" , "$exceptionHandler" , function ( e , t , n , a , i ) { function s ( s , r , l ) { C ( s ) || ( l = r , r = s , s = m ) ; var c , d = H ( arguments , 3 ) , p = v ( l ) && ! l , u = ( p ? a : n ) . defer ( ) , g = u . promise ; return c = t . defer ( function ( ) { try { u . resolve ( s . apply ( null , d ) ) } catch ( t ) { u . reject ( t ) , i ( t ) } finally { delete o [ g . $$timeoutId ] } p || e . $apply ( ) } , r ) , g . $$timeoutId = c , o [ c ] = u , g } var o = { } ; return s . cancel = function ( e ) { return ! ! ( e && e . $$timeoutId in o ) && ( o [ e . $$timeoutId ] . reject ( "canceled" ) , delete o [ e . $$timeoutId ] , t . defer . cancel ( e . $$timeoutId ) ) } , s } ] } function Fn ( e ) { var t = e ; return Ba && ( $s . setAttribute ( "href" , t ) , t = $s . href ) , $s . setAttribute ( "href" , t ) , { href : $s . href , protocol : $s . protocol ? $s . protocol . replace ( /:$/ , "" ) : "" , host : $s . host , search : $s . search ? $s . search . replace ( /^\?/ , "" ) : "" , hash : $s . hash ? $s . hash . replace ( /^#/ , "" ) : "" , hostname : $s . hostname , port : $s . port , pathname : "/" === $s . pathname . charAt ( 0 ) ? $s . pathname : "/" + $s . pathname } } function Rn ( e ) { var t = w ( e ) ? Fn ( e ) : e ; return t . protocol === Cs . protocol && t . host === Cs . host } function Nn ( ) { this . $get = h ( e ) } function Bn ( e ) { function t ( e ) { try { return decodeURIComponent ( e ) } catch ( t ) { return e } } var n = e [ 0 ] || { } , a = { } , i = "" ; return function ( ) { var e , s , o , r , l , c = n . cookie || "" ; if ( c !== i ) for ( i = c , e = i . split ( "; " ) , a = { } , o = 0 ; o < e . length ; o ++ ) s = e [ o ] , r = s . indexOf ( "=" ) , r > 0 && ( l = t ( s . substring ( 0 , r ) ) , _ ( a [ l ] ) && ( a [ l ] = t ( s . substring ( r + 1 ) ) ) ) ; return a } } function Un ( ) { this . $get = Bn } function On ( e ) { function t ( i , s ) { if ( y ( i ) ) { var o = { } ; return a ( i , function ( e , n ) { o [ n ] = t ( n , e ) } ) , o } return e . factory ( i + n , s ) } var n = "Filter" ; this . register = t , this . $get = [ "$injector" , function ( e ) { return function ( t ) { return e . get ( t + n ) } } ] , t ( "currency" , Vn ) , t ( "date" , sa ) , t ( "filter" , Ln ) , t ( "json" , oa ) , t ( "limitTo" , ra ) , t ( "lowercase" , Ts ) , t ( "number" , zn ) , t ( "orderBy" , ca ) , t ( "uppercase" , Ds ) } function Ln ( ) { return function ( e , a , i ) { if ( ! n ( e ) ) { if ( null == e ) return e ; throw t ( "filter" ) ( "notarray" , "Expected array but received: {0}" , e ) } var s , o , r = qn ( a ) ; switch ( r ) { case "function" : s = a ; break ; case "boolean" : case "null" : case "number" : case "string" : o = ! 0 ; c
var t = os . exec ( e ) ; return ( t [ 1 ] || "" === e ) && this . path ( decodeURIComponent ( t [ 1 ] ) ) , ( t [ 2 ] || t [ 1 ] || "" === e ) && this . search ( t [ 3 ] || "" ) , this . hash ( t [ 5 ] || "" ) , this } , protocol : Zt ( "$$protocol" ) , host : Zt ( "$$host" ) , port : Zt ( "$$port" ) , path : Xt ( "$$path" , function ( e ) { return e = null !== e ? e . toString ( ) : "" , "/" == e . charAt ( 0 ) ? e : "/" + e } ) , search : function ( e , t ) { switch ( arguments . length ) { case 0 : return this . $$search ; case 1 : if ( w ( e ) || k ( e ) ) e = e . toString ( ) , this . $$search = J ( e ) ; else { if ( ! y ( e ) ) throw ls ( "isrcharg" , "The first argument of the `$location#search()` call must be a string or an object." ) ; e = O ( e , { } ) , a ( e , function ( t , n ) { null == t && delete e [ n ] } ) , this . $$search = e } break ; default : _ ( t ) || null === t ? delete this . $$search [ e ] : this . $$search [ e ] = t } return this . $$compose ( ) , this } , hash : Xt ( "$$hash" , function ( e ) { return null !== e ? e . toString ( ) : "" } ) , replace : function ( ) { return this . $$replace = ! 0 , this } } ; a ( [ Yt , Kt , Gt ] , function ( e ) { e . prototype = Object . create ( cs ) , e . prototype . state = function ( t ) { if ( ! arguments . length ) return this . $$state ; if ( e !== Gt || ! this . $$html5 ) throw ls ( "nostate" , "History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API" ) ; return this . $$state = _ ( t ) ? null : t , this } } ) ; var ds = t ( "$parse" ) , ps = Function . prototype . call , us = Function . prototype . apply , ms = Function . prototype . bind , gs = ge ( ) ; a ( "+ - * / % === !== == != < > <= >= && || ! = |" . split ( " " ) , function ( e ) { gs [ e ] = ! 0 } ) ; var hs = { n : "\n" , f : "\f" , r : "\r" , t : "\t" , v : "\x0B" , "'" : "'" , '"' : '"' } , fs = function ( e ) { this . options = e } ; fs . prototype = { constructor : fs , lex : function ( e ) { for ( this . text = e , this . index = 0 , this . tokens = [ ] ; this . index < this . text . length ; ) { var t = this . text . charAt ( this . index ) ; if ( '"' === t || "'" === t ) this . readString ( t ) ; else if ( this . isNumber ( t ) || "." === t && this . isNumber ( this . peek ( ) ) ) this . readNumber ( ) ; else if ( this . isIdentifierStart ( this . peekMultichar ( ) ) ) this . readIdent ( ) ; else if ( this . is ( t , "(){}[].,;:?" ) ) this . tokens . push ( { index : this . index , text : t } ) , this . index ++ ; else if ( this . isWhitespace ( t ) ) this . index ++ ; else { var n = t + this . peek ( ) , a = n + this . peek ( 2 ) , i = gs [ t ] , s = gs [ n ] , o = gs [ a ] ; if ( i || s || o ) { var r = o ? a : s ? n : t ; this . tokens . push ( { index : this . index , text : r , operator : ! 0 } ) , this . index += r . length } else this . throwError ( "Unexpected next character " , this . index , this . index + 1 ) } } return this . tokens } , is : function ( e , t ) { return t . indexOf ( e ) !== - 1 } , peek : function ( e ) { var t = e || 1 ; return this . index + t < this . text . length && this . text . charAt ( this . index + t ) } , isNumber : function ( e ) { return "0" <= e && e <= "9" && "string" == typeof e } , isWhitespace : function ( e ) { return " " === e || "\r" === e || "\t" === e || "\n" === e || "\x0B" === e || " " === e } , isIdentifierStart : function ( e ) { return this . options . isIdentifierStart ? this . options . isIdentifierStart ( e , this . codePointAt ( e ) ) : this . isValidIdentifierStart ( e ) } , isValidIdentifierStart : function ( e ) { return "a" <= e && e <= "z" || "A" <= e && e <= "Z" || "_" === e || "$" === e } , isIdentifierContinue : function ( e ) { return this . options . isIdentifierContinue ? this . options . isIdentifierContinue ( e , this . codePointAt ( e ) ) : this . isValidIdentifierContinue ( e ) } , isValidIdentifierContinue : function ( e , t ) { return this . isValidIdentifierStart ( e , t ) || this . isNumber ( e ) } , codePointAt : function ( e ) { return 1 === e . length ? e . charCodeAt ( 0 ) : ( e . charCodeAt ( 0 ) << 10 ) + e . charCodeAt ( 1 ) - 56613888 } , peekMultichar : function ( ) { var e = this . text . charAt ( this . index ) , t = this . peek ( ) ; if ( ! t ) return e ; var n = e . charCodeAt ( 0 ) , a = t . charCodeAt ( 0 ) ; return n >= 55296 && n <= 56319 && a >= 56320 && a <= 57343 ? e + t : e } , isExpOperator : function ( e ) { return "-" === e || "+" === e || this . isNumber ( e ) } , throwError : function ( e , t , n ) { n = n || this . index ; var a = v ( t ) ? "s " + t + "-" + this . index + " [" + this . text . substring ( t , n ) + "]" : " " + n ; throw ds ( "lexerr" , "Lexer Error: {0} at column{1} in expression [{2}]." , e , a , this . text ) } , readNumber : function ( ) { for ( var e = "" , t = this . index ; this . index < this . text . length ; ) { var n = Pa ( this . text . charAt ( this . index ) ) ; if ( "." == n || this . isNumber ( n ) ) e += n ; else { var a = this . peek ( ) ; if ( "e" == n && this . isExpOperator ( a ) ) e += n ; else if ( this . isExpOperator ( n ) && a && this . isNumber ( a ) && "e" == e . charAt ( e . length - 1 ) ) e += n ; else { if ( ! this . isExpOperator ( n ) || a && this . isNumber ( a ) || "e" != e . charAt ( e . length - 1 ) ) break ; this . throwError ( "Invalid exponent" ) } } this . index ++ } this . tokens . push ( { index : t , text : e , constant : ! 0 , value : Number ( e ) } ) } , readIdent : function ( ) { var e = this . index ; for ( this . index += thi
return { multiElement : ! 0 , transclude : "element" , priority : 600 , terminal : ! 0 , restrict : "A" , $$tlb : ! 0 , link : function ( n , a , i , s , o ) { var r , l , c ; n . $watch ( i . ngIf , function ( n ) { n ? l || o ( function ( n , s ) { l = s , n [ n . length ++ ] = t . $$createComment ( "end ngIf" , i . ngIf ) , r = { clone : n } , e . enter ( n , a . parent ( ) , a ) } ) : ( c && ( c . remove ( ) , c = null ) , l && ( l . $destroy ( ) , l = null ) , r && ( c = me ( r . clone ) , e . leave ( c ) . then ( function ( ) { c = null } ) , r = null ) ) } ) } } } ] , go = [ "$templateRequest" , "$anchorScroll" , "$animate" , function ( e , t , n ) { return { restrict : "ECA" , priority : 400 , terminal : ! 0 , transclude : "element" , controller : Ga . noop , compile : function ( a , i ) { var s = i . ngInclude || i . src , o = i . onload || "" , r = i . autoscroll ; return function ( a , i , l , c , d ) { var p , u , m , g = 0 , h = function ( ) { u && ( u . remove ( ) , u = null ) , p && ( p . $destroy ( ) , p = null ) , m && ( n . leave ( m ) . then ( function ( ) { u = null } ) , u = m , m = null ) } ; a . $watch ( s , function ( s ) { var l = function ( ) { ! v ( r ) || r && ! a . $eval ( r ) || t ( ) } , u = ++ g ; s ? ( e ( s , ! 0 ) . then ( function ( e ) { if ( ! a . $$destroyed && u === g ) { var t = a . $new ( ) ; c . template = e ; var r = d ( t , function ( e ) { h ( ) , n . enter ( e , null , i ) . then ( l ) } ) ; p = t , m = r , p . $emit ( "$includeContentLoaded" , s ) , a . $eval ( o ) } } , function ( ) { a . $$destroyed || u === g && ( h ( ) , a . $emit ( "$includeContentError" , s ) ) } ) , a . $emit ( "$includeContentRequested" , s ) ) : ( h ( ) , c . template = null ) } ) } } } } ] , ho = [ "$compile" , function ( t ) { return { restrict : "ECA" , priority : - 400 , require : "ngInclude" , link : function ( n , a , i , s ) { return Va . call ( a [ 0 ] ) . match ( /SVG/ ) ? ( a . empty ( ) , void t ( Me ( s . template , e . document ) . childNodes ) ( n , function ( e ) { a . append ( e ) } , { futureParentElement : a } ) ) : ( a . html ( s . template ) , void t ( a . contents ( ) ) ( n ) ) } } } ] , fo = da ( { priority : 450 , compile : function ( ) { return { pre : function ( e , t , n ) { e . $eval ( n . ngInit ) } } } } ) , _o = function ( ) { return { restrict : "A" , priority : 100 , require : "ngModel" , link : function ( e , t , n , i ) { var s = t . attr ( n . $attr . ngList ) || ", " , o = "false" !== n . ngTrim , r = o ? Xa ( s ) : s , l = function ( e ) { if ( ! _ ( e ) ) { var t = [ ] ; return e && a ( e . split ( r ) , function ( e ) { e && t . push ( o ? Xa ( e ) : e ) } ) , t } } ; i . $parsers . push ( l ) , i . $formatters . push ( function ( e ) { if ( Ya ( e ) ) return e . join ( s ) } ) , i . $isEmpty = function ( e ) { return ! e || ! e . length } } } } , vo = "ng-valid" , yo = "ng-invalid" , bo = "ng-pristine" , wo = "ng-dirty" , ko = "ng-untouched" , $o = "ng-touched" , Co = "ng-pending" , So = "ng-empty" , Mo = "ng-not-empty" , xo = t ( "ngModel" ) , Io = [ "$scope" , "$exceptionHandler" , "$attrs" , "$element" , "$parse" , "$animate" , "$timeout" , "$rootScope" , "$q" , "$interpolate" , function ( e , t , n , i , s , o , r , l , c , d ) { this . $viewValue = Number . NaN , this . $modelValue = Number . NaN , this . $$rawModelValue = void 0 , this . $validators = { } , this . $asyncValidators = { } , this . $parsers = [ ] , this . $formatters = [ ] , this . $viewChangeListeners = [ ] , this . $untouched = ! 0 , this . $touched = ! 1 , this . $pristine = ! 0 , this . $dirty = ! 1 , this . $valid = ! 0 , this . $invalid = ! 1 , this . $error = { } , this . $$success = { } , this . $pending = void 0 , this . $name = d ( n . name || "" , ! 1 ) ( e ) , this . $$parentForm = Rs ; var p , u = s ( n . ngModel ) , g = u . assign , h = u , f = g , y = null , b = this ; this . $$setOptions = function ( e ) { if ( b . $options = e , e && e . getterSetter ) { var t = s ( n . ngModel + "()" ) , a = s ( n . ngModel + "($$$p)" ) ; h = function ( e ) { var n = u ( e ) ; return C ( n ) && ( n = t ( e ) ) , n } , f = function ( e , t ) { C ( u ( e ) ) ? a ( e , { $$$p : t } ) : g ( e , t ) } } else if ( ! u . assign ) throw xo ( "nonassign" , "Expression '{0}' is non-assignable. Element: {1}" , n . ngModel , Z ( i ) ) } , this . $render = m , this . $isEmpty = function ( e ) { return _ ( e ) || "" === e || null === e || e !== e } , this . $$updateEmptyClasses = function ( e ) { b . $isEmpty ( e ) ? ( o . removeClass ( i , Mo ) , o . addClass ( i , So ) ) : ( o . removeClass ( i , So ) , o . addClass ( i , Mo ) ) } ; var w = 0 ; xa ( { ctrl : this , $element : i , set : function ( e , t ) { e [ t ] = ! 0 } , unset : function ( e , t ) { delete e [ t ] } , $animate : o } ) , this . $setPristine = function ( ) { b . $dirty = ! 1 , b . $pristine = ! 0 , o . removeClass ( i , wo ) , o . addClass ( i , bo ) } , this . $setDirty = function ( ) { b . $dirty = ! 0 , b . $pristine = ! 1 , o . removeClass ( i , bo ) , o . addClass ( i , wo ) , b . $$parentForm . $setDirty ( ) } , this . $setUntouched = function ( ) { b . $touched = ! 1 , b . $untouched = ! 0 , o . setClass ( i , ko , $o ) } , this . $setTouched = function ( ) { b . $touched = ! 0 , b . $untouched = ! 1 , o . setClass ( i , $o , ko ) } , this . $rollbackViewValue = function ( ) { r . cancel ( y ) , b . $viewValue = b . $$lastCommittedViewValue , b . $render ( ) } , this . $validate = function ( ) { if ( ! k ( b . $modelValue ) || ! isNaN ( b . $modelValue ) ) { var e = b . $$lastCommittedViewValue , t = b . $$rawModelValue , n = b . $valid , a = b . $modelValue , i = b . $options && b . $options . allowInvalid ; b . $$runValidators ( t , e , function ( e ) { i || n === e || ( b . $modelValue = e ? t : void 0 , b . $modelValue !== a && b . $$write
transitionDuration : ge , transitionDelay : me , transitionProperty : P + se , animationDuration : ue , animationDelay : pe , animationIterationCount : R + le } , $e = { transitionDuration : ge , transitionDelay : me , animationDuration : ue , animationDelay : pe } , Ce = [ "$animateProvider" , function ( e ) { var t = T ( ) , n = T ( ) ; this . $get = [ "$window" , "$$jqLite" , "$$AnimateRunner" , "$timeout" , "$$forceReflow" , "$sniffer" , "$$rAFScheduler" , "$$animateQueue" , function ( e , a , r , l , c , d , f , _ ) { function y ( e , t ) { var n = "$$ngAnimateParentKey" , a = e . parentNode , i = a [ n ] || ( a [ n ] = ++ L ) ; return i + "-" + e . getAttribute ( "class" ) + "-" + t } function b ( n , a , i , s ) { var o = t . get ( i ) ; return o || ( o = x ( e , n , s ) , "infinite" === o . animationIterationCount && ( o . animationIterationCount = 1 ) ) , t . put ( i , o ) , o } function C ( i , o , r , l ) { var c ; if ( t . count ( r ) > 0 && ( c = n . get ( r ) , ! c ) ) { var d = s ( o , "-stagger" ) ; a . addClass ( i , d ) , c = x ( e , i , l ) , c . animationDuration = Math . max ( c . animationDuration , 0 ) , c . transitionDuration = Math . max ( c . transitionDuration , 0 ) , a . removeClass ( i , d ) , n . put ( r , c ) } return c || { } } function I ( e ) { q . push ( e ) , f . waitUntilQuiet ( function ( ) { t . flush ( ) , n . flush ( ) ; for ( var e = c ( ) , a = 0 ; a < q . length ; a ++ ) q [ a ] ( e ) ; q . length = 0 } ) } function T ( e , t , n ) { var a = b ( e , t , n , ke ) , i = a . animationDelay , s = a . transitionDelay ; return a . maxDelay = i && s ? Math . max ( i , s ) : i || s , a . maxDuration = Math . max ( a . animationDuration * a . animationIterationCount , a . transitionDuration ) , a } var O = p ( a ) , L = 0 , q = [ ] ; return function ( e , n ) { function c ( ) { f ( ) } function p ( ) { f ( ! 0 ) } function f ( t ) { if ( ! ( G || Y && K ) ) { G = ! 0 , K = ! 1 , V . $$skipPreparationClasses || a . removeClass ( e , ke ) , a . removeClass ( e , Se ) , k ( W , ! 1 ) , w ( W , ! 1 ) , j ( ce , function ( e ) { W . style [ e [ 0 ] ] = "" } ) , O ( e , V ) , m ( e , V ) , Object . keys ( z ) . length && j ( z , function ( e , t ) { e ? W . style . setProperty ( t , e ) : W . style . removeProperty ( t ) } ) , V . onDone && V . onDone ( ) , me && me . length && e . off ( me . join ( " " ) , L ) ; var n = e . data ( ve ) ; n && ( l . cancel ( n [ 0 ] . timer ) , e . removeData ( ve ) ) , ee && ee . complete ( ! t ) } } function b ( e ) { Oe . blockTransition && w ( W , e ) , Oe . blockKeyframeAnimation && k ( W , ! ! e ) } function x ( ) { return ee = new r ( { end : c , cancel : p } ) , I ( B ) , f ( ) , { $$willAnimate : ! 1 , start : function ( ) { return ee } , end : c } } function L ( e ) { e . stopPropagation ( ) ; var t = e . originalEvent || e , n = t . $manualTimeStamp || Date . now ( ) , a = parseFloat ( t . elapsedTime . toFixed ( be ) ) ; Math . max ( n - le , 0 ) >= ae && a >= ie && ( Y = ! 0 , f ( ) ) } function q ( ) { function t ( ) { if ( ! G ) { if ( b ( ! 1 ) , j ( ce , function ( e ) { var t = e [ 0 ] , n = e [ 1 ] ; W . style [ t ] = n } ) , O ( e , V ) , a . addClass ( e , Se ) , Oe . recalculateTimingStyles ) { if ( Ce = W . className + " " + ke , Ie = y ( W , Ce ) , Be = T ( W , Ce , Ie ) , Ue = Be . maxDelay , ne = Math . max ( Ue , 0 ) , ie = Be . maxDuration , 0 === ie ) return void f ( ) ; Oe . hasTransitions = Be . transitionDuration > 0 , Oe . hasAnimations = Be . animationDuration > 0 } if ( Oe . applyAnimationDelay && ( Ue = "boolean" != typeof V . delay && A ( V . delay ) ? parseFloat ( V . delay ) : Ue , ne = Math . max ( Ue , 0 ) , Be . animationDelay = Ue , Le = M ( Ue , ! 0 ) , ce . push ( Le ) , W . style [ Le [ 0 ] ] = Le [ 1 ] ) , ae = ne * ye , oe = ie * ye , V . easing ) { var t , i = V . easing ; Oe . hasTransitions && ( t = P + re , ce . push ( [ t , i ] ) , W . style [ t ] = i ) , Oe . hasAnimations && ( t = R + re , ce . push ( [ t , i ] ) , W . style [ t ] = i ) } Be . transitionDuration && me . push ( F ) , Be . animationDuration && me . push ( N ) , le = Date . now ( ) ; var s = ae + we * oe , o = le + s , r = e . data ( ve ) || [ ] , c = ! 0 ; if ( r . length ) { var d = r [ 0 ] ; c = o > d . expectedEndTime , c ? l . cancel ( d . timer ) : r . push ( f ) } if ( c ) { var p = l ( n , s , ! 1 ) ; r [ 0 ] = { timer : p , expectedEndTime : o } , r . push ( f ) , e . data ( ve , r ) } me . length && e . on ( me . join ( " " ) , L ) , V . to && ( V . cleanupStyles && D ( z , W , Object . keys ( V . to ) ) , h ( e , V ) ) } } function n ( ) { var t = e . data ( ve ) ; if ( t ) { for ( var n = 1 ; n < t . length ; n ++ ) t [ n ] ( ) ; e . removeData ( ve ) } } if ( ! G ) { if ( ! W . parentNode ) return void f ( ) ; var i = function ( e ) { if ( Y ) K && e && ( K = ! 1 , f ( ) ) ; else if ( K = ! e , Be . animationDuration ) { var t = k ( W , K ) ; K ? ce . push ( t ) : o ( ce , t ) } } , s = Re > 0 && ( Be . transitionDuration && 0 === Ae . transitionDuration || Be . animationDuration && 0 === Ae . animationDuration ) && Math . max ( Ae . animationDelay , Ae . transitionDelay ) ; s ? l ( t , Math . floor ( s * Re * ye ) , ! 1 ) : t ( ) , te . resume = function ( ) { i ( ! 0 ) } , te . pause = function ( ) { i ( ! 1 ) } } } var V = n || { } ; V . $$prepared || ( V = u ( U ( V ) ) ) ; var z = { } , W = v ( e ) ; if ( ! W || ! W . parentNode || ! _ . enabled ( ) ) return x ( ) ; var G , K , Y , ee , te , ne , ae , ie , oe , le , ce = [ ] , pe = e . attr ( "class" ) , ue = i ( V ) , me = [ ] ; if ( 0 === V . duration || ! d . animations && ! d . transitions ) return x ( ) ; var ge = V . event && H ( V . event ) ? V . event . join ( " " ) : V . event , he = ge && V . structural , fe = "" , _e = "" ; he ? fe = s ( ge , J , ! 0 ) : ge && ( fe = ge ) , V . addClass && ( _e += s ( V . addClass , Z ) ) , V . removeClass && ( _e . length && ( _e += " " ) , _e += s ( V . removeClass , X ) ) , V .
return l . isOpen } , l . getToggleElement = function ( ) { return r . toggleElement } , l . focusToggleElement = function ( ) { r . toggleElement && r . toggleElement [ 0 ] . focus ( ) } , l . $watch ( "isOpen" , function ( t , n ) { s [ t ? "addClass" : "removeClass" ] ( r . $element , c ) , t ? ( l . focusToggleElement ( ) , i . open ( l ) ) : i . close ( l ) , d ( e , t ) , angular . isDefined ( t ) && t !== n && p ( e , { open : ! ! t } ) } ) , e . $on ( "$locationChangeSuccess" , function ( ) { l . isOpen = ! 1 } ) , e . $on ( "$destroy" , function ( ) { l . $destroy ( ) } ) } ] ) . directive ( "dropdown" , function ( ) { return { controller : "DropdownController" , link : function ( e , t , n , a ) { a . init ( t ) } } } ) . directive ( "dropdownToggle" , function ( ) { return { require : "?^dropdown" , link : function ( e , t , n , a ) { if ( a ) { a . toggleElement = t ; var i = function ( i ) { i . preventDefault ( ) , t . hasClass ( "disabled" ) || n . disabled || e . $apply ( function ( ) { a . toggle ( ) } ) } ; t . bind ( "click" , i ) , t . attr ( { "aria-haspopup" : ! 0 , "aria-expanded" : ! 1 } ) , e . $watch ( a . isOpen , function ( e ) { t . attr ( "aria-expanded" , ! ! e ) } ) , e . $on ( "$destroy" , function ( ) { t . unbind ( "click" , i ) } ) } } } } ) , angular . module ( "ui.bootstrap.tooltip" , [ "ui.bootstrap.position" , "ui.bootstrap.bindHtml" ] ) . provider ( "$tooltip" , function ( ) { function e ( e ) { var t = /[A-Z]/g , n = "-" ; return e . replace ( t , function ( e , t ) { return ( t ? n : "" ) + e . toLowerCase ( ) } ) } var t = { placement : "top" , animation : ! 0 , popupDelay : 0 } , n = { mouseenter : "mouseleave" , click : "click" , focus : "blur" } , a = { } ; this . options = function ( e ) { angular . extend ( a , e ) } , this . setTriggers = function ( e ) { angular . extend ( n , e ) } , this . $get = [ "$window" , "$compile" , "$timeout" , "$document" , "$position" , "$interpolate" , function ( i , s , o , r , l , c ) { return function ( i , d , p ) { function u ( e ) { var t = e || m . trigger || p , a = n [ t ] || t ; return { show : t , hide : a } } var m = angular . extend ( { } , t , a ) , g = e ( i ) , h = c . startSymbol ( ) , f = c . endSymbol ( ) , _ = "<div " + g + '-popup title="' + h + "title" + f + '" content="' + h + "content" + f + '" placement="' + h + "placement" + f + '" animation="animation" is-open="isOpen"></div>' ; return { restrict : "EA" , compile : function ( e , t ) { var n = s ( _ ) ; return function ( e , t , a ) { function s ( ) { A . isOpen ? p ( ) : c ( ) } function c ( ) { I && ! e . $eval ( a [ d + "Enable" ] ) || ( v ( ) , A . popupDelay ? S || ( S = o ( g , A . popupDelay , ! 1 ) , S . then ( function ( e ) { e ( ) } ) ) : g ( ) ( ) ) } function p ( ) { e . $apply ( function ( ) { h ( ) } ) } function g ( ) { return S = null , C && ( o . cancel ( C ) , C = null ) , A . content ? ( f ( ) , k . css ( { top : 0 , left : 0 , display : "block" } ) , M ? r . find ( "body" ) . append ( k ) : t . after ( k ) , E ( ) , A . isOpen = ! 0 , A . $digest ( ) , E ) : angular . noop } function h ( ) { A . isOpen = ! 1 , o . cancel ( S ) , S = null , A . animation ? C || ( C = o ( _ , 500 ) ) : _ ( ) } function f ( ) { k && _ ( ) , $ = A . $new ( ) , k = n ( $ , angular . noop ) } function _ ( ) { C = null , k && ( k . remove ( ) , k = null ) , $ && ( $ . $destroy ( ) , $ = null ) } function v ( ) { y ( ) , b ( ) } function y ( ) { var e = a [ d + "Placement" ] ; A . placement = angular . isDefined ( e ) ? e : m . placement } function b ( ) { var e = a [ d + "PopupDelay" ] , t = parseInt ( e , 10 ) ; A . popupDelay = isNaN ( t ) ? m . popupDelay : t } function w ( ) { var e = a [ d + "Trigger" ] ; T ( ) , x = u ( e ) , x . show === x . hide ? t . bind ( x . show , s ) : ( t . bind ( x . show , c ) , t . bind ( x . hide , p ) ) } var k , $ , C , S , M = ! ! angular . isDefined ( m . appendToBody ) && m . appendToBody , x = u ( void 0 ) , I = angular . isDefined ( a [ d + "Enable" ] ) , A = e . $new ( ! 0 ) , E = function ( ) { var e = l . positionElements ( t , k , A . placement , M ) ; e . top += "px" , e . left += "px" , k . css ( e ) } ; A . isOpen = ! 1 , a . $observe ( i , function ( e ) { A . content = e , ! e && A . isOpen && h ( ) } ) , a . $observe ( d + "Title" , function ( e ) { A . title = e } ) ; var T = function ( ) { t . unbind ( x . show , c ) , t . unbind ( x . hide , p ) } ; w ( ) ; var D = e . $eval ( a [ d + "Animation" ] ) ; A . animation = angular . isDefined ( D ) ? ! ! D : m . animation ; var P = e . $eval ( a [ d + "AppendToBody" ] ) ; M = angular . isDefined ( P ) ? P : M , M && e . $on ( "$locationChangeSuccess" , function ( ) { A . isOpen && h ( ) } ) , e . $on ( "$destroy" , function ( ) { o . cancel ( C ) , o . cancel ( S ) , T ( ) , _ ( ) , A = null } ) } } } } } ] } ) . directive ( "tooltipPopup" , function ( ) { return { restrict : "EA" , replace : ! 0 , scope : { content : "@" , placement : "@" , animation : "&" , isOpen : "&" } , templateUrl : "template/tooltip/tooltip-popup.html" } } ) . directive ( "tooltip" , [ "$tooltip" , function ( e ) { return e ( "tooltip" , "tooltip" , "mouseenter" ) } ] ) . directive ( "tooltipHtmlUnsafePopup" , function ( ) { return { restrict : "EA" , replace : ! 0 , scope : { content : "@" , placement : "@" , animation : "&" , isOpen : "&" } , templateUrl : "template/tooltip/tooltip-html-unsafe-popup.html" } } ) . directive ( "tooltipHtmlUnsafe" , [ "$tooltip" , function ( e ) { return e ( "tooltipHtmlUnsafe" , "tooltip" , "mouseenter" ) } ] ) , angular . module ( "ui.bootstrap.position" , [ ] ) . factory ( "$position" , [ "$document" , "$window" , function ( e , t ) { funct
blockSize : e . blockSize , formatter : a . format } ) } , decrypt : function ( e , t , n , a ) { a = this . cfg . extend ( a ) , t = this . _parse ( t , a . format ) ; var i = e . createDecryptor ( n , a ) . finalize ( t . ciphertext ) ; return i } , _parse : function ( e , t ) { return "string" == typeof e ? t . parse ( e , this ) : e } } ) , b = t . kdf = { } , w = b . OpenSSL = { execute : function ( e , t , n , a ) { a || ( a = i . random ( 8 ) ) ; var s = c . create ( { keySize : t + n } ) . compute ( e , a ) , o = i . create ( s . words . slice ( t ) , 4 * n ) ; return s . sigBytes = 4 * t , f . create ( { key : s , iv : o , salt : a } ) } } , k = n . PasswordBasedCipher = y . extend ( { cfg : y . cfg . extend ( { kdf : w } ) , encrypt : function ( e , t , n , a ) { a = this . cfg . extend ( a ) ; var i = a . kdf . execute ( n , e . keySize , e . ivSize ) ; a . iv = i . iv ; var s = y . encrypt . call ( this , e , t , i . key , a ) ; return s . mixIn ( i ) , s } , decrypt : function ( e , t , n , a ) { a = this . cfg . extend ( a ) , t = this . _parse ( t , a . format ) ; var i = a . kdf . execute ( n , e . keySize , e . ivSize , t . salt ) ; a . iv = i . iv ; var s = y . decrypt . call ( this , e , t , i . key , a ) ; return s } } ) } ( ) , function ( ) { var e = CryptoJS , t = e . lib , n = t . BlockCipher , a = e . algo , i = [ ] , s = [ ] , o = [ ] , r = [ ] , l = [ ] , c = [ ] , d = [ ] , p = [ ] , u = [ ] , m = [ ] ; ! function ( ) { for ( var e = [ ] , t = 0 ; t < 256 ; t ++ ) t < 128 ? e [ t ] = t << 1 : e [ t ] = t << 1 ^ 283 ; for ( var n = 0 , a = 0 , t = 0 ; t < 256 ; t ++ ) { var g = a ^ a << 1 ^ a << 2 ^ a << 3 ^ a << 4 ; g = g >>> 8 ^ 255 & g ^ 99 , i [ n ] = g , s [ g ] = n ; var h = e [ n ] , f = e [ h ] , _ = e [ f ] , v = 257 * e [ g ] ^ 16843008 * g ; o [ n ] = v << 24 | v >>> 8 , r [ n ] = v << 16 | v >>> 16 , l [ n ] = v << 8 | v >>> 24 , c [ n ] = v ; var v = 16843009 * _ ^ 65537 * f ^ 257 * h ^ 16843008 * n ; d [ g ] = v << 24 | v >>> 8 , p [ g ] = v << 16 | v >>> 16 , u [ g ] = v << 8 | v >>> 24 , m [ g ] = v , n ? ( n = h ^ e [ e [ e [ _ ^ h ] ] ] , a ^= e [ e [ a ] ] ) : n = a = 1 } } ( ) ; var g = [ 0 , 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , 27 , 54 ] , h = a . AES = n . extend ( { _doReset : function ( ) { for ( var e = this . _key , t = e . words , n = e . sigBytes / 4 , a = this . _nRounds = n + 6 , s = 4 * ( a + 1 ) , o = this . _keySchedule = [ ] , r = 0 ; r < s ; r ++ ) if ( r < n ) o [ r ] = t [ r ] ; else { var l = o [ r - 1 ] ; r % n ? n > 6 && r % n == 4 && ( l = i [ l >>> 24 ] << 24 | i [ l >>> 16 & 255 ] << 16 | i [ l >>> 8 & 255 ] << 8 | i [ 255 & l ] ) : ( l = l << 8 | l >>> 24 , l = i [ l >>> 24 ] << 24 | i [ l >>> 16 & 255 ] << 16 | i [ l >>> 8 & 255 ] << 8 | i [ 255 & l ] , l ^= g [ r / n | 0 ] << 24 ) , o [ r ] = o [ r - n ] ^ l } for ( var c = this . _invKeySchedule = [ ] , h = 0 ; h < s ; h ++ ) { var r = s - h ; if ( h % 4 ) var l = o [ r ] ; else var l = o [ r - 4 ] ; h < 4 || r <= 4 ? c [ h ] = l : c [ h ] = d [ i [ l >>> 24 ] ] ^ p [ i [ l >>> 16 & 255 ] ] ^ u [ i [ l >>> 8 & 255 ] ] ^ m [ i [ 255 & l ] ] } } , encryptBlock : function ( e , t ) { this . _doCryptBlock ( e , t , this . _keySchedule , o , r , l , c , i ) } , decryptBlock : function ( e , t ) { var n = e [ t + 1 ] ; e [ t + 1 ] = e [ t + 3 ] , e [ t + 3 ] = n , this . _doCryptBlock ( e , t , this . _invKeySchedule , d , p , u , m , s ) ; var n = e [ t + 1 ] ; e [ t + 1 ] = e [ t + 3 ] , e [ t + 3 ] = n } , _doCryptBlock : function ( e , t , n , a , i , s , o , r ) { for ( var l = this . _nRounds , c = e [ t ] ^ n [ 0 ] , d = e [ t + 1 ] ^ n [ 1 ] , p = e [ t + 2 ] ^ n [ 2 ] , u = e [ t + 3 ] ^ n [ 3 ] , m = 4 , g = 1 ; g < l ; g ++ ) { var h = a [ c >>> 24 ] ^ i [ d >>> 16 & 255 ] ^ s [ p >>> 8 & 255 ] ^ o [ 255 & u ] ^ n [ m ++ ] , f = a [ d >>> 24 ] ^ i [ p >>> 16 & 255 ] ^ s [ u >>> 8 & 255 ] ^ o [ 255 & c ] ^ n [ m ++ ] , _ = a [ p >>> 24 ] ^ i [ u >>> 16 & 255 ] ^ s [ c >>> 8 & 255 ] ^ o [ 255 & d ] ^ n [ m ++ ] , v = a [ u >>> 24 ] ^ i [ c >>> 16 & 255 ] ^ s [ d >>> 8 & 255 ] ^ o [ 255 & p ] ^ n [ m ++ ] ; c = h , d = f , p = _ , u = v } var h = ( r [ c >>> 24 ] << 24 | r [ d >>> 16 & 255 ] << 16 | r [ p >>> 8 & 255 ] << 8 | r [ 255 & u ] ) ^ n [ m ++ ] , f = ( r [ d >>> 24 ] << 24 | r [ p >>> 16 & 255 ] << 16 | r [ u >>> 8 & 255 ] << 8 | r [ 255 & c ] ) ^ n [ m ++ ] , _ = ( r [ p >>> 24 ] << 24 | r [ u >>> 16 & 255 ] << 16 | r [ c >>> 8 & 255 ] << 8 | r [ 255 & d ] ) ^ n [ m ++ ] , v = ( r [ u >>> 24 ] << 24 | r [ c >>> 16 & 255 ] << 16 | r [ d >>> 8 & 255 ] << 8 | r [ 255 & p ] ) ^ n [ m ++ ] ; e [ t ] = h , e [ t + 1 ] = f , e [ t + 2 ] = _ , e [ t + 3 ] = v } , keySize : 8 } ) ; e . AES = n . _createHelper ( h ) } ( ) , function ( e ) { var t = CryptoJS , n = t . lib , a = n . WordArray , i = n . Hasher , s = t . algo , o = [ ] , r = [ ] ; ! function ( ) { function t ( t ) { for ( var n = e . sqrt ( t ) , a = 2 ; a <= n ; a ++ ) if ( ! ( t % a ) ) return ! 1 ; return ! 0 } function n ( e ) { return 4294967296 * ( e - ( 0 | e ) ) | 0 } for ( var a = 2 , i = 0 ; i < 64 ; ) t ( a ) && ( i < 8 && ( o [ i ] = n ( e . pow ( a , . 5 ) ) ) , r [ i ] = n ( e . pow ( a , 1 / 3 ) ) , i ++ ) , a ++ } ( ) ; var l = [ ] , c = s . SHA256 = i . extend ( { _doReset : function ( ) { this . _hash = new a . init ( o . slice ( 0 ) ) } , _doProcessBlock : function ( e , t ) { for ( var n = this . _hash . words , a = n [ 0 ] , i = n [ 1 ] , s = n [ 2 ] , o = n [ 3 ] , c = n [ 4 ] , d = n [ 5 ] , p = n [ 6 ] , u = n [ 7 ] , m = 0 ; m < 64 ; m ++ ) { if ( m < 16 ) l [ m ] = 0 | e [ t + m ] ; else { var g = l [ m - 15 ] , h = ( g << 25 | g >>> 7 ) ^ ( g << 14 | g >>> 18 ) ^ g >>> 3 , f = l [ m - 2 ] , _ = ( f << 15 | f >>> 17 ) ^ ( f << 13 | f >>> 19 ) ^ f >>> 10 ; l [ m ] = h + l [ m - 7 ] + _ + l [ m - 16 ] } var v = c & d ^ ~ c & p , y = a & i ^ a & s ^ i & s , b = ( a << 30 | a >>> 2 ) ^ ( a << 19 | a >>> 13 ) ^ ( a << 10 | a >>> 22 ) , w = ( c << 26 | c >>> 6 ) ^ ( c << 21 | c >>> 11 ) ^ ( c << 7 | c >>> 25 ) , k = u + w + v + r [ m ] + l [ m ] , $ = b + y ; u = p , p = d , d = c , c = o + k | 0 , o = s , s = i , i = a , a = k + $ | 0 } n [ 0 ] = n [ 0 ] + a | 0 , n [ 1 ] = n [ 1 ] + i | 0 , n [ 2 ] = n [ 2 ] + s | 0 , n [ 3 ] = n [ 3 ] + o | 0 , n [ 4 ] = n [ 4 ] + c | 0 , n [ 5 ] = n [ 5 ] + d | 0 , n [ 6 ] = n [ 6 ] + p | 0 , n [ 7 ] = n [ 7 ] + u | 0 } , _doFinalize : function ( ) { var t = this . _data , n = t . words , a = 8 * this . _nDataBytes , i = 8 * t . sigBytes ; return n [ i >>> 5 ] |= 128 << 24 - i % 32 , n [ ( i + 64 >>> 9 << 4 ) + 14 ] = e . floor ( a / 4294967296 ) , n [ ( i + 64 >>> 9 << 4 ) + 15 ] = a , t . sigBytes = 4 * n . length , this . _process ( ) , this . _hash } , c
e . g += t , 8 <= e . g && 8 <= e . g && A ( e ) } else e . fa = 1 ; return n } function D ( e ) { return e . Pa == e . gb } function P ( e , t ) { return u ( e != h ) , 0 == t ? 0 : ( e . gb = 2 * t - 1 , e . Y = d ( e . gb , Wn ) , e . Y == h ? 0 : ( e . Y [ 0 ] . s = - 1 , e . Pa = 1 ) ) } function F ( e ) { e != h && ( e . Y = h , e . Y = h , e . gb = 0 , e . Pa = 0 ) } function R ( e , t , n , a ) { for ( var i = e . Y , s = 0 , o = + e . gb ; 0 < a -- ; ) { if ( s >= o ) return 0 ; if ( 0 > i [ s ] . s ) { if ( D ( e ) ) return 0 ; var r = e , l = r . Y , c = + r . Pa ; i [ s ] . s = c - s , r . Pa += 2 , l [ c + 0 ] . s = - 1 , l [ c + 1 ] . s = - 1 } else if ( 0 == i [ s ] . s ) return 0 ; s += i [ s ] . s + ( n >> a & 1 ) } if ( 0 > i [ s ] . s ) i [ s ] . s = 0 ; else if ( 0 != i [ s ] . s ) return 0 ; return i [ s ] . kc = t , 1 } function N ( e , t , n ) { var a = f , i = 0 , s = 0 ; for ( u ( e != h ) , u ( t != h ) , a = 0 ; a < n ; ++ a ) 0 < t [ a ] && ( ++ i , s = a ) ; if ( ! P ( e , i ) ) return 0 ; if ( 1 == i ) return 0 > s || s >= n ? ( F ( e ) , 0 ) : R ( e , s , 0 , 0 ) ; if ( i = 0 , s = c ( n , f ) , s == h ) return ( i = i && D ( e ) ) || F ( e ) , i ; var o = f , o = f , a = c ( xn + 1 , 0 ) , r = f , l = c ( xn + 1 , 0 ) , d = 0 ; for ( u ( t != h ) , u ( 0 < n ) , u ( s != h ) , o = 0 ; o < n ; ++ o ) t [ o ] > d && ( d = t [ o ] ) ; if ( d > xn ) a = 0 ; else { for ( o = 0 ; o < n ; ++ o ) ++ a [ t [ o ] ] ; for ( r = a [ 0 ] = 0 , l [ 0 ] = - 1 , o = 1 ; o <= d ; ++ o ) r = r + a [ o - 1 ] << 1 , l [ o ] = r ; for ( o = 0 ; o < n ; ++ o ) s [ o ] = 0 < t [ o ] ? l [ t [ o ] ] ++ : Kn ; a = 1 } if ( ! a ) return ( i = i && D ( e ) ) || F ( e ) , i ; for ( a = 0 ; a < n ; ++ a ) if ( 0 < t [ a ] && ! R ( e , a , s [ a ] , t [ a ] ) ) return ( i = i && D ( e ) ) || F ( e ) , i ; return ( i = D ( e ) ) || F ( e ) , i } function B ( e , t , n , a , i , s , o ) { for ( var r = f , r = 0 ; r < o ; ++ r ) i [ s + r ] = e [ t + r ] + n [ a + r ] & 255 } function U ( n , a , i ) { var s = n . P . l ; if ( ! ( i = 0 > a || 0 > i || a + i > n . P . v ) && ( i = 0 == a ) ) { e : { var o = n . Ga , r = n . G , l = n . ub ; i = n . P . l ; var d = n . P . v , p = n . Xb , m = [ h ] , g = h , _ = d * i , v = h , y = h , y = "WEBP_FILTER_TYPE" , b = f , m = f , w = 0 , k = f ; if ( u ( 0 < i && 0 < d && s >= i ) , u ( o != h && p != h ) , l <= Rn ) i = 0 ; else if ( k = o [ r + 0 ] >> 0 & 3 , y = o [ r + 0 ] >> 2 & 3 , b = o [ r + 0 ] >> 4 & 3 , m = o [ r + 0 ] >> 6 & 3 , k < Nn || k > Bn || y >= Na || b > Un || 0 != m ) i = 0 ; else { if ( k == Nn ) w = l >= _ , m = o , g = r + Rn ; else { if ( m = c ( _ , 0 ) , g = 0 , m == h ) { i = 0 ; break e } var w = r + Rn , l = l - Rn , r = m , v = e ( pn ) , $ = 0 , C = Qe ( ) ; C == h ? w = 0 : ( C . l = i , C . v = d , C . N = v , ye ( Ut ) , v . put = It , v . Mb = xt , v . Pb = At , v . ka = h , v . ka = r , v . fd = 0 , v . width = i , v . height = d , C . a = en , I ( C . o , o , w , l ) , C . Wa = Ea , tt ( i , d , 1 , C , h ) && nt ( C , i ) && ( C . Wa = Aa , $ = Xe ( C , C . V , C . Ha , C . l , C . v , at ) ) , C != h && et ( C ) , w = $ ) } if ( w ) { for ( o = Ba [ y ] , o != h ? ( v = c ( _ , 0 ) , y = 0 , v == h && ( w = 0 , k != Nn && ( g = m = h ) ) , o ( m , g , i , d , 1 , i , v , y ) , _ = v , k = y ) : ( _ = m , k = g ) , o = 0 ; 0 < d -- ; ) t ( p , o , _ , k , i ) , k += i , o += s ; b == Un && ( w = m == h || 0 >= g || 0 >= i ? 0 : 1 ) } i = w } } i = ! i } return i ? h : 0 == a ? n . Xb : + a * s } function O ( e ) { var t = e . width , n = e . height , a = e . J ; if ( 0 >= t || 0 >= n || ! ( a >= Ot && a < Jt ) ) return nn ; if ( ! e . Fc && e . Jb == h ) { var i = h , s = 0 , o = 0 , r = 0 , l = 0 , i = b , d = t * Ua [ a ] , p = d * n ; if ( a < Zt || ( s = parseInt ( ( t + 1 ) / 2 , 10 ) , r = s * parseInt ( ( n + 1 ) / 2 , 10 ) , a == Xt && ( o = t , l = o * n ) ) , i = p + 2 * r + l , i != i ) return nn ; if ( i = c ( i , 205 ) , i == h ) return tn ; e . Jb = i , e . jc = h , a < Zt ? ( t = e . c . RGBA , t . ma = i , t . Sa = h , t . f = d , t . size = p ) : ( t = e . c . Va , t . y = i , t . D = h , t . F = d , t . Wc = p , t . c = i , t . B = h + p , t . nb = s , t . Rc = r , t . S = i , t . C = h + p + r , t . rb = s , t . Uc = r , a == Xt && ( t . p = i , t . q = h + p + 2 * r ) , t . Wb = l , t . Fa = o ) } return a = 1 , s = e . J , o = e . width , r = e . height , s >= Ot && s < Jt ? s < Zt ? ( e = e . c . RGBA , a &= e . f * r <= e . size , a &= e . f >= o * Ua [ s ] , a &= e . ma != h ) : ( e = e . c . Va , l = e . nb * parseInt ( ( r + 1 ) / 2 , 10 ) , d = e . rb * parseInt ( ( r + 1 ) / 2 , 10 ) , p = e . Fa * r , a &= e . F * r <= e . Wc , a &= l <= e . Rc , a &= d <= e . Uc , a &= p <= e . Wb , a &= e . F >= o , a &= e . nb >= parseInt ( ( o + 1 ) / 2 , 10 ) , a &= e . rb >= parseInt ( ( o + 1 ) / 2 , 10 ) , a &= e . y != h , a &= e . c != h , a &= e . S != h , s == Xt && ( a &= e . Fa >= o , a &= p <= e . Wb , a &= e . p != h ) ) : a = 0 , a ? en : nn } function L ( e , t , n , a ) { if ( a == h || 0 >= e || 0 >= t ) return nn ; if ( n != h ) { if ( n . Ua ) { var i = n . wc , s = n . vc , o = n . t & - 2 , r = n . k & - 2 ; if ( 0 > o || 0 > r || 0 >= i || 0 >= s || o + i > e || r + s > t ) return nn ; e = i , t = s } if ( n . I ) { if ( 0 >= n . Ba || 0 >= n . Aa ) return nn ; e = n . Ba , t = n . Aa } } return a . width = e , a . height = t , O ( a ) } function H ( e ) { return e & - 256 ? 0 > e ? 0 : 255 : e } function q ( e , t , n , a ) { var i , s = c ( 16 , 0 ) ; i = 0 ; var o ; for ( o = 0 ; 4 > o ; ++ o ) { var r = e [ t + 0 ] + e [ t + 8 ] , l = e [ t + 0 ] - e [ t + 8 ] , d = ( e [ t + 4 ] * li >> 16 ) - ( e [ t + 12 ] * ri >> 16 ) , p = ( e [ t + 4 ] * ri >> 16 ) + ( e [ t + 12 ] * li >> 16 ) ; s [ i + 0 ] = r + p , s [ i + 1 ] = l + d , s [ i + 2 ] = l - d , s [ i + 3 ] = r - p , i += 4 , t ++ } for ( o = i = 0 ; 4 > o ; ++ o ) e = s [ i + 0 ] + 4 , r = e + s [ i + 8 ] , l = e - s [ i + 8 ] , d = ( s [ i + 4 ] * li >> 16 ) - ( s [ i + 12 ] * ri >> 16 ) , p = ( s [ i + 4 ] * ri >> 16 ) + ( s [ i + 12 ] * li >> 16 ) , n [ a + 0 + 0 * ma ] = H ( n [ a + 0 + 0 * ma ] + ( r + p >> 3 ) ) , n [ a + 1 + 0 * ma ] = H ( n [ a + 1 + 0 * ma ] + ( l + d >> 3 ) ) , n [ a + 2 + 0 * ma ] = H ( n [ a + 2 + 0 * ma ] + ( l - d >> 3 ) ) , n [ a + 3 + 0 * ma ] = H ( n [ a + 3 + 0 * ma ] + ( r - p >> 3 ) ) , i ++ , a += ma } function V ( e , t , n , a , i ) { q ( e , t , n , a ) , i && q ( e , t + 16 , n , a + 4 ) } function z ( e , t , n , a ) { Oa ( e , t + 0 , n , a + 0 , 1 ) , Oa ( e , t + 32 , n , a + 4 * ma , 1 ) } function W ( e , t , n , a ) { e = e [ t + 0 ] + 4 ; var i ; for ( i = 0 ; 4 > i ; ++ i ) for ( t = 0 ; 4 > t ; ++ t ) n [ a + t + i * ma ] = H ( n [ a + t + i * ma ] + ( e >> 3 ) ) } function G ( e , t , n , a ) { e [ t + 0 ] && W ( e , t + 0 , n , a + 0 ) , e [ t + 16 ] && W ( e , t + 16 , n , a + 4 ) , e [ t + 32 ] && W ( e , t + 32 , n , a + 4 * ma ) , e [ t + 48 ] && W ( e , t + 48 , n , a + 4 * ma + 4 ) } function K ( e , t , n ) { var a , i = t - ma , s = si , o = 255 - e [ i - 1 ] ; for ( a = 0 ; a < n ; ++ a ) { var r , l = s , c = o + e [ t - 1 ] ; for ( r = 0 ; r < n ; ++ r ) e [ t + r ] =
} return 0 } function Mt ( e , t ) { var n = e . p , a = [ e . q ] ; if ( n != h ) { var i = e . m , s = t . j . J , o = t . j . c . RGBA , r = [ f ] , l = Ct ( e , a , r ) , a = a [ 0 ] , c = o . ma , l = o . Sa + l * o . f , d = l + 1 , p = 15 , u = f ; for ( j = 0 ; j < r [ 0 ] ; ++ j ) { for ( u = 0 ; u < i ; ++ u ) { var m = n [ a + u ] >> 4 ; c [ d + 2 * u ] = 240 & c [ d + 2 * u ] | m , p &= m } a += e . width , d += o . f } 15 != p && k ( s ) && WebPApplyAlphaMultiply4444 ( c , l , i , r , o . f ) } return 0 } function xt ( e ) { var t = e . ka , n = t . j . J , a = n < Zt , i = n == Lt || n == Ht || n == qt || n == Vt || n == Xt || k ( n ) ; if ( t . memory = h , t . $a = h , t . zb = h , t . ad = h , ! Bt ( t . Qa , e , i ? Zt : Xt ) ) return 0 ; if ( e . I ) { if ( ! ( a ? InitRGBRescaler ( e , t ) : InitYUVRescaler ( e , t ) ) ) return alert ( "memory error #1" ) , 0 } else { if ( a ) { if ( t . $a = wt , e . Bb ) { var s , o = e . m + 1 >> 1 , r = e . m + 2 * o , l = [ ] ; for ( s = 0 ; s < r ; ++ s ) l . push ( 205 ) ; if ( l . push ( 0 ) , t . memory = l , t . memory == h ) return alert ( "memory error #2" ) , 0 ; t . Sb = t . memory , t . Tb = 0 , t . Qb = t . Sb , t . Rb = t . Tb + e . m , t . lc = t . Qb , t . mc = t . Rb + o , t . $a = kt , as [ Ot ] = rt , as [ Lt ] = ct , as [ jt ] = lt , as [ Ht ] = dt , as [ qt ] = pt , as [ Vt ] = ut , as [ zt ] = mt } } else t . $a = bt ; i && ( k ( n ) && ( WebPApplyAlphaMultiply = yt , as [ Wt ] = ct , as [ Gt ] = dt , as [ Kt ] = pt , as [ Yt ] = ut ) , t . zb = n == Vt || n == Yt ? Mt : a ? St : $t ) } if ( a && ! ns ) { for ( e = 0 ; 256 > e ; ++ e ) Zi [ e ] = 89858 * ( e - 128 ) + Yi >> Ai , Qi [ e ] = - 22014 * ( e - 128 ) + Yi , Ji [ e ] = - 45773 * ( e - 128 ) , Xi [ e ] = 113618 * ( e - 128 ) + Yi >> Ai ; for ( e = Ei ; e < Ti ; ++ e ) t = 76283 * ( e - 16 ) + Yi >> Ai , es [ e - Ei ] = _e ( t , 255 ) , ts [ e - Ei ] = _e ( t + 8 >> 4 , 15 ) ; ns = 1 } return 1 } function It ( e ) { var t = e . ka , n = e . m , a = e . h ; return u ( ! ( 1 & e . w ) ) , 0 >= n || 0 >= a ? 0 : ( n = t . $a ( e , t ) , t . ec += n , t . zb && t . zb ( e , t ) , 1 ) } function At ( e ) { e = e . ka , e . memory = "" , e . memory = h } function Et ( e , t ) { return e [ t + 0 ] | e [ t + 1 ] << 8 | e [ t + 2 ] << 16 } function Tt ( e , t ) { return ( Et ( e , t ) | e [ t + 3 ] << 24 ) >>> 0 } function Dt ( t , n , a , i , s , o , r ) { var c = 0 , d = [ 0 ] , p = "VP8StatusCode" , m = e ( mn ) ; if ( t == h || a [ 0 ] < jn ) return ln ; m . data = t , m . b = [ n [ 0 ] ] , m . e = [ a [ 0 ] ] , m . na = [ m . na ] ; e : { if ( c = m . na , u ( t != h ) , u ( a != h ) , u ( c != h ) , c [ 0 ] = 0 , a [ 0 ] >= jn && ! l ( t , n [ 0 ] , "RIFF" , On ) ) { if ( l ( t , n [ 0 ] + 8 , "WEBP" , On ) ) { p = an ; break e } var v = Tt ( t , n [ 0 ] + On ) ; if ( v < On + Ln ) { p = an ; break e } c [ 0 ] = v , n [ 0 ] += jn , a [ 0 ] -= jn } else c [ 0 ] = 0 ; p = en } if ( m . na = m . na [ 0 ] , p != en ) return p ; c = 0 < m . na , v = [ 0 ] ; e : if ( p = Ln + Hn , u ( t != h ) , u ( a != h ) , u ( d != h ) , d [ 0 ] = 0 , a [ 0 ] < Ln ) p = ln ; else { if ( ! l ( t , n [ 0 ] , "VP8X" , On ) ) { var b = f , k = f , $ = y ; if ( Tt ( t , n [ 0 ] + On ) != Hn ) { p = an ; break e } if ( a [ 0 ] < p ) { p = ln ; break e } if ( $ = Tt ( t , n [ 0 ] + 8 ) , b = 1 + Et ( t , n [ 0 ] + 12 ) , k = 1 + Et ( t , n [ 0 ] + 15 ) , b * k >= Vn ) { p = an ; break e } v != h && ( v [ 0 ] = $ ) , i != h && ( i [ 0 ] = b ) , s != h && ( s [ 0 ] = k ) , n [ 0 ] += p , a [ 0 ] -= p , d [ 0 ] = 1 } p = en } if ( p != en ) return p ; if ( ! c && d [ 0 ] ) return an ; if ( o != h && ( o [ 0 ] = ! ! ( v [ 0 ] & qn ) ) , d && r == h ) return en ; if ( a < On ) return ln ; if ( c && d [ 0 ] || ! c && ! d [ 0 ] && ! l ( t , n [ 0 ] , "ALPH" , On ) ) { m . $ = [ m . $ ] , m . G = [ m . G ] , m . pa = [ m . pa ] ; e : { var d = m . na , c = m . $ , v = m . G , p = m . pa , b = _ , k = 0 , $ = w , C = On + Ln + Hn ; for ( u ( t != h ) , u ( a != h ) , b = t , k = n [ 0 ] , $ = a [ 0 ] , u ( c != h ) , u ( p != h ) , c [ 0 ] = h , v [ 0 ] = h , p [ 0 ] = 0 ; ; ) { var S = y , M = y ; if ( n [ 0 ] = k , a [ 0 ] = $ , $ < Ln ) { p = ln ; break e } if ( S = Tt ( b , k + On ) , M = Ln + S + 1 & - 2 , C += M , 0 < d && C > d ) { p = an ; break e } if ( $ < M ) { p = ln ; break e } if ( l ( b , k , "ALPH" , On ) ) { if ( ! l ( b , k , "VP8 " , On ) || ! l ( b , "VP8L" , On ) ) { p = en ; break e } } else c [ 0 ] = b , v [ 0 ] = k + Ln , p [ 0 ] = S ; k += M , $ -= M } p = g } if ( m . $ = m . $ [ 0 ] , m . G = m . G [ 0 ] , m . pa = m . pa [ 0 ] , p != en ) return p } m . ta = [ m . ta ] , m . ia = [ m . ia ] ; e : if ( d = m . na , c = m . ta , v = m . ia , k = ! l ( t , n [ 0 ] , "VP8 " , On ) , p = ! l ( t , n [ 0 ] , "VP8L" , On ) , b = On + Ln , u ( t != h ) , u ( a != h ) , u ( c != h ) , u ( v != h ) , a [ 0 ] < Ln ) p = ln ; else { if ( k || p ) { if ( k = Tt ( t , n [ 0 ] + On ) , d >= b && k > d - b ) { p = an ; break e } c [ 0 ] = k , n [ 0 ] += Ln , a [ 0 ] -= Ln , v [ 0 ] = p } else v [ 0 ] = 1 <= a && t [ n + 0 ] == yn , c [ 0 ] = a [ 0 ] ; p = en } if ( m . ta = m . ta [ 0 ] , m . ia = m . ia [ 0 ] , p != en ) return p ; if ( m . ta > zn ) return an ; if ( m . ia ) { if ( a [ 0 ] < kn ) return ln ; d = n [ 0 ] , c = a [ 0 ] , i = i ? i [ 0 ] : h , s = s ? s [ 0 ] : h , v = o ? o [ 0 ] : h , t == h || c < kn ? t = 0 : ( p = [ f ] , b = [ f ] , k = [ f ] , $ = e ( hn ) , I ( $ , t , d , c ) , Ve ( $ , p , b , k ) ? ( i != h && ( i [ 0 ] = p [ 0 ] ) , s != h && ( s [ 0 ] = b [ 0 ] ) , v != h && ( v [ 0 ] = k [ 0 ] ) , t = 1 ) : t = 0 ) } else { if ( a < vn ) return ln ; d = n [ 0 ] , c = a [ 0 ] , i = i ? i [ 0 ] : h , s = s ? s [ 0 ] : h , ! ( t == h || c < vn ) && 3 <= c - 3 && 157 == t [ d + 3 + 0 ] && 1 == t [ d + 3 + 1 ] && 42 == t [ d + 3 + 2 ] ? ( c = t [ d + 0 ] | t [ d + 1 ] << 8 | t [ d + 2 ] << 16 , v = 16383 & ( t [ d + 7 ] << 8 | t [ d + 6 ] ) , t = 16383 & ( t [ d + 9 ] << 8 | t [ d + 8 ] ) , ! ( ! ( 1 & c ) + 0 ) || 3 < ( c >> 1 & 7 ) || ! ( c >> 4 & 1 ) || c >> 5 >= m . ta ? t = 0 : ( i && ( i [ 0 ] = v ) , s && ( s [ 0 ] = t ) , t = 1 ) ) : t = 0 } return t ? ( o != h && ( o [ 0 ] |= m . $ != h ) , r != h && ( r [ 0 ] = m , r [ 0 ] . offset = n [ 0 ] - r [ 0 ] . b , u ( n [ 0 ] - r [ 0 ] . b < zn ) , u ( r [ 0 ] . offset == r [ 0 ] . e - a [ 0 ] ) ) , en ) : an } function Pt ( e ) { return u ( e != h ) , Dt ( e [ 0 ] . data , e [ 0 ] . b , e [ 0 ] . e , h , h , h , e ) } function Ft ( t , n , a , i ) { var s = "VP8StatusCode" , o = e ( pn ) , r = e ( mn ) ; if ( r . data = t , r . b = n , r . e = a , r . b = [ r . b ] , r . e = [ r . e ] , r = [ r ] , s = Pt ( r ) , s != en ) return s ; if ( r = r [ 0 ] , r . b = r . b [ 0 ] , r . e = r . e [ 0 ] , u ( i != h ) , ye ( Ut ) , o . data = r . data , o . b = n + r . offset , o . e = r . e - r . offset , o . put = It , o . Mb = xt , o . Pb = At , o . ka = i , r . ia ) { if ( t = Qe ( ) , t == h ) return tn ; it ( t , o ) ? ( s = L (
var o ; try { o = t . get ( i . $normalize ( s ) + "Directive" ) } catch ( r ) { throw new Error ( s + " could not be found. The name should appear as it exists in the markup, not camelCased as it would appear in the directive declaration, e.g. directive-name not directiveName." ) } var l = o [ 0 ] ; if ( l . scope !== ! 0 && l . scope ) throw new Error ( "Cannot use a directive with an isolated scope. The scope must be either true or falsy (e.g. false/null/undefined). Occurred for directive " + s + "." ) ; if ( l . restrict . indexOf ( "A" ) < 0 ) throw new Error ( 'Directives must be usable as attributes. Add "A" to the restrict option (or remove the option entirely). Occurred for directive ' + s + "." ) ; n . directiveData && ( n . directiveData = angular . fromJson ( n . directiveData ) ) ; var c = e ( "<div " + s + "></div>" ) ( n ) ; a . append ( c ) } ) } } } ] ) . directive ( "toasterContainer" , [ "$parse" , "$rootScope" , "$interval" , "$sce" , "toasterConfig" , "toaster" , "toasterEventRegistry" , function ( e , t , n , a , i , s , o ) { return { replace : ! 0 , restrict : "EA" , scope : ! 0 , link : function ( t , r , l ) { function c ( e , a ) { e . timeoutPromise = n ( function ( ) { t . removeToast ( e . toastId ) } , a , 1 ) } function d ( n , i ) { if ( n . type = g [ "icon-classes" ] [ n . type ] , n . type || ( n . type = g [ "icon-class" ] ) , g [ "prevent-duplicates" ] === ! 0 && t . toasters . length ) { if ( t . toasters [ t . toasters . length - 1 ] . body === n . body ) return ; var s , o , r = ! 1 ; for ( s = 0 , o = t . toasters . length ; s < o ; s ++ ) if ( t . toasters [ s ] . toastId === i ) { r = ! 0 ; break } if ( r ) return } var l = g [ "close-button" ] ; if ( "boolean" == typeof n . showCloseButton ) ; else if ( "boolean" == typeof l ) n . showCloseButton = l ; else if ( "object" == typeof l ) { var c = l [ n . type ] ; "undefined" != typeof c && null !== c && ( n . showCloseButton = c ) } else n . showCloseButton = ! 1 ; switch ( n . showCloseButton && ( n . closeHtml = a . trustAsHtml ( n . closeHtml || t . config . closeHtml ) ) , n . bodyOutputType = n . bodyOutputType || g [ "body-output-type" ] , n . bodyOutputType ) { case "trustedHtml" : n . html = a . trustAsHtml ( n . body ) ; break ; case "template" : n . bodyTemplate = n . body || g [ "body-template" ] ; break ; case "templateWithData" : var d = e ( n . body || g [ "body-template" ] ) , p = d ( t ) ; n . bodyTemplate = p . template , n . data = p . data ; break ; case "directive" : n . html = n . body } t . configureTimer ( n ) , g [ "newest-on-top" ] === ! 0 ? ( t . toasters . unshift ( n ) , g . limit > 0 && t . toasters . length > g . limit && t . toasters . pop ( ) ) : ( t . toasters . push ( n ) , g . limit > 0 && t . toasters . length > g . limit && t . toasters . shift ( ) ) , angular . isFunction ( n . onShowCallback ) && n . onShowCallback ( ) } function p ( e ) { var a = t . toasters [ e ] ; a . timeoutPromise && n . cancel ( a . timeoutPromise ) , t . toasters . splice ( e , 1 ) , angular . isFunction ( a . onHideCallback ) && a . onHideCallback ( ) } function u ( e ) { for ( var n = t . toasters . length - 1 ; n >= 0 ; n -- ) m ( e ) ? p ( n ) : t . toasters [ n ] . toastId == e && p ( n ) } function m ( e ) { return angular . isUndefined ( e ) || null === e } var g ; g = angular . extend ( { } , i , t . $eval ( l . toasterOptions ) ) , t . config = { toasterId : g [ "toaster-id" ] , position : g [ "position-class" ] , title : g [ "title-class" ] , message : g [ "message-class" ] , tap : g [ "tap-to-dismiss" ] , closeButton : g [ "close-button" ] , closeHtml : g [ "close-html" ] , animation : g [ "animation-class" ] , mouseoverTimer : g [ "mouseover-timer-stop" ] } , t . $on ( "$destroy" , function ( ) { o . unsubscribeToNewToastEvent ( t . _onNewToast ) , o . unsubscribeToClearToastsEvent ( t . _onClearToasts ) } ) , t . configureTimer = function ( e ) { var t = angular . isNumber ( e . timeout ) ? e . timeout : g [ "time-out" ] ; "object" == typeof t && ( t = t [ e . type ] ) , t > 0 && c ( e , t ) } , t . removeToast = function ( e ) { var n , a ; for ( n = 0 , a = t . toasters . length ; n < a ; n ++ ) if ( t . toasters [ n ] . toastId === e ) { p ( n ) ; break } } , t . toasters = [ ] , t . _onNewToast = function ( e , n , a ) { ( m ( t . config . toasterId ) && m ( n ) || ! m ( t . config . toasterId ) && ! m ( n ) && t . config . toasterId == n ) && d ( s . toast , a ) } , t . _onClearToasts = function ( e , n , a ) { ( "*" == n || m ( t . config . toasterId ) && m ( n ) || ! m ( t . config . toasterId ) && ! m ( n ) && t . config . toasterId == n ) && u ( a ) } , o . setup ( ) , o . subscribeToNewToastEvent ( t . _onNewToast ) , o . subscribeToClearToastsEvent ( t . _onClearToasts ) } , controller : [ "$scope" , "$element" , "$attrs" , function ( e , t , a ) { e . stopTimer = function ( t ) { e . config . mouseoverTimer === ! 0 && t . timeoutPromise && ( n . cancel ( t . timeoutPromise ) , t . timeoutPromise = null ) } , e . restartTimer = function ( t ) { e . config . mouseoverTimer === ! 0 ? t . timeoutPromise || e . configureTimer ( t ) : null === t . timeoutPromise && e . removeToast ( t . toastId ) } , e . click = function ( t , n ) { if ( e . config . tap === ! 0 || t . showCloseButton === ! 0 && n === ! 0 ) { var a = ! 0 ; t . clickHandler && ( angular . isFunction ( t . clickHandler ) ? a = t . clickH
type : "IDB_CREATE_TIMEOUT" } ) } , 3e3 ) , t . onsuccess = function ( e ) { s = ! 0 ; var a = t . result ; a . onerror = function ( e ) { h = ! 1 , console . error ( "Error creating/accessing IndexedDB database" , e ) , n . reject ( e ) } , n . resolve ( a ) } , t . onerror = function ( e ) { s = ! 0 , h = ! 1 , console . error ( "Error creating/accessing IndexedDB database" , e ) , n . reject ( e ) } , t . onupgradeneeded = function ( e ) { s = ! 0 , console . warn ( "performing idb upgrade from" , e . oldVersion , "to" , e . newVersion ) ; var t = e . target . result ; 1 == e . oldVersion && t . deleteObjectStore ( m ) , a ( t ) } , p = n . promise } function s ( t , n ) { return i ( ) . then ( function ( a ) { if ( ! f ) return o ( a , t , n ) ; n instanceof Blob || ( n = blobConstruct ( [ n ] ) ) ; try { var i = a . transaction ( [ m ] , IDBTransaction . READ _WRITE || "readwrite" ) . objectStore ( m ) , s = i . put ( n , t ) } catch ( r ) { return f ? ( f = ! 1 , o ( a , t , n ) ) : ( h = ! 1 , e . reject ( r ) ) } var l = e . defer ( ) ; return s . onsuccess = function ( e ) { l . resolve ( n ) } , s . onerror = function ( e ) { l . reject ( e ) } , l . promise } ) } function o ( t , n , a ) { if ( l ( a ) > 10485760 ) return e . reject ( ) ; if ( ! ( a instanceof Blob ) ) { var i = blobSafeMimeType ( a . type || "image/jpeg" ) , s = "data:" + i + ";base64," + bytesToBase64 ( a ) ; return r ( t , n , s ) . then ( function ( ) { return a } ) } try { var o = new FileReader } catch ( c ) { return h = ! 1 , e . reject ( ) } var d = e . defer ( ) ; o . onloadend = function ( ) { r ( t , n , o . result ) . then ( function ( ) { d . resolve ( a ) } , function ( e ) { d . reject ( e ) } ) } , o . onerror = function ( e ) { d . reject ( e ) } ; try { o . readAsDataURL ( a ) } catch ( c ) { return h = ! 1 , e . reject ( ) } return d . promise } function r ( t , n , a ) { try { var i = t . transaction ( [ m ] , IDBTransaction . READ _WRITE || "readwrite" ) . objectStore ( m ) , s = i . put ( a , n ) } catch ( o ) { return h = ! 1 , e . reject ( o ) } var r = e . defer ( ) ; return s . onsuccess = function ( e ) { r . resolve ( ) } , s . onerror = function ( e ) { r . reject ( e ) } , r . promise } function l ( e ) { return e . size || e . byteLength || e . length } function c ( t ) { return i ( ) . then ( function ( n ) { var a = e . defer ( ) , i = n . transaction ( [ m ] , IDBTransaction . READ || "readonly" ) . objectStore ( m ) , s = i . get ( t ) ; return s . onsuccess = function ( e ) { var t = e . target . result ; void 0 === t ? a . reject ( ) : "string" == typeof t && "data:" === t . substr ( 0 , 5 ) ? a . resolve ( dataUrlToBlob ( t ) ) : a . resolve ( t ) } , s . onerror = function ( e ) { a . reject ( e ) } , a . promise } ) } function d ( t , a ) { var i = n . getFakeFileWriter ( a , function ( e ) { s ( t , e ) } ) ; return e . when ( i ) } t . indexedDB = t . indexedDB || t . webkitIndexedDB || t . mozIndexedDB || t . OIndexedDB || t . msIndexedDB , t . IDBTransaction = t . IDBTransaction || t . webkitIDBTransaction || t . OIDBTransaction || t . msIDBTransaction ; var p , u = "cachedFiles" , m = "files" , g = 2 , h = void 0 !== t . indexedDB && void 0 !== t . IDBTransaction ; h && navigator . userAgent . indexOf ( "Safari" ) != - 1 && navigator . userAgent . indexOf ( "Chrome" ) == - 1 && navigator . userAgent . match ( /Version\/[678]/ ) && ( h = ! 1 ) ; var f = h || ! 1 ; return i ( ) , { name : "IndexedDB" , isAvailable : a , saveFile : s , getFile : c , getFileWriter : d } } ] ) . service ( "TmpfsFileStorage" , [ "$q" , "$window" , "FileManager" , function ( e , t , n ) { function a ( ) { if ( l ) return l ; if ( ! t . requestFileSystem ) return l = e . reject ( { type : "FS_BROWSER_UNSUPPORTED" , description : "requestFileSystem not present" } ) ; var n = e . defer ( ) ; return t . requestFileSystem ( t . TEMPORARY , 524288e3 , function ( e ) { cachedFs = e , n . resolve ( ) } , function ( e ) { c = ! 1 , n . reject ( e ) } ) , l = n . promise } function i ( ) { return Config . allow _tmpfs && c } function s ( t , n ) { return n = n || 1 , a ( ) . then ( function ( ) { var a = e . defer ( ) ; return cachedFs . root . getFile ( t , { create : ! 1 } , function ( e ) { e . file ( function ( t ) { t . size >= n ? a . resolve ( e ) : a . reject ( new Error ( "FILE_NOT_FOUND" ) ) } , function ( e ) { console . log ( dT ( ) , "error" , e ) , a . reject ( e ) } ) } , function ( ) { a . reject ( new Error ( "FILE_NOT_FOUND" ) ) } ) , a . promise } ) } function o ( e , t ) { return r ( e ) . then ( function ( e ) { return n . write ( e , t ) . then ( function ( ) { return e . finalize ( ) } ) } ) } function r ( t ) { return a ( ) . then ( function ( ) { var a = e . defer ( ) ; return cachedFs . root . getFile ( t , { create : ! 0 } , function ( e ) { n . getFileWriter ( e ) . then ( function ( t ) { t . finalize = function ( ) { return e } , a . resolve ( t ) } , function ( e ) { c = ! 1 , a . reject ( e ) } ) } , function ( e ) { c = ! 1 , a . reject ( e ) } ) , a . promise } ) } t . requestFileSystem = t . requestFileSystem || t . webkitRequestFileSystem ; var l , c = void 0 !== t . requestFileSystem ; return a ( ) , { name : "TmpFS" , isAvailable : i , saveFile : o , getFile : s , getFileWriter : r } } ] ) . service ( "MemoryFileStorage" , [ "$q" , "FileManager" , function ( e , t ) { function n ( ) { return ! 0 } function a ( t , n ) { return o [ t ] ? e . when ( o [ t ] ) : e . reject ( new Error ( "FILE_NOT_FOUND" ) ) } function i ( t , n ) { return e . when ( o [ t ] = n ) } function s ( n , a ) { var s = t . getFakeFi
! 1 ; if ( "server_DH_params_fail" == a . _ ) { var i = sha1BytesSync ( e . newNonce ) . slice ( - 16 ) ; return bytesCmp ( i , a . new _nonce _hash ) ? ( t . reject ( new Error ( "[MT] server_DH_params_fail" ) ) , ! 1 ) : ( t . reject ( new Error ( "[MT] server_DH_params_fail new_nonce_hash mismatch" ) ) , ! 1 ) } try { p ( e , a . encrypted _answer ) } catch ( s ) { return t . reject ( s ) , ! 1 } m ( e ) } , function ( e ) { t . reject ( e ) } ) } function p ( e , t ) { e . localTime = tsNow ( ) , e . tmpAesKey = sha1BytesSync ( e . newNonce . concat ( e . serverNonce ) ) . concat ( sha1BytesSync ( e . serverNonce . concat ( e . newNonce ) ) . slice ( 0 , 12 ) ) , e . tmpAesIv = sha1BytesSync ( e . serverNonce . concat ( e . newNonce ) ) . slice ( 12 ) . concat ( sha1BytesSync ( [ ] . concat ( e . newNonce , e . newNonce ) ) , e . newNonce . slice ( 0 , 4 ) ) ; var n = aesDecryptSync ( t , e . tmpAesKey , e . tmpAesIv ) , i = n . slice ( 0 , 20 ) , s = n . slice ( 20 ) , o = bytesToArrayBuffer ( s ) , r = new TLDeserialization ( o , { mtproto : ! 0 } ) , l = r . fetchObject ( "Server_DH_inner_data" ) ; if ( "server_DH_inner_data" != l . _ ) throw new Error ( "[MT] server_DH_inner_data response invalid: " + constructor ) ; if ( ! bytesCmp ( e . nonce , l . nonce ) ) throw new Error ( "[MT] server_DH_inner_data nonce mismatch" ) ; if ( ! bytesCmp ( e . serverNonce , l . server _nonce ) ) throw new Error ( "[MT] server_DH_inner_data serverNonce mismatch" ) ; console . log ( dT ( ) , "Done decrypting answer" ) , e . g = l . g , e . dhPrime = l . dh _prime , e . gA = l . g _a , e . serverTime = l . server _time , e . retry = 0 , u ( e . g , e . dhPrime , e . gA ) ; var c = r . getOffset ( ) ; if ( ! bytesCmp ( i , sha1BytesSync ( s . slice ( 0 , c ) ) ) ) throw new Error ( "[MT] server_DH_inner_data SHA1-hash mismatch" ) ; a . applyServerTime ( e . serverTime , e . localTime ) } function u ( e , t , n ) { console . log ( dT ( ) , "Verifying DH params" ) ; var a = bytesToHex ( t ) ; if ( 3 != e || "c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b" !== a ) throw new Error ( "[MT] DH params are not verified: unknown dhPrime" ) ; console . log ( dT ( ) , "dhPrime cmp OK" ) ; var i = new BigInteger ( bytesToHex ( n ) , 16 ) , s = new BigInteger ( a , 16 ) ; if ( i . compareTo ( BigInteger . ONE ) <= 0 ) throw new Error ( "[MT] DH params are not verified: gA <= 1" ) ; if ( i . compareTo ( s . subtract ( BigInteger . ONE ) ) >= 0 ) throw new Error ( "[MT] DH params are not verified: gA >= dhPrime - 1" ) ; console . log ( dT ( ) , "1 < gA < dhPrime-1 OK" ) ; var o = new BigInteger ( null ) ; o . fromInt ( 2 ) ; var r = o . pow ( 1984 ) ; if ( i . compareTo ( r ) < 0 ) throw new Error ( "[MT] DH params are not verified: gA < 2^{2048-64}" ) ; if ( i . compareTo ( s . subtract ( r ) ) >= 0 ) throw new Error ( "[MT] DH params are not verified: gA > dhPrime - 2^{2048-64}" ) ; return console . log ( dT ( ) , "2^{2048-64} < gA < dhPrime-2^{2048-64} OK" ) , ! 0 } function m ( e ) { var t = e . deferred , a = bytesFromHex ( e . g . toString ( 16 ) ) ; e . b = new Array ( 256 ) , n . nextBytes ( e . b ) , i . modPow ( a , e . b , e . dhPrime ) . then ( function ( n ) { var a = new TLSerialization ( { mtproto : ! 0 } ) ; a . storeObject ( { _ : "client_DH_inner_data" , nonce : e . nonce , server _nonce : e . serverNonce , retry _id : [ 0 , e . retry ++ ] , g _b : n } , "Client_DH_Inner_Data" ) ; var s = sha1BytesSync ( a . getBuffer ( ) ) . concat ( a . getBytes ( ) ) , o = aesEncryptSync ( s , e . tmpAesKey , e . tmpAesIv ) , r = new TLSerialization ( { mtproto : ! 0 } ) ; r . storeMethod ( "set_client_DH_params" , { nonce : e . nonce , server _nonce : e . serverNonce , encrypted _data : o } ) , console . log ( dT ( ) , "Send set_client_DH_params" ) , l ( e . dcID , r . getBuffer ( ) ) . then ( function ( n ) { var a = n . fetchObject ( "Set_client_DH_params_answer" ) ; return "dh_gen_ok" != a . _ && "dh_gen_retry" != a . _ && "dh_gen_fail" != a . _ ? ( t . reject ( new Error ( "[MT] Set_client_DH_params_answer response invalid: " + a . _ ) ) , ! 1 ) : bytesCmp ( e . nonce , a . nonce ) ? bytesCmp ( e . serverNonce , a . server _nonce ) ? void i . modPow ( e . gA , e . b , e . dhPrime ) . then ( function ( n ) { var i = sha1BytesSync ( n ) , s = i . slice ( 0 , 8 ) , o = i . slice ( - 8 ) ; switch ( console . log ( dT ( ) , "Got Set_client_DH_params_answer" , a . _ ) , a . _ ) { case "dh_gen_ok" : var r = sha1BytesSync ( e . newNonce . concat ( [ 1 ] , s ) ) . slice ( - 16 ) ; if ( ! bytesCmp ( r , a . new _nonce _hash1 ) ) return t . reject ( new Error ( "[MT] Set_client_DH_params_answer new_nonce_hash1 mismatch" ) ) , ! 1 ; var l = bytesXor ( e . n
} function u ( ) { _ && ! y && ( console . warn ( "clear master instance" ) , o . remove ( "xt_instance" ) ) } function m ( ) { if ( _ || y ) return ! 1 ; console . log ( dT ( ) , "deactivate" ) , v = ! 1 , y = ! 0 , u ( ) , s . dismissAll ( ) , document . title = e ( "inactive_tab_title_raw" ) ; var a = n ( "<ng-include src=\"'partials/desktop/inactive.html'\"></ng-include>" ) , i = t . $new ( ! 0 ) ; i . close = function ( ) { r . close ( ) } , i . reload = function ( ) { r . reload ( ) } , a ( i , function ( e ) { $ ( ".page_wrap" ) . hide ( ) , $ ( e ) . appendTo ( $ ( "body" ) ) } ) , t . idle . deactivated = ! 0 } function g ( ) { if ( y ) return ! 1 ; var e = tsNow ( ) , n = t . idle && t . idle . isIDLE , i = { id : h , idle : n , time : e } ; o . get ( "xt_instance" ) . then ( function ( t ) { ! n || ! t || t . id == h || t . time < e - 2e4 ? ( o . set ( { xt _instance : i } ) , _ || ( d . startAll ( ) , b ? console . warn ( dT ( ) , "now master instance" , i ) : b = ! 0 , _ = ! 0 ) , v && ( a . cancel ( v ) , v = ! 1 ) ) : _ && ( d . stopAll ( ) , console . warn ( dT ( ) , "now idle instance" , i ) , v || ( v = a ( m , 3e4 ) ) , _ = ! 1 ) } ) } var h = nextRandomInt ( 4294967295 ) , f = ! 1 , _ = ! 1 , v = ! 1 , y = ! 1 , b = ! 1 ; return { start : p } } ] ) ; var extraModules = [ ] ; Config . Modes . animations && extraModules . push ( "ngAnimate" ) , angular . module ( "myApp" , [ "ngRoute" , "ngSanitize" , "ngTouch" , "ui.bootstrap" , "mediaPlayer" , "toaster" , "izhukov.utils" , "izhukov.mtproto" , "izhukov.mtproto.wrapper" , "myApp.filters" , "myApp.services" , "myApp.templates" , "myApp.directives" , "myApp.controllers" ] . concat ( extraModules ) ) . config ( [ "$locationProvider" , "$routeProvider" , "$compileProvider" , "StorageProvider" , function ( e , t , n , a ) { n . imgSrcSanitizationWhitelist ( /^\s*(https?|ftp|file|blob|filesystem|chrome-extension|app):|data:image\// ) , n . aHrefSanitizationWhitelist ( /^\s*(https?|ftp|file|tg|mailto|blob|filesystem|chrome-extension|app):|data:/ ) , n . debugInfoEnabled ( ! 1 ) , Config . Modes . test && a . setPrefix ( "t_" ) , t . when ( "/" , { template : "" , controller : "AppWelcomeController" } ) , t . when ( "/login" , { templateUrl : templateUrl ( "login" ) , controller : "AppLoginController" } ) , t . when ( "/im" , { templateUrl : templateUrl ( "im" ) , controller : "AppIMController" , reloadOnSearch : ! 1 } ) , t . otherwise ( { redirectTo : "/" } ) } ] ) , angular . module ( "myApp.services" , [ "myApp.i18n" , "izhukov.utils" ] ) . service ( "AppUsersManager" , [ "$rootScope" , "$modal" , "$modalStack" , "$filter" , "$q" , "qSync" , "MtpApiManager" , "RichTextProcessor" , "ServerTimeManager" , "Storage" , "_" , function ( e , t , n , a , i , s , o , r , l , c , d ) { function p ( ) { return N ? N : N = o . invokeApi ( "contacts.getContacts" , { hash : "" } ) . then ( function ( e ) { var t , n ; B = [ ] , h ( e . users ) ; for ( var n = 0 ; n < e . contacts . length ; n ++ ) t = e . contacts [ n ] . user _id , B . push ( t ) , SearchIndexManager . indexObject ( t , u ( t ) , q ) ; return B } ) } function u ( e ) { var t = O [ e ] ; return ! ! t && ( t . first _name || "" ) + " " + ( t . last _name || "" ) + " " + ( t . phone || "" ) + " " + ( t . username || "" ) } function m ( e ) { return p ( ) . then ( function ( t ) { if ( angular . isString ( e ) && e . length ) { for ( var n = SearchIndexManager . search ( e , q ) , a = [ ] , i = 0 ; i < t . length ; i ++ ) n [ t [ i ] ] && a . push ( t [ i ] ) ; t = a } return t } ) } function g ( e ) { return L [ e ] || 0 } function h ( e ) { angular . forEach ( e , f ) } function f ( t , n ) { if ( angular . isObject ( t ) && ! ( n && angular . isObject ( O [ t . id ] ) && O [ t . id ] . first _name ) ) { var i = t . id , s = O [ i ] ; if ( void 0 === t . pFlags && ( t . pFlags = { } ) , ! t . pFlags . min || void 0 === s ) { if ( t . phone && ( t . rPhone = a ( "phoneNumber" ) ( t . phone ) ) , t . num = Math . abs ( i ) % 8 + 1 , t . first _name ? ( t . rFirstName = r . wrapRichText ( t . first _name , { noLinks : ! 0 , noLinebreaks : ! 0 } ) , t . rFullName = t . last _name ? r . wrapRichText ( t . first _name + " " + ( t . last _name || "" ) , { noLinks : ! 0 , noLinebreaks : ! 0 } ) : t . rFirstName ) : ( t . rFirstName = r . wrapRichText ( t . last _name , { noLinks : ! 0 , noLinebreaks : ! 0 } ) || t . rPhone || d ( "user_first_name_deleted" ) , t . rFullName = r . wrapRichText ( t . last _name , { noLinks : ! 0 , noLinebreaks : ! 0 } ) || t . rPhone || d ( "user_name_deleted" ) ) , t . username ) { var o = SearchIndexManager . cleanUsername ( t . username ) ; L [ o ] = i } t . sortName = t . pFlags . deleted ? "" : SearchIndexManager . cleanSearchText ( t . first _name + " " + ( t . last _name || "" ) ) ; var c = t . sortName . split ( " " ) , p = c . shift ( ) , u = c . pop ( ) ; t . initials = p . charAt ( 0 ) + ( u ? u . charAt ( 0 ) : p . charAt ( 1 ) ) , t . status && ( t . status . expires && ( t . status . expires -= l . serverTimeOffset ) , t . status . was _online && ( t . status . was _online -= l . serverTimeOffset ) ) , t . pFlags . bot ? t . sortStatus = - 1 : t . sortStatus = v ( t . status ) ; var s = O [ i ] ; void 0 === s ? s = O [ i ] = t : safeReplaceObject ( s , t ) , e . $broadcast ( "user_update" , i ) , void 0 !== H [ i ] && safeReplaceObject ( H [ i ] , t && t . photo && t . photo . photo _small || { empty : ! 0 } ) } } } function _ ( e , t ) { j [ e ] = t } function v ( e ) { if ( e ) { var t = e . expires || e . was _online ; if ( t )
t && f ( e , t ) } , function ( ) { f ( e ) . then ( function ( e ) { l . download ( e , t . mime _type , n ) } ) } ) } function y ( e ) { var t = g ( e ) , n = Math . min ( $ ( window ) . width ( ) - ( Config . Mobile ? 0 : 60 ) , 542 ) , a = $ ( window ) . height ( ) - ( Config . Mobile ? 92 : 150 ) , i = { placeholder : "img/placeholders/docThumbModal.gif" , width : n , height : a } ; if ( t . w && t . h ) { var s = calcImageInBox ( t . w , t . h , n , a ) ; i . width = s . w , i . height = s . h } else i . height = i . width = Math . min ( n , a ) ; return t . full = i , t . fullThumb = angular . copy ( t . thumb ) , t . fullThumb . width = i . width , t . fullThumb . height = i . height , t } function b ( e , a ) { var i = t . $new ( ! 0 ) ; return i . docID = e , i . messageID = a , n . open ( { templateUrl : templateUrl ( "video_modal" ) , windowTemplateUrl : templateUrl ( "media_modal_layout" ) , controller : "VideoModalController" , scope : i , windowClass : "video_modal_window" } ) } var w = { } , k = { } , C = $ ( window ) . width ( ) , S = $ ( window ) . height ( ) ; return { saveDoc : d , getDoc : p , hasDoc : u , wrapForHistory : g , wrapVideoForFull : y , updateDocDownloaded : h , downloadDoc : f , openDoc : _ , openVideo : b , saveDocFile : v } } ] ) . service ( "AppStickersManager" , [ "$q" , "$rootScope" , "$modal" , "_" , "FileManager" , "MtpApiManager" , "AppDocsManager" , "Storage" , "ApiUpdatesManager" , function ( e , t , n , a , i , s , o , r , l ) { function c ( ) { k || ( k = ! 0 , setTimeout ( d , 1e3 ) ) } function d ( e ) { return r . get ( "all_stickers" ) . then ( function ( t ) { var n = Config . Schema . API . layer ; return t . layer == n && void 0 !== t . emojiIndex || ( t = ! 1 ) , t && t . date > tsNow ( ! 0 ) && ! e ? ( S = t . emojiIndex , p ( t ) ) : s . invokeApi ( "messages.getAllStickers" , { hash : t && t . hash || "" } ) . then ( function ( e ) { var a = "messages.allStickersNotModified" == e . _ ; return a && ( e = t ) , e . date = tsNow ( ! 0 ) + 3600 , e . layer = n , delete e . _ , a ? ( r . set ( { all _stickers : e } ) , S = e . emojiIndex , p ( e ) ) : g ( e , t && t . fullSets ) . then ( function ( ) { return r . set ( { all _stickers : e } ) , p ( e ) } ) } ) } ) } function p ( e ) { if ( $ !== e . hash ) { $ = e . hash ; var t , n , i , s , r , l , c , d ; for ( C = [ ] , i = e . sets . length , t = 0 ; t < i ; t ++ ) if ( l = e . sets [ t ] , ! l . pFlags . disabled ) { for ( d = e . fullSets [ l . id ] . documents , s = d . length , c = [ ] , n = 0 ; n < s ; n ++ ) r = d [ n ] , o . saveDoc ( r ) , c . push ( r . id ) ; l . docIDs = c , C . push ( l ) } } return h ( ) . then ( function ( e ) { var t = C ; if ( e . length ) { t = C . slice ( ) ; var n , i , s = [ ] ; for ( n = 0 , i = e . length ; n < i ; n ++ ) s . push ( e [ n ] . id ) ; t . unshift ( { id : 0 , title : a ( "im_stickers_tab_recent_raw" ) , short _name : "" , docIDs : s } ) } return t } ) } function u ( e ) { angular . forEach ( e . packs , function ( e ) { for ( var t = e . emoticon , n = ! 1 ; t . length && ( n = EmojiHelper . emojiMap [ t ] , void 0 === n ) ; ) t = t . substr ( 0 , - 1 ) ; if ( void 0 !== n ) { var a = S [ n ] ; void 0 === a && ( S [ n ] = a = [ ] ) , angular . forEach ( e . documents , function ( e ) { a . indexOf ( e ) === - 1 && a . push ( e ) } ) } } ) } function m ( e ) { return h ( ) . then ( function ( ) { var t = S [ e ] , n = [ ] ; if ( void 0 === t ) return n ; var a = [ ] ; return angular . forEach ( C , function ( e ) { a . push ( e . id ) } ) , angular . forEach ( t , function ( e ) { var t = o . getDoc ( e ) ; if ( t && t . stickerSetInput ) { var i = t . stickerSetInput . id ; a . indexOf ( i ) != - 1 && n . push ( t ) } } ) , n . sort ( function ( e , t ) { return a . indexOf ( e . stickerSetInput . id ) - a . indexOf ( t . stickerSetInput . id ) } ) , n } ) } function g ( t , n ) { var a = [ ] , i = n || t . fullSets || { } ; return t . fullSets = { } , S = t . emojiIndex = { } , angular . forEach ( t . sets , function ( e ) { var n = i [ e . id ] ; if ( n && n . set . hash == e . hash ) t . fullSets [ e . id ] = n , u ( n ) ; else { var o = s . invokeApi ( "messages.getStickerSet" , { stickerset : { _ : "inputStickerSetID" , id : e . id , access _hash : e . access _hash } } ) . then ( function ( n ) { t . fullSets [ e . id ] = n , u ( n ) } ) ; a . push ( o ) } } ) , e . all ( a ) } function h ( ) { return r . get ( "stickers_popular" ) . then ( function ( e ) { var t , n , a , i = [ ] ; if ( e && e . length ) for ( t = 0 , n = e . length ; t < n ; t ++ ) a = e [ t ] [ 0 ] , o . hasDoc ( a ) && i . push ( { id : a , rate : e [ t ] [ 1 ] } ) ; return i } ) } function f ( e ) { h ( ) . then ( function ( t ) { for ( var n = ! 1 , a = t . length , i = [ ] , s = 0 ; s < a ; s ++ ) t [ s ] . id == e && ( n = ! 0 , t [ s ] . rate ++ ) , i . push ( [ t [ s ] . id , t [ s ] . rate ] ) ; n ? i . sort ( function ( e , t ) { return t [ 1 ] - e [ 1 ] } ) : ( i . length > 15 && ( i = i . slice ( 0 , 15 ) ) , i . push ( [ e , 1 ] ) ) , ConfigStorage . set ( { stickers _popular : i } ) } ) } function _ ( e ) { return s . invokeApi ( "messages.getStickerSet" , { stickerset : e } ) . then ( function ( e ) { for ( var t = 0 ; t < e . documents . length ; t ++ ) o . saveDoc ( e . documents [ t ] ) ; return e } ) } function v ( e , t ) { var n = t ? "messages.uninstallStickerSet" : "messages.installStickerSet" , a = { _ : "inputStickerSetID" , id : e . set . id , access _hash : e . set . access _hash } ; return s . invokeApi ( n , { stickerset : a , disabled : ! 1 } ) . then ( function ( n ) { var a ; a = t ? { _ : "updateDelStickerSet" , id : e . set . id } : { _ : "updateNewStickerSet" , stickerset : e } , l . processUpdateMessage ( { _ : "updateShort" , update : a } ) } ) } function y ( e ) { return b ( { _ : " inputStickerSetS
} } function g ( e , n ) { var s ; if ( s = e . match ( /^resolve\?domain=(.+?)(?:&(start|startgroup|post|game)=(.+))?$/ ) ) return a . resolveUsername ( s [ 1 ] ) . then ( function ( e ) { if ( e > 0 && i . isBot ( e ) && ( "startgroup" == s [ 2 ] || "game" == s [ 2 ] ) ) { var n = "startgroup" == s [ 2 ] ; return d . selectPeer ( { confirm _type : n ? "INVITE_TO_GROUP" : "INVITE_TO_GAME" , noUsers : n } ) . then ( function ( r ) { var l , c = a . getPeerID ( r ) ; if ( n ) { var d = c < 0 ? - c : 0 ; l = o . startBot ( e , d , s [ 3 ] ) } else inputGame = { _ : "inputGameShortName" , bot _id : i . getUserInput ( e ) , short _name : s [ 3 ] } , l = o . shareGame ( e , c , inputGame ) ; l . then ( function ( ) { t . $broadcast ( "history_focus" , { peerString : r } ) } ) } ) , ! 0 } var l = { peerString : a . getPeerString ( e ) } ; "start" == s [ 2 ] ? l . startParam = s [ 3 ] : "post" == s [ 2 ] && ( l . messageID = r . getFullMessageID ( parseInt ( s [ 3 ] ) , - e ) ) , t . $broadcast ( "history_focus" , l ) } ) , ! 0 ; if ( s = e . match ( /^join\?invite=(.+)$/ ) ) return y ( s [ 1 ] ) , ! 0 ; if ( s = e . match ( /^addstickers\?set=(.+)$/ ) ) return p . openStickersetLink ( s [ 1 ] ) , ! 0 ; if ( s = e . match ( /^msg_url\?url=([^&]+)(?:&text=(.*))?$/ ) ) { var e = decodeURIComponent ( s [ 1 ] ) , l = s [ 2 ] ? decodeURIComponent ( s [ 2 ] ) : "" ; return v ( e , l ) , ! 0 } if ( n && ( s = e . match ( /^unsafe_url\?url=([^&]+)/ ) ) ) { var e = decodeURIComponent ( s [ 1 ] ) ; return u . confirm ( { type : "JUMP_EXT_URL" , url : e } ) . then ( function ( ) { var t = "_blank" ; 0 !== e . search ( "https://telegram.me/" ) && 0 !== e . search ( "https://t.me/" ) || ( t = "_self" ) ; var n = window . open ( e , t ) ; try { n . opener = null } catch ( a ) { } } ) , ! 0 } if ( s = e . match ( /^search_hashtag\?hashtag=(.+?)$/ ) ) return t . $broadcast ( "dialogs_search" , { query : "#" + decodeURIComponent ( s [ 1 ] ) } ) , Config . Mobile && t . $broadcast ( "history_focus" , { peerString : "" } ) , ! 0 ; if ( n && ( s = e . match ( /^bot_command\?command=(.+?)(?:&bot=(.+))?$/ ) ) ) { var c = t . selectedPeerID , l = "/" + s [ 1 ] ; return c < 0 && s [ 2 ] && ( l += "@" + s [ 2 ] ) , o . sendText ( c , l ) , t . $broadcast ( "history_focus" , { peerString : a . getPeerString ( c ) } ) , ! 0 } return ! 1 } function h ( e , n ) { if ( console . log ( dT ( ) , "Received activity" , e , n ) , "share" == e && n . url ) v ( n . url , "" ) ; else if ( "view" == e && n . url ) { var s = n . url . match ( b ) ; s && g ( s [ 3 ] ) } else if ( "webrtc-call" == e && n . contact ) { var r = n . contact , l = [ ] ; if ( void 0 != r . tel ) for ( var c = 0 ; c < r . tel . length ; c ++ ) l . push ( r . tel [ c ] . value ) ; var p = ( r . givenName || [ ] ) . join ( " " ) , m = ( r . familyName || [ ] ) . join ( " " ) ; l . length && i . importContact ( l [ 0 ] , p , m ) . then ( function ( e ) { if ( e ) { var n = a . getPeerString ( e ) ; t . $broadcast ( "history_focus" , { peerString : n } ) } else u . show ( { error : { code : 404 , type : "USER_NOT_USING_TELEGRAM" } } ) } ) } else "share" === e && n . blobs && n . blobs . length > 0 && d . selectPeers ( { confirm _type : "EXT_SHARE_PEER" , canSend : ! 0 } ) . then ( function ( e ) { angular . forEach ( e , function ( e ) { var t = a . getPeerID ( e ) ; angular . forEach ( n . blobs , function ( e ) { o . sendFile ( t , e , { isMedia : ! 0 } ) } ) } ) , 1 == e . length && t . $broadcast ( "history_focus" , { peerString : e [ 0 ] } ) } ) } function f ( ) { w || ( w = ! 0 , window . navigator . mozSetMessageHandler && ( console . log ( dT ( ) , "Set activity message handler" ) , window . navigator . mozSetMessageHandler ( "activity" , function ( e ) { h ( e . source . name , e . source . data ) } ) ) , $ ( document ) . on ( "click" , function ( e ) { var t = e . target ; if ( t && "A" == t . tagName && ! t . onclick && ! t . onmousedown ) { var n = $ ( t ) . attr ( "href" ) || t . href || "" , a = n . match ( b ) ; if ( a && g ( a [ 3 ] , ! 0 ) ) return cancelEvent ( e ) } } ) , t . $on ( "$routeUpdate" , m ) , m ( ) ) } function _ ( e ) { var t = e . match ( b ) ; if ( t && g ( t [ 3 ] , ! 0 ) ) return ! 0 ; var n = window . open ( e , "_blank" ) ; try { n . opener = null } catch ( a ) { } return ! ! n } function v ( n , a , i ) { var s = { } ; i && ( s . shareLinkPromise = e . when ( n ) ) , d . selectPeer ( s ) . then ( function ( e ) { t . $broadcast ( "history_focus" , { peerString : e , attachment : { _ : "share_url" , url : n , text : a } } ) } ) } function y ( e ) { return l . invokeApi ( "messages.checkChatInvite" , { hash : e } ) . then ( function ( n ) { var a ; if ( "chatInviteAlready" == n . _ ) { s . saveApiChat ( n . chat ) ; var i = ! n . chat . pFlags . left || s . isChannel ( n . chat . id ) && n . chat . username ; if ( i ) return t . $broadcast ( "history_focus" , { peerString : s . getChatString ( n . chat . id ) } ) ; a = n . chat . title } else a = n . title ; u . confirm ( { type : n . pFlags . channel && ! n . pFlags . megagroup ? "JOIN_CHANNEL_BY_LINK" : "JOIN_GROUP_BY_LINK" , title : a } ) . then ( function ( ) { return l . invokeApi ( "messages.importChatInvite" , { hash : e } ) . then ( function ( e ) { if ( c . processUpdateMessage ( e ) , e . chats && 1 == e . chats . length ) t . $broadcast ( "history_focus" , { peerString : s . getChatString ( e . chats [ 0 ] . id ) } ) ; else if ( e . updates && e . updates . length ) for ( var n , a = 0 , i = e . updates . length ; a < i ; a ++ ) if ( n = e . updates [ a ] , "updateNewMessage" == n . _ ) { t . $broadcast ( "history_focus" , { p
d . flushHistory ( e . curDialog . peerID , ! 0 ) . then ( function ( ) { B ( ) } ) } ) } function O ( t ) { var n = [ ] ; if ( t ? n . push ( t ) : e . selectedCount > 0 && angular . forEach ( e . selectedMsgs , function ( e , t ) { n . push ( t ) } ) , n . length ) { for ( var a = e . curDialog . peerID , i = a > 0 , s = p . isChannel ( a ) , o = p . isBroadcast ( a ) , r = p . isMegagroup ( a ) , l = ! s && ! i , c = ! s , u = 0 ; c && u < n . length ; u ++ ) { var m = n [ u ] ; d . canRevokeMessage ( m ) || ( c = ! 1 ) } _ . confirm ( { type : "MESSAGES_DELETE" , count : n . length , revocable : c , isUser : i , peerID : a , isChannel : o , isSupergroup : r , isUsualGroup : l } , { } , { revoke : ! 1 } ) . then ( function ( e ) { d . deleteMessages ( n , e . revoke ) . then ( function ( ) { B ( ) } ) } ) } } function L ( e ) { m . selectPeers ( { canSend : ! 0 , confirm _type : "FORWARD_PEER" , shareLinkPromise : d . getMessageShareLink ( e ) } ) . then ( function ( t ) { angular . forEach ( t , function ( t ) { var n = p . getPeerID ( t ) ; d . forwardMessages ( n , [ e ] ) } ) ; var n = s . pop ( { type : "info" , body : o ( "confirm_modal_forward_to_peer_success" ) , bodyOutputType : "trustedHtml" , clickHandler : function ( ) { i . $broadcast ( "history_focus" , { peerString : t [ 0 ] } ) , s . clear ( n ) } , showCloseButton : ! 1 } ) } ) } function j ( t ) { var n = [ ] ; t ? n . push ( t ) : e . selectedCount > 0 && angular . forEach ( e . selectedMsgs , function ( e , t ) { n . push ( t ) } ) , n . length && m . selectPeer ( { canSend : ! 0 } ) . then ( function ( e ) { B ( ) , i . $broadcast ( "history_focus" , { peerString : e , attachment : { _ : "fwd_messages" , id : n } } ) } ) } function H ( t ) { t || 1 != e . selectedCount || angular . forEach ( e . selectedMsgs , function ( e , n ) { t = n } ) , t && ( B ( ) , e . $broadcast ( "reply_selected" , t ) ) } function q ( t ) { t || 1 != e . selectedCount || angular . forEach ( e . selectedMsgs , function ( e , n ) { t = n } ) , t && ( B ( ) , e . $broadcast ( "edit_selected" , t ) ) } function V ( ) { e . historyState . selectActions ? B ( ) : ( e . historyState . selectActions = "selected" , e . $broadcast ( "ui_panel_update" ) ) } function z ( t ) { return "search" == t ? void i . $broadcast ( "history_search" , e . curDialog . peerID ) : ( e . historyFilter . mediaType = t || ! 1 , e . curDialog . messageID = ! 1 , K . messages = [ ] , K . ids = [ ] , e . state . empty = ! 0 , void A ( ) ) } function W ( ) { e . historyFilter . mediaType ? z ( ) : e . curDialog . messageID ? i . $broadcast ( "history_focus" , { peerString : e . curDialog . peer } ) : A ( ! 0 ) } e . $watchCollection ( "curDialog" , y ) , u . attach ( ) , g . start ( ) , h . start ( ) , e . peerHistories = [ ] , e . selectedMsgs = { } , e . selectedCount = 0 , e . historyState . selectActions = ! 1 , e . historyState . botActions = ! 1 , e . historyState . channelActions = ! 1 , e . historyState . canDelete = ! 1 , e . historyState . canReply = ! 1 , e . historyState . missedCount = 0 , e . historyState . skipped = ! 1 , e . state = { } , e . toggleMessage = R , e . selectedDelete = O , e . selectedForward = j , e . selectedReply = H , e . selectedEdit = q , e . selectedCancel = B , e . selectedFlush = U , e . selectInlineBot = N , e . startBot = T , e . cancelBot = D , e . joinChannel = P , e . togglePeerMuted = F , e . toggleEdit = V , e . toggleMedia = z , e . returnToRecent = W , e . $on ( "history_edit_toggle" , V ) , e . $on ( "history_edit_flush" , U ) , e . $on ( "history_media_toggle" , function ( e , t ) { z ( t ) } ) , e . $on ( "history_return_recent" , W ) ; var G , K = ! 1 , Y = ! 1 , Z = ! 1 , X = ! 1 , J = 0 , Q = 0 , ee = ! 1 , te = { photos : "inputMessagesFilterPhotos" , video : "inputMessagesFilterVideo" , documents : "inputMessagesFilterDocument" , audio : "inputMessagesFilterVoice" } , ne = 0 , ae = 0 , ie = ! 1 , se = ! 1 , oe = 0 , re = ! 1 , le = ! 1 ; e . $on ( "history_update" , angular . noop ) ; var ce = ! 1 ; e . $on ( "stateSynchronized" , function ( ) { ce && ( ce == e . curDialog . peerID && A ( ) , ce = ! 1 ) } ) , e . $on ( "reply_button_press" , function ( t , n ) { var a = e . historyState . replyKeyboard ; if ( a ) { var i = { replyToMsgID : G < 0 && a . mid } ; switch ( n . _ ) { case "keyboardButtonRequestPhone" : _ . confirm ( { type : "BOT_ACCESS_PHONE" } ) . then ( function ( ) { var e = l . getSelf ( ) ; d . sendOther ( G , { _ : "inputMediaContact" , phone _number : e . phone , first _name : e . first _name , last _name : e . last _name } , i ) } ) ; break ; case "keyboardButtonRequestGeoLocation" : _ . confirm ( { type : "BOT_ACCESS_GEO" } ) . then ( function ( ) { return v . getPosition ( ) . then ( function ( e ) { d . sendOther ( G , { _ : "inputMediaGeoPoint" , geo _point : { _ : "inputGeoPoint" , lat : e . lat , "long" : e [ "long" ] } } , i ) } , function ( e ) { _ . alert ( o ( "error_modal_bad_request_title_raw" ) , o ( "error_modal_gelocation_na_raw" ) ) } ) } ) ; break ; default : d . sendText ( G , n . text , i ) } } } ) , e . $on ( "history_reload" , function ( t , n ) { n == e . curDialog . peerID && A ( ) } ) , e . $on ( "history_forbidden" , function ( n , a ) { a == e . curDialog . peerID && t . url ( "/im" ) , k ( a ) } ) , e . $on ( "dialog_migrate" , function ( t , n ) { if ( n . migrateFrom == e . curDialog . peerID ) { var a = p . getPeerString ( n . migrateTo ) ; i . $broadcast ( "history_focus" , { peerString : a } ) } k ( n . migrateFrom ) } ) , e . $on ( "notify_settings" , funct
} ) } ) } , e . migrateToSuperGroup = function ( ) { _ . confirm ( { type : "SUPERGROUP_MIGRATE" } ) . then ( function ( ) { d . invokeApi ( "messages.migrateChat" , { chat _id : r . getChatInput ( e . chatID ) } ) . then ( v ) } ) } , e . kickFromGroup = function ( t ) { d . invokeApi ( "messages.deleteChatUser" , { chat _id : r . getChatInput ( e . chatID ) , user _id : o . getUserInput ( t ) } ) . then ( v ) } , e . flushHistory = function ( a ) { _ . confirm ( { type : a ? "HISTORY_FLUSH" : "HISTORY_FLUSH_AND_DELETE" } ) . then ( function ( ) { m . flushHistory ( - e . chatID , a ) . then ( function ( ) { a ? i . $broadcast ( "history_focus" , { peerString : e . chatFull . peerString } ) : ( t . close ( ) , n . url ( "/im" ) ) } ) } ) } , e . inviteViaLink = function ( ) { var t = i . $new ( ) ; t . chatID = e . chatID , s . open ( { templateUrl : templateUrl ( "chat_invite_link_modal" ) , controller : "ChatInviteLinkModalController" , scope : t , windowClass : "md_simple_modal_window" } ) } , e . photo = { } , e . $watch ( "photo.file" , y ) , e . deletePhoto = function ( ) { e . photo . updating = ! 0 , d . invokeApi ( "messages.editChatPhoto" , { chat _id : r . getChatInput ( e . chatID ) , photo : { _ : "inputChatPhotoEmpty" } } ) . then ( v ) [ "finally" ] ( function ( ) { e . photo . updating = ! 1 } ) } , e . editTitle = function ( ) { var t = i . $new ( ) ; t . chatID = e . chatID , s . open ( { templateUrl : templateUrl ( "chat_edit_modal" ) , controller : "ChatEditModalController" , scope : t , windowClass : "md_simple_modal_window mobile_modal" } ) } , e . hasRights = function ( t ) { return r . hasRights ( e . chatID , t ) } } ] ) . controller ( "ChannelModalController" , [ "$scope" , "$timeout" , "$rootScope" , "$modal" , "AppUsersManager" , "AppChatsManager" , "AppProfileManager" , "AppPhotosManager" , "MtpApiManager" , "MtpApiFileManager" , "NotificationsManager" , "AppMessagesManager" , "AppPeersManager" , "ApiUpdatesManager" , "ContactsSelectService" , "ErrorService" , function ( e , t , n , a , i , s , o , r , l , c , d , p , u , m , g , h ) { function f ( t ) { m . processUpdateMessage ( t ) , n . $broadcast ( "history_focus" , { peerString : e . chatFull . peerString } ) } function _ ( t ) { t && t . type && 0 === t . type . indexOf ( "image" ) && ( e . photo . updating = ! 0 , c . uploadFile ( t ) . then ( function ( t ) { return l . invokeApi ( "channels.editPhoto" , { channel : s . getChannelInput ( e . chatID ) , photo : { _ : "inputChatUploadedPhoto" , file : t } } ) . then ( f ) } ) [ "finally" ] ( function ( ) { e . photo . updating = ! 1 } ) ) } e . chatFull = s . wrapForFull ( e . chatID , { } ) , e . settings = { notifications : ! 0 } , e . isMegagroup = s . isMegagroup ( e . chatID ) , o . getChannelFull ( e . chatID , ! 0 ) . then ( function ( t ) { e . chatFull = s . wrapForFull ( e . chatID , t ) , e . $broadcast ( "ui_height" ) , d . savePeerSettings ( - e . chatID , t . notify _settings ) , d . getPeerMuted ( - e . chatID ) . then ( function ( t ) { e . settings . notifications = ! t , e . $watch ( "settings.notifications" , function ( t , n ) { return t !== n && void d . getPeerSettings ( - e . chatID ) . then ( function ( n ) { t ? n . mute _until = 0 : n . mute _until = 2e9 , d . updatePeerSettings ( - e . chatID , n ) } ) } ) } ) , e . chatFull . chat && e . chatFull . chat . pFlags . creator && e . chatFull . exported _invite && "chatInviteEmpty" == e . chatFull . exported _invite . _ && o . getChatInviteLink ( e . chatID , ! 0 ) . then ( function ( t ) { e . chatFull . exported _invite = { _ : "chatInviteExported" , link : t } } ) } ) , e . leaveChannel = function ( ) { return h . confirm ( { type : e . isMegagroup ? "MEGAGROUP_LEAVE" : "CHANNEL_LEAVE" } ) . then ( function ( ) { l . invokeApi ( "channels.leaveChannel" , { channel : s . getChannelInput ( e . chatID ) } ) . then ( f ) } ) } , e . deleteChannel = function ( ) { return h . confirm ( { type : e . isMegagroup ? "MEGAGROUP_DELETE" : "CHANNEL_DELETE" } ) . then ( function ( ) { l . invokeApi ( "channels.deleteChannel" , { channel : s . getChannelInput ( e . chatID ) } ) . then ( f ) } ) } , e . joinChannel = function ( ) { l . invokeApi ( "channels.joinChannel" , { channel : s . getChannelInput ( e . chatID ) } ) . then ( f ) } , e . inviteToChannel = function ( ) { var t = [ ] ; angular . forEach ( ( e . chatFull . participants || { } ) . participants || [ ] , function ( e ) { t . push ( e . user _id ) } ) , g . selectContacts ( { disabled : t } ) . then ( function ( t ) { var n = [ ] ; angular . forEach ( t , function ( e ) { n . push ( i . getUserInput ( e ) ) } ) , l . invokeApi ( "channels.inviteToChannel" , { channel : s . getChannelInput ( e . chatID ) , users : n } ) . then ( f ) } ) } , e . kickFromChannel = function ( t ) { l . invokeApi ( "channels.kickFromChannel" , { channel : s . getChannelInput ( e . chatID ) , user _id : i . getUserInput ( t ) , kicked : ! 0 } ) . then ( f ) } , e . shareLink = function ( t ) { var i = n . $new ( ) ; return i . chatID = e . chatID , a . open ( { templateUrl : templateUrl ( "chat_invite_link_modal" ) , controller : "ChatInviteLinkModalController" , scope : i , windowClass : "md_simple_modal_window" } ) , cancelEvent ( t ) } , e . photo = { } , e . $watch ( "photo.file" , _ ) , e . deletePhoto = function ( ) { e . photo . updating = ! 0
} ; Pe [ n ] = y , H ( y , r ) && t . $broadcast ( "history_reply_markup" , { peerID : n } ) } if ( w . savePeerSettings ( n , e . notify _settings ) , a && e . pts && o . addChannelState ( a , e . pts ) , Config . Modes . packed && ! a && e . unread _count > 0 && Ye && e . top _message > Ye && r . pFlags . unread && ! r . pFlags . out ) { var b = 16 & r . flags ? r . from _id : n ; w . getPeerMuted ( b ) . then ( function ( e ) { e || Ce ( r ) } ) } } function T ( e ) { var n = Fe . dialogs , a = 0 , s = 0 , o = 0 , d = 0 , p = 0 ; return et && ( a = et + y . serverTimeOffset , d = 65536 * et , p |= 1 ) , _ . invokeApi ( "messages.getDialogs" , { flags : p , offset _date : a , offset _id : m . getMessageLocalID ( s ) , offset _peer : c . getInputPeerByID ( o ) , limit : e } , { timeout : 300 } ) . then ( function ( e ) { a || C . setAuthorized ( ! 0 ) , r . saveApiUsers ( e . users ) , l . saveApiChats ( e . chats ) , te ( e . messages ) ; var s = ! ! a , o = ! 1 ; e . dialogs . reverse ( ) , angular . forEach ( e . dialogs , function ( e ) { E ( e ) , d && e . index > d && ( lt [ e . peerID ] = e , o = ! 0 ) , s || c . isChannel ( c . getPeerID ( e . peer ) ) || ( $e ( e . top _message ) , s = ! 0 ) } ) , e . dialogs . reverse ( ) , ( ! e . dialogs . length || ! e . count || n . length >= e . count ) && ( Qe = ! 0 ) , o && ! rt ? rt = i ( Me , 0 ) : t . $broadcast ( "dialogs_multiupdate" , { } ) } ) } function D ( ) { return 2147483392 + ( 255 & tt ++ ) } function P ( e ) { return void 0 === e && ( e = tsNow ( ! 0 ) + y . serverTimeOffset ) , 65536 * e + ( 65535 & ++ nt ) } function F ( e , t ) { var n = Fe . dialogs , a = A ( e . peerID ) [ 1 ] ; if ( void 0 !== a && n . splice ( a , 1 ) , t && ! e . pFlags . pinned && ( ! et || t < et ) ) { if ( void 0 !== a ) return ! 1 ; et = t } var i , s = e . index , o = n . length ; if ( ! o || s < n [ o - 1 ] . index ) n . push ( e ) ; else if ( s >= n [ 0 ] . index ) n . unshift ( e ) ; else for ( i = 0 ; i < o ; i ++ ) if ( s > n [ i ] . index ) { n . splice ( i , 0 , e ) ; break } } function R ( t , n , a , i ) { var s = c . isChannel ( t ) ; s && c . isMegagroup ( t ) ; return _ . invokeApi ( "messages.getHistory" , { peer : c . getInputPeerByID ( t ) , offset _id : n ? m . getMessageLocalID ( n ) : 0 , add _offset : i || 0 , limit : a || 0 } , { timeout : 300 , noErrorBox : ! 0 } ) . then ( function ( e ) { r . saveApiUsers ( e . users ) , l . saveApiChats ( e . chats ) , te ( e . messages ) , s && o . addChannelState ( - t , e . pts ) ; var n = e . messages . length ; return n && e . messages [ n - 1 ] . deleted && ( e . messages . splice ( n - 1 , 1 ) , n -- , e . count -- ) , t < 0 || ! r . isBot ( t ) || n == a && a < e . count ? e : $ . getProfile ( t ) . then ( function ( n ) { var a = n . bot _info && n . bot _info . description ; if ( a ) { var i = Oe -- , s = { _ : "messageService" , id : i , from _id : t , to _id : c . getOutputPeer ( t ) , flags : 0 , pFlags : { } , date : tsNow ( ! 0 ) + y . serverTimeOffset , action : { _ : "messageActionBotIntro" , description : a } } ; te ( [ s ] ) , e . messages . push ( s ) , e . count && e . count ++ } return e } ) } , function ( n ) { switch ( n . type ) { case "CHANNEL_PRIVATE" : var a = l . getChat ( - t ) ; a = { _ : "channelForbidden" , access _hash : a . access _hash , title : a . title } , o . processUpdateMessage ( { _ : "updates" , updates : [ { _ : "updateChannel" , channel _id : - t } ] , chats : [ a ] , users : [ ] } ) } return e . reject ( n ) } ) } function N ( e , n , a , i ) { var s = at [ e ] && ! n ? 1 : 0 ; return R ( e , n , a , s ) . then ( function ( s ) { i . count = s . count || s . messages . length ; var o = 0 ; if ( ! n && s . messages . length && ( n = s . messages [ 0 ] . mid + 1 ) , n > 0 ) for ( o = 0 ; o < i . history . length && ! ( n > i . history [ o ] ) ; o ++ ) ; var r = i . history . length ; i . history . splice ( o , i . history . length - o ) , angular . forEach ( s . messages , function ( n ) { H ( i , n ) && t . $broadcast ( "history_reply_markup" , { peerID : e } ) , i . history . push ( n . mid ) } ) ; var l = i . history . length ; a -= l - r ; var c = at [ e ] , d = it [ e ] , p = void 0 !== c || void 0 !== d ; if ( p && ( i . count = Math . max ( i . count , l ) + 1 ) , a > 0 ) { if ( n = i . history [ l - 1 ] , p ) { if ( ! s . messages . length ) { if ( ! d ) return i . count = l , ! 0 ; n = 0 , e = d } return N ( e , n , a , i ) } if ( l < i . count ) return N ( e , n , a , i ) } return ! 0 } ) } function B ( t , n ) { var a = n . unreadOffset ; if ( a ) { var i , s ; for ( i = n . history . length - 1 ; i >= 0 ; i -- ) if ( s = Ee [ n . history [ i ] ] , s && ! s . pFlags . out && s . pFlags . unread ) { n . unreadOffset = i + 1 ; break } } return e . when ( n ) } function U ( e , n ) { if ( ! at [ e ] && ! it [ n ] && l . hasChat ( - n ) ) { var a = l . getChat ( - e ) ; a && a . migrated _to && a . migrated _to . channel _id == - n && ( at [ e ] = n , it [ n ] = e , i ( function ( ) { var a = A ( e ) ; a . length && ( Fe . dialogs . splice ( a [ 1 ] , 1 ) , t . $broadcast ( "dialog_drop" , { peerID : e } ) ) , t . $broadcast ( "dialog_migrate" , { migrateFrom : e , migrateTo : n } ) } , 100 ) ) } } function O ( e ) { if ( at [ e ] ) return at [ e ] } function L ( e , t , n , a , i ) { at [ e ] && ( e = at [ e ] ) ; var s = Pe [ e ] , o = 0 , r = ! 1 , l = ! 1 , c = ! 1 ; i = i ? Math . min ( 50 , i ) : 0 , void 0 === s && ( s = Pe [ e ] = { count : null , history : [ ] , pending : [ ] } ) ; var d = ! 1 , p = e ; if ( it [ e ] && ( d = ! 0 , t && t < m . fullMsgIDModulus && ( p = it [ e ] ) ) , ! n && ! t ) { var u = A ( e ) [ 0 ] ; if ( u && u . unread _count > 1 ) { var g = u . unread _count ; ( c = g > 50 ) ? u . read _inbox _max _id ? ( t = u . read _inbox _max _id , a = 16 , l = 16 , n = 4 ) : ( n = 20 , l = 16 , o = g - l ) : ( n = Math . max ( 10 , i , g + 2 ) , l = g ) } else Config . Mobile && ( n = 20 ) } if ( t > 0 ) for ( r = ! 0 , o = 0 ; o < s . history . leng
c = x ( "conversation_group_photo_removed_raw" ) ; break ; case "messageActionChatAddUser" : case "messageActionChatAddUsers" : c = x ( "conversation_invited_user_message_raw" ) ; break ; case "messageActionChatReturn" : c = x ( "conversation_returned_to_group_raw" ) ; break ; case "messageActionChatJoined" : c = x ( "conversation_joined_group_raw" ) ; break ; case "messageActionChatDeleteUser" : c = x ( "conversation_kicked_user_message_raw" ) ; break ; case "messageActionChatLeave" : c = x ( "conversation_left_group_raw" ) ; break ; case "messageActionChatJoinedByLink" : c = x ( "conversation_joined_by_link_raw" ) ; break ; case "messageActionChannelCreate" : c = x ( "conversation_created_channel_raw" ) ; break ; case "messageActionChannelEditTitle" : c = x ( "conversation_changed_channel_name_raw" ) ; break ; case "messageActionChannelEditPhoto" : c = x ( "conversation_changed_channel_photo_raw" ) ; break ; case "messageActionChannelDeletePhoto" : c = x ( "conversation_removed_channel_photo_raw" ) ; break ; case "messageActionPinMessage" : c = x ( "conversation_pinned_message_raw" ) ; break ; case "messageActionGameScore" : c = Je ( e . action . score ) ; break ; case "messageActionPhoneCall" : switch ( e . action . type ) { case "out_missed" : c = x ( "message_service_phonecall_canceled_raw" ) ; break ; case "in_missed" : c = x ( "message_service_phonecall_missed_raw" ) ; break ; case "out_ok" : c = x ( "message_service_phonecall_outgoing_raw" ) ; break ; case "in_ok" : c = x ( "message_service_phonecall_incoming_raw" ) } } if ( s > 0 ) { var m = r . getUser ( e . from _id ) , g = r . getUserPhoto ( e . from _id ) ; o . title = ( m . first _name || "" ) + ( m . first _name && m . last _name ? " " : "" ) + ( m . last _name || "" ) , o . title || ( o . title = m . phone || x ( "conversation_unknown_user_raw" ) ) , i = g , a = r . getUserString ( s ) } else { if ( o . title = l . getChat ( - s ) . title || x ( "conversation_unknown_chat_raw" ) , e . from _id > 0 ) { var m = r . getUser ( e . from _id ) ; o . title = ( m . first _name || m . last _name || x ( "conversation_unknown_user_raw" ) ) + " @ " + o . title } i = l . getChatPhoto ( - s ) , a = l . getChatString ( - s ) } o . title = b . wrapPlainText ( o . title ) , o . onclick = function ( ) { t . $broadcast ( "history_focus" , { peerString : a , messageID : 16 & e . flags ? e . mid : 0 } ) } , o . message = c , o . key = "msg" + e . mid , o . tag = a , o . silent = e . pFlags . silent || ! 1 , i . location && ! i . location . empty ? v . downloadSmallFile ( i . location , i . size ) . then ( function ( t ) { e . pFlags . unread && ( o . image = t , w . notify ( o ) ) } ) : w . notify ( o ) } function Se ( ) { i . cancel ( st ) , st = ! 1 , t . $broadcast ( "history_multiappend" , ot ) , ot = { } } function Me ( ) { i . cancel ( rt ) , rt = ! 1 ; var e = 0 ; angular . forEach ( lt , function ( t , n ) { t . reload ? ( Ie ( n ) , delete lt [ n ] ) : ( F ( t ) , c . isChannel ( n ) || ( e = Math . max ( e , t . top _message || 0 ) ) ) } ) , e !== ! 1 && $e ( e ) , t . $broadcast ( "dialogs_multiupdate" , lt ) , lt = { } } function xe ( ) { i . cancel ( ct ) , ct = ! 1 ; var e = t . idle . isIDLE && M . isOtherDeviceActive ( ) ? 3e4 : 1e3 ; angular . forEach ( dt , function ( t ) { t . isMutedPromise . then ( function ( n ) { var a = t . top _message ; ! n && a . pFlags . unread && setTimeout ( function ( ) { a . pFlags . unread && Ce ( a , { fwd _count : t . fwd _count } ) } , e ) } ) } ) , dt = { } } function Ie ( e ) { return _ . invokeApi ( "messages.getPeerDialogs" , { peers : [ c . getInputPeerByID ( e ) ] } ) . then ( Ae ) } function Ae ( e ) { r . saveApiUsers ( e . users ) , l . saveApiChats ( e . chats ) , te ( e . messages ) ; var n = { } , a = ! 1 ; angular . forEach ( e . dialogs , function ( e ) { var i = c . getPeerID ( e . peer ) ; if ( e . top _message ) { var s = A ( i ) . length > 0 ; E ( e ) , s ? ( he ( e . top _message ) , t . $broadcast ( "dialog_top" , e ) ) : ( n [ i ] = e , a = ! 0 ) } else { var o = A ( i ) ; o . length && ( Fe . dialogs . splice ( o [ 1 ] , 1 ) , t . $broadcast ( "dialog_drop" , { peerID : i } ) ) } } ) , a && t . $broadcast ( "dialogs_multiupdate" , n ) } var Ee = { } , Te = { } , De = { } , Pe = { } , Fe = { count : null , dialogs : [ ] } , Re = { } , Ne = { } , Be = { } , Ue = e . when ( ) , Oe = - 1 , Le = SearchIndexManager . createIndex ( ) , je = { query : ! 1 } , He = { } , qe = [ ] , Ve = [ ] , ze = ! 1 , We = { } , Ge = [ ] , Ke = ! 1 , Ye = ! 1 ; k . get ( "max_seen_msg" ) . then ( function ( e ) { e && ! m . getMessageIDInfo ( e ) [ 1 ] && ( Ye = e ) } ) ; var Ze = a ( "dateOrTime" ) , Xe = x . pluralize ( "conversation_forwarded_X_messages" ) , Je = x . pluralize ( "conversation_scored_X" ) ; w . start ( ) ; var Qe = ! 1 , et = 0 , tt = 0 , nt = 0 , at = { } , it = { } , st = ! 1 , ot = { } , rt = ! 1 , lt = { } , ct = ! 1 , dt = { } ; return t . $on ( "apiUpdate" , function ( e , n ) { switch ( n . _ ) { case "updateMessageID" : var a = n . random _id , s = Re [ a ] ; if ( s ) { var o = s [ 0 ] , d = c . isChannel ( o ) ? - o : 0 ; Ne [ m . getFullMessageID ( n . id , d ) ] = a } break ; case "updateNewMessage" : case "updateNewChannelMessage" : var p = n . message , o = ue ( p ) , u = Pe [ o ] , g = A ( o ) ; if ( ! g . length ) { lt [ o ] = { reload : ! 0 } , rt || ( rt = i ( Me , 0 ) ) ; break } if ( "updateNewChannelMessage" == n . _ ) { var h = l . getChat ( - o ) ; if ( h . pFlags && ( h . pFlags . left || h
e . put ( "partials/mobile/channel_modal.html" , '<div class="chat_modal_wrap">\n\n <div class="tg_page_head tg_modal_head">\n <div class="navbar navbar-static-top navbar-inverse">\n <div class="container">\n\n <div class="navbar-toggle-wrap dropdown" dropdown ng-if="chatFull.chat.pFlags.creator || !chatFull.chat.pFlags.left && !chatFull.chat.pFlags.kicked">\n <a class="dropdown-toggle navbar-toggle" dropdown-toggle>\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n </a>\n <ul class="dropdown-menu">\n <li ng-if="hasRights(\'edit_photo\')">\n <a ng-click="deletePhoto()" my-i18n="group_modal_menu_delete_photo"></a>\n </li>\n <li ng-if="hasRights(\'edit_title\')">\n <a ng-click="editChannel()" my-i18n="modal_edit"></a>\n </li>\n <li ng-if="chatFull.chat.pFlags.creator">\n <a ng-click="deleteChannel()" my-i18n="channel_modal_delete_channel"></a>\n </li>\n <li ng-if="!chatFull.chat.pFlags.creator && !chatFull.chat.pFlags.left && !chatFull.chat.pFlags.kicked">\n <a ng-click="leaveChannel()" my-i18n="group_modal_menu_leave"></a>\n </li>\n </ul>\n </div>\n\n <div class="navbar-header">\n\n <ul class="nav navbar-nav navbar-quick-nav">\n <li>\n <a ng-click="$close()" class="navbar-quick-media-back">\n <i class="icon icon-back"></i>\n <div class="navbar-quick-back-title">\n <h4 my-i18n="channel_modal_info"></h4>\n </div>\n </a>\n </li>\n </ul>\n\n </div>\n\n </div>\n </div>\n </div>\n\n <div class="modal-body mobile_modal_body">\n\n <div class="mobile_user_modal_photo_profile_wrap">\n\n <a ng-click="openPhoto(chatFull.chat_photo.id, {p: -chatFull.chat.id})" class="mobile_user_modal_image_wrap pull-left" my-peer-photolink="::-chatFull.chat.id" img-class="mobile_user_modal_image mobile_chat_modal_image" no-open="true" watch="true" ng-class="{disabled: !chatFull.chat.photo.photo_small}" ng-disabled="!chatFull.chat.photo.photo_small"></a>\n\n <div class="mobile_user_modal_info_wrap clearfix">\n <h4 class="mobile_user_modal_header" my-peer-link="-chatFull.chat.id" verified="true"></h4>\n <p class="mobile_user_modal_status" ng-if="chatFull.participants_count > 0">\n <ng-pluralize count="chatFull.participants_count"\n when="group_modal_pluralize_participants">\n </ng-pluralize>\n </p>\n </div>\n\n </div>\n\n <div class="mobile_modal_section" ng-if="chatFull.rAbout">\n <h4 class="mobile_modal_section_header" my-i18n="channel_modal_description"></h4>\n <div class="mobile_modal_section_value" ng-bind-html="chatFull.rAbout"></div>\n </div>\n\n <div class="mobile_modal_section" ng-if="chatFull.chat.username || chatFull.chat.pFlags.creator">\n <h4 class="mobile_modal_section_header" my-i18n="channel_modal_share_link"></h4>\n <div class="mobile_modal_section_value" ng-switch="chatFull.chat.username.length > 0">\n <a ng-switch-when="true" class="settings_modal_username_link" ng-click="shareLink($event)" ng-bind="\'https://t.me/\' + chatFull.chat.username" ng-href="https://t.me/{{chatFull.chat.username}}" target="_blank"></a>\n <a ng-switch-default ng-click="shareLink($event)" ng-bind="chatFull.exported_invite.link" ng-href="{{chatFull.exported_invite.link}}" target="_blank"></a>\n </div>\n </div>\n\n <div class="mobile_modal_action_wrap" ng-if="hasRights(\'invite\' ) ">\n <a class=" mobile _modal _action " ng-click=" inviteToChannel ( ) " my-i18n=" channel _modal _add _member "></a>\n </div>\n\n <div class=" mobile _modal _action _wrap " ng-if=" chatFull . chat . pFlags . left ">\n <a class=" mobile _modal _action " ng-click=" joinChannel ( ) " my-i18n=" channel _modal _join " > < / a > \ n < / d i v > \ n < d i v c l a s
e . put ( "partials/mobile/im.html" , '<div my-head></div>\n\n<div class="im_page_wrap" ng-class="{im_page_peer_not_selected: !curDialog.peer}">\n\n <div class="im_page_split clearfix">\n\n <div ng-controller="AppImDialogsController" my-dialogs class="im_dialogs_col_wrap" ng-class="search.query.length > 0 ? \'im_dialogs_col_search\' : \'\'">\n <div class="im_dialogs_panel">\n <div class="im_dialogs_search">\n <input class="form-control im_dialogs_search_field no_outline" type="search" placeholder="{{\'modal_search\' | i18n}}" ng-model="search.query" autocomplete="off" />\n <a class="im_dialogs_search_clear tg_search_clear" ng-click="searchClear()" ng-show="search.query.length">\n <i class="icon icon-search-clear"></i>\n </a>\n </div>\n </div>\n\n <div my-dialogs-list-mobile class="im_dialogs_col im_dialogs_scrollable_wrap mobile_scrollable_wrap">\n\n <div class="im_dialogs_empty_wrap" ng-if="isEmpty.contacts" my-vertical-position="0.4">\n <h3 class="im_dialogs_empty_header" my-i18n="im_no_contacts"></h3>\n <p class="im_dialogs_empty_lead" my-i18n="im_get_started_long"></p>\n <button type="button" class="btn btn-primary btn-block im_dialogs_add_contact" ng-click="importContact()" my-i18n="im_add_contact"></button>\n <button ng-if="phonebookAvailable" type="button" class="btn btn-primary btn-block im_dialogs_import_phonebook" ng-click="importPhonebook()" my-i18n="im_import_phonebook"></button>\n </div>\n\n <ul class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" my-dialog dialog-message="dialogMessage" ng-repeat="dialogMessage in dialogs track by dialogMessage.peerID" ng-class="{active: curDialog.peerID == dialogMessage.peerID}"></li>\n </ul>\n\n <div class="im_dialogs_contacts_wrap" ng-show="contacts.length > 0">\n <h5 my-i18n="im_contacts_title"></h5>\n <ul class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:\'user.sortName\' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">\n <a class="im_dialog" ng-mousedown="dialogSelect(contact.peerString)">\n <div class="im_dialog_photo pull-left" my-peer-photolink="contact.userID" img-class="im_dialog_photo" watch="true"></div>\n <div class="im_dialog_message_wrap">\n <div class="im_dialog_peer">\n <span class="im_dialog_user" my-peer-link="contact.userID" verified="true"></span>\n </div>\n <div class="im_dialog_message">\n <span class="im_dialog_message_text" my-user-status="::contact.userID"></span>\n </div>\n </div>\n </a>\n </li>\n </ul>\n </div>\n\n <div class="im_dialogs_contacts_wrap" ng-show="foundPeers.length > 0">\n <h5 my-i18n="im_found_title"></h5>\n <ul class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" ng-repeat="foundPeer in foundPeers track by foundPeer.id" ng-class="{active: curDialog.peerID == foundPeer.id}">\n <a class="im_dialog" ng-mousedown="dialogSelect(foundPeer.peerString)">\n <div class="im_dialog_photo pull-left" my-peer-photolink="foundPeer.id" img-class="im_dialog_photo" watch="true"></div>\n <div class="im_dialog_message_wrap">\n <div class="im_dialog_peer">\n <span class="im_dialog_user" my-peer-link="foundPeer.id" verified="true"></span>\n </div>\n <div class="im_dialog_message">\n <span class="im_dialog_message_text" ng-bind="::\'@\' + foundPeer . username "></span>\n </div>\n </div>\n </a>\n </li>\n </ul>\n </div>\n\n <div class=" im _dialogs _messages _wrap " ng-show=" foundMessages . length > 0 ">\n <h5 my-i18n=" im _messages " > <
e . put ( "partials/mobile/message_attach_geo.html" , '<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_geopoint">\n <img\n class="im_message_venue_geopoint_image"\n my-geo-point-map="media.geo"\n width="200"\n height="100"\n />\n</a>' ) , e . put ( "partials/mobile/message_attach_pending.html" , '<div class="im_message_document im_message_upload_file" ng-class="::\'im_message_upload_\' + media.type">\n <div class="im_message_file_button im_message_file_button_upload">\n <i class="im_message_file_button_icon"></i>\n </div>\n <div class="im_message_document_info">\n <div class="im_message_document_name_wrap">\n <span class="im_message_document_name" ng-attr-data-name="{{media_file_name_without_ext}}" ng-attr-data-ext="{{media_file_ext}}"></span>\n <span class="im_message_document_size" ng-if="media.progress" ng-bind="media.progress | formatSizeProgress"></span>\n </div>\n <div class="clearfix im_message_cancelable_progress_wrap">\n <a class="im_message_media_progress_cancel pull-right" ng-click="media.progress.cancel()" my-i18n="modal_cancel"></a>\n <div class="im_message_download_progress_wrap">\n <div class="progress tg_down_progress">\n <div class="progress-bar progress-bar-success" role="progressbar" ng-style="{width: media.progress.percent + \'%\'}"></div>\n </div>\n </div>\n </div>\n </div>\n</div>\n' ) , e . put ( "partials/mobile/message_attach_photo.html" , '<a class="im_message_photo_thumb" ng-click="openPhoto(media.photo.id, {m: messageId})" ng-style="::{width: media.photo.thumb.width + \'px\'}" ng-mouseover="preloadPhoto(media.photo.id)">\n <img\n class="im_message_photo_thumb"\n my-load-thumb\n thumb="media.photo.thumb"\n />\n</a>\n<div ng-if="::media.rCaption" class="im_message_photo_caption" ng-bind-html="::media.rCaption"></div>' ) , e . put ( "partials/mobile/message_attach_venue.html" , '<div class="im_message_venue clearfix">\n\n <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap">\n <img\n class="im_message_venue_geopoint_image"\n my-geo-point-map="media.geo"\n width="100"\n height="100"\n alt="[{{::\'conversation_media_location\' | i18n}} {{::media.mapUrl}}]"\n />\n </a>\n\n <div class="im_message_venue_info">\n <div class="im_message_venue_title_wrap">\n <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_document_name" ng-bind="::media.title"></a>\n </div>\n <div class="im_message_venue_address" ng-bind="::media.address"></div>\n </div>\n\n</div>\n' ) , e . put ( "partials/mobile/message_attach_webpage.html" , '<div ng-show="webpage._ == \'webPage\'" class="im_message_webpage_wrap clearfix" ng-switch="webpage.type">\n <div ng-switch-when="photo" class="im_message_webpage_photo">\n <div class="im_message_webpage_site" ng-bind="webpage.site_name || webpage.display_url"></div>\n <div class="im_message_webpage_title">\n <a href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="webpage.rTitle"></a>\n </div>\n <div ng-if="webpage.description.length" class="im_message_webpage_description" ng-bind-html="webpage.rDescription"></div>\n <a class="im_message_photo_thumb" ng-click="openPhoto(webpage.photo.id, {w: webpage.id, m: messageId})" ng-style="::{width: webpage.photo.thumb.width + \'px\' } " ng-mouseover=" preloadPhoto ( webpage . photo . id ) ">\n <img\n class=" im _message _photo _thumb "\n my-load-thumb\n thumb=" webpage . photo . thumb "\n />\n </a>\n </div>\n <div ng-switch-when=" video " class=" im _message _webpage _video ">\n <div class=" im _message _webpage _site " ng-bind=" webpage . site _name || webpage . display _url "></div>\n <div class=" im _message _webpage _title ">\n <a ng-click=" openEmbed ( $event ) " href=" { { webpage . url } } " target=" _blank " rel=" noopener noreferrer " ng-bind-html=" webpage . rTitle "></a>\n </div>\n <div ng-if=" webpage . description . length " class=" im _message _webpage _description " ng-bind-html=" webpage . rDescription " > <
e . put ( "partials/mobile/stickerset_modal.html" , '<div class="stickerset_modal_wrap">\n\n <div class="tg_page_head tg_modal_head">\n <div class="navbar navbar-static-top navbar-inverse">\n <div class="container">\n\n <div class="navbar-header">\n\n <ul class="nav navbar-nav navbar-quick-nav">\n <li class="navbar-quick-right" ng-if="stickersetLoaded" ng-switch="stickersetInstalled">\n <a ng-switch-when="true" my-i18n="stickerset_modal_uninstall" ng-click="toggleInstalled(false)"></a>\n <a ng-switch-when="false" my-i18n="stickerset_modal_install" ng-click="toggleInstalled(true)"></a>\n </li>\n <li>\n <a ng-click="$dismiss()" class="navbar-quick-media-back">\n <i class="icon icon-back"></i>\n <div class="navbar-quick-back-title">\n <h4 ng-switch="!stickersetLoaded">\n <span ng-switch-when="true" my-i18n="stickerset_modal_title_loading"></span>\n <span ng-switch-default ng-bind="stickerset.title"></span>\n </h4>\n </div>\n </a>\n </li>\n </ul>\n\n </div>\n\n </div>\n </div>\n </div>\n\n <div class="modal-body">\n\n <div my-stickers-list class="stickerset_modal_col">\n\n <div class="stickerset_wrap nano" my-infinite-scroller>\n <div class="stickerset_scrollable_wrap nano-content" ng-switch="!stickersetLoaded">\n\n <div ng-switch-when="true" class="stickerset_modal_loading" my-vertical-position="0.2" padding="true" my-i18n="stickerset_modal_loading">\n <my-i18n-param name="dots">\n <span my-loading-dots></span>\n </my-i18n-param>\n </div>\n\n <div ng-switch-default class="stickerset_modal_stickers_list clearfix">\n <div class="stickerset_modal_sticker_wrap" ng-repeat="sticker in documents | limitTo: slice.limit">\n <div class="stickerset_modal_sticker" my-load-sticker document="sticker" thumb="true"></div>\n <div class="stickerset_modal_sticker_alt" ng-bind-html="sticker.stickerEmoji"></div>\n </div>\n </div>\n\n </div>\n </div>\n\n </div>\n\n </div>\n\n</div>' ) , e . put ( "partials/mobile/user_modal.html" , ' < div class = "mobile_user_modal_wrap" > \ n \ n < div class = "tg_page_head tg_modal_head" > \ n < div class = "navbar navbar-static-top navbar-inverse" > \ n < div class = "container" > \ n \ n < div class = "navbar-toggle-wrap dropdown" dropdown > \ n < a class = "dropdown-toggle navbar-toggle" dropdown - toggle > \ n < span class = "icon-bar" > < / s p a n > \ n < s p a n c l a s s = " i c o n - b a r " > < / s p a n > \ n < s p a n c l a s s = " i c o n - b a r " > < / s p a n > \ n < / a > \ n < u l c l a s s = " d r o p d o w n - m e n u " > \ n < l i n g - i f = " u s e r . p F l a g s . c o n t a c t " > \ n < a n g - c l i c k = " i m p o r t C o n t a c t ( t r u e ) " m y - i 1 8 n = " u s e r _ m o d a l _ e d i t _ c o n t a c t " > < / a > \ n < / l i > \ n < l i n g - i f = " u s e r . p F l a g s . c o n t a c t " > \ n < a n g - c l i c k = " d e l e t e C o n t a c t ( ) " m y - i 1 8 n = " u s e r _ m o d a l _ d e l e t e _ c o n t a c t " > < / a > \ n < / l i > \ n < l i n g - i f = " u s e r . p h o n e . l e n g t h > 0 & a m p ; & a m p ; ! u s e r . p F l a g s . c o n t a c t & a m p ; & a m p ; ! u s e r . p F l a g s . s e l f " > \ n < a n g - c l i c k = " i m p o r t C o n t a c t ( ) " m y - i 1 8 n = " u s e r _ m o d a l _ a d d _ c o n t a c t " > < / a > \ n < / l i > \ n < l i > \ n < a n g - c l i c k = " f l u s h H i s t o r y ( t r u e ) " m y - i 1 8 n = " u s e r _ m o d a l _ c l e a r _ h i s t o r y " > < / a > \ n < / l i > \ n < l i > \ n < a n g - c l i c k = " f l u s h H i s t o r y ( ) " m y - i 1 8 n = " u s e r _ m o d a l _ d e l e t e _ c h a t " > < / a > \ n < / l i > \ n < / u l > \ n < / d i v > \ n \ n < d i v c l a s s = " n a v b a r - h e a d e r " > \ n \ n < u l c l a s s = " n a v n a v b a r - n a v n a v b a r - q u i c k - n a v " > \ n < l i > \ n < a n g - c l i c k = " $ c l o s e ( ) " c l a s s = " n a v b a r - q u i c k - m e d i a - b a c k " > \ n < i c l a s s = " i c o n i c o n - b a c k " > < / i > \ n < d i v c l a s s = " n a v b a r - q u i c k - b a c k - t i t l e " > \ n < h 4 m y - i 1 8 n = " u s e r _ m o d a l _ c o n t a c t _ i n f o " > < / h 4 > \ n < / d i v > \ n < / a > \ n < / l i > \ n < / u l > \ n \ n < / d i v > \ n \ n < / d i v > \ n <
e . put ( "partials/desktop/channel_edit_modal.html" , '<div class="md_simple_modal_wrap" my-modal-position>\n\n <div class="md_simple_modal_body">\n\n <form class="modal_simple_form" ng-submit="updateChannel()">\n\n <h4 my-i18n="channel_edit_modal_title"></h4>\n\n <div class="md-input-group" my-labeled-input>\n <label class="md-input-label" my-i18n="channel_edit_name"></label>\n <input class="md-input" my-focused type="text" ng-model="channel.title" />\n </div>\n\n <div class="md-input-group" my-labeled-input>\n <label class="md-input-label" my-i18n="channel_edit_about"></label>\n <input class="md-input" type="text" ng-model="channel.about" />\n </div>\n\n </form>\n\n </div>\n\n <div class="md_simple_modal_footer">\n <button class="btn btn-md" ng-click="$dismiss()" my-i18n="modal_cancel"></button>\n <button class="btn btn-md btn-md-primary" ng-class="{disabled: channel.updating}" ng-click="updateChannel()" ng-bind="channel.updating ? \'channel_edit_submit_active\' : \'channel_edit_submit\' | i18n" ng-disabled="channel.updating"></button>\n </div>\n\n</div>' ) , e . put ( "partials/desktop/channel_modal.html" , '<div class="chat_modal_wrap md_modal_wrap" my-modal-position>\n\n <div class="md_modal_head">\n <div class="md_modal_title_wrap">\n <div class="md_modal_actions_wrap clearfix">\n <a class="md_modal_action md_modal_action_close" ng-click="$close()" my-i18n="modal_close"></a>\n <a class="md_modal_action" ng-if="hasRights(\'edit_title\')" ng-click="editChannel()" my-i18n="modal_edit"></a>\n </div>\n <div class="md_modal_title" ng-switch="isMegagroup">\n <span ng-switch-when="true" my-i18n="group_modal_info"></span>\n <span ng-switch-default my-i18n="channel_modal_info"></span>\n </div>\n </div>\n\n <div class="peer_modal_profile_wrap clearfix">\n <div class="peer_modal_photo_wrap pull-left" ng-switch="photo.updating">\n <div ng-switch-when="true" class="peer_modal_photo md_photo_loading loading_dots">\n <i></i><i></i><i></i>\n </div>\n <a ng-switch-default ng-click="openPhoto(chatFull.chat_photo.id, {p: -chatFull.chat.id})" class="peer_modal_photo" my-peer-photolink="::-chatFull.chat.id" img-class="peer_modal_photo" no-open="true" watch="true" ng-class="{disabled: !chatFull.chat.photo.photo_small}" ng-disabled="!chatFull.chat.photo.photo_small"></a>\n </div>\n <div class="peer_modal_profile">\n <div class="peer_modal_profile_name" my-peer-link="-chatFull.chat.id" verified="true"></div>\n <div class="peer_modal_profile_description" ng-if="chatFull.participants_count > 0">\n <ng-pluralize count="chatFull.participants_count"\n when="group_modal_pluralize_participants">\n </ng-pluralize>\n </div>\n </div>\n </div>\n </div>\n\n <div class="md_modal_split_actions_wrap">\n <div class="md_modal_split_actions" ng-switch="hasRights(\'edit_photo\')">\n <div ng-switch-when="true" class="md_modal_split_action">\n <input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" title="{{\'group_modal_update_photo\' | i18n}}" />\n <i class="md_modal_split_action_camera"></i>\n </div>\n <a ng-switch-default class="md_modal_split_action" href="" ng-click="goToHistory()" title="{{\'user_modal_send_message\' | i18n } } ">\n <i class=" md _modal _split _action _msg "></i>\n </a>\n </div>\n </div>\n\n <div class=" md _modal _body ">\n\n <div class=" md _modal _sections clearfix ">\n\n <div class=" md _modal _iconed _section _wrap md _modal _iconed _section _number " ng-if=" chatFull . rAbout || chatFull . chat . username || chatFull . chat . pFlags . creator ">\n <i class=" md _modal _section _icon md _modal _section _icon _about "></i>\n\n <div class=" md _modal _section _param _wrap " ng-if=" chatFull . about . length > 0 ">\n <div class=" md _modal _section _param _value " > \ n < span ng - bind - htm
e . put ( "partials/desktop/country_select_modal.html" , '<div class="countries_modal_wrap md_modal_wrap" my-modal-position>\n\n <div class="md_modal_head md_modal_head_simple">\n <div class="md_modal_title_wrap">\n <div class="md_modal_actions_wrap clearfix">\n <a class="md_modal_action md_modal_action_close" ng-click="$dismiss()" my-i18n="modal_close"></a>\n </div>\n </div>\n <div class="md_modal_title" my-i18n="country_select_modal_title"></div>\n </div>\n\n <div class="md_modal_body">\n\n <div class="countries_modal_search">\n <input class="form-control countries_modal_search_field no_outline" my-focused type="search" placeholder="{{\'modal_search\' | i18n}}" ng-model="search.query" autocomplete="off" />\n <a class="countries_modal_search_clear tg_search_clear" ng-click="search.query = \'\'" ng-show="search.query.length">\n <i class="icon icon-search-clear"></i>\n </a>\n\n </div>\n\n <div class="countries_modal_col" my-countries-list>\n\n <div class="countries_wrap nano" my-infinite-scroller>\n <div class="countries_scrollable_wrap nano-content">\n\n <ul class="countries_modal_members_list nav nav-pills nav-stacked">\n\n <li class="countries_modal_country_wrap clearfix" ng-repeat="country in countries | limitTo : slice.limit track by $index">\n <a class="countries_modal_country" ng-click="$close(country)">\n <span class="countries_modal_country_code pull-right" ng-bind="country.code"></span>\n <span class="countries_modal_country_name" ng-bind="country.name"></span>\n </a>\n </li>\n\n </ul>\n\n </div>\n </div>\n\n </div>\n\n </div>\n\n</div>\n' ) , e . put ( "partials/desktop/dialog.html" , '<a class="im_dialog" ng-mousedown="dialogSelect(dialogMessage.peerString, dialogMessage.unreadCount == -1 && dialogMessage.mid)">\n\n <div class="im_dialog_meta pull-right text-right">\n <div class="im_dialog_date" ng-bind="dialogMessage.dateText"></div>\n <span\n class="im_dialog_badge badge ng-hide"\n ng-show="dialogMessage.unreadCount > 0 && !dialogMessage.pFlags.out"\n ng-bind="dialogMessage.unreadCount"\n my-peer-muted="dialogMessage.peerID" muted-class="im_dialog_badge_muted"\n ></span>\n <i\n class="im_dialog_unread ng-hide"\n ng-show="dialogMessage.pFlags.out && dialogMessage.pFlags.unread"\n ></i>\n <i\n class="im_dialog_pinned ng-hide"\n ng-show="dialogMessage.pinned && !dialogMessage.unreadCount && !dialogMessage.pFlags.unread"\n ></i>\n </div>\n\n <div class="im_dialog_photo pull-left" my-peer-photolink="::dialogMessage.peerID" img-class="im_dialog_photo" watch="true"></div>\n\n <div class="im_dialog_message_wrap">\n\n <div class="im_dialog_peer">\n <span my-peer-link="dialogMessage.peerID" verified="true"></span>\n </div>\n\n <div ng-switch="dialogMessage.typing ? \'typing\' : (!dialogMessage.unreadCount && dialogMessage.draft ? \'draft\' : (dialogMessage.deleted ? \'deleted\' : \'message\' ) ) ">\n\n <div ng-switch-when=" typing " class=" im _dialog _message ">\n <span class=" im _short _message _service " my-i18n=" im _conversation _group _typing ">\n <my-i18n-param name=" name "><span my-peer-link=" dialogMessage . typing " short=" true " class=" im _dialog _chat _from _wrap "></span></my-i18n-param><my-i18n-param name=" dots "><span my-loading-dots></span></my-i18n-param>\n </span>\n </div>\n\n <div ng-switch-when=" draft " class=" im _dialog _message ">\n <span class=" im _dialog _chat _from _wrap ">\n <span class=" im _dialog _draft _from " my-i18n=" conversation _draft "></span>\n </span>\n <span class=" im _short _message _text " ng-bind-html=" dialogMessage . draft . richMessage "></span>\n </div>\n\n <div ng-switch-when=" deleted " class=" im _dialog _message ">\n <span class=" im _short _message _text "> </span>\n </div>\n\n <div ng-switch-when=" message " class=" im _dialog _message ">\n <span ng-switch=" dialogMessage . peerID > 0 || dialo
e . put ( "partials/desktop/import_contact_modal.html" , '<div class="md_simple_modal_wrap" my-modal-position>\n\n <div class="md_simple_modal_body">\n\n <form class="modal_simple_form" ng-submit="doImport()" name="importContactForm">\n\n <h4 my-i18n="contact_import_modal_title"></h4>\n\n <div class="md-input-group" my-labeled-input ng-class="{\'md-input-error\': importContactForm.phone.$invalid && importContactForm.phone.$touched}" my-labeled-input>\n <label class="md-input-label" ng-switch="importContactForm.phone.$invalid && importContactForm.phone.$touched">\n <span ng-switch-when="true" my-i18n="login_incorrect_number"></span>\n <span ng-switch-default my-i18n="contact_import_modal_phone"></span>\n </label>\n <input class="md-input" my-focused type="tel" ng-model="importContact.phone" ng-pattern="/^[-\\+\\(\\)\\d\\s]{7,32}$/" my-submit-on-enter name="phone" />\n </div>\n\n <div class="md-input-group" my-labeled-input>\n <label class="md-input-label" my-i18n="contact_edit_modal_first_name"></label>\n <input class="md-input" type="text" ng-model="importContact.first_name" my-submit-on-enter />\n </div>\n\n <div class="md-input-group" my-labeled-input>\n <label class="md-input-label" my-i18n="contact_edit_modal_last_name"></label>\n <input class="md-input" type="text" ng-model="importContact.last_name" my-submit-on-enter />\n </div>\n\n </form>\n\n </div>\n\n <div class="md_simple_modal_footer">\n <button class="btn btn-md" ng-click="$dismiss()" my-i18n="modal_cancel"></button>\n <button class="btn btn-md btn-md-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? \'contact_import_modal_submit_active\' : \'contact_import_modal_submit\' | i18n" ng-disabled="progress.enabled"></button>\n </div>\n\n</div>' ) , e . put ( "partials/desktop/inactive.html" , '<div class="inactive_page_wrap">\n <div class="tg_head_split inactive_head"></div>\n <div class="im_page_wrap">\n <div class="inactive_page_content" my-vertical-position="0.35">\n <a class="inactive_image" ng-click="reload()"></a>\n <h3 class="inactive_title" my-i18n="inactive_title"></h3>\n <div class="inactive_description" my-i18n="inactive_description_md"></div>\n <div class="inactive_actions">\n <button class="btn btn-lg btn-md btn-md-primary" ng-click="reload()" my-i18n="inactive_reload_btn" my-focused></button>\n </div>\n </div>\n </div>\n</div>' ) , e . put ( "partials/desktop/inline_results.html" , '<a ng-if="botResults.switch_pm !== undefined" class="inline_switch_pm" ng-bind-html="botResults.switch_pm.rText" data-inlineid="_switch_pm_{{botResults.switch_pm.start_param}}"></a>\n\n<ul class="inline_results_wrap composer_dropdown">\n <li class="inline_result_wrap" ng-class="\'inline_result_\' + result.type" ng-repeat="result in botResults.results track by result.qID" ng-switch="result.type">\n\n <a ng-switch-when="gif" class="img_gif_with_progress_wrap" data-inlineid="{{result.qID}}" ng-style="::{width: result.thumbW, height: result.thumbH}" ng-switch="result._">\n <div class="inline_result_ind"></div>\n <div ng-switch-when="botInlineMediaResult" ng-switch="result.document.url !== undefined" class="inline_result_gif_mtproto">\n <div ng-switch-when="true" ng-switch="result.document.mime_type == \'video/mp4\' ">\n <video ng-switch-when=" true " width=" { { result . thumbW } } " height=" { { result . thumbH } } " loop autoplay class=" img _gif _video ">\n <source ng-src=" { { result . document . url } } " type=" video / mp4 ">\n </video>\n <img ng-switch-default class=" img _gif _image " ng-src=" { { result . document . url } } " width=" { { result . thumbW } } " height=" { { result . thumbH } } " />\n </div>\n <div ng-switch-default class=" img _gif _image _wrap ">\n <img class=" img _gif _thumb " my-load-thumb thumb=" result . document . thumb " width=" { { result . thumbW } } " height=" { { result . thumbH } } " />\n </div>\n </div>\n <div ng-switch-default ng-switch=" result . content
e . put ( "partials/desktop/message_attach_photo.html" , '<a class="im_message_photo_thumb" ng-click="openPhoto(media.photo.id, {m: messageId})" ng-style="::{width: media.photo.thumb.width + \'px\'}" ng-mouseover="preloadPhoto(media.photo.id)">\n <img\n class="im_message_photo_thumb"\n my-load-thumb\n thumb="media.photo.thumb"\n alt="[{{::\'conversation_media_photo\' | i18n}}]"\n />\n</a>\n<div ng-if="::media.rCaption" class="im_message_photo_caption" ng-bind-html="::media.rCaption"></div>' ) , e . put ( "partials/desktop/message_attach_venue.html" , '<div class="im_message_venue clearfix">\n\n <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap">\n <img\n class="im_message_venue_geopoint_image"\n my-geo-point-map="media.geo"\n width="100"\n height="100"\n alt="[{{::\'conversation_media_location\' | i18n}} {{::media.mapUrl}}]"\n />\n </a>\n\n <div class="im_message_venue_info">\n <div class="im_message_venue_title_wrap">\n <a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_document_name" ng-bind="::media.title"></a>\n </div>\n <div class="im_message_venue_address" ng-bind="::media.address"></div>\n </div>\n\n</div>\n' ) , e . put ( "partials/desktop/message_attach_webpage.html" , '<div ng-show="media.webpage._ == \'webPage\'" class="im_message_webpage_wrap clearfix" ng-switch="media.webpage.type">\n <div ng-switch-when="photo" class="im_message_webpage_photo">\n <div class="im_message_webpage_title">\n <a href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="media.webpage.rTitle"></a>\n </div>\n <div ng-if="media.webpage.description.length" class="im_message_webpage_description" ng-bind-html="media.webpage.rDescription"></div>\n <a class="im_message_photo_thumb" ng-click="openPhoto(media.webpage.photo.id, {w: media.webpage.id, m: messageId})" ng-style="::{width: media.webpage.photo.thumb.width + \'px\'}" ng-mouseover="preloadPhoto(media.webpage.photo.id)">\n <img\n class="im_message_photo_thumb"\n my-load-thumb\n thumb="media.webpage.photo.thumb"\n alt="[{{::\'conversation_media_photo\' | i18n}}]"\n />\n </a>\n </div>\n <div ng-switch-when="video" class="im_message_webpage_video">\n <div class="im_message_webpage_site" ng-bind="media.webpage.site_name || media.webpage.display_url"></div>\n <div class="im_message_webpage_title">\n <a ng-click="openEmbed($event)" href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="media.webpage.rTitle"></a>\n </div>\n <div ng-if="media.webpage.description.length" class="im_message_webpage_description" ng-bind-html="media.webpage.rDescription"></div>\n <a class="im_message_video_thumb" ng-click="openEmbed($event)" ng-href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-style="::{width: video.thumb.width + \'px\'}">\n <span ng-if="media.webpage.duration > 0" class="im_message_video_duration nocopy" data-content="{{::media.webpage.duration | duration}}"></span>\n <i class="icon icon-videoplay"></i>\n <img\n class="im_message_video_thumb"\n my-load-thumb\n thumb="media.webpage.photo.thumb"\n alt="[{{::\'conversation_media_video\' | i18n } } ] "\n />\n </a>\n </div>\n\n <div ng-switch-when=" document " class=" im _message _webpage _document ">\n <div my-message-document=" media . webpage " message-id=" messageId "></div>\n </div>\n\n <div ng-switch-when=" gif " class=" im _message _webpage _gif ">\n <div class=" im _message _webpage _title ">\n <a href=" { { media . webpage . url } } " target=" _blank " rel=" noopener noreferrer " ng-bind-html=" media . webpage . rTitle "></a>\n </div>\n <div my-message-document=" media . webpage " message-id=" messageId "></div>\n </div>\n\n <div ng-switch-default class=" im _message _webpage _article ">\n <a ng-if=" media . webpage . photo " href=" { { media . webpage . url } } " target=" _blank " rel=" noopener noreferrer " class=" im _message _webpage _article _ph
e . put ( "partials/desktop/short_message.html" , '<span class="im_short_message_media" ng-if="message.media" ng-switch="message.media._">\n <span ng-switch-when="messageMediaPhoto" my-i18n="conversation_media_photo"></span>\n <span ng-switch-when="messageMediaDocument" ng-switch="message.media.document.type || false">\n <span ng-switch-when="sticker">\n <span ng-bind-html="message.media.document.stickerEmoji"></span>\n <my-i18n msgid="conversation_media_sticker"></my-i18n>\n </span>\n <span ng-switch-when="gif" my-i18n="conversation_media_gif"></span>\n <span ng-switch-when="audio" my-i18n="conversation_media_audio"></span>\n <span ng-switch-when="voice" my-i18n="conversation_media_audio"></span>\n <span ng-switch-when="video" my-i18n="conversation_media_video"></span>\n <span ng-switch-default ng-bind="message.media.document.file_name"></span>\n </span>\n <span ng-switch-when="messageMediaGeo" my-i18n="conversation_media_location"></span>\n <span ng-switch-when="messageMediaVenue" my-i18n="conversation_media_location"></span>\n <span ng-switch-when="messageMediaContact" my-i18n="conversation_media_contact"></span>\n <span ng-switch-when="messageMediaGame">\n <span my-emoji-image="🎮"></span>\n <span ng-bind-html="message.media.game.rTitle"></span>\n </span>\n</span><span class="im_short_message_service" ng-if="message._ == \'messageService\' " ng-switch=" message . action . _ ">\n <span ng-switch-when=" messageActionChatCreate " my-i18n=" conversation _group _created "></span>\n <span ng-switch-when=" messageActionChatEditTitle " my-i18n=" conversation _group _renamed "></span>\n <span ng-switch-when=" messageActionChatEditPhoto " my-i18n=" conversation _group _photo _updated "></span>\n <span ng-switch-when=" messageActionChatDeletePhoto " my-i18n=" conversation _group _photo _removed "></span>\n <span ng-switch-when=" messageActionChatJoinedByLink " my-i18n=" conversation _joined _by _link "></span>\n <span ng-switch-when=" messageActionChatReturn " my-i18n=" conversation _returned _to _group "></span>\n <span ng-switch-when=" messageActionChatJoined " my-i18n=" conversation _joined _group "></span>\n <span ng-switch-when=" messageActionChatAddUser " my-i18n=" conversation _invited _user ">\n <my-i18n-param name=" user "><span my-peer-link=" message . action . user _id "></span></my-i18n-param>\n </span>\n <span ng-switch-when=" messageActionChatAddUsers " my-i18n=" ">\n <ng-pluralize count=" message . action . users . length "\n when=" conversation _invited _users ">\n </ng-pluralize>\n </span>\n <span ng-switch-when=" messageActionChatLeave " my-i18n=" conversation _left _group "></span>\n <span ng-switch-when=" messageActionChatDeleteUser " my-i18n=" conversation _kicked _user ">\n <my-i18n-param name=" user "><span my-peer-link=" message . action . user _id "></span></my-i18n-param>\n </span>\n <span ng-switch-when=" messageActionChatMigrateTo " my-i18n=" conversation _converted _to _supergroup "></span>\n <span ng-switch-when=" messageActionChannelMigrateFrom " my-i18n=" conversation _converted _to _supergroup "></span>\n <span ng-switch-when=" messageActionChannelCreate " my-i18n=" conversation _created _channel "></span>\n <span ng-switch-when=" messageActionChannelEditTitle " my-i18n=" conversation _changed _channel _name "></span>\n <span ng-switch-when=" messageActionChannelEditPhoto " my-i18n=" conversation _changed _channel _photo "></span>\n <span ng-switch-when=" messageActionPinMessage " my-i18n=" conversation _pinned _message "></span>\n <span ng-switch-when=" messageActionGameScore ">\n <ng-pluralize count=" message . action . score "\n when=" conversation _scored _X "></ng-pluralize>\n </my-i18n-param>\n </span>\n <span ng-switch-when=" messageActionPhoneCall " ng-switch=" message . action . type ">\n <span ng-switch-when=" out _missed " my-i18n=" message _service _phonecall _canceled "></span>\n <span ng-switch-when=" in _missed " my-i18n=" message _service _phonecall _missed "></span>\n <span ng-switch-when=" out _ok " my-i18n=" message _service _phonecall _outgoing "></span>\n <span ng-switch-when=" in _ok " my-i18n=" message _service _phonecall _incomin
cancelEvent ( e ) ; if ( m = r . attr ( "data-command" ) ) return this . onCommandSelected && this . onCommandSelected ( m , 9 == e . keyCode ) , cancelEvent ( e ) ; if ( g = r . attr ( "data-inlineid" ) ) return t . onInlineResultSend && t . onInlineResultSend ( g ) , t . hideSuggestions ( ) , cancelEvent ( e ) ; i = ! 0 } } if ( i && 13 == e . keyCode ) { var h = ! 1 , f = ! 0 ; if ( this . getSendOnEnter && ! this . getSendOnEnter ( ) && ( f = ! 1 ) , f && ! e . shiftKey ? h = ! 0 : f || ! e . ctrlKey && ! e . metaKey || ( h = ! 0 ) , h ) return this . onMessageSubmit ( e ) , cancelEvent ( e ) } if ( [ 33 , 34 , 35 , 36 , 38 , 39 ] . indexOf ( e . keyCode ) != - 1 && ! e . shiftKey && ! e . altKey && ! e . ctrlKey && ! e . metaKey && this . richTextareaEl && ! this . richTextareaEl [ 0 ] . textContent . length ) return this . onDirectionKey ( e ) } } , MessageComposer . prototype . backupSelection = function ( ) { if ( delete this . selection , this . isActive ) if ( window . getSelection ) { var e = window . getSelection ( ) ; e . getRangeAt && e . rangeCount && ( this . selection = e . getRangeAt ( 0 ) ) } else document . selection && document . selection . createRange && ( this . selection = document . selection . createRange ( ) ) } , MessageComposer . prototype . restoreSelection = function ( ) { if ( ! this . selection ) return ! 1 ; var e = ! 1 ; if ( window . getSelection ) { var t = window . getSelection ( ) ; t . removeAllRanges ( ) , t . addRange ( this . selection ) , e = ! 0 } else document . selection && this . selection . select && ( this . selection . select ( ) , e = ! 0 ) ; return delete this . selection , e } , MessageComposer . prototype . checkAutocomplete = function ( e ) { var t , n ; if ( this . richTextareaEl ) { var a = this . richTextareaEl [ 0 ] , i = getRichValueWithCaret ( a ) , n = i [ 0 ] , t = i [ 1 ] >= 0 ? i [ 1 ] : n . length ; t || this . cleanRichTextarea ( n , ! 0 ) } else var a = this . textareaEl [ 0 ] , t = getFieldSelection ( a ) , n = a . value ; if ( n && this . curInlineResults && this . curInlineResults . text == n ) return void this . showInlineSuggestions ( this . curInlineResults ) ; e || ( n = n . substr ( 0 , t ) ) ; var s = n . match ( MessageComposer . autoCompleteRegEx ) ; if ( s ) { if ( this . previousQuery == s [ 0 ] ) return ; this . previousQuery = s [ 0 ] ; var o = SearchIndexManager . cleanSearchText ( s [ 3 ] ) ; if ( "@" == s [ 2 ] ) if ( this . mentions && this . mentions . index ) { if ( o . length ) for ( var r , l = SearchIndexManager . search ( o , this . mentions . index ) , c = [ ] , d = 0 , p = this . mentions . users . length ; d < p ; d ++ ) r = this . mentions . users [ d ] , l [ r . id ] && c . push ( r ) ; else var c = this . mentions . users ; c . length ? this . showMentionSuggestions ( c ) : this . hideSuggestions ( ) } else this . hideSuggestions ( ) ; else if ( s [ 1 ] || "/" != s [ 2 ] ) { if ( ":" == s [ 2 ] ) { if ( n . match ( /^\s*:(.+):\s*$/ ) ) return ; EmojiHelper . getPopularEmoji ( function ( e ) { if ( o . length ) { var t = EmojiHelper . searchEmojis ( o ) ; if ( t . length ) { for ( var n , a , i = [ ] , s = 0 , r = e . length ; s < r && ( n = e [ s ] . code , a = t . indexOf ( n ) , ! ( a >= 0 ) || ( i . push ( n ) , t . splice ( a , 1 ) , t . length ) ) ; s ++ ) ; this . showEmojiSuggestions ( i . concat ( t ) ) } else this . hideSuggestions ( ) } else this . showEmojiSuggestions ( e ) } . bind ( this ) ) } } else if ( this . commands && this . commands . index ) { if ( o . length ) for ( var u , l = SearchIndexManager . search ( o , this . commands . index ) , m = [ ] , d = 0 , p = this . commands . list . length ; d < p ; d ++ ) u = this . commands . list [ d ] , l [ u . value ] && m . push ( u ) ; else var m = this . commands . list ; m . length ? this . showCommandsSuggestions ( m ) : this . hideSuggestions ( ) } else this . hideSuggestions ( ) } else delete this . previousQuery , this . hideSuggestions ( ) } , MessageComposer . prototype . onFocusBlur = function ( e ) { this . isActive = "focus" == e . type , this . isActive ? setTimeout ( this . checkAutocomplete . bind ( this ) , 100 ) : ( this . cleanRichTextarea ( ) , this . hideSuggestions ( ) ) , this . richTextareaEl && document . execCommand ( "enableObjectResizing" , ! this . isActive , ! this . isActive ) } , MessageComposer . prototype . onRichPaste = function ( e ) { var t , n = ( e . originalEvent || e ) . clipboardData , a = n && n . items || [ ] ; for ( t = 0 ; t < a . length ; t ++ ) if ( "file" == a [ t ] . kind ) return e . preventDefault ( ) , ! 0 ; try { var i = n . getData ( "text/plain" ) } catch ( e ) { return ! 0 } return setZeroTimeout ( this . onChange . bind ( this ) , 0 ) , ! i . length || ( document . execCommand ( "insertText" , ! 1 , i ) , cancelEvent ( e ) ) } , MessageComposer . prototype . cleanRichTextarea = function ( e , t ) { if ( this . richTextareaEl [ 0 ] && ( void 0 === e && ( e = getRichValue ( this . richTextareaEl [ 0 ] ) ) , e . match ( /^\s*$/ ) && this . richTextareaEl . html ( ) . length > 0 && ( this . richTextareaEl . html ( "" ) , this . lastLength = 0 , this . wasEmpty = ! 0 , t ) ) ) { var n = this ; setZeroTimeout ( function ( ) { n . focus ( ) } ) } } , MessageComposer . prototype . onRichPasteNode = function ( e ) { var t = ( e . originalEvent || e ) . target , n = ( t || { } ) . src || "" , a = ! 1 ; if ( "data:" == n . substr ( 0 , 5 ) ) { a = ! 0 ; var i = dataUrlToBlob ( n ) ; this . onFilePaste
e = t ( function ( ) { $ ( i ) . removeClass ( "im_message_focus_active" ) , $ ( i ) . data ( "unfocus_promise" , ! 1 ) } , 2800 ) , $ ( i ) . data ( "unfocus_promise" , e ) } ) } } else ( a = $ ( ".im_message_unread_split:visible" , u ) [ 0 ] ) ? ( o = Math . max ( 0 , a . offsetTop - 52 ) , A = ! 1 ) : ( o = u . scrollHeight , A = ! 0 ) ; if ( o !== ! 1 ) { var p = function ( ) { C ( ) , t ( function ( ) { $ ( u ) . trigger ( "scroll" ) , E = u . scrollTop } ) , s && s ( ) } ; n ? $ ( u ) . animate ( { scrollTop : o } , 200 , p ) : ( u . scrollTop = o , p ( ) ) } } function l ( t ) { if ( s . is ( ":visible" ) || $ ( s [ 0 ] . parentNode . parentNode ) . is ( ":visible" ) ) { $ ( f ) . is ( ":visible" ) && $ ( f ) . css ( { height : $ ( y ) . height ( ) } ) , _ && _ . offsetHeight || ( _ = $ ( ".tg_page_head" ) [ 0 ] ) , v && v . offsetHeight || ( v = $ ( ".footer_wrap" ) [ 0 ] ) ; var n = v ? v . offsetHeight : 0 ; n && n ++ ; var a = $ ( e ) . height ( ) - h . offsetHeight - ( _ ? _ . offsetHeight : 48 ) - n ; $ ( d ) . css ( { height : a } ) , c ( ) , t !== ! 0 && ( A && onContentLoaded ( function ( ) { u . scrollTop = u . scrollHeight , C ( ) } ) , C ( 100 ) ) } } function c ( ) { $ ( p ) . css ( { marginTop : 0 } ) ; var e = u . offsetHeight - p . offsetHeight - g . offsetHeight - ( Config . Mobile ? 0 : 39 ) ; p . offsetHeight > 0 && e > 0 && $ ( p ) . css ( { marginTop : e } ) , $ ( d ) . nanoScroller ( ) } var d = $ ( ".im_history_wrap" , s ) [ 0 ] , p = $ ( ".im_history_messages" , s ) [ 0 ] , u = ( $ ( ".im_history" , s ) [ 0 ] , $ ( ".im_history_scrollable_wrap" , s ) [ 0 ] ) , m = $ ( ".im_history_scrollable" , s ) [ 0 ] , g = $ ( ".im_history_empty_wrap" , s ) [ 0 ] , h = $ ( ".im_bottom_panel_wrap" , s ) [ 0 ] , f = $ ( ".im_send_form_wrap" , s ) [ 0 ] , _ = $ ( ".tg_page_head" ) [ 0 ] , v = $ ( ".footer_wrap" ) [ 0 ] , y = $ ( ".im_send_form" , s ) [ 0 ] , b = ! 1 , w = ! 1 ; onContentLoaded ( function ( ) { u . scrollTop = u . scrollHeight } ) , $ ( d ) . nanoScroller ( { preventPageScrolling : ! 0 , tabIndex : - 1 , iOSNativeScrolling : ! 0 } ) ; var k , C = function ( e ) { t ( function ( ) { $ ( u ) . hasClass ( "im_history_to_bottom" ) || $ ( d ) . nanoScroller ( ) } , e || 0 ) } , S = ! 1 , M = [ "transform" , "webkitTransform" , "MozTransform" , "msTransform" , "OTransform" ] ; for ( k = 0 ; k < M . length ; k ++ ) if ( M [ k ] in p . style ) { S = M [ k ] ; break } var x = ! 1 , I = ! 1 ; i . $on ( "ui_history_append_new" , function ( e , t ) { if ( ! A && ! t . my ) return void onContentLoaded ( function ( ) { $ ( d ) . nanoScroller ( ) } ) ; if ( t . idleScroll ) return void onContentLoaded ( function ( ) { $ ( d ) . nanoScroller ( ) , r ( ! 0 ) } ) ; var i , s = x && ! n . idle . isIDLE && p . clientHeight > 0 ; if ( s ) i = u . scrollHeight ; else { var o = parseInt ( $ ( u ) . css ( "paddingRight" ) ) ; $ ( m ) . css ( { bottom : 0 , paddingRight : o } ) , $ ( u ) . addClass ( "im_history_to_bottom" ) } onContentLoaded ( function ( ) { if ( s ) { I = ! 0 , $ ( p ) . removeClass ( "im_history_appending" ) , u . scrollTop = u . scrollHeight , $ ( p ) . css ( S , "translate(0px, " + ( u . scrollHeight - i ) + "px)" ) , $ ( d ) . nanoScroller ( ) ; var e = { } ; e [ S ] = "translate(0px, 0px)" , $ ( p ) . addClass ( "im_history_appending" ) , a ( $ ( p ) , e ) . then ( function ( ) { I = ! 1 , $ ( p ) . removeClass ( "im_history_appending" ) , c ( ) } ) } else $ ( u ) . removeClass ( "im_history_to_bottom" ) , $ ( m ) . css ( { bottom : "" , paddingRight : 0 } ) , u . scrollTop = u . scrollHeight , c ( ) } ) } ) , i . $on ( "history_direction_key" , function ( e , t ) { var n = ! 1 ; switch ( console . warn ( "scroll top" , t . keyCode ) , t . keyCode ) { case 33 : n = u . scrollTop - u . clientHeight ; break ; case 34 : n = u . scrollTop + u . clientHeight ; break ; case 36 : n = 0 ; break ; case 35 : n = u . scrollHeight } n !== ! 1 && $ ( u ) . stop ( ) . animate ( { scrollTop : n } , 200 ) } ) , i . $on ( "ui_history_change" , function ( ) { var e = parseInt ( $ ( u ) . css ( "paddingRight" ) ) ; $ ( u ) . addClass ( "im_history_to_bottom" ) , u . scrollHeight , $ ( m ) . css ( { bottom : 0 , paddingRight : e } ) , onContentLoaded ( function ( ) { $ ( u ) . removeClass ( "im_history_to_bottom" ) , $ ( m ) . css ( { bottom : "" , paddingRight : "" } ) , l ( ! 0 ) , b = ! 1 , w = ! 1 , r ( ) } ) } ) , i . $on ( "ui_history_change_scroll" , function ( e , t ) { onContentLoaded ( function ( ) { r ( ! 1 , t ) } ) } ) , i . $on ( "ui_history_focus" , function ( ) { A || ( u . scrollTop = u . scrollHeight , C ( ) , A = ! 0 ) } ) , i . $on ( "ui_history_prepend" , function ( ) { var e = u . scrollHeight , n = u . scrollTop , a = parseInt ( $ ( u ) . css ( "paddingRight" ) ) , s = u . clientHeight ; $ ( u ) . addClass ( "im_history_to_bottom" ) , u . scrollHeight , $ ( m ) . css ( { bottom : - ( e - n - s ) , paddingRight : a } ) ; var o = function ( ) { $ ( u ) . removeClass ( "im_history_to_bottom" ) , $ ( m ) . css ( { bottom : "" , paddingRight : "" } ) , E >= 0 ? r ( ) : u . scrollTop = n + u . scrollHeight - e , c ( ) , b = ! 1 , t ( function ( ) { u . scrollHeight != e && $ ( u ) . trigger ( "scroll" ) } ) , clearTimeout ( l ) , d ( ) } , l = setTimeout ( o , 0 ) , d = i . $on ( "$viewContentLoaded" , o ) } ) , i . $on ( "ui_history_append" , function ( ) { var e = u . scrollHeight ; onContentLoaded ( function ( ) { A = ! 1 , c ( ) , w = ! 1 , E >= 0 && r ( ) , t ( function ( ) { u . scrollHeight != e && $ ( u ) . trigger ( "scroll" ) } ) } ) } ) , i . $on ( "ui_panel_update" , function ( e , n ) { l ( ) , onContentLoaded ( function ( ) { l ( ) , n && n . blur ? i . $broadcast ( "ui_message_blur" ) : getS
var a = n . myScrollToOn , i = function ( ) { onContentLoaded ( function ( ) { $ ( "html, body" ) . animate ( { scrollTop : t . offset ( ) . top } , 200 ) } ) } ; "$init" == a ? i ( ) : e . $on ( a , i ) } } } ) . directive ( "myComposerDropdown" , function ( ) { return { templateUrl : templateUrl ( "composer_dropdown" ) } } ) . directive ( "myEmojiSuggestions" , function ( ) { return { link : function ( e , t , n ) { e . $watchCollection ( "emojiCodes" , function ( e ) { var n , a , i , s , o , r , l , c , d = [ ] , p = Config . Mobile ? 26 : 20 , u = Math . min ( 5 , e . length ) ; for ( r = 0 ; r < u ; r ++ ) n = e [ r ] , n . code && ( n = n . code ) , ( a = Config . Emoji [ n ] ) && ( i = EmojiHelper . spritesheetPositions [ n ] , o = i [ 0 ] , s = i [ 1 ] , l = p * i [ 3 ] , c = p * i [ 2 ] , d . push ( '<li><a class="composer_emoji_option" data-code="' + encodeEntities ( n ) + '"><i class="emoji emoji-w' , p , " emoji-spritesheet-" + o + '" style="background-position: -' + l + "px -" + c + 'px;"></i><span class="composer_emoji_shortcut">:' + encodeEntities ( a [ 1 ] [ 0 ] ) + ":</span></a></li>" ) ) ; t . html ( d . join ( "" ) ) , console . log ( dT ( ) , "emoji done" ) } ) } } } ) . directive ( "myInlineResults" , [ "AppPhotosManager" , "ExternalResourcesManager" , "AppDocsManager" , function ( e , t , n ) { return { templateUrl : templateUrl ( "inline_results" ) , scope : { botResults : "=myInlineResults" } , link : function ( a , i , s ) { a . $watch ( "botResults.results" , function ( a ) { angular . forEach ( a , function ( a ) { a . thumb _url && ! a . thumbUrl && t . downloadByURL ( a . thumb _url ) . then ( function ( e ) { a . thumbUrl = e } ) , "gif" == a . type && a . content _url && ! a . contentUrl && t . downloadByURL ( a . content _url ) . then ( function ( e ) { a . contentUrl = e } ) , "gif" != a . type && "sticker" != a . type || ! a . document || n . downloadDoc ( a . document . id ) ; var i ; if ( "photo" == a . type && a . photo ) { i = e . choosePhotoSize ( a . photo , a . thumbW , a . thumbH ) ; var s = calcImageInBox ( i . w , i . h , a . thumbW , a . thumbH ) ; a . thumb = { width : s . w , height : s . h , location : i . location , size : i . size } } "game" == a . type && a . photo && ( i = e . choosePhotoSize ( a . photo , 100 , 100 ) , a . thumb = { location : i . location , size : i . size } ) } ) } ) } } } ] ) . directive ( "myGameCommunication" , [ "$window" , function ( e ) { function t ( t , n , a ) { onContentLoaded ( function ( ) { var a = $ ( "iframe, webview" , n ) [ 0 ] , i = a . contentWindow , s = function ( e ) { if ( e = e . originalEvent || e , ! e . source || e . source == i ) { var n = e . data ; try { var a = JSON . parse ( n ) } catch ( s ) { return } a && a . eventType && t . $emit ( "game_frame_event" , a ) } } ; $ ( e ) . on ( "message" , s ) , t . $on ( "$destroy" , function ( ) { $ ( e ) . off ( "message" , s ) } ) } ) } return { link : t } } ] ) . directive ( "myEmojiImage" , [ "RichTextProcessor" , function ( e ) { function t ( t , n , a ) { var i = a . myEmojiImage , s = e . wrapRichText ( i , { noLinks : ! 0 , noLinebreaks : ! 0 } ) ; n . html ( s . valueOf ( ) ) } return { link : t } } ] ) . directive ( "myExternalEmbed" , function ( ) { function e ( e , r , l ) { var c = e . $eval ( l . myExternalEmbed ) ; if ( c ) { var d , p = "" , u = ! 1 ; switch ( c [ 0 ] ) { case "youtube" : d = c [ 1 ] , p = '<div class="im_message_media_embed im_message_video_embed"><' + o + ' type="text/html" frameborder="0" src="https://www.youtube.com/embed/' + d + '?autoplay=0&controls=2" webkitallowfullscreen mozallowfullscreen allowfullscreen></' + o + "></div>" ; break ; case "vimeo" : d = c [ 1 ] , p = '<div class="im_message_media_embed im_message_video_embed"><' + o + ' type="text/html" frameborder="0" src="https://player.vimeo.com/video/' + d + '?title=0&byline=0&portrait=0" webkitallowfullscreen mozallowfullscreen allowfullscreen></' + o + "></div>" ; break ; case "instagram" : var m = c [ 1 ] ; p = '<div class="im_message_media_embed im_message_insta_embed"><' + o + ' type="text/html" frameborder="0" src="https://instagram.com/p/' + m + '/embed/"></' + o + "></div>" ; break ; case "vine" : var g = c [ 1 ] ; p = '<div class="im_message_media_embed im_message_vine_embed"><' + o + ' type="text/html" frameborder="0" src="https://vine.co/v/' + g + '/embed/simple"></' + o + "></div>" ; break ; case "soundcloud" : var h = c [ 1 ] ; p = '<div class="im_message_media_embed im_message_soundcloud_embed"><' + o + ' type="text/html" frameborder="0" src="https://w.soundcloud.com/player/?url=' + encodeEntities ( encodeURIComponent ( h ) ) + '&auto_play=false&hide_related=true&show_comments=false&show_user=true&show_reposts=false&visual=true"></' + o + "></div>" ; break ; case "spotify" : var f = c [ 1 ] ; p = '<div class="im_message_media_embed im_message_spotify_embed"><' + o + ' type="text/html" frameborder="0" allowtransparency="true" src="https://embed.spotify.com/?uri=spotify:' + encodeEntities ( encodeURIComponent ( f ) ) + '"></' + o + "></div>" ; break ; case "twitter" : p = ' < div class = "im_message_twitter_embed" > < bl