2018-01-25 11:06:58 +01:00
/*
2019-01-07 12:02:38 +01:00
* Copyright (c) Ascensio System SIA 2019. All rights reserved
2018-01-25 11:06:58 +01:00
*
* http://www.onlyoffice.com
*
* Version: 0.0.0 (build:0)
*/
2019-01-15 14:28:49 +01:00
function onDropDownKeyDown ( t ) { var e = $ ( this ) , i = e . parent ( ) , n = jQuery . Event ( "keydown.before.bs.dropdown" ) , o = jQuery . Event ( "keydown.after.bs.dropdown" ) ; i . trigger ( n ) , i . hasClass ( "no-stop-propagate" ) ? ( arguments . length > 1 && arguments [ 1 ] instanceof KeyboardEvent && ( t = arguments [ 1 ] ) , ! /^(38|40|27|13|9|37|39)$/ . test ( t . keyCode ) || t . ctrlKey || t . altKey || ( patchDropDownKeyDownAdditional . call ( this , t ) , /(37|39)/ . test ( t . keyCode ) || ( t . preventDefault ( ) , t . stopPropagation ( ) ) ) ) : ( patchDropDownKeyDown . call ( this , t ) , t . preventDefault ( ) , t . stopPropagation ( ) ) , i . trigger ( o ) } function patchDropDownKeyDown ( t ) { if ( /(38|40|27|37|39)/ . test ( t . keyCode ) ) { var e = $ ( this ) ; if ( t . preventDefault ( ) , t . stopPropagation ( ) , ! e . is ( ".disabled, :disabled" ) ) { var i = getParent ( e ) , n = i . hasClass ( "open" ) || i . hasClass ( "over" ) ; if ( ! n || n && 27 == t . keyCode ) { if ( 27 == t . which ) { if ( o = $ ( "[role=menu] li.dropdown-submenu.over:visible" , i ) , o . length ) return o . eq ( o . length - 1 ) . removeClass ( "over" ) , ! 1 ; i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) ? ( i . removeClass ( "over" ) , i . find ( "> a" ) . focus ( ) ) : i . find ( "[data-toggle=dropdown]" ) . focus ( ) } return n ? e . click ( ) : void 0 } var o = $ ( "> [role=menu] > li:not(.divider):not(.disabled):visible" , i ) . find ( "> a" ) ; if ( o . length ) { var s = o . index ( o . filter ( ":focus" ) ) ; if ( 39 == t . keyCode ) { if ( s < 0 ) return ; var a = o . eq ( s ) . parent ( ) ; a . hasClass ( "dropdown-submenu" ) && ! a . hasClass ( "over" ) && ( a . mouseenter ( ) , a . addClass ( "focused-submenu" ) , _ . delay ( function ( ) { var t = $ ( "> [role=menu]" , a ) , e = t . find ( "> li:not(.divider):not(.disabled):visible > a" ) , i = t . find ( "> li:not(.divider):not(.disabled):visible .dataview" ) , n = 0 ; if ( t . find ( "> .menu-scroll" ) . length > 0 ) for ( var o = t . scrollTop ( ) , s = 0 ; s < e . length ; s ++ ) if ( e [ s ] . offsetTop > o ) { n = s ; break } e . length > 0 && i . length < 1 && e . eq ( n ) . focus ( ) } , 250 ) ) } else 37 == t . keyCode ? i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) && ( i . removeClass ( "over" ) , i . find ( "> a" ) . focus ( ) ) : ( 38 == t . keyCode ? s > 0 ? s -- : s = e . hasClass ( "no-cyclic" ) ? 0 : o . length - 1 : 40 == t . keyCode && ( s < o . length - 1 ? s ++ : s = e . hasClass ( "no-cyclic" ) ? o . length - 1 : 0 ) , ~ s || ( s = 0 ) , i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) && i . addClass ( "focused-submenu" ) , o . eq ( s ) . focus ( ) ) } } } } function patchDropDownKeyDownAdditional ( t ) { if ( /(38|40|27|37|39)/ . test ( t . keyCode ) ) { var e = $ ( this ) ; if ( /(37|39)/ . test ( t . keyCode ) || ( t . preventDefault ( ) , t . stopPropagation ( ) ) , ! e . is ( ".disabled, :disabled" ) ) { var i = getParent ( e ) , n = i . hasClass ( "open" ) || i . hasClass ( "over" ) ; if ( ! n || n && ( 27 == t . keyCode || 37 == t . keyCode || 39 == t . keyCode ) ) return n ? e . click ( ) : void 0 ; var o = $ ( "> [role=menu] > li:not(.divider):not(.disabled):visible" , i ) . find ( "> a" ) ; if ( o . length ) { var s = o . index ( o . filter ( ".focus" ) ) ; 38 == t . keyCode ? s > 0 ? s -- : s = e . hasClass ( "no-cyclic" ) ? 0 : o . length - 1 : 40 == t . keyCode && ( s < o . length - 1 ? s ++ : s = e . hasClass ( "no-cyclic" ) ? o . length - 1 : 0 ) , ~ s || ( s = 0 ) , o . removeClass ( "focus" ) , o . eq ( s ) . addClass ( "focus" ) } } } } function getParent ( t ) { var e = t . attr ( "data-target" ) ; e || ( e = t . attr ( "href" ) , e = e && /#/ . test ( e ) && e . replace ( /.*(?=#[^\s]*$)/ , "" ) ) ; var i = e && $ ( e ) ; return i && i . length ? i : t . parent ( ) } function clearMenus ( t ) { $ ( ".dropdown-toggle" ) . each ( function ( e ) { var i = $ ( this ) . parent ( ) ; if ( i . hasClass ( "open" ) ) { if ( "prevent-canvas-click" == i . attr ( "data-value" ) ) return void i . attr ( "data-value" , "" ) ; i . trigger ( e = $ . Event ( "hide.bs.dropdown" ) ) , e . isDefaultPrevented ( ) || i . removeClass ( "open" ) . trigger ( "hidden.bs.dropdown" , t ) } } ) } if ( function ( ) { var t = "object" == typeof self && self . self === self && self || "object" == typeof global && global . global === global && global || this || { } , e = t . _ , i = Array . prototype , n = Object . prototype , o = "undefined" != typeof Symbol ? Symbol . prototype : null , s = i . push , a = i . slice , r = n . toString , l = n . hasOwnProperty , c = Array . isArray , d = Object . keys , h = Object . create , p = function ( ) { } , m = function ( t ) { return t instanceof m ? t : this instanceof m ? void ( this . _wrapped = t ) : new m ( t ) } ; "undefined" == typeof exports || exports . nodeType ? t . _ = m : ( "undefined" != typeof module && ! module . nodeType && module . exports && ( exports = module . exports = m ) , exports . _ = m ) , m . VERSION = "1.8.3" ; var u , g = function ( t , e , i ) { if ( void 0 === e ) return t ; switch ( i ) { case 1 : return function ( i ) { return t . call ( e , i ) } ; case null : case 3 : return function ( i , n , o ) { return t . call ( e , i , n , o ) } ; case 4 : return function ( i , n , o , s ) { return t . call ( e , i , n , o , s ) } } return function ( ) { return t . apply ( e , arguments ) } } , b = function ( t , e , i ) { return m . it
; var n , o = 0 , s = e . toLowerCase ( ) . match ( Pt ) || [ ] ; if ( ut . isFunction ( i ) ) for ( ; n = s [ o ++ ] ; ) "+" === n [ 0 ] ? ( n = n . slice ( 1 ) || "*" , ( t [ n ] = t [ n ] || [ ] ) . unshift ( i ) ) : ( t [ n ] = t [ n ] || [ ] ) . push ( i ) } } function J ( t , e , i , n ) { function o ( r ) { var l ; return s [ r ] = ! 0 , ut . each ( t [ r ] || [ ] , function ( t , r ) { var c = r ( e , i , n ) ; return "string" != typeof c || a || s [ c ] ? a ? ! ( l = c ) : void 0 : ( e . dataTypes . unshift ( c ) , o ( c ) , ! 1 ) } ) , l } var s = { } , a = t === Le ; return o ( e . dataTypes [ 0 ] ) || ! s [ "*" ] && o ( "*" ) } function Z ( t , e ) { var i , n , o = ut . ajaxSettings . flatOptions || { } ; for ( i in e ) void 0 !== e [ i ] && ( ( o [ i ] ? t : n || ( n = { } ) ) [ i ] = e [ i ] ) ; return n && ut . extend ( ! 0 , t , n ) , t } function Q ( t , e , i ) { for ( var n , o , s , a , r = t . contents , l = t . dataTypes ; "*" === l [ 0 ] ; ) l . shift ( ) , void 0 === n && ( n = t . mimeType || e . getResponseHeader ( "Content-Type" ) ) ; if ( n ) for ( o in r ) if ( r [ o ] && r [ o ] . test ( n ) ) { l . unshift ( o ) ; break } if ( l [ 0 ] in i ) s = l [ 0 ] ; else { for ( o in i ) { if ( ! l [ 0 ] || t . converters [ o + " " + l [ 0 ] ] ) { s = o ; break } a || ( a = o ) } s = s || a } if ( s ) return s !== l [ 0 ] && l . unshift ( s ) , i [ s ] } function tt ( t , e , i , n ) { var o , s , a , r , l , c = { } , d = t . dataTypes . slice ( ) ; if ( d [ 1 ] ) for ( a in t . converters ) c [ a . toLowerCase ( ) ] = t . converters [ a ] ; for ( s = d . shift ( ) ; s ; ) if ( t . responseFields [ s ] && ( i [ t . responseFields [ s ] ] = e ) , ! l && n && t . dataFilter && ( e = t . dataFilter ( e , t . dataType ) ) , l = s , s = d . shift ( ) ) if ( "*" === s ) s = l ; else if ( "*" !== l && l !== s ) { if ( ! ( a = c [ l + " " + s ] || c [ "* " + s ] ) ) for ( o in c ) if ( r = o . split ( " " ) , r [ 1 ] === s && ( a = c [ l + " " + r [ 0 ] ] || c [ "* " + r [ 0 ] ] ) ) { ! 0 === a ? a = c [ o ] : ! 0 !== c [ o ] && ( s = r [ 0 ] , d . unshift ( r [ 1 ] ) ) ; break } if ( ! 0 !== a ) if ( a && t . throws ) e = a ( e ) ; else try { e = a ( e ) } catch ( t ) { return { state : "parsererror" , error : a ? t : "No conversion from " + l + " to " + s } } } return { state : "success" , data : e } } var et = [ ] , it = t . document , nt = Object . getPrototypeOf , ot = et . slice , st = et . concat , at = et . push , rt = et . indexOf , lt = { } , ct = lt . toString , dt = lt . hasOwnProperty , ht = dt . toString , pt = ht . call ( Object ) , mt = { } , ut = function ( t , e ) { return new ut . fn . init ( t , e ) } , gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g , bt = /^-ms-/ , ft = /-([a-z])/g , Ct = function ( t , e ) { return e . toUpperCase ( ) } ; ut . fn = ut . prototype = { jquery : "3.2.1" , constructor : ut , length : 0 , toArray : function ( ) { return ot . call ( this ) } , get : function ( t ) { return null == t ? ot . call ( this ) : t < 0 ? this [ t + this . length ] : this [ t ] } , pushStack : function ( t ) { var e = ut . merge ( this . constructor ( ) , t ) ; return e . prevObject = this , e } , each : function ( t ) { return ut . each ( this , t ) } , map : function ( t ) { return this . pushStack ( ut . map ( this , function ( e , i ) { return t . call ( e , i , e ) } ) ) } , slice : function ( ) { return this . pushStack ( ot . apply ( this , arguments ) ) } , first : function ( ) { return this . eq ( 0 ) } , last : function ( ) { return this . eq ( - 1 ) } , eq : function ( t ) { var e = this . length , i = + t + ( t < 0 ? e : 0 ) ; return this . pushStack ( i >= 0 && i < e ? [ this [ i ] ] : [ ] ) } , end : function ( ) { return this . prevObject || this . constructor ( ) } , push : at , sort : et . sort , splice : et . splice } , ut . extend = ut . fn . extend = function ( ) { var t , e , i , n , o , s , a = arguments [ 0 ] || { } , r = 1 , l = arguments . length , c = ! 1 ; for ( "boolean" == typeof a && ( c = a , a = arguments [ r ] || { } , r ++ ) , "object" == typeof a || ut . isFunction ( a ) || ( a = { } ) , r === l && ( a = this , r -- ) ; r < l ; r ++ ) if ( null != ( t = arguments [ r ] ) ) for ( e in t ) i = a [ e ] , n = t [ e ] , a !== n && ( c && n && ( ut . isPlainObject ( n ) || ( o = Array . isArray ( n ) ) ) ? ( o ? ( o = ! 1 , s = i && Array . isArray ( i ) ? i : [ ] ) : s = i && ut . isPlainObject ( i ) ? i : { } , a [ e ] = ut . extend ( c , s , n ) ) : void 0 !== n && ( a [ e ] = n ) ) ; return a } , ut . extend ( { expando : "jQuery" + ( "3.2.1" + Math . random ( ) ) . replace ( /\D/g , "" ) , isReady : ! 0 , error : function ( t ) { throw new Error ( t ) } , noop : function ( ) { } , isFunction : function ( t ) { return "function" === ut . type ( t ) } , isWindow : function ( t ) { return null != t && t === t . window } , isNumeric : function ( t ) { var e = ut . type ( t ) ; return ( "number" === e || "string" === e ) && ! isNaN ( t - parseFloat ( t ) ) } , isPlainObject : function ( t ) { var e , i ; return ! ( ! t || "[object Object]" !== ct . call ( t ) ) && ( ! ( e = nt ( t ) ) || "function" == typeof ( i = dt . call ( e , "constructor" ) && e . constructor ) && ht . call ( i ) === pt ) } , isEmptyObject : function ( t ) { var e ; for ( e in t ) return ! 1 ; return ! 0 } , type : function ( t ) { return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? lt [ ct . call ( t ) ] || "object" : typeof t } , globalEval : function ( t ) { i ( t ) } , camelCase : function ( t ) { return t . replace ( bt , "ms-" ) . replace ( ft , Ct ) } , each : function ( t , e ) { var i , o = 0 ; if ( n ( t ) ) for ( i = t . length ; o < i && ! 1 !== e . call ( t [ o ] , o , t [ o ] ) ; o ++ ) ; else for ( o in t ) if ( ! 1 === e . call ( t [ o ] , o , t [ o ] ) ) break ; return t } , trim : function ( t ) { return null == t ? "" : ( t + "" ) . replace ( gt , "" ) } , makeArray : function ( t , e ) { var i = e || [ ] ; return null != t && ( n ( Object ( t ) ) ? ut . merge (
ut . readyException ( t ) } ) , this } , ut . extend ( { isReady : ! 1 , readyWait : 1 , ready : function ( t ) { ( ! 0 === t ? -- ut . readyWait : ut . isReady ) || ( ut . isReady = ! 0 , ! 0 !== t && -- ut . readyWait > 0 || Bt . resolveWith ( it , [ ut ] ) ) } } ) , ut . ready . then = Bt . then , "complete" === it . readyState || "loading" !== it . readyState && ! it . documentElement . doScroll ? t . setTimeout ( ut . ready ) : ( it . addEventListener ( "DOMContentLoaded" , h ) , t . addEventListener ( "load" , h ) ) ; var Ut = function ( t , e , i , n , o , s , a ) { var r = 0 , l = t . length , c = null == i ; if ( "object" === ut . type ( i ) ) { o = ! 0 ; for ( r in i ) Ut ( t , e , r , i [ r ] , ! 0 , s , a ) } else if ( void 0 !== n && ( o = ! 0 , ut . isFunction ( n ) || ( a = ! 0 ) , c && ( a ? ( e . call ( t , n ) , e = null ) : ( c = e , e = function ( t , e , i ) { return c . call ( ut ( t ) , i ) } ) ) , e ) ) for ( ; r < l ; r ++ ) e ( t [ r ] , i , a ? n : n . call ( t [ r ] , r , e ( t [ r ] , i ) ) ) ; return o ? t : c ? e . call ( t ) : l ? e ( t [ 0 ] , i ) : s } , Et = function ( t ) { return 1 === t . nodeType || 9 === t . nodeType || ! + t . nodeType } ; p . uid = 1 , p . prototype = { cache : function ( t ) { var e = t [ this . expando ] ; return e || ( e = { } , Et ( t ) && ( t . nodeType ? t [ this . expando ] = e : Object . defineProperty ( t , this . expando , { value : e , configurable : ! 0 } ) ) ) , e } , set : function ( t , e , i ) { var n , o = this . cache ( t ) ; if ( "string" == typeof e ) o [ ut . camelCase ( e ) ] = i ; else for ( n in e ) o [ ut . camelCase ( n ) ] = e [ n ] ; return o } , get : function ( t , e ) { return void 0 === e ? this . cache ( t ) : t [ this . expando ] && t [ this . expando ] [ ut . camelCase ( e ) ] } , access : function ( t , e , i ) { return void 0 === e || e && "string" == typeof e && void 0 === i ? this . get ( t , e ) : ( this . set ( t , e , i ) , void 0 !== i ? i : e ) } , remove : function ( t , e ) { var i , n = t [ this . expando ] ; if ( void 0 !== n ) { if ( void 0 !== e ) { Array . isArray ( e ) ? e = e . map ( ut . camelCase ) : ( e = ut . camelCase ( e ) , e = e in n ? [ e ] : e . match ( Pt ) || [ ] ) , i = e . length ; for ( ; i -- ; ) delete n [ e [ i ] ] } ( void 0 === e || ut . isEmptyObject ( n ) ) && ( t . nodeType ? t [ this . expando ] = void 0 : delete t [ this . expando ] ) } } , hasData : function ( t ) { var e = t [ this . expando ] ; return void 0 !== e && ! ut . isEmptyObject ( e ) } } ; var Vt = new p , Dt = new p , Rt = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/ , Ft = /[A-Z]/g ; ut . extend ( { hasData : function ( t ) { return Dt . hasData ( t ) || Vt . hasData ( t ) } , data : function ( t , e , i ) { return Dt . access ( t , e , i ) } , removeData : function ( t , e ) { Dt . remove ( t , e ) } , _data : function ( t , e , i ) { return Vt . access ( t , e , i ) } , _removeData : function ( t , e ) { Vt . remove ( t , e ) } } ) , ut . fn . extend ( { data : function ( t , e ) { var i , n , o , s = this [ 0 ] , a = s && s . attributes ; if ( void 0 === t ) { if ( this . length && ( o = Dt . get ( s ) , 1 === s . nodeType && ! Vt . get ( s , "hasDataAttrs" ) ) ) { for ( i = a . length ; i -- ; ) a [ i ] && ( n = a [ i ] . name , 0 === n . indexOf ( "data-" ) && ( n = ut . camelCase ( n . slice ( 5 ) ) , u ( s , n , o [ n ] ) ) ) ; Vt . set ( s , "hasDataAttrs" , ! 0 ) } return o } return "object" == typeof t ? this . each ( function ( ) { Dt . set ( this , t ) } ) : Ut ( this , function ( e ) { var i ; if ( s && void 0 === e ) { if ( void 0 !== ( i = Dt . get ( s , t ) ) ) return i ; if ( void 0 !== ( i = u ( s , t ) ) ) return i } else this . each ( function ( ) { Dt . set ( this , t , e ) } ) } , null , e , arguments . length > 1 , null , ! 0 ) } , removeData : function ( t ) { return this . each ( function ( ) { Dt . remove ( this , t ) } ) } } ) , ut . extend ( { queue : function ( t , e , i ) { var n ; if ( t ) return e = ( e || "fx" ) + "queue" , n = Vt . get ( t , e ) , i && ( ! n || Array . isArray ( i ) ? n = Vt . access ( t , e , ut . makeArray ( i ) ) : n . push ( i ) ) , n || [ ] } , dequeue : function ( t , e ) { e = e || "fx" ; var i = ut . queue ( t , e ) , n = i . length , o = i . shift ( ) , s = ut . _queueHooks ( t , e ) , a = function ( ) { ut . dequeue ( t , e ) } ; "inprogress" === o && ( o = i . shift ( ) , n -- ) , o && ( "fx" === e && i . unshift ( "inprogress" ) , delete s . stop , o . call ( t , a , s ) ) , ! n && s && s . empty . fire ( ) } , _queueHooks : function ( t , e ) { var i = e + "queueHooks" ; return Vt . get ( t , i ) || Vt . access ( t , i , { empty : ut . Callbacks ( "once memory" ) . add ( function ( ) { Vt . remove ( t , [ e + "queue" , i ] ) } ) } ) } } ) , ut . fn . extend ( { queue : function ( t , e ) { var i = 2 ; return "string" != typeof t && ( e = t , t = "fx" , i -- ) , arguments . length < i ? ut . queue ( this [ 0 ] , t ) : void 0 === e ? this : this . each ( function ( ) { var i = ut . queue ( this , t , e ) ; ut . _queueHooks ( this , t ) , "fx" === t && "inprogress" !== i [ 0 ] && ut . dequeue ( this , t ) } ) } , dequeue : function ( t ) { return this . each ( function ( ) { ut . dequeue ( this , t ) } ) } , clearQueue : function ( t ) { return this . queue ( t || "fx" , [ ] ) } , promise : function ( t , e ) { var i , n = 1 , o = ut . Deferred ( ) , s = this , a = this . length , r = function ( ) { -- n || o . resolveWith ( s , [ s ] ) } ; for ( "string" != typeof t && ( e = t , t = void 0 ) , t = t || "fx" ; a -- ; ) ( i = Vt . get ( s [ a ] , t + "queueHooks" ) ) && i . empty && ( n ++ , i . empty . add ( r ) ) ; return r ( ) , o . promise ( e ) } } ) ; var Lt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ . source , Ht = new RegExp ( "^(?:([+-])=|)(" + Lt + ")([a-z%]*)$" , "i" ) , Ot = [ "Top" , "Right" , "Bottom" , "Left" ] , Nt = function ( t , e ) { return t = e || t , "none" === t . style . display || "" === t . sty
json : "application/json, text/javascript" } , contents : { xml : /\bxml\b/ , html : /\bhtml/ , json : /\bjson\b/ } , responseFields : { xml : "responseXML" , text : "responseText" , json : "responseJSON" } , converters : { "* text" : String , "text html" : ! 0 , "text json" : JSON . parse , "text xml" : ut . parseXML } , flatOptions : { url : ! 0 , context : ! 0 } } , ajaxSetup : function ( t , e ) { return e ? Z ( Z ( t , ut . ajaxSettings ) , e ) : Z ( ut . ajaxSettings , t ) } , ajaxPrefilter : X ( Fe ) , ajaxTransport : X ( Le ) , ajax : function ( e , i ) { function n ( e , i , n , r ) { var c , p , m , _ , y , w = i ; d || ( d = ! 0 , l && t . clearTimeout ( l ) , o = void 0 , a = r || "" , x . readyState = e > 0 ? 4 : 0 , c = e >= 200 && e < 300 || 304 === e , n && ( _ = Q ( u , x , n ) ) , _ = tt ( u , _ , x , c ) , c ? ( u . ifModified && ( y = x . getResponseHeader ( "Last-Modified" ) , y && ( ut . lastModified [ s ] = y ) , ( y = x . getResponseHeader ( "etag" ) ) && ( ut . etag [ s ] = y ) ) , 204 === e || "HEAD" === u . type ? w = "nocontent" : 304 === e ? w = "notmodified" : ( w = _ . state , p = _ . data , m = _ . error , c = ! m ) ) : ( m = w , ! e && w || ( w = "error" , e < 0 && ( e = 0 ) ) ) , x . status = e , x . statusText = ( i || w ) + "" , c ? f . resolveWith ( g , [ p , w , x ] ) : f . rejectWith ( g , [ x , w , m ] ) , x . statusCode ( v ) , v = void 0 , h && b . trigger ( c ? "ajaxSuccess" : "ajaxError" , [ x , u , c ? p : m ] ) , C . fireWith ( g , [ x , w ] ) , h && ( b . trigger ( "ajaxComplete" , [ x , u ] ) , -- ut . active || ut . event . trigger ( "ajaxStop" ) ) ) } "object" == typeof e && ( i = e , e = void 0 ) , i = i || { } ; var o , s , a , r , l , c , d , h , p , m , u = ut . ajaxSetup ( { } , i ) , g = u . context || u , b = u . context && ( g . nodeType || g . jquery ) ? ut ( g ) : ut . event , f = ut . Deferred ( ) , C = ut . Callbacks ( "once memory" ) , v = u . statusCode || { } , _ = { } , y = { } , w = "canceled" , x = { readyState : 0 , getResponseHeader : function ( t ) { var e ; if ( d ) { if ( ! r ) for ( r = { } ; e = Ee . exec ( a ) ; ) r [ e [ 1 ] . toLowerCase ( ) ] = e [ 2 ] ; e = r [ t . toLowerCase ( ) ] } return null == e ? null : e } , getAllResponseHeaders : function ( ) { return d ? a : null } , setRequestHeader : function ( t , e ) { return null == d && ( t = y [ t . toLowerCase ( ) ] = y [ t . toLowerCase ( ) ] || t , _ [ t ] = e ) , this } , overrideMimeType : function ( t ) { return null == d && ( u . mimeType = t ) , this } , statusCode : function ( t ) { var e ; if ( t ) if ( d ) x . always ( t [ x . status ] ) ; else for ( e in t ) v [ e ] = [ v [ e ] , t [ e ] ] ; return this } , abort : function ( t ) { var e = t || w ; return o && o . abort ( e ) , n ( 0 , e ) , this } } ; if ( f . promise ( x ) , u . url = ( ( e || u . url || xe . href ) + "" ) . replace ( Re , xe . protocol + "//" ) , u . type = i . method || i . type || u . method || u . type , u . dataTypes = ( u . dataType || "*" ) . toLowerCase ( ) . match ( Pt ) || [ "" ] , null == u . crossDomain ) { c = it . createElement ( "a" ) ; try { c . href = u . url , c . href = c . href , u . crossDomain = Oe . protocol + "//" + Oe . host != c . protocol + "//" + c . host } catch ( t ) { u . crossDomain = ! 0 } } if ( u . data && u . processData && "string" != typeof u . data && ( u . data = ut . param ( u . data , u . traditional ) ) , J ( Fe , u , i , x ) , d ) return x ; h = ut . event && u . global , h && 0 == ut . active ++ && ut . event . trigger ( "ajaxStart" ) , u . type = u . type . toUpperCase ( ) , u . hasContent = ! De . test ( u . type ) , s = u . url . replace ( Be , "" ) , u . hasContent ? u . data && u . processData && 0 === ( u . contentType || "" ) . indexOf ( "application/x-www-form-urlencoded" ) && ( u . data = u . data . replace ( Me , "+" ) ) : ( m = u . url . slice ( s . length ) , u . data && ( s += ( Ae . test ( s ) ? "&" : "?" ) + u . data , delete u . data ) , ! 1 === u . cache && ( s = s . replace ( Ue , "$1" ) , m = ( Ae . test ( s ) ? "&" : "?" ) + "_=" + Se ++ + m ) , u . url = s + m ) , u . ifModified && ( ut . lastModified [ s ] && x . setRequestHeader ( "If-Modified-Since" , ut . lastModified [ s ] ) , ut . etag [ s ] && x . setRequestHeader ( "If-None-Match" , ut . etag [ s ] ) ) , ( u . data && u . hasContent && ! 1 !== u . contentType || i . contentType ) && x . setRequestHeader ( "Content-Type" , u . contentType ) , x . setRequestHeader ( "Accept" , u . dataTypes [ 0 ] && u . accepts [ u . dataTypes [ 0 ] ] ? u . accepts [ u . dataTypes [ 0 ] ] + ( "*" !== u . dataTypes [ 0 ] ? ", " + He + "; q=0.01" : "" ) : u . accepts [ "*" ] ) ; for ( p in u . headers ) x . setRequestHeader ( p , u . headers [ p ] ) ; if ( u . beforeSend && ( ! 1 === u . beforeSend . call ( g , x , u ) || d ) ) return x . abort ( ) ; if ( w = "abort" , C . add ( u . complete ) , x . done ( u . success ) , x . fail ( u . error ) , o = J ( Le , u , i , x ) ) { if ( x . readyState = 1 , h && b . trigger ( "ajaxSend" , [ x , u ] ) , d ) return x ; u . async && u . timeout > 0 && ( l = t . setTimeout ( function ( ) { x . abort ( "timeout" ) } , u . timeout ) ) ; try { d = ! 1 , o . send ( _ , n ) } catch ( t ) { if ( d ) throw t ; n ( - 1 , t ) } } else n ( - 1 , "No Transport" ) ; return x } , getJSON : function ( t , e , i ) { return ut . get ( t , e , i , "json" ) } , getScript : function ( t , e ) { return ut . get ( t , void 0 , e , "script" ) } } ) , ut . each ( [ "get" , "post" ] , function ( t , e ) { ut [ e ] = function ( t , i , n , o ) { return ut . isFunction ( i ) && ( o = o || n , n = i , i = void 0 ) , ut . ajax ( ut . extend ( { url : t , type : e , dataType : o , data : i , success : n } , ut . isPlainObject ( t ) && t ) ) } } ) , ut . _evalUrl = function ( t ) { return ut . ajax ( { url : t , type : "GET" , dataType : "script" , cache : ! 0 , async : ! 1 , global : ! 1
; o || i . data ( "bs.alert" , o = new n ( this ) ) , "string" == typeof e && o [ e ] . call ( i ) } ) } var i = '[data-dismiss="alert"]' , n = function ( e ) { t ( e ) . on ( "click" , i , this . close ) } ; n . VERSION = "3.3.7" , n . TRANSITION _DURATION = 150 , n . prototype . close = function ( e ) { function i ( ) { a . detach ( ) . trigger ( "closed.bs.alert" ) . remove ( ) } var o = t ( this ) , s = o . attr ( "data-target" ) ; s || ( s = o . attr ( "href" ) , s = s && s . replace ( /.*(?=#[^\s]*$)/ , "" ) ) ; var a = t ( "#" === s ? [ ] : s ) ; e && e . preventDefault ( ) , a . length || ( a = o . closest ( ".alert" ) ) , a . trigger ( e = t . Event ( "close.bs.alert" ) ) , e . isDefaultPrevented ( ) || ( a . removeClass ( "in" ) , t . support . transition && a . hasClass ( "fade" ) ? a . one ( "bsTransitionEnd" , i ) . emulateTransitionEnd ( n . TRANSITION _DURATION ) : i ( ) ) } ; var o = t . fn . alert ; t . fn . alert = e , t . fn . alert . Constructor = n , t . fn . alert . noConflict = function ( ) { return t . fn . alert = o , this } , t ( document ) . on ( "click.bs.alert.data-api" , i , n . prototype . close ) } ( jQuery ) , function ( t ) { "use strict" ; function e ( e ) { return this . each ( function ( ) { var n = t ( this ) , o = n . data ( "bs.button" ) , s = "object" == typeof e && e ; o || n . data ( "bs.button" , o = new i ( this , s ) ) , "toggle" == e ? o . toggle ( ) : e && o . setState ( e ) } ) } var i = function ( e , n ) { this . $element = t ( e ) , this . options = t . extend ( { } , i . DEFAULTS , n ) , this . isLoading = ! 1 } ; i . VERSION = "3.3.7" , i . DEFAULTS = { loadingText : "loading..." } , i . prototype . setState = function ( e ) { var i = "disabled" , n = this . $element , o = n . is ( "input" ) ? "val" : "html" , s = n . data ( ) ; e += "Text" , null == s . resetText && n . data ( "resetText" , n [ o ] ( ) ) , setTimeout ( t . proxy ( function ( ) { n [ o ] ( null == s [ e ] ? this . options [ e ] : s [ e ] ) , "loadingText" == e ? ( this . isLoading = ! 0 , n . addClass ( i ) . attr ( i , i ) . prop ( i , ! 0 ) ) : this . isLoading && ( this . isLoading = ! 1 , n . removeClass ( i ) . removeAttr ( i ) . prop ( i , ! 1 ) ) } , this ) , 0 ) } , i . prototype . toggle = function ( ) { var t = ! 0 , e = this . $element . closest ( '[data-toggle="buttons"]' ) ; if ( e . length ) { var i = this . $element . find ( "input" ) ; "radio" == i . prop ( "type" ) ? ( i . prop ( "checked" ) && ( t = ! 1 ) , e . find ( ".active" ) . removeClass ( "active" ) , this . $element . addClass ( "active" ) ) : "checkbox" == i . prop ( "type" ) && ( i . prop ( "checked" ) !== this . $element . hasClass ( "active" ) && ( t = ! 1 ) , this . $element . toggleClass ( "active" ) ) , i . prop ( "checked" , this . $element . hasClass ( "active" ) ) , t && i . trigger ( "change" ) } else this . $element . attr ( "aria-pressed" , ! this . $element . hasClass ( "active" ) ) , this . $element . toggleClass ( "active" ) } ; var n = t . fn . button ; t . fn . button = e , t . fn . button . Constructor = i , t . fn . button . noConflict = function ( ) { return t . fn . button = n , this } , t ( document ) . on ( "click.bs.button.data-api" , '[data-toggle^="button"]' , function ( i ) { var n = t ( i . target ) . closest ( ".btn" ) ; e . call ( n , "toggle" ) , t ( i . target ) . is ( 'input[type="radio"], input[type="checkbox"]' ) || ( i . preventDefault ( ) , n . is ( "input,button" ) ? n . trigger ( "focus" ) : n . find ( "input:visible,button:visible" ) . first ( ) . trigger ( "focus" ) ) } ) . on ( "focus.bs.button.data-api blur.bs.button.data-api" , '[data-toggle^="button"]' , function ( e ) { t ( e . target ) . closest ( ".btn" ) . toggleClass ( "focus" , /^focus(in)?$/ . test ( e . type ) ) } ) } ( jQuery ) , function ( t ) { "use strict" ; function e ( e ) { return this . each ( function ( ) { var n = t ( this ) , o = n . data ( "bs.carousel" ) , s = t . extend ( { } , i . DEFAULTS , n . data ( ) , "object" == typeof e && e ) , a = "string" == typeof e ? e : s . slide ; o || n . data ( "bs.carousel" , o = new i ( this , s ) ) , "number" == typeof e ? o . to ( e ) : a ? o [ a ] ( ) : s . interval && o . pause ( ) . cycle ( ) } ) } var i = function ( e , i ) { this . $element = t ( e ) , this . $indicators = this . $element . find ( ".carousel-indicators" ) , this . options = i , this . paused = null , this . sliding = null , this . interval = null , this . $active = null , this . $items = null , this . options . keyboard && this . $element . on ( "keydown.bs.carousel" , t . proxy ( this . keydown , this ) ) , "hover" == this . options . pause && ! ( "ontouchstart" in document . documentElement ) && this . $element . on ( "mouseenter.bs.carousel" , t . proxy ( this . pause , this ) ) . on ( "mouseleave.bs.carousel" , t . proxy ( this . cycle , this ) ) } ; i . VERSION = "3.3.7" , i . TRANSITION _DURATION = 600 , i . DEFAULTS = { interval : 5e3 , pause : "hover" , wrap : ! 0 , keyboard : ! 0 } , i . prototype . keydown = function ( t ) { if ( ! /input|textarea/i . test ( t . target . tagName ) ) { switch ( t . which ) { case 37 : this . prev ( ) ; break ; case 39 : this . next ( ) ; break ; default : return } t . preventDefault ( ) } } , i . prototype . cycle = function ( e ) { return e || ( this . paused = ! 1 ) , this . interval && clearInterval ( this . interval ) , this . options . interval && ! this . paused && ( this . interval = setInterval ( t . proxy ( this . next , this ) , this . options . interval ) ) , this } , i . prot
} ) , a = t . Event ( "show.bs.tab" , { relatedTarget : o [ 0 ] } ) ; if ( o . trigger ( s ) , e . trigger ( a ) , ! a . isDefaultPrevented ( ) && ! s . isDefaultPrevented ( ) ) { var r = t ( n ) ; this . activate ( e . closest ( "li" ) , i ) , this . activate ( r , r . parent ( ) , function ( ) { o . trigger ( { type : "hidden.bs.tab" , relatedTarget : e [ 0 ] } ) , e . trigger ( { type : "shown.bs.tab" , relatedTarget : o [ 0 ] } ) } ) } } } , i . prototype . activate = function ( e , n , o ) { function s ( ) { a . removeClass ( "active" ) . find ( "> .dropdown-menu > .active" ) . removeClass ( "active" ) . end ( ) . find ( '[data-toggle="tab"]' ) . attr ( "aria-expanded" , ! 1 ) , e . addClass ( "active" ) . find ( '[data-toggle="tab"]' ) . attr ( "aria-expanded" , ! 0 ) , r ? ( e [ 0 ] . offsetWidth , e . addClass ( "in" ) ) : e . removeClass ( "fade" ) , e . parent ( ".dropdown-menu" ) . length && e . closest ( "li.dropdown" ) . addClass ( "active" ) . end ( ) . find ( '[data-toggle="tab"]' ) . attr ( "aria-expanded" , ! 0 ) , o && o ( ) } var a = n . find ( "> .active" ) , r = o && t . support . transition && ( a . length && a . hasClass ( "fade" ) || ! ! n . find ( "> .fade" ) . length ) ; a . length && r ? a . one ( "bsTransitionEnd" , s ) . emulateTransitionEnd ( i . TRANSITION _DURATION ) : s ( ) , a . removeClass ( "in" ) } ; var n = t . fn . tab ; t . fn . tab = e , t . fn . tab . Constructor = i , t . fn . tab . noConflict = function ( ) { return t . fn . tab = n , this } ; var o = function ( i ) { i . preventDefault ( ) , e . call ( t ( this ) , "show" ) } ; t ( document ) . on ( "click.bs.tab.data-api" , '[data-toggle="tab"]' , o ) . on ( "click.bs.tab.data-api" , '[data-toggle="pill"]' , o ) } ( jQuery ) , function ( t ) { "use strict" ; function e ( e ) { return this . each ( function ( ) { var n = t ( this ) , o = n . data ( "bs.affix" ) , s = "object" == typeof e && e ; o || n . data ( "bs.affix" , o = new i ( this , s ) ) , "string" == typeof e && o [ e ] ( ) } ) } var i = function ( e , n ) { this . options = t . extend ( { } , i . DEFAULTS , n ) , this . $target = t ( this . options . target ) . on ( "scroll.bs.affix.data-api" , t . proxy ( this . checkPosition , this ) ) . on ( "click.bs.affix.data-api" , t . proxy ( this . checkPositionWithEventLoop , this ) ) , this . $element = t ( e ) , this . affixed = null , this . unpin = null , this . pinnedOffset = null , this . checkPosition ( ) } ; i . VERSION = "3.3.7" , i . RESET = "affix affix-top affix-bottom" , i . DEFAULTS = { offset : 0 , target : window } , i . prototype . getState = function ( t , e , i , n ) { var o = this . $target . scrollTop ( ) , s = this . $element . offset ( ) , a = this . $target . height ( ) ; if ( null != i && "top" == this . affixed ) return o < i && "top" ; if ( "bottom" == this . affixed ) return null != i ? ! ( o + this . unpin <= s . top ) && "bottom" : ! ( o + a <= t - n ) && "bottom" ; var r = null == this . affixed , l = r ? o : s . top , c = r ? a : e ; return null != i && o <= i ? "top" : null != n && l + c >= t - n && "bottom" } , i . prototype . getPinnedOffset = function ( ) { if ( this . pinnedOffset ) return this . pinnedOffset ; this . $element . removeClass ( i . RESET ) . addClass ( "affix" ) ; var t = this . $target . scrollTop ( ) , e = this . $element . offset ( ) ; return this . pinnedOffset = e . top - t } , i . prototype . checkPositionWithEventLoop = function ( ) { setTimeout ( t . proxy ( this . checkPosition , this ) , 1 ) } , i . prototype . checkPosition = function ( ) { if ( this . $element . is ( ":visible" ) ) { var e = this . $element . height ( ) , n = this . options . offset , o = n . top , s = n . bottom , a = Math . max ( t ( document ) . height ( ) , t ( document . body ) . height ( ) ) ; "object" != typeof n && ( s = o = n ) , "function" == typeof o && ( o = n . top ( this . $element ) ) , "function" == typeof s && ( s = n . bottom ( this . $element ) ) ; var r = this . getState ( a , e , o , s ) ; if ( this . affixed != r ) { null != this . unpin && this . $element . css ( "top" , "" ) ; var l = "affix" + ( r ? "-" + r : "" ) , c = t . Event ( l + ".bs.affix" ) ; if ( this . $element . trigger ( c ) , c . isDefaultPrevented ( ) ) return ; this . affixed = r , this . unpin = "bottom" == r ? this . getPinnedOffset ( ) : null , this . $element . removeClass ( i . RESET ) . addClass ( l ) . trigger ( l . replace ( "affix" , "affixed" ) + ".bs.affix" ) } "bottom" == r && this . $element . offset ( { top : a - e - s } ) } } ; var n = t . fn . affix ; t . fn . affix = e , t . fn . affix . Constructor = i , t . fn . affix . noConflict = function ( ) { return t . fn . affix = n , this } , t ( window ) . on ( "load" , function ( ) { t ( '[data-spy="affix"]' ) . each ( function ( ) { var i = t ( this ) , n = i . data ( ) ; n . offset = n . offset || { } , null != n . offsetBottom && ( n . offset . bottom = n . offsetBottom ) , null != n . offsetTop && ( n . offset . top = n . offsetTop ) , e . call ( i , n ) } ) } ) } ( jQuery ) , define ( "bootstrap" , [ "jquery" ] , function ( ) { } ) , void 0 === Common ) var Common = { } ; if ( define ( "notification" , [ "backbone" ] , function ( t ) { "use strict" ; var e = function ( ) { } ; if ( _ . extend ( e . prototype , t . Events ) , void 0 !== Common . NotificationCenter ) throw "Native Common.NotificationCenter instance already defined." ; e . extend = t . Model . extend , Common . NotificationCenter = new e } ) , function ( ) { var t = function ( t , e ) { for ( v
setTimeout ( function ( ) { r . $window . css ( { "-webkit-transition" : "0.2s opacity, 0.2s -webkit-transform" , "-webkit-transform" : "scale(1)" , "-moz-transition" : "0.2s opacity, 0.2s -moz-transform" , "-moz-transform" : "scale(1)" , "-ms-transition" : "0.2s opacity, 0.2s -ms-transform" , "-ms-transform" : "scale(1)" , "-o-transition" : "0.2s opacity, 0.2s -o-transform" , "-o-transform" : "scale(1)" , opacity : "1" } ) } , 1 ) , setTimeout ( function ( ) { r . $window . addClass ( "notransform" ) , r . fireEvent ( "show" , r ) } , this . initConfig . modal ? 1e3 : 350 ) ) : ( this . $window . css ( { opacity : 1 } ) , this . $window . addClass ( "notransform" ) , this . fireEvent ( "show" , this ) ) , Common . NotificationCenter . trigger ( "window:show" ) } , close : function ( e ) { if ( $ ( document ) . off ( "keydown." + this . cid ) , this . initConfig . header && this . $window . find ( ".header" ) . off ( "mousedown" , this . binding . dragStart ) , this . initConfig . modal ) { var i = t ( ) , o = ! 0 ; if ( i . attr ( "counter" , parseInt ( i . attr ( "counter" ) ) - 1 ) , this . $lastmodal . length > 0 && ( this . $lastmodal . removeClass ( "dethrone" ) , o = ! ( this . $lastmodal . hasClass ( "modal" ) && this . $lastmodal . is ( ":visible" ) ) ) , o ) if ( ! 1 !== this . options . animate ) { var s = i . css ( "opacity" ) ; i . css ( n ( 0 ) ) , setTimeout ( function ( ) { i . css ( "opacity" , s ) , parseInt ( i . attr ( "counter" ) ) < 1 && ( i . hide ( ) , i . attr ( "counter" , 0 ) ) } , 300 ) } else parseInt ( i . attr ( "counter" ) ) < 1 && ( i . hide ( ) , i . attr ( "counter" , 0 ) ) ; Common . NotificationCenter . trigger ( "modal:close" , this ) } this . $window . remove ( ) , ! 0 !== e && this . fireEvent ( "close" , this ) } , hide : function ( ) { if ( $ ( document ) . off ( "keydown." + this . cid ) , this . $window ) { if ( this . initConfig . modal ) { var e = t ( ) , i = ! 0 ; if ( e . attr ( "counter" , parseInt ( e . attr ( "counter" ) ) - 1 ) , this . $lastmodal . length > 0 && ( this . $lastmodal . removeClass ( "dethrone" ) , i = ! ( this . $lastmodal . hasClass ( "modal" ) && this . $lastmodal . is ( ":visible" ) ) ) , i ) if ( ! 1 !== this . options . animate ) { var o = e . css ( "opacity" ) ; e . css ( n ( 0 ) ) , setTimeout ( function ( ) { e . css ( "opacity" , o ) , parseInt ( e . attr ( "counter" ) ) < 1 && ( e . hide ( ) , e . attr ( "counter" , 0 ) ) } , 300 ) } else parseInt ( e . attr ( "counter" ) ) < 1 && ( e . hide ( ) , e . attr ( "counter" , 0 ) ) ; Common . NotificationCenter . trigger ( "modal:hide" , this ) } this . $window . hide ( ) , this . $window . removeClass ( "notransform" ) , this . fireEvent ( "hide" , this ) } } , isLocked : function ( ) { return this . $window . hasClass ( "dethrone" ) || ! this . options . modal && this . $window . parent ( ) . find ( ".asc-window.modal:visible" ) . length } , getChild : function ( t ) { return t ? this . $window . find ( t ) : this . $window } , setWidth : function ( t ) { if ( t >= 0 ) { var e = parseInt ( this . $window . css ( "min-width" ) ) ; t < e && ( t = e ) , t -= parseInt ( this . $window . css ( "border-left-width" ) ) + parseInt ( this . $window . css ( "border-right-width" ) ) , this . $window . width ( t ) } } , getWidth : function ( ) { return parseInt ( this . $window . css ( "width" ) ) } , setHeight : function ( t ) { if ( t >= 0 ) { var e = parseInt ( this . $window . css ( "min-height" ) ) ; t < e && ( t = e ) , t -= parseInt ( this . $window . css ( "border-bottom-width" ) ) + parseInt ( this . $window . css ( "border-top-width" ) ) , this . $window . height ( t ) , this . initConfig . header && ( t -= parseInt ( this . $window . find ( "> .header" ) . css ( "height" ) ) ) , this . $window . find ( "> .body" ) . css ( "height" , t ) } } , getHeight : function ( ) { return parseInt ( this . $window . css ( "height" ) ) } , setSize : function ( t , e ) { this . setWidth ( t ) , this . setHeight ( e ) } , getSize : function ( ) { return [ this . getWidth ( ) , this . getHeight ( ) ] } , setTitle : function ( t ) { this . $window . find ( "> .header > .title" ) . text ( t ) } , getTitle : function ( ) { return this . $window . find ( "> .header > .title" ) . text ( ) } , getLeft : function ( ) { return parseInt ( this . $window . css ( "left" ) ) } , getTop : function ( ) { return parseInt ( this . $window . css ( "top" ) ) } , isVisible : function ( ) { return this . $window && this . $window . is ( ":visible" ) } , setResizable : function ( t , e , i ) { if ( t !== this . resizable ) { if ( t ) { var n = '<div class="resize-border left" style="top:' + ( this . initConfig . header ? "33" : "5" ) + 'px; bottom: 5px; height: auto; border-right-style: solid; cursor: e-resize;"></div><div class="resize-border left bottom" style="border-bottom-left-radius: 5px; cursor: sw-resize;"></div><div class="resize-border bottom" style="left: 4px; right: 4px; width: auto; z-index: 2; border-top-style: solid; cursor: s-resize;"></div><div class="resize-border right bottom" style="border-bottom-right-radius: 5px; cursor: se-resize;"></div><div class="resize-border right" style="top:' + ( this . initConfig . header ? "33" : "5" ) + 'px; bottom: 5px; hei
if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],e,!1);else this.onmousewheel=null},getLineHeight:function(e){return parseInt(t(e)["offsetParent"in t.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("perfectscrollbar",["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){"use strict";var e={wheelSpeed:10,wheelPropagation:!1,minScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1,includeMargin:!0},i=function(){var t=0;return function(){var e=t;return t+=1,".perfect-scrollbar-"+e}}();t.fn.perfectScrollbar=function(n,o){return this.each(function(){var s=t.extend(!0,{},e),a=t(this);if("object"==typeof n?t.extend(!0,s,n):o=n,"update"===o)return a.data("perfect-scrollbar-update")&&a.data("perfect-scrollbar-update")(),a;if("destroy"===o)return a.data("perfect-scrollbar-destroy")&&a.data("perfect-scrollbar-destroy")(),a;if(a.data("perfect-scrollbar"))return a.data("perfect-scrollbar");a.addClass("ps-container");var r,l,c,d,h,p,m,u,g,b,f,C=t("<div class=' ps - scrollbar - x - rail '></div>").appendTo(a),v=t("<div class=' ps - scrollbar - y - rail '></div>").appendTo(a),_=t("<div class=' ps - scrollbar - x '></div>").appendTo(C),y=t("<div class=' ps - scrollbar - y '></div>").appendTo(v),w=parseInt(C.css("bottom"),10),x=parseInt(v.css("right"),10),S=i(),A=function(t,e){var i=t+e,n=f-g;b=i<0?0:i>n?n:i;var o=parseInt(b*(p-d)/(f-g),10);a.scrollTop(o),C.css({bottom:w-o})},T=function(t,e){var i=t+e,n=c-m;u=i<0?0:i>n?n:i;var o=parseInt(u*(h-c)/(c-m),10);a.scrollLeft(o),v.css({right:x-o})},k=function(t){return s.minScrollbarLength&&(t=Math.max(t,s.minScrollbarLength)),t},I=function(){C.css({left:a.scrollLeft(),bottom:w-a.scrollTop(),width:c,display:r?"inherit":"none"}),v.hasClass("in-scrolling")?v.css({right:x-a.scrollLeft(),height:f,display:l?"inherit":"none"}):v.css({top:a.scrollTop(),right:x-a.scrollLeft(),height:f,display:l?"inherit":"none"}),_.css({left:u,width:m}),y.css({top:b,height:g})},P=function(){c=s.includePadding?a.innerWidth():a.width(),d=s.includePadding?a.innerHeight():a.height(),f=d-(s.includeMargin?parseInt(v.css("margin-top"))+parseInt(v.css("margin-bottom")):0),h=a.prop("scrollWidth"),p=a.prop("scrollHeight"),!s.suppressScrollX&&c+s.scrollXMarginOffset<h?(r=!0,m=k(parseInt(c*c/h,10)),u=parseInt(a.scrollLeft()*(c-m)/(h-c),10)):(r=!1,m=0,u=0,a.scrollLeft(0)),!s.suppressScrollY&&d+s.scrollYMarginOffset<p?(l=!0,g=k(parseInt(f*d/p,10)),b=parseInt(a.scrollTop()*(f-g)/(p-d),10)):(l=!1,g=0,b=0,a.scrollTop(0)),b>=f-g&&(b=f-g),u>=c-m&&(u=c-m),I(),s.onChange&&s.onChange(this)},M=function(){var e,i;_.bind("mousedown"+S,function(t){i=t.pageX,e=_.position().left,C.addClass("in-scrolling"),t.stopPropagation(),t.preventDefault()}),t(document).bind("mousemove"+S,function(t){C.hasClass("in-scrolling")&&(T(e,t.pageX-i),t.stopPropagation(),t.preventDefault())}),t(document).bind("mouseup"+S,function(t){C.hasClass("in-scrolling")&&C.removeClass("in-scrolling")}),e=i=null},B=function(){var e,i;y.bind("mousedown"+S,function(t){i=t.pageY,e=y.position().top,v.addClass("in-scrolling");var n=parseInt(v.css("margin-top")),o=v[0].getBoundingClientRect();v.css({position:"fixed",left:o.left,top:o.top-n}),t.stopPropagation(),t.preventDefault()}),t(document).bind("mousemove"+S,function(t){v.hasClass("in-scrolling")&&(A(e,t.pageY-i),t.stopPropagation(),t.preventDefault())}),t(document).bind("mouseup"+S,function(t){v.hasClass("in-scrolling")&&(v.removeClass("in-scrolling"),v.css({position:"",left:"",top:""}),I())}),e=i=null},U=function(t,e){var i=a.scrollTop();if(0===t){if(!l)return!1;if(0===i&&e>0||i>=p-d&&e<0)return!s.wheelPropagation}var n=a.scrollLeft();if(0===e){if(!r)return!1;if(0===n&&t<0||n>=h-c&&t>0)ret
;return i.put_type("object"==typeof t&&void 0!==t.effectId?Asc.c_oAscColor.COLOR_TYPE_SCHEME:Asc.c_oAscColor.COLOR_TYPE_SRGB),i.put_r(e>>16),i.put_g((65280&e)>>8),i.put_b(255&e),i.put_a(255),void 0!==t.effectId&&i.put_value(t.effectId),i},colorValue2EffectId:function(t){if("object"==typeof t&&void 0!==t.effectValue&&this.effectcolors)for(var e=0;e<this.effectcolors.length;e++)if(this.effectcolors[e].effectValue===t.effectValue&&t.color.toUpperCase()===this.effectcolors[e].color.toUpperCase()){t.effectId=this.effectcolors[e].effectId;break}return t}}},Common.Utils.Metric=_.extend(new function(){var t=this;return t.c_MetricUnits={cm:0,pt:1,inch:2},t.currentMetric=t.c_MetricUnits.pt,t.metricName=["Cm","Pt","Inch"],t.defaultMetric=t.c_MetricUnits.cm,{c_MetricUnits:t.c_MetricUnits,txtCm:"cm",txtPt:"pt",txtInch:' "',setCurrentMetric:function(e){t.currentMetric=e},getCurrentMetric:function(){return t.currentMetric},getCurrentMetricName:function(){return this[" txt "+t.metricName[t.currentMetric]]},getMetricName:function(e){return this[" txt "+t.metricName[void 0!==e?e:0]]},setDefaultMetric:function(e){t.defaultMetric=e},getDefaultMetric:function(){return t.defaultMetric},fnRecalcToMM:function(e){if(null!==e&&void 0!==e)switch(t.currentMetric){case t.c_MetricUnits.cm:return 10*e;case t.c_MetricUnits.pt:return 25.4*e/72;case t.c_MetricUnits.inch:return 25.4*e}return e},fnRecalcFromMM:function(e){switch(t.currentMetric){case t.c_MetricUnits.cm:return parseFloat((e/10).toFixed(4));case t.c_MetricUnits.pt:return parseFloat((72*e/25.4).toFixed(3));case t.c_MetricUnits.inch:return parseFloat((e/25.4).toFixed(3))}return e}}},Common.Utils.Metric||{}),Common.Utils.RGBColor=function(t){var e,i,n;" # "==t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g," "),t=t.toLowerCase();for(var o=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^hsb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(t){var e={},i=Math.round(t[1]),n=Math.round(255*t[2]/100),o=Math.round(255*t[3]/100);if(0==n)e.r=e.g=e.b=o;else{var s=o,a=(255-n)*o/255,r=i%60*(s-a)/60;360==i&&(i=0),i<60?(e.r=s,e.b=a,e.g=a+r):i<120?(e.g=s,e.b=a,e.r=s-r):i<180?(e.g=s,e.r=a,e.b=a+r):i<240?(e.b=s,e.r=a,e.g=s-r):i<300?(e.b=s,e.g=a,e.r=a+r):i<360?(e.r=s,e.g=a,e.b=s-r):(e.r=0,e.g=0,e.b=0)}return[Math.round(e.r),Math.round(e.g),Math.round(e.b)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],s=0;s<o.length;s++){var a=o[s].re,r=o[s].process,l=a.exec(t);if(l){var c=r(l);e=c[0],i=c[1],n=c[2]}}return e=e<0||isNaN(e)?0:e>255?255:e,i=i<0||isNaN(i)?0:i>255?255:i,n=n<0||isNaN(n)?0:n>255?255:n,{r:e,g:i,b:n,isEqual:function(t){return e==t.r&&i==t.g&&n==t.b},toRGB:function(){return" rgb ( "+e+" , "+i+" , "+n+" ) "},toRGBA:function(t){return void 0===t&&(t=1)," rgba ( "+e+" , "+i+" , "+n+" , "+t+" ) "},toHex:function(){var t=e.toString(16),o=i.toString(16),s=n.toString(16);return 1==t.length&&(t=" 0 "+t),1==o.length&&(o=" 0 "+o),1==s.length&&(s=" 0 "+s)," # "+t+o+s},toHSB:function(){var t={h:0,s:0,b:0},o=Math.min(e,i,n),s=Math.max(e,i,n),a=s-o;return t.b=s,t.s=0!=s?255*a/s:0,0!=t.s?t.h=e==s?0+(i-n)/a:i==s?2+(n-e)/a:4+(e-i)/a:t.h=0,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t.h=parseInt(t.h),t.s=parseInt(t.s),t.b=parseInt(t.b),t}}},Common.Utils.String=new function(){return{format:function(t){var e=_.toArray(arguments).slice(1);return t.replace(/\{(\d+)\}/g,function(t,i){return e[i]})},htmlEncode:function(t){return _.escape(t)},htmlDecode:function(t){return _.unescape(t)},ellipsis:function(t,e,i){if(t&&t.length>e){if(i){var n=t.substr(0,e-2),o=Math.max(n.lastIndexOf(" "),n.lastIndexOf(" . "),n.lastIndexOf(" ! "),n.lastIndexOf(" ? "));if(-1!==o&&o>=e-15)return n.substr(0,o)+" ... "}return t.substr(0,e-3)+" ... "}return t},platformKey:function(t,e,i){return _.isEmpty(e)&&(e=" ( { 0 } ) "),Common.Utils.isMac?(_.isFunction(i)&&(t=i.call(this,t)),Common.Utils.String.fo
Common.Views.CommentsPopover=Common.UI.Window.extend({initialize:function(t){var e={};_.extend(e,{closable:!1,width:265,height:120,header:!1,modal:!1},t),this.template=t.template||['<div class=" box ">','<div id=" id - comments - popover " class=" comments - popover "></div>','<div id=" id - comments - arrow " class=" comments - arrow "></div>'," < / d i v > " ] . j o i n ( " " ) , t h i s . s t o r e = t . s t o r e , t h i s . d e l e g a t e = t . d e l e g a t e , e . t p l = _ . t e m p l a t e ( t h i s . t e m p l a t e ) ( e ) , t h i s . a r r o w = { m a r g i n : 2 0 , w i d t h : 1 2 , h e i g h t : 3 4 } , t h i s . s d k B o u n d s = { w i d t h : 0 , h e i g h t : 0 , p a d d i n g : 1 0 , p a d d i n g T o p : 2 0 } , C o m m o n . U I . W i n d o w . p r o t o t y p e . i n i t i a l i z e . c a l l ( t h i s , e ) } , r e n d e r : f u n c t i o n ( ) { C o m m o n . U I . W i n d o w . p r o t o t y p e . r e n d e r . c a l l ( t h i s ) ; v a r t = t h i s , e = t h i s . d e l e g a t e , o = t h i s . $ w i n d o w ; o . c s s ( { h e i g h t : " " , m i n H e i g h t : " " , o v e r f l o w : " h i d d e n " , p o s i t i o n : " a b s o l u t e " , z I n d e x : " 9 9 0 " } ) ; v a r s = o . f i n d ( " . b o d y " ) ; s & & s . c s s ( " p o s i t i o n " , " r e l a t i v e " ) , o . o n ( " c l i c k " , _ . b i n d ( f u n c t i o n ( ) { o . c s s ( { z I n d e x : " 9 9 1 " } ) , C o m m o n . N o t i f i c a t i o n C e n t e r . t r i g g e r ( " c o m m e n t s : c l i c k " ) } , t h i s ) ) , C o m m o n . N o t i f i c a t i o n C e n t e r . o n ( " r e v i e w : c l i c k " , f u n c t i o n ( ) { o . c s s ( { z I n d e x : " 9 9 0 " } ) } ) ; v a r a = C o m m o n . U I . D a t a V i e w . e x t e n d ( f u n c t i o n ( ) { v a r e = t ; r e t u r n { o p t i o n s : { h a n d l e S e l e c t : ! 1 , s c r o l l a b l e : ! 0 , t e m p l a t e : _ . t e m p l a t e ( ' < d i v c l a s s = " d a t a v i e w - c t i n n e r " s t y l e = " o v e r f l o w - y : h i d d e n ; " > < / d i v > ' ) } , g e t T e x t B o x : f u n c t i o n ( ) { v a r t = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) ; r e t u r n t & & t . l e n g t h ? t : v o i d 0 } , s e t F o c u s T o T e x t B o x : f u n c t i o n ( t ) { v a r e = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) ; i f ( t ) e . b l u r ( ) ; e l s e i f ( e & & e . l e n g t h ) { v a r i = e . v a l ( ) ; e . f o c u s ( ) , e . v a l ( " " ) , e . v a l ( i ) } } , g e t A c t i v e T e x t B o x V a l : f u n c t i o n ( ) { v a r t = $ ( t h i s . e l ) . f i n d ( " t e x t a r e a " ) ; r e t u r n t & & t . l e n g t h ? t . v a l ( ) . t r i m ( ) : " " } , a u t o H e i g h t T e x t B o x : f u n c t i o n ( ) { f u n c t i o n i ( ) { l = $ ( n . s c r o l l e r . e l ) . s c r o l l T o p ( ) , s . s c r o l l H e i g h t > s . c l i e n t H e i g h t ? ( o . c s s ( { h e i g h t : s . s c r o l l H e i g h t + r + " p x " } ) , e . c a l c u l a t e S i z e O f C o n t e n t ( ) ) : ( c = s . c l i e n t H e i g h t ) > = a & & ( o . c s s ( { h e i g h t : a + " p x " } ) , s . s c r o l l H e i g h t > s . c l i e n t H e i g h t & & ( d = M a t h . m a x ( s . s c r o l l H e i g h t + r , a ) , o . c s s ( { h e i g h t : d + " p x " } ) ) , e . c a l c u l a t e S i z e O f C o n t e n t ( ) , e . s e t L e f t T o p ( t . a r r o w P o s X , t . a r r o w P o s Y , t . l e f t X ) , e . c a l c u l a t e S i z e O f C o n t e n t ( ) ) , n . s c r o l l e r . s c r o l l T o p ( l ) , n . a u t o S c r o l l T o E d i t B u t t o n s ( ) } v a r n = t h i s , o = t h i s . $ e l . f i n d ( " t e x t a r e a " ) , s = n u l l , a = 5 0 , r = 0 , l = 0 , c = 0 , d = 0 ; o & & o . l e n g t h & & ( s = o . g e t ( 0 ) ) & & ( r = . 2 5 * p a r s e I n t ( o . c s s ( " l i n e H e i g h t " ) , 1 0 ) , i ( ) , o . b i n d ( " i n p u t p r o p e r t y c h a n g e " , i ) ) , t h i s . t e x t B o x = o } , c l e a r T e x t B o x B i n d : f u n c t i o n ( ) { t h i s . t e x t B o x & & ( t h i s . t e x t B o x . u n b i n d ( " i n p u t p r o p e r t y c h a n g e " ) , t h i s . t e x t B o x = v o i d 0 ) } , a u t o S c r o l l T o E d i t B u t t o n s : f u n c t i o n ( ) { v a r t = $ ( " # i d - c o m m e n t s - c h a n g e - p o p o v e r " ) , e = n u l l , i = t h i s . e l . g e t B o u n d i n g C l i e n t R e c t ( ) , n = 0 ; t . l e n g t h & & ( e = t . g e t ( 0 ) . g e t B o u n d i n g C l i e n t R e c t ( ) ) & & i & & ( n = i . b o t t o m - ( e . b o t t o m + 7 ) ) < 0 & & t h i s . s c r o l l e r . s c r o l l T o p ( t h i s . s c r o l l e r . g e t S c r o l l T o p ( ) - n ) } } } ( ) ) ; i f ( a ) i f ( t h i s . c o m m e n t s V i e w ) t h i s . c o m m e n t s V i e w . r e n d e r ( $ ( " # i d - c o m m e n t s - p o p o v e r " ) ) , t h i s . c o m m e n t s V i e w . o n R e s e t I t e m s ( ) ; e l s e { t h i s . c o m m e n t s V i e w = n e w a ( { e l : $ ( " # i d - c o m m e n t s - p o p o v e r " ) , s t o r e : t . s t o r e , i t e m T e m p l a t e : _ . t e m p l a t e ( n ( i , { t e x t A d d R e p l y : e . t e x t A d d R e p l y , t e x t A d d : e . t e x t A d d , t e x t C a n c e l : e . t e x t C a n c e l , t e x t E d i t : e . t e x t E d i t , t e x t R e p l y : e . t e x t R e p l y , t e x t C l o s e : e . t e x t C l o s e , m a x C o m m L e n g t h : A s c . c _ o A s c M a x C e l l O r C o m m e n t L e n g t h } ) ) } ) ; v a r r = f u n c t i o n ( t , i , n ) { i . t i p s A r r a y & & i . t i p s A r r a y . f o r E a c h ( f u n c t i o n ( t ) { t . r e m o v e ( ) } ) ; v a r o = [ ] , s = $ ( i . e l ) . f i n d ( " . b t n - r e s o l v e " ) ; s . t o o l t i p ( { t i t l e : e . t e x t R e s o l v e , p l a c e m e n t : " c u r s o r " } ) , s . e a c h ( f u n c t i o n ( t , e ) { o . p u s h ( $ ( e ) . d a t a ( " b s . t o o l t i p " ) . t i p ( ) ) } ) , s = $ ( i . e l ) . f i n d ( " . b t n - r e s o l v e - c h e c k " ) , s . t o o l t i p ( { t i t l e : e . t e x t O p e n A g a i n , p l a c e m e n t : " c u r s o r " } ) , s . e a c h ( f u n c t i o n ( t , e ) { o . p u s h ( $ ( e ) . d a t a ( " b s . t o o l t i p " ) . t i p ( ) ) } ) , i . t i p s A r r a y = o } , l = f u n c t i o n ( ) { t . _ i s M o u s e O v e r = ! 0 } , c = f u n c t i o n ( ) { t . _ i s M o u s e O v e r = ! 1 } ; t h i s . c o m m e n t s V i e w . o n ( " i t e m : a d d " , r ) , t h i s . c o m m e n t s V i e w . o n ( " i t e m : r e m o v e " , r ) , t h i s . c o m m e n t s V i e w . o n ( " i t e m : c h a n g e " , r ) , t h i s . c o m m e n t s V i e w . c m p E l . o n ( " m o u s e o v e r " , l ) . o n ( " m o u s e o u t " , c ) , t h i s . c o m m e n t s V i e w . o n ( " i t e m : c l i c k " , f u n c t i o n ( i , n , o , s ) { f u n c t i o n a ( ) { t . u p d a t e ( ) } v a r r , l , c , d , h , p ; i f ( r = $ ( s . t a r g e t ) ) { i f ( l = o . g e t ( " e d i t T e x t I n P o p o v e r " ) , c = o . g e t ( " s h o w R e p l y I n P o p o v e r " ) , p = o . g e t ( " h i d e A d d R e p l y " ) , d = o . g e t ( " u i d " ) , h = r . a t t r ( " d a t a - v a l u e " ) , o . g e t ( " h i n t " ) ) r e t u r n v o i d e . f i r e E v e n t ( " c o m m e n t : d i s a b l e H i n t " , [ o ] ) ; i f ( r . h a s C l a s s ( " b t n - e d i t " ) ) _ . i s U n d e f i n e d ( h ) ? l | | ( e . f i r e E v e n t ( " c o m m e n t : c l o s e E d i t i n g " ) , o . s e t ( " e d i t T e x t I n P o p o v e r " , ! 0 ) , e . f i r e E v e n t ( " c o m m e n t : s h o w " , [ d ] ) , t h i s . a u t o H e i g h t T e x t B o x ( ) , t . c a l c u l a t e S i z e O f C o n t e n t ( ) , t . s e t L e f t T o p ( t . a r r o w P o
define ( "common/main/lib/view/History" , [ "common/main/lib/util/utils" , "common/main/lib/component/BaseView" , "common/main/lib/component/Layout" ] , function ( t ) { "use strict" ; Common . Views . History = Common . UI . BaseView . extend ( _ . extend ( { el : "#left-panel-history" , storeHistory : void 0 , template : _ . template ( [ '<div id="history-box" class="layout-ct vbox">' , '<div id="history-header" class="">' , '<div id="history-btn-back"><%=scope.textCloseHistory%></div>' , "</div>" , '<div id="history-list" class="">' , "</div>" , '<div id="history-expand-changes" class="">' , '<div id="history-btn-expand"><%=scope.textHideAll%></div>' , "</div>" , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { _ . extend ( this , t ) , Common . UI . BaseView . prototype . initialize . call ( this , arguments ) } , render : function ( t ) { t = t || this . el , $ ( t ) . html ( this . template ( { scope : this } ) ) . width ( ( parseInt ( Common . localStorage . getItem ( "de-mainmenu-width" ) ) || MENU _SCALE _PART ) - SCALE _MIN ) , this . viewHistoryList = new Common . UI . DataView ( { el : $ ( "#history-list" ) , store : this . storeHistory , enableKeyEvents : ! 1 , itemTemplate : _ . template ( [ '<div id="<%= id %>" class="history-item-wrap <% if (!isVisible) { %>hidden<% } %>" ' , 'style="display: block; <% if (!isRevision) { %>padding-left: 40px;<% } %><% if (canRestore && selected) { %>padding-bottom: 6px;<% } %>">' , '<div class="user-date"><%= created %></div>' , "<% if (markedAsVersion) { %>" , '<div class="user-version">ver.<%=version%></div>' , "<% } %>" , "<% if (isRevision && hasChanges) { %>" , '<div class="revision-expand img-commonctrl <% if (isExpanded) { %>up<% } %>"></div>' , "<% } %>" , '<div class="user-name">' , '<div class="color" style="display: inline-block; background-color:<%=usercolor%>;" >' , "</div><%= Common.Utils.String.htmlEncode(username) %>" , "</div>" , "<% if (canRestore && selected) { %>" , '<label class="revision-restore" role="presentation" tabindex="-1">' + this . textRestore + "</label>" , "<% } %>" , "</div>" ] . join ( "" ) ) } ) ; var e = this ; this . viewHistoryList . onClickItem = function ( t , i , n ) { var o = $ ( n . target ) ; if ( o && o . hasClass ( "revision-expand" ) ) { var s = ! i . get ( "isExpanded" ) ; i . set ( "isExpanded" , s ) ; var a = e . storeHistory . findRevisions ( i . get ( "revision" ) ) ; if ( a && a . length > 1 ) for ( var r = 1 ; r < a . length ; r ++ ) a [ r ] . set ( "isVisible" , s ) ; this . scroller . update ( { minScrollbarLength : 40 } ) } else Common . UI . DataView . prototype . onClickItem . call ( this , t , i , n ) ; e . btnExpand . cmpEl . text ( e . storeHistory . hasCollapsed ( ) ? e . textShowAll : e . textHideAll ) } ; var i = function ( t , i , n ) { if ( n . get ( "isRevision" ) ) { i . btnTip && ( i . btnTip . dontShow = ! 0 , i . btnTip . tip ( ) . remove ( ) , i . btnTip = null ) ; var o = $ ( i . el ) . find ( ".revision-expand" ) . tooltip ( { title : n . get ( "isExpanded" ) ? e . textHide : e . textShow , placement : "cursor" } ) ; o . length > 0 && ( i . btnTip = o . data ( "bs.tooltip" ) ) } } ; return this . viewHistoryList . on ( "item:add" , i ) , this . viewHistoryList . on ( "item:change" , i ) , this . btnBackToDocument = new Common . UI . Button ( { el : $ ( "#history-btn-back" ) , enableToggle : ! 1 } ) , this . btnExpand = new Common . UI . Button ( { el : $ ( "#history-btn-expand" ) , enableToggle : ! 1 } ) , this . trigger ( "render:after" , this ) , this } , textRestore : "Restore" , textShow : "Expand" , textHide : "Collapse" , textCloseHistory : "Close History" , textHideAll : "Hide detailed changes" , textShowAll : "Show detailed changes" } , Common . Views . History || { } ) ) } ) , void 0 === Common ) var Common = { } ; if ( Common . Views = Common . Views || { } , define ( "common/main/lib/view/Plugins" , [ "common/main/lib/util/utils" , "common/main/lib/component/BaseView" , "common/main/lib/component/Layout" , "common/main/lib/component/Window" ] , function ( t ) { "use strict" ; Common . Views . Plugins = Common . UI . BaseView . extend ( _ . extend ( { el : "#left-panel-plugins" , storePlugins : void 0 , template : _ . template ( [ '<div id="plugins-box" class="layout-ct vbox">' , '<label id="plugins-header"><%= scope.strPlugins %></label>' , '<div id="plugins-list" class="">' , "</div>" , "</div>" , '<div id="current-plugin-box" class="layout-ct vbox hidden">' , '<div id="current-plugin-header">' , "<label></label>" , '<div id="id-plugin-close" class="plugin-close img-commonctrl"></div>' , "</div>" , '<div id="current-plugin-frame" class="">' , "</div>" , "</div>" , '<div id="plugins-mask" style="display: none;">' ] . join ( "" ) ) , initialize : function ( t ) { _ . extend ( this , t ) , this . _locked = ! 1 , this . _state = { DisabledControls : ! 0 } , this . lockedContro
e ( window ) . on ( "resize" , i . bind ( this . onWindowResize , this ) ) ) , this . developerHint . toggleClass ( "hidden" , ! t ) ; var n = this . $el . find ( "button.btn-category:visible" ) , o = n . length > 0 ? e ( n [ n . length - 1 ] ) : null ; this . minDevPosition = o ? o . offset ( ) . top - o . offsetParent ( ) . offset ( ) . top + o . height ( ) + 20 : 20 , this . onWindowResize ( ) } } , onWindowResize : function ( ) { this . developerHint . css ( "top" , Math . max ( ( this . $el . height ( ) - this . devHeight ) / 2 , this . minDevPosition ) ) } , tipComments : "Comments" , tipChat : "Chat" , tipAbout : "About" , tipSupport : "Feedback & Support" , tipFile : "File" , tipSearch : "Search" , tipPlugins : "Plugins" , txtDeveloper : "DEVELOPER MODE" , txtTrial : "TRIAL MODE" } , DE . Views . LeftMenu || { } ) ) } ) , define ( "documenteditor/main/app/controller/Viewport" , [ "core" , "common/main/lib/view/Header" , "documenteditor/main/app/view/Viewport" , "documenteditor/main/app/view/LeftMenu" ] , function ( t ) { "use strict" ; DE . Controllers . Viewport = Backbone . Controller . extend ( { models : [ ] , collections : [ ] , views : [ "Viewport" , "Common.Views.Header" ] , initialize : function ( ) { } , setApi : function ( t ) { this . api = t } , onLaunch : function ( ) { this . viewport = this . createView ( "Viewport" ) . render ( ) , this . header = this . createView ( "Common.Views.Header" , { headerCaption : "Document Editor" } ) . render ( ) , Common . NotificationCenter . on ( "layout:changed" , _ . bind ( this . onLayoutChanged , this ) ) , $ ( window ) . on ( "resize" , _ . bind ( this . onWindowResize , this ) ) ; var t = $ ( "#left-menu" ) , e = $ ( "#left-panel-history" ) ; this . viewport . hlayout . on ( "layout:resizedrag" , function ( ) { this . api . Resize ( ) , Common . localStorage . setItem ( "de-mainmenu-width" , e . is ( ":visible" ) ? e . width ( ) + SCALE _MIN : t . width ( ) ) } , this ) , this . boxSdk = $ ( "#editor_sdk" ) , this . boxSdk . css ( "border-left" , "none" ) } , onLayoutChanged : function ( t ) { switch ( t ) { default : this . viewport . vlayout . doLayout ( ) ; case "rightmenu" : this . viewport . hlayout . doLayout ( ) ; break ; case "history" : var e = this . viewport . hlayout . items [ 1 ] ; e . resize . el && ( this . boxSdk . css ( "border-left" , "" ) , e . resize . el . show ( ) ) , this . viewport . hlayout . doLayout ( ) ; break ; case "leftmenu" : var e = this . viewport . hlayout . items [ 0 ] ; e . resize . el && ( e . el . width ( ) > 40 ? ( this . boxSdk . css ( "border-left" , "" ) , e . resize . el . show ( ) ) : ( e . resize . el . hide ( ) , this . boxSdk . css ( "border-left" , "0 none" ) ) ) , this . viewport . hlayout . doLayout ( ) ; break ; case "header" : case "toolbar" : case "status" : this . viewport . vlayout . doLayout ( ) } this . api . Resize ( ) } , onWindowResize : function ( t ) { this . onLayoutChanged ( "window" ) } } ) } ) , $ ( document ) . off ( "keydown.bs.dropdown.data-api" ) . on ( "keydown.bs.dropdown.data-api" , "[data-toggle=dropdown], [role=menu]" , onDropDownKeyDown ) , function ( ) { function t ( t ) { 1 != t . which && void 0 != t . which || clearMenus ( /form-control/ . test ( t . target . className ) ) } var e , i = $ . _data ( $ ( document ) . get ( 0 ) , "events" ) ; i && i . click && i . click . every ( function ( t , i , n ) { return /click/ . test ( t . type ) && ! t . selector && /bs\..+\.dropdown/ . test ( t . namespace ) && ( e = t . handler ) , ! e } ) , e && $ ( document ) . off ( "click.bs.dropdown.data-api" , e ) . on ( "click.bs.dropdown.data-api" , t ) } ( ) , define ( "common/main/lib/extend/Bootstrap" , function ( ) { } ) , void 0 === Common ) var Common = { } ; if ( define ( "common/main/lib/component/MenuItem" , [ "common/main/lib/component/BaseView" , "common/main/lib/component/ToggleManager" ] , function ( ) { "use strict" ; Common . UI . MenuItem = Common . UI . BaseView . extend ( { options : { id : null , cls : "" , style : "" , hint : ! 1 , checkable : ! 1 , checked : ! 1 , allowDepress : ! 1 , disabled : ! 1 , value : null , toggleGroup : null , iconCls : "" , menu : null , canFocused : ! 0 } , tagName : "li" , template : _ . template ( [ '<a id="<%= id %>" style="<%= style %>" <% if(options.canFocused) { %> tabindex="-1" type="menuitem" <% }; if(!_.isUndefined(options.stopPropagation)) { %> data-stopPropagation="true" <% }; %> >' , "<% if (!_.isEmpty(iconCls)) { %>" , '<span class="menu-item-icon <%= iconCls %>"></span>' , "<% } %>" , "<%= caption %>" , "</a>" ] . join ( "" ) ) , initialize : function ( t ) { Common . UI . BaseView . prototype . initialize . call ( this , t ) ; var e = this ; $ ( this . el ) ; this . id = e . options . id || Common . UI . getId ( ) , this . cls = e . options . cls , this . style = e . options . style , this . caption = e . options . caption , this . menu = e . options . menu || null , this . checkable = e . options . checkable , this . checked = e . options . checked , e . allowDepress = e . options . allowDepress , this . disabled = e . options . disabled , this . value = e . options . value , this . toggleGroup = e . options . toggleGroup , this . template = e . options . tem
this . indeterminate = "indeterminate" === t , this . $chk . toggleClass ( "checked" , this . checked ) , this . $chk . toggleClass ( "indeterminate" , this . indeterminate ) , this . value = this . indeterminate ? "indeterminate" : this . checked ? "checked" : "unchecked" } , setValue : function ( t , e ) { this . rendered ? ( this . lastValue = this . value , this . setRawValue ( t ) , ! 0 !== e && this . lastValue !== t && this . trigger ( "change" , this , this . value , this . lastValue ) ) : this . options . value = t } , getValue : function ( ) { return this . value } , isChecked : function ( ) { return this . checked } , setCaption : function ( t ) { this . $label . find ( "span" ) . text ( t ) } } ) } ) , void 0 === Common ) var Common = { } ; var FONT _TYPE _RECENT = 4 ; if ( define ( "common/main/lib/component/ComboBoxFonts" , [ "common/main/lib/component/ComboBox" ] , function ( ) { "use strict" ; Common . UI . ComboBoxFonts = Common . UI . ComboBox . extend ( function ( ) { var t = Asc . FONT _THUMBNAIL _HEIGHT || 26 , e = window . devicePixelRatio > 1 , i = document . createElement ( "canvas" ) , n = i . getContext ( "2d" ) , o = "../../../../sdkjs/common/Images/fonts_thumbnail.png" , s = "../../../../sdkjs/common/Images/fonts_thumbnail@2x.png" ; return "object" == typeof window . AscDesktopEditor && ( o = window . AscDesktopEditor . getFontsSprite ( ) , s = window . AscDesktopEditor . getFontsSprite ( ! 0 ) ) , i . height = e ? 2 * t : t , i . width = e ? 604 : 302 , { template : _ . template ( [ '<div class="input-group combobox fonts <%= cls %>" id="<%= id %>" style="<%= style %>">' , '<input type="text" class="form-control">' , '<div style="display: table-cell;"></div>' , '<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret img-commonctrl"></span></button>' , '<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">' , '<li class="divider">' , "<% _.each(items, function(item) { %>" , '<li id="<%= item.id %>">' , '<a class="font-item" tabindex="-1" type="menuitem" style="vertical-align:middle; margin: 0 0 0 -10px; height:<%=scope.getListItemHeight()%>px;"/>' , "</li>" , "<% }); %>" , "</ul>" , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { Common . UI . ComboBox . prototype . initialize . call ( this , _ . extend ( t , { displayField : "name" , scroller : { wheelSpeed : 20 , alwaysVisibleY : ! 0 , onChange : this . updateVisibleFontsTiles . bind ( this ) } } ) ) , this . recent = _ . isNumber ( t . recent ) ? t . recent : 3 , Common . NotificationCenter . on ( "fonts:change" , _ . bind ( this . onApiChangeFont , this ) ) , Common . NotificationCenter . on ( "fonts:load" , _ . bind ( this . fillFonts , this ) ) } , render : function ( t ) { var e = null ; return _ . isUndefined ( this . _input ) || ( e = this . _input . val ( ) ) , Common . UI . ComboBox . prototype . render . call ( this , t ) , this . setRawValue ( e ) , this . _input . on ( "keyup" , _ . bind ( this . onInputKeyUp , this ) ) , this . _input . on ( "keydown" , _ . bind ( this . onInputKeyDown , this ) ) , this } , onAfterKeydownMenu : function ( t ) { var e = this ; return t . keyCode == Common . UI . Keys . RETURN ? ( $ ( t . target ) . closest ( "input" ) . length ? this . lastValue !== this . _input . val ( ) && this . _input . trigger ( "change" ) : ( $ ( t . target ) . click ( ) , this . rendered && ( Common . Utils . isIE ? this . _input . trigger ( "change" , { onkeydown : ! 0 } ) : this . _input . blur ( ) ) ) , ! 1 ) : t . keyCode == Common . UI . Keys . ESC && this . isMenuOpen ( ) ? ( this . _input . val ( this . lastValue ) , setTimeout ( function ( ) { e . closeMenu ( ) , e . onAfterHideMenu ( t ) } , 10 ) , ! 1 ) : ( t . keyCode != Common . UI . Keys . HOME && t . keyCode != Common . UI . Keys . END && t . keyCode != Common . UI . Keys . BACKSPACE || ! this . isMenuOpen ( ) || ( e . _input . focus ( ) , setTimeout ( function ( ) { e . _input [ 0 ] . selectionStart = e . _input [ 0 ] . selectionEnd = t . keyCode == Common . UI . Keys . HOME ? 0 : e . _input [ 0 ] . value . length } , 10 ) ) , void this . updateVisibleFontsTiles ( ) ) } , onInputKeyUp : function ( t ) { if ( t . keyCode != Common . UI . Keys . RETURN && t . keyCode !== Common . UI . Keys . SHIFT && t . keyCode !== Common . UI . Keys . CTRL && t . keyCode !== Common . UI . Keys . ALT && t . keyCode !== Common . UI . Keys . LEFT && t . keyCode !== Common . UI . Keys . RIGHT && t . keyCode !== Common . UI . Keys . HOME && t . keyCode !== Common . UI . Keys . END && t . keyCode !== Common . UI . Keys . ESC && t . keyCode !== Common . UI . Keys . INSERT && t . keyCode !== Common . UI . Keys . TAB && ( t . stopPropagation ( ) , this . selectCandidate ( t . keyCode == Common . UI . Keys . DELETE || t . keyCode == Common . UI . Keys . BACKSPACE ) , this . _selectedItem ) ) { var e = this ; void 0 === e . _timerSelection && ( e . _timerSelection = setInterval ( function ( ) { if ( ! ( new Date - e . _inInputKeyDown < 100 ) && e . _selectedItem ) { clearInterval ( e . _timerSelection ) , e . _timerSelection = void 0 ; var t = e . _input [ 0 ] , i = e . _selectedItem
m . setVirtualBorderColor = function ( t ) { var e = new Common . Utils . RGBColor ( t ) ; if ( ! d . isEqual ( e ) ) { d = e ; for ( var i = 0 ; i < m . rows ; i ++ ) for ( var n = 0 ; n < m . columns ; n ++ ) { var o = m . getCell ( n , i ) ; o . setVirtualBorderColor ( d . toHex ( ) ) } } } , m . setBordersSize = function ( t , e ) { e = e > m . maxBorderSize ? m . maxBorderSize : e , t . indexOf ( "t" ) > - 1 && ( u . top = e ) , t . indexOf ( "r" ) > - 1 && ( u . right = e ) , t . indexOf ( "b" ) > - 1 && ( u . bottom = e ) , t . indexOf ( "l" ) > - 1 && ( u . left = e ) , b ( ) } , m . setBordersColor = function ( t , e ) { var i = new Common . Utils . RGBColor ( e ) ; t . indexOf ( "t" ) > - 1 && ( g . top = i ) , t . indexOf ( "r" ) > - 1 && ( g . right = i ) , t . indexOf ( "b" ) > - 1 && ( g . bottom = i ) , t . indexOf ( "l" ) > - 1 && ( g . left = i ) , b ( ) } , m . getBorderSize = function ( t ) { switch ( t ) { case "t" : return u . top ; case "r" : return u . right ; case "b" : return u . bottom ; case "l" : return u . left } return null } , m . getBorderColor = function ( t ) { switch ( t ) { case "t" : return g . top . toHex ( ) ; case "r" : return g . right . toHex ( ) ; case "b" : return g . bottom . toHex ( ) ; case "l" : return g . left . toHex ( ) } return null } , m . setTableColor = function ( t ) { h . css ( "background-color" , "transparent" == t ? t : "#" + t ) } , m . setCellsColor = function ( t ) { p . css ( "background-color" , "transparent" == t ? t : "#" + t ) } , m . options . el && m . render ( null , { borderSize : u , borderColor : g , virtualBorderSize : c , virtualBorderColor : d } ) } , render : function ( t ) { var e = this , i = arguments [ 1 ] ; if ( this . trigger ( "render:before" , this ) , e . rendered ? this . cmpEl = $ ( this . el ) : ( this . cmpEl = $ ( this . template ( _ . extend ( { scope : e } , i ) ) ) , t ? ( this . setElement ( t , ! 1 ) , this . setElement ( t , ! 1 ) , t . html ( this . cmpEl ) ) : $ ( this . el ) . html ( this . cmpEl ) ) , ! e . rendered ) { this . cmpEl ; this . _cells = [ ] ; for ( var n = 0 ; n < e . rows ; n ++ ) for ( var o = 0 ; o < e . columns ; o ++ ) { var s = new Common . UI . CellStyler ( { el : $ ( "#" + e . id + "-cell-container-" + o + "-" + n ) , overwriteStyle : e . overwriteStyle , halfBorderSize : ! e . spacingMode , defaultBorderSize : e . spacingMode ? i . virtualBorderSize : 0 , defaultBorderColor : i . virtualBorderColor . toHex ( ) , id : e . id + "-cell-" + o + "-" + n , col : o , row : n } ) ; this . _cells . push ( s ) , s . on ( "borderclick" , function ( t , i , n , o ) { var s , a , r ; if ( "t" == i ) { if ( t . row > 0 ) for ( s = 0 ; s < e . columns ; s ++ ) r = e . getCell ( s , t . row - 1 ) , r . setBordersSize ( "b" , n ) , r . setBordersColor ( "b" , o ) ; for ( s = 0 ; s < e . columns ; s ++ ) r = e . getCell ( s , t . row ) , t . halfBorderSize && t . row < 1 ? r . setBordersSize ( "t" , 0 ) : r . setBordersSize ( "t" , n ) , r . setBordersColor ( "t" , o ) } else if ( "b" == i ) { if ( t . row < e . rows - 1 ) for ( s = 0 ; s < e . columns ; s ++ ) r = e . getCell ( s , t . row + 1 ) , r . setBordersSize ( "t" , n ) , r . setBordersColor ( "t" , o ) ; for ( s = 0 ; s < e . columns ; s ++ ) r = e . getCell ( s , t . row ) , t . halfBorderSize && t . row >= e . rows - 1 ? r . setBordersSize ( "b" , 0 ) : r . setBordersSize ( "b" , n ) , r . setBordersColor ( "b" , o ) } else if ( "l" == i ) { if ( t . col > 0 ) for ( a = 0 ; a < e . rows ; a ++ ) r = e . getCell ( t . col - 1 , a ) , r . setBordersSize ( "r" , n ) , r . setBordersColor ( "r" , o ) ; for ( a = 0 ; a < e . rows ; a ++ ) r = e . getCell ( t . col , a ) , t . halfBorderSize && t . col < 1 ? r . setBordersSize ( "l" , 0 ) : r . setBordersSize ( "l" , n ) , r . setBordersColor ( "l" , o ) } else if ( "r" == i ) { if ( t . col < e . columns - 1 ) for ( a = 0 ; a < e . rows ; a ++ ) r = e . getCell ( t . col + 1 , a ) , r . setBordersSize ( "l" , n ) , r . setBordersColor ( "l" , o ) ; for ( a = 0 ; a < e . rows ; a ++ ) r = e . getCell ( t . col , a ) , t . halfBorderSize && t . col >= e . columns - 1 ? r . setBordersSize ( "r" , 0 ) : r . setBordersSize ( "r" , n ) , r . setBordersColor ( "r" , o ) } } ) } } return e . rendered = ! 0 , this . trigger ( "render:after" , this ) , this } , getCell : function ( t , e ) { return _ . findWhere ( this . _cells , { id : this . id + "-cell-" + t + "-" + e } ) } } ) } ) , define ( "text!common/main/lib/template/ExtendedColorDialog.template" , [ ] , function ( ) { return '<div class="color-box">\r\n <div id="id-hsb-colorpicker" style="vertical-align:top;">\r\n </div>\r\n <div class="color-info" style="">\r\n <div style="margin-left:15px;">\r\n <label class="color-label"><%= txtNew %></label>\r\n <div id="field-new-color" class="color-cnt top"></div>\r\n <div id="field-start-color" class="color-cnt bottom"></div>\r\n <label class="color-label"><%= txtCurrent %></label>\r\n </div>\r\n <div style="padding:13px 0 2px 0;">\r\n <label class="input-label">R:</label>\r\n <div id="extended-spin-r" class="color-spin"></div>\r\n </div>\r\n <div style="padding:2px 0;">\r\n <label class="input-label">G:</label>\r\n <div id="extended-spin-g" class="color-spin"></div>\r\n </div>\r\n <div style="padding:2px 0;">\r\n
template:_.template(' < div id = "drop-advanced-border-color-menu" style = "width: 169px; height: 220px; margin: 10px;" > < / d i v > ' ) } , { t e m p l a t e : _ . t e m p l a t e ( ' < a i d = " d r o p - a d v a n c e d - b o r d e r - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n B o r d e r C o l o r . o n ( " r e n d e r : a f t e r " , f u n c t i o n ( e ) { t . c o l o r s B o r d e r = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : $ ( " # d r o p - a d v a n c e d - b o r d e r - c o l o r - m e n u " ) } ) . o n ( " s e l e c t " , _ . b i n d ( f u n c t i o n ( e , i ) { t . b t n B o r d e r C o l o r . s e t C o l o r ( i ) , t . t a b l e S t y l e r . s e t V i r t u a l B o r d e r C o l o r ( " o b j e c t " = = t y p e o f i ? i . c o l o r : i ) } , t ) ) } ) , t h i s . b t n B o r d e r C o l o r . r e n d e r ( $ ( " # d r o p - a d v a n c e d - b u t t o n - b o r d e r c o l o r " ) ) , t h i s . b t n B o r d e r C o l o r . s e t C o l o r ( " 0 0 0 0 0 0 " ) , t h i s . b t n B o r d e r C o l o r . m e n u . c m p E l . o n ( " c l i c k " , " # d r o p - a d v a n c e d - b o r d e r - c o l o r - n e w " , _ . b i n d ( f u n c t i o n ( ) { t . c o l o r s B o r d e r . a d d N e w C o l o r ( " o b j e c t " = = t y p e o f t . b t n B o r d e r C o l o r . c o l o r ? t . b t n B o r d e r C o l o r . c o l o r . c o l o r : t . b t n B o r d e r C o l o r . c o l o r ) } , t ) ) , t h i s . b t n B a c k C o l o r = n e w C o m m o n . U I . C o l o r B u t t o n ( { s t y l e : " w i d t h : 4 5 p x ; " , m e n u : n e w C o m m o n . U I . M e n u ( { i t e m s : [ { t e m p l a t e : _ . t e m p l a t e ( ' < d i v i d = " d r o p - a d v a n c e d - b a c k - c o l o r - m e n u " s t y l e = " w i d t h : 1 6 9 p x ; h e i g h t : 2 2 0 p x ; m a r g i n : 1 0 p x ; " > < / d i v > ' ) } , { t e m p l a t e : _ . t e m p l a t e ( ' < a i d = " d r o p - a d v a n c e d - b a c k - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n B a c k C o l o r . o n ( " r e n d e r : a f t e r " , f u n c t i o n ( e ) { t . c o l o r s B a c k = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : $ ( " # d r o p - a d v a n c e d - b a c k - c o l o r - m e n u " ) , t r a n s p a r e n t : ! 0 } ) . o n ( " s e l e c t " , _ . b i n d ( f u n c t i o n ( e , i ) { t . b t n B a c k C o l o r . s e t C o l o r ( i ) , t . p a r a g r a p h S h a d e = i , t . _ c h a n g e d P r o p s & & ( v o i d 0 ! = = t . _ c h a n g e d P r o p s . g e t _ S h a d e ( ) & & n u l l ! = = t . _ c h a n g e d P r o p s . g e t _ S h a d e ( ) | | t . _ c h a n g e d P r o p s . p u t _ S h a d e ( n e w A s c . a s c _ C P a r a g r a p h S h d ) , " t r a n s p a r e n t " = = i ? t . _ c h a n g e d P r o p s . g e t _ S h a d e ( ) . p u t _ V a l u e ( A s c . c _ o A s c S h d N i l ) : ( t . _ c h a n g e d P r o p s . g e t _ S h a d e ( ) . p u t _ V a l u e ( A s c . c _ o A s c S h d C l e a r ) , t . _ c h a n g e d P r o p s . g e t _ S h a d e ( ) . p u t _ C o l o r ( C o m m o n . U t i l s . T h e m e C o l o r . g e t R g b C o l o r ( i ) ) ) ) ; v a r n = " o b j e c t " = = t y p e o f i ? i . c o l o r : i ; t . t a b l e S t y l e r . s e t C e l l s C o l o r ( n ) } , t ) ) } ) , t h i s . b t n B a c k C o l o r . r e n d e r ( $ ( " # d r o p - a d v a n c e d - b u t t o n - c o l o r " ) ) , t h i s . b t n B a c k C o l o r . m e n u . c m p E l . o n ( " c l i c k " , " # d r o p - a d v a n c e d - b a c k - c o l o r - n e w " , _ . b i n d ( f u n c t i o n ( ) { t . c o l o r s B a c k . a d d N e w C o l o r ( ) } , t ) ) , t h i s . s p n M a r g i n T o p = n e w C o m m o n . U I . M e t r i c S p i n n e r ( { e l : $ ( " # d r o p - a d v a n c e d - i n p u t - t o p " ) , s t e p : . 1 , w i d t h : 1 0 0 , v a l u e : " 0 c m " , d e f a u l t U n i t : " c m " , m a x V a l u e : 5 5 . 8 7 , m i n V a l u e : 0 } ) . o n ( " c h a n g e " , _ . b i n d ( f u n c t i o n ( t , e , i ) { t h i s . _ n o A p p l y | | ( _ . i s U n d e f i n e d ( t h i s . M a r g i n s ) & & ( t h i s . M a r g i n s = { } ) , t h i s . M a r g i n s . T o p = C o m m o n . U t i l s . M e t r i c . f n R e c a l c T o M M ( t . g e t N u m b e r V a l u e ( ) ) ) } , t ) ) , t h i s . s p n M a r g i n L e f t = n e w C o m m o n . U I . M e t r i c S p i n n e r ( { e l : $ ( " # d r o p - a d v a n c e d - i n p u t - l e f t " ) , s t e p : . 1 , w i d t h : 1 0 0 , v a l u e : " 0 c m " , d e f a u l t U n i t : " c m " , m a x V a l u e : 5 5 . 8 7 , m i n V a l u e : 0 } ) . o n ( " c h a n g e " , _ . b i n d ( f u n c t i o n ( t , e , i ) { t h i s . _ n o A p p l y | | ( _ . i s U n d e f i n e d ( t h i s . M a r g i n s ) & & ( t h i s . M a r g i n s = { } ) , t h i s . M a r g i n s . L e f t = C o m m o n . U t i l s . M e t r i c . f n R e c a l c T o M M ( t . g e t N u m b e r V a l u e ( ) ) ) } , t ) ) , t h i s . s p n M a r g i n B o t t o m = n e w C o m m o n . U I . M e t r i c S p i n n e r ( { e l : $ ( " # d r o p - a d v a n c e d - i n p u t - b o t t o m " ) , s t e p : . 1 , w i d t h : 1 0 0 , v a l u e : " 0 c m " , d e f a u l t U n i t : " c m " , m a x V a l u e : 5 5 . 8 7 , m i n V a l u e : 0 } ) . o n ( " c h a n g e " , _ . b i n d ( f u n c t i o n ( t , e , i ) { t h i s . _ n o A p p l y | | ( _ . i s U n d e f i n e d ( t h i s . M a r g i n s ) & & ( t h i s . M a r g i n s = { } ) , t h i s . M a r g i n s . B o t t o m = C o m m o n . U t i l s . M e t r i c . f n R e c a l c T o M M ( t . g e t N u m b e r V a l u e ( ) ) ) } , t ) ) , t h i s . s p n M a r g i n R i g h t = n e w C o m m o n . U I . M e t r i c S p i n n e r ( { e l : $ ( " # d r o p - a d v a n c e d - i n p u t - r i g h t " ) , s t e p : . 1 , w i d t h : 1 0 0 , v a l u e : " 0 c m " , d e f a u l t U n i t : " c m " , m a x V a l u e : 5 5 . 8 7 , m i n V a l u e : 0 } ) . o n ( " c h a n g e " , _ . b i n d ( f u n c t i o n ( t , e , i ) { t h i s . _ n o A p p l y | | ( _ . i s U n d e f i n e d ( t h i s . M a r g i n s ) & & ( t h i s . M a r g i n s = { } ) , t h i s . M a r g i n s . R i g h t = C o m m o n . U t i l s . M e t r i c . f n R e c a l c T o M M ( t . g e t N u m b e r V a l u e ( ) ) ) } , t ) ) , t h i s . b t n N o n e = n e w C o m m o n . U I . B u t t o n ( { c l s : " b t n x - h u g e b t n - o p t i o n s " , i c o n C l s : " i c o n - a d v a n c e d - w r a p b t n - d r o p - n o n e " , e n a b l e T o g g l e : ! 0 , t o g g l e G r o u p : " d r o p A d v G r o u p " , a l l o w D e p r e s s : ! 1 , h i n t : t h i s . t e x t N o n e } ) . o n ( " t o g g l e " , _ . b i n d ( f u n c t i o n ( e , i ) { t . _ c h a n g e d P r o p s & & i & & ( t . _ D i s a b l e E l e m ( A s c . c _ o A s c D r o p C a p . N o n e ) , t . _ c h a n g e d P r o p s . p u t _ D r o p C a p ( A s c . c _ o A s c D r o p C a p . N o n e ) ) } , t ) ) , t h i s . b t n I n T e x t = n e w C o m m o n . U I . B u t t o n ( { c l s : " b t n x - h u g e b t n - o p t i o n s " , i c o n C l s : " i c o n - a d v a n c e d - w r a p b t n - d r o p - t e x t " , e n a b l e T o g g l e : ! 0 , t o g g l e G r o u p : " d r o p A d v G r o u p " , a l l o w D e p r e s s : ! 1 , h i n t : t h i s . t e x t I n T e x t } ) . o n ( " t o g g l e " , _ . b i n d ( f u n c t i o n ( e , i ) { t . _ c h a n g e d P r o p s & & i & & ( t . _ D i s a b l e E l e m ( A s c . c _ o A s c D r o p C a p . D r o p ) , t . _ c h a n g e d P r o p s . p u t _ D r o p C a p ( A s c . c _ o A s c D r o p C a p . D r o p ) ) } , t ) ) , t h i s . b t n I n M a r g i n = n e w C o m m o n . U I . B u t t o n ( { c l s : " b t n x - h u g e b
validateOnBlur : ! 0 , disabled : ! 1 } , template : _ . template ( [ '<div class="input-field" style="<%= style %>">' , "<input " , 'type="<%= type %>" ' , 'name="<%= name %>" ' , 'spellcheck="<%= spellcheck %>" ' , 'class="form-control <%= cls %>" ' , 'placeholder="<%= placeHolder %>" ' , 'value="<%= value %>"' , ">" , '<span class="input-error"/>' , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { Common . UI . BaseView . prototype . initialize . call ( this , t ) ; var e = this ; $ ( this . el ) ; this . id = e . options . id || Common . UI . getId ( ) , this . cls = e . options . cls , this . style = e . options . style , this . value = e . options . value , this . type = e . options . type , this . name = e . options . name , this . validation = e . options . validation , this . allowBlank = e . options . allowBlank , this . placeHolder = e . options . placeHolder , this . template = e . options . template || e . template , this . editable = e . options . editable || ! 0 , this . disabled = e . options . disabled , this . spellcheck = e . options . spellcheck , this . blankError = e . options . blankError || "This field is required" , this . validateOnChange = e . options . validateOnChange , this . validateOnBlur = e . options . validateOnBlur , this . maxLength = e . options . maxLength , e . rendered = e . options . rendered || ! 1 , e . options . el && e . render ( ) } , render : function ( t ) { var e = this ; if ( e . rendered ? this . cmpEl = $ ( this . el ) : ( this . cmpEl = $ ( this . template ( { id : this . id , cls : this . cls , style : this . style , value : this . value , type : this . type , name : this . name , placeHolder : this . placeHolder , spellcheck : this . spellcheck , scope : e } ) ) , t ? ( this . setElement ( t , ! 1 ) , t . html ( this . cmpEl ) ) : $ ( this . el ) . html ( this . cmpEl ) ) , ! e . rendered ) { var i = this . cmpEl ; if ( this . _input = this . cmpEl . find ( "input" ) . addBack ( ) . filter ( "input" ) , this . editable && ( this . _input . on ( "blur" , _ . bind ( this . onInputChanged , this ) ) , this . _input . on ( "keypress" , _ . bind ( this . onKeyPress , this ) ) , this . _input . on ( "keyup" , _ . bind ( this . onKeyUp , this ) ) , this . validateOnChange && this . _input . on ( "input" , _ . bind ( this . onInputChanging , this ) ) , this . maxLength && this . _input . attr ( "maxlength" , this . maxLength ) ) , this . setEditable ( this . editable ) , this . disabled && this . setDisabled ( this . disabled ) , this . _input . closest ( ".asc-window" ) . length > 0 ) var n = function ( ) { var t = i . find ( ".input-error" ) . data ( "bs.tooltip" ) ; t && t . tip ( ) . remove ( ) , Common . NotificationCenter . off ( { "modal:close" : n } ) } ; Common . NotificationCenter . on ( { "modal:close" : n } ) } return e . rendered = ! 0 , this } , _doChange : function ( t , e ) { if ( ! e || ! e . synthetic ) { var i = $ ( t . target ) . val ( ) , n = this . value ; this . trigger ( "changed:before" , this , i , n , t ) , t . isDefaultPrevented ( ) || ( this . value = i , this . validateOnBlur && this . checkValidate ( ) , this . trigger ( "changed:after" , this , i , n , t ) ) } } , onInputChanged : function ( t , e ) { this . _doChange ( t , e ) } , onInputChanging : function ( t , e ) { var i = $ ( t . target ) . val ( ) , n = this . value ; t . isDefaultPrevented ( ) || ( this . value = i , this . validateOnBlur && this . checkValidate ( ) , this . trigger ( "changing" , this , i , n , t ) ) } , onKeyPress : function ( t ) { if ( this . trigger ( "keypress:before" , this , t ) , ! t . isDefaultPrevented ( ) ) { if ( t . keyCode === Common . UI . Keys . RETURN ) this . _doChange ( t ) ; else if ( this . options . maskExp && ! _ . isEmpty ( this . options . maskExp . source ) ) { var e = String . fromCharCode ( t . which ) ; this . options . maskExp . test ( e ) || t . ctrlKey || t . keyCode === Common . UI . Keys . DELETE || t . keyCode === Common . UI . Keys . BACKSPACE || t . keyCode === Common . UI . Keys . LEFT || t . keyCode === Common . UI . Keys . RIGHT || t . keyCode === Common . UI . Keys . HOME || t . keyCode === Common . UI . Keys . END || t . keyCode === Common . UI . Keys . ESC || t . keyCode === Common . UI . Keys . INSERT || ( t . preventDefault ( ) , t . stopPropagation ( ) ) } this . trigger ( "keypress:after" , this , t ) } } , onKeyUp : function ( t ) { this . trigger ( "keyup:before" , this , t ) , t . isDefaultPrevented ( ) || this . trigger ( "keyup:after" , this , t ) } , setEditable : function ( t ) { var e = this . _input ; this . editable = t , t && e ? ( e . removeAttr ( "readonly" ) , e . removeAttr ( "data-can-copy" ) ) : ( e . attr ( "readonly" , "readonly" ) , e . attr ( "data-can-copy" , ! 1 ) ) } , isEditable : function ( ) { return this . editable } , setDisabled : function ( t ) { this . disabled = t , $ ( this . el ) . toggleClass ( "disabled" , t ) , t ? this . _input . attr ( "disabled" , ! 0 ) : this . _input . removeAttr ( "disabled" ) } , isDisabled : function ( ) { return this . disabled } , setValue : function ( t ) { this . value = t , this . rendered && this . _input . val ( t ) } , getValue : function ( ) { return this . value } , focus : function ( ) { this . _input . focus ( ) } , checkValidate : function ( ) { var t = this , e = [ ] ; if ( ! t . allowBlank && _ . isEmpty ( t . value ) && e . push ( t . blankErro
if ( this . _changedProps && this . _changedProps . put _Position ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) , this . api && ! this . _noApply ) { var o = this . _originalProps ? this . _originalProps : new Asc . asc _CParagraphProperty ; o . put _Position ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) , this . api . SetDrawImagePlaceParagraph ( "paragraphadv-font-img" , o ) } } , this ) ) , this . spinners . push ( this . numPosition ) , this . numTab = new Common . UI . MetricSpinner ( { el : $ ( "#paraadv-spin-tab" ) , step : . 1 , width : 180 , defaultUnit : "cm" , value : "1.25 cm" , maxValue : 55.87 , minValue : 0 } ) , this . spinners . push ( this . numTab ) , this . numDefaultTab = new Common . UI . MetricSpinner ( { el : $ ( "#paraadv-spin-default-tab" ) , step : . 1 , width : 107 , defaultUnit : "cm" , value : "1.25 cm" , maxValue : 55.87 , minValue : 0 } ) , this . numDefaultTab . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _changedProps && this . _changedProps . put _DefaultTab ( parseFloat ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) . toFixed ( 1 ) ) ) } , this ) ) , this . spinners . push ( this . numDefaultTab ) , this . tabList = new Common . UI . ListView ( { el : $ ( "#paraadv-list-tabs" ) , emptyText : this . noTabs , store : new Common . UI . DataViewStore } ) , this . tabList . store . comparator = function ( t ) { return t . get ( "tabPos" ) } , this . tabList . on ( "item:select" , _ . bind ( this . onSelectTab , this ) ) ; var n = function ( ) { t . _noApply || ( t . _tabListChanged = ! 0 ) } ; this . listenTo ( this . tabList . store , "add" , n ) , this . listenTo ( this . tabList . store , "remove" , n ) , this . listenTo ( this . tabList . store , "reset" , n ) , this . radioLeft = new Common . UI . RadioBox ( { el : $ ( "#paragraphadv-radio-left" ) , labelText : this . textTabLeft , name : "asc-radio-tab" , checked : ! 0 } ) , this . radioCenter = new Common . UI . RadioBox ( { el : $ ( "#paragraphadv-radio-center" ) , labelText : this . textTabCenter , name : "asc-radio-tab" } ) , this . radioRight = new Common . UI . RadioBox ( { el : $ ( "#paragraphadv-radio-right" ) , labelText : this . textTabRight , name : "asc-radio-tab" } ) , this . btnAddTab = new Common . UI . Button ( { el : $ ( "#paraadv-button-add-tab" ) } ) , this . btnAddTab . on ( "click" , _ . bind ( this . addTab , this ) ) , this . btnRemoveTab = new Common . UI . Button ( { el : $ ( "#paraadv-button-remove-tab" ) } ) , this . btnRemoveTab . on ( "click" , _ . bind ( this . removeTab , this ) ) , this . btnRemoveAll = new Common . UI . Button ( { el : $ ( "#paraadv-button-remove-all" ) } ) , this . btnRemoveAll . on ( "click" , _ . bind ( this . removeAllTabs , this ) ) , this . spnMarginTop = new Common . UI . MetricSpinner ( { el : $ ( "#paraadv-number-margin-top" ) , step : . 1 , width : 100 , defaultUnit : "cm" , value : "0 cm" , maxValue : 55.87 , minValue : 0 } ) , this . spnMarginTop . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _noApply || ( void 0 === this . Margins && ( this . Margins = { } ) , this . Margins . Top = Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) } , this ) ) , this . spinners . push ( this . spnMarginTop ) , this . spnMarginBottom = new Common . UI . MetricSpinner ( { el : $ ( "#paraadv-number-margin-bottom" ) , step : . 1 , width : 100 , defaultUnit : "cm" , value : "0 cm" , maxValue : 55.87 , minValue : 0 } ) , this . spnMarginBottom . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _noApply || ( void 0 === this . Margins && ( this . Margins = { } ) , this . Margins . Bottom = Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) } , this ) ) , this . spinners . push ( this . spnMarginBottom ) , this . spnMarginLeft = new Common . UI . MetricSpinner ( { el : $ ( "#paraadv-number-margin-left" ) , step : . 1 , width : 100 , defaultUnit : "cm" , value : "0.19 cm" , maxValue : 9.34 , minValue : 0 } ) , this . spnMarginLeft . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _noApply || ( void 0 === this . Margins && ( this . Margins = { } ) , this . Margins . Left = Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) } , this ) ) , this . spinners . push ( this . spnMarginLeft ) , this . spnMarginRight = new Common . UI . MetricSpinner ( { el : $ ( "#paraadv-number-margin-right" ) , step : . 1 , width : 100 , defaultUnit : "cm" , value : "0.19 cm" , maxValue : 9.34 , minValue : 0 } ) , this . spnMarginRight . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _noApply || ( void 0 === this . Margins && ( this . Margins = { } ) , this . Margins . Right = Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) } , this ) ) , this . spinners . push ( this . spnMarginRight ) , this . TextOnlySettings = $ ( ".text-only" ) , this . afterRender ( ) } , getSettings : function ( ) { if ( null === this . ChangedBorders ? this . _changedProps . put _Borders ( this . Borders ) : void 0 !== this . ChangedBorders && this . _changedProps . put _Borders ( this . ChangedBorders ) , this . Margins ) { var t = this . _changedProps . get _Borders ( ) ; void 0 !== t && null !== t || ( this . _changedProps . p
2019-01-07 12:02:38 +01:00
return ' < div id = "id-adv-table-width" class = "settings-panel active" > \ r \ n < div class = "inner-content" > \ r \ n < table cols = "3" > \ r \ n < tr > \ r \ n < td colspan = "3" class = "padding-small" > \ r \ n < label class = "header" > < %= scope . textTableSize % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d s t y l e = " v e r t i c a l - a l i g n : b o t t o m ; p a d d i n g - b o t t o m : 1 1 p x ; " > \ r \ n < d i v i d = " t a b l e a d v - c h e c k b o x - w i d t h " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t W i d t h % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - w i d t h " s t y l e = " m a r g i n - r i g h t : 1 0 p x ; " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t M e a s u r e % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - c m b - u n i t " s t y l e = " w i d t h : 1 1 5 p x ; " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c o l s p a n = " 3 " c l a s s = " p a d d i n g - l a r g e " > \ r \ n < d i v i d = " t a b l e a d v - c h e c k b o x - a u t o f i t " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < / t a b l e > \ r \ n < d i v c l a s s = " p a d d i n g - s m a l l " > < / d i v > \ r \ n < t a b l e c o l s = " 2 " s t y l e = " w i d t h : 1 0 0 % ; " > \ r \ n < t r > \ r \ n < t d c o l s p a n = 2 c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " h e a d e r " > < % = s c o p e . t e x t D e f a u l t M a r g i n s % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " w i d t h = " 1 2 5 p x " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t T o p % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - m a r g i n - t a b l e - t o p " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t L e f t % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - m a r g i n - t a b l e - l e f t " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - l a r g e " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t B o t t o m % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - m a r g i n - t a b l e - b o t t o m " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - l a r g e " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t R i g h t % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - m a r g i n - t a b l e - r i g h t " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < / t a b l e > \ r \ n < d i v c l a s s = " p a d d i n g - s m a l l " > < / d i v > \ r \ n < t a b l e c o l s = " 2 " > \ r \ n < t r > \ r \ n < t d c o l s p a n = " 2 " c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " h e a d e r " > < % = s c o p e . t e x t O p t i o n s % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d s t y l e = " v e r t i c a l - a l i g n : b o t t o m ; p a d d i n g - b o t t o m : 1 9 p x ; " > \ r \ n < d i v i d = " t a b l e a d v - c h e c k b o x - s p a c i n g " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - l a r g e " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t A l l o w S p a c i n g % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - s p a c i n g " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < / t a b l e > \ r \ n < / d i v > \ r \ n < d i v c l a s s = " i n n e r - c o n t e n t " > \ r \ n < / d i v > \ r \ n < / d i v > \ r \ n < d i v i d = " i d - a d v - t a b l e - c e l l - p r o p s " c l a s s = " s e t t i n g s - p a n e l " > \ r \ n < d i v c l a s s = " i n n e r - c o n t e n t " > \ r \ n < t a b l e c o l s = " 3 " > \ r \ n < t r > \ r \ n < t d c o l s p a n = " 3 " c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " h e a d e r " > < % = s c o p e . t e x t C e l l S i z e % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d s t y l e = " v e r t i c a l - a l i g n : b o t t o m ; p a d d i n g - b o t t o m : 1 9 p x ; " > \ r \ n < d i v i d = " t a b l e a d v - c h e c k b o x - p r e f w i d t h " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - l a r g e " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t P r e f W i d t h % > < / l a b e l > \ r \ n < d i v i d = " t a b l e a d v - n u m b e r - p r e f w i d t h " s t y l e = " m a r g i n - r i g h t : 1 0 p x ; " > < / d i v > \ r \
cls : "btn-options huge" , iconCls : "icon-right-panel btn-wrap-parallel" , posId : c _tableWrap . TABLE _WRAP _PARALLEL , hint : this . textWrapParallelTooltip , enableToggle : ! 0 , allowDepress : ! 1 , toggleGroup : "advtablewrapGroup" } ) , this . btnWrapParallel . render ( $ ( "#tableadv-button-wrap-parallel" ) ) , this . btnWrapParallel . on ( "click" , _ . bind ( this . onBtnFlowWrapClick , this ) ) , this . btnAlignLeft = new Common . UI . Button ( { cls : "btn-options huge" , iconCls : "icon-right-panel btn-table-align-left" , posId : c _tableAlign . TABLE _ALIGN _LEFT , hint : this . textLeftTooltip , enableToggle : ! 0 , allowDepress : ! 1 , toggleGroup : "advtablealignGroup" } ) , this . btnAlignLeft . render ( $ ( "#tableadv-button-align-left" ) ) , this . btnAlignLeft . on ( "click" , _ . bind ( function ( t ) { this . _changedProps && t . pressed && ( this . _changedProps . put _TableAlignment ( t . options . posId ) , this . _changedProps . put _TableIndent ( Common . Utils . Metric . fnRecalcToMM ( this . spnIndentLeft . getNumberValue ( ) ) ) , this . spnIndentLeft . setDisabled ( ! t . pressed ) , this . _state . alignChanged = ! 0 ) } , this ) ) , this . btnAlignCenter = new Common . UI . Button ( { cls : "btn-options huge" , iconCls : "icon-right-panel btn-table-align-center" , posId : c _tableAlign . TABLE _ALIGN _CENTER , hint : this . textCenterTooltip , enableToggle : ! 0 , allowDepress : ! 1 , toggleGroup : "advtablealignGroup" } ) , this . btnAlignCenter . render ( $ ( "#tableadv-button-align-center" ) ) , this . btnAlignCenter . on ( "click" , _ . bind ( function ( t ) { this . _changedProps && t . pressed && ( this . _changedProps . put _TableAlignment ( t . options . posId ) , this . _changedProps . put _TableIndent ( 0 ) , this . spnIndentLeft . setDisabled ( t . pressed ) , this . _state . alignChanged = ! 0 ) } , this ) ) , this . btnAlignRight = new Common . UI . Button ( { cls : "btn-options huge" , iconCls : "icon-right-panel btn-table-align-right" , posId : c _tableAlign . TABLE _ALIGN _RIGHT , hint : this . textRightTooltip , enableToggle : ! 0 , allowDepress : ! 1 , toggleGroup : "advtablealignGroup" } ) , this . btnAlignRight . render ( $ ( "#tableadv-button-align-right" ) ) , this . btnAlignRight . on ( "click" , _ . bind ( function ( t ) { this . _changedProps && t . pressed && ( this . _changedProps . put _TableAlignment ( t . options . posId ) , this . _changedProps . put _TableIndent ( 0 ) , this . spnIndentLeft . setDisabled ( t . pressed ) , this . _state . alignChanged = ! 0 ) } , this ) ) , this . spnIndentLeft = new Common . UI . MetricSpinner ( { el : $ ( "#tableadv-number-indent" ) , step : . 1 , width : 85 , defaultUnit : "cm" , defaultValue : 0 , value : "0 cm" , maxValue : 38.09 , minValue : - 38.09 } ) , this . spnIndentLeft . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _changedProps && this . _changedProps . put _TableIndent ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) } , this ) ) , this . spinners . push ( this . spnIndentLeft ) , this . spnDistanceTop = new Common . UI . MetricSpinner ( { el : $ ( "#tableadv-number-distance-top" ) , step : . 1 , width : 85 , defaultUnit : "cm" , value : "1 cm" , maxValue : 55.87 , minValue : 0 } ) , this . spnDistanceTop . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _changedProps && ( void 0 === this . _changedProps . get _TablePaddings ( ) && this . _changedProps . put _TablePaddings ( new Asc . asc _CPaddings ) , this . _changedProps . get _TablePaddings ( ) . put _Top ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) ) } , this ) ) , this . spinners . push ( this . spnDistanceTop ) , this . spnDistanceBottom = new Common . UI . MetricSpinner ( { el : $ ( "#tableadv-number-distance-bottom" ) , step : . 1 , width : 85 , defaultUnit : "cm" , value : "1 cm" , maxValue : 55.87 , minValue : 0 } ) , this . spnDistanceBottom . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _changedProps && ( void 0 === this . _changedProps . get _TablePaddings ( ) && this . _changedProps . put _TablePaddings ( new Asc . asc _CPaddings ) , this . _changedProps . get _TablePaddings ( ) . put _Bottom ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) ) } , this ) ) , this . spinners . push ( this . spnDistanceBottom ) , this . spnDistanceLeft = new Common . UI . MetricSpinner ( { el : $ ( "#tableadv-number-distance-left" ) , step : . 1 , width : 85 , defaultUnit : "cm" , value : "1 cm" , maxValue : 9.34 , minValue : 0 } ) , this . spnDistanceLeft . on ( "change" , _ . bind ( function ( t , e , i , n ) { this . _changedProps && ( void 0 === this . _changedProps . get _TablePaddings ( ) && this . _changedProps . put _TablePaddings ( new Asc . asc _CPaddings ) , this . _changedProps . get _TablePaddings ( ) . put _Left ( Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ( ) ) ) ) } , this ) ) , this . spinners . push ( this . spnDistanceLeft ) , this . spnDistanceRight = new Common . UI . MetricSpinner ( { el : $ ( "#tableadv-number-distance-right" ) , step : . 1 , width : 85 ,
2019-01-15 14:28:49 +01:00
this . _changedProps . get _PositionH ( ) . put _RelativeFrom ( this . _state . HPositionFrom ) , ! this . _state . spnXChanged ) { var i = this . _originalProps . get _Value _X ( this . _state . HPositionFrom ) ; this . spnX . setValue ( Common . Utils . Metric . fnRecalcFromMM ( i ) , ! 0 ) } this . _changedProps . get _PositionH ( ) . put _Value ( Common . Utils . Metric . fnRecalcToMM ( this . spnX . getNumberValue ( ) ) ) } } , onVAlignSelect : function ( t , e ) { this . _changedProps && ( null !== this . _changedProps . get _PositionV ( ) && void 0 !== this . _changedProps . get _PositionV ( ) || this . _changedProps . put _PositionV ( new Asc . CTablePositionV ) , this . _state . VAlignType = e . value , this . _changedProps . get _PositionV ( ) . put _UseAlign ( ! 0 ) , this . _changedProps . get _PositionV ( ) . put _RelativeFrom ( this . _state . VAlignFrom ) , this . _changedProps . get _PositionV ( ) . put _Align ( this . _state . VAlignType ) ) } , onVRelativeSelect : function ( t , e ) { this . _changedProps && ( null !== this . _changedProps . get _PositionV ( ) && void 0 !== this . _changedProps . get _PositionV ( ) || this . _changedProps . put _PositionV ( new Asc . CTablePositionV ) , this . _state . VAlignFrom = e . value , this . _changedProps . get _PositionV ( ) . put _UseAlign ( ! 0 ) , this . _changedProps . get _PositionV ( ) . put _RelativeFrom ( this . _state . VAlignFrom ) , this . _changedProps . get _PositionV ( ) . put _Align ( this . _state . VAlignType ) , this . chMove . setValue ( this . _state . VAlignFrom == Asc . c _oAscVAnchor . Text , ! 0 ) ) } , onVPositionSelect : function ( t , e ) { if ( this . _changedProps ) { if ( null !== this . _changedProps . get _PositionV ( ) && void 0 !== this . _changedProps . get _PositionV ( ) || this . _changedProps . put _PositionV ( new Asc . CTablePositionV ) , this . _state . VPositionFrom = e . value , this . _changedProps . get _PositionV ( ) . put _UseAlign ( ! 1 ) , this . _changedProps . get _PositionV ( ) . put _RelativeFrom ( this . _state . VPositionFrom ) , ! this . _state . spnYChanged ) { var i = this . _originalProps . get _Value _Y ( this . _state . VPositionFrom ) ; this . spnY . setValue ( Common . Utils . Metric . fnRecalcFromMM ( i ) , ! 0 ) } this . _changedProps . get _PositionV ( ) . put _Value ( Common . Utils . Metric . fnRecalcToMM ( this . spnY . getNumberValue ( ) ) ) , this . chMove . setValue ( this . _state . VPositionFrom == Asc . c _oAscVAnchor . Text , ! 0 ) } } , onRadioHAlignChange : function ( t , e , i ) { this . _changedProps && ( null !== this . _changedProps . get _PositionH ( ) && void 0 !== this . _changedProps . get _PositionH ( ) || this . _changedProps . put _PositionH ( new Asc . CTablePositionH ) , this . _changedProps . get _PositionH ( ) . put _UseAlign ( e ) , e && ( this . _changedProps . get _PositionH ( ) . put _Align ( this . _state . HAlignType ) , this . _changedProps . get _PositionH ( ) . put _RelativeFrom ( this . _state . HAlignFrom ) ) ) , e && ( this . cmbHAlign . setDisabled ( ! 1 ) , this . cmbHRelative . setDisabled ( ! 1 ) , this . spnX . setDisabled ( ! 0 ) , this . cmbHPosition . setDisabled ( ! 0 ) , this . _state . horizontalPropChanged = ! 0 , this . _state . alignChanged = ! 0 ) } , onRadioHPositionChange : function ( t , e , i ) { if ( this . _changedProps && ( null !== this . _changedProps . get _PositionH ( ) && void 0 !== this . _changedProps . get _PositionH ( ) || this . _changedProps . put _PositionH ( new Asc . CTablePositionH ) , this . _changedProps . get _PositionH ( ) . put _UseAlign ( ! e ) , e ) ) { if ( ! this . _state . spnXChanged ) { var n = this . _originalProps . get _Value _X ( this . _state . HPositionFrom ) ; this . spnX . setValue ( Common . Utils . Metric . fnRecalcFromMM ( n ) ) } this . _changedProps . get _PositionH ( ) . put _Value ( Common . Utils . Metric . fnRecalcToMM ( this . spnX . getNumberValue ( ) ) ) , this . _changedProps . get _PositionH ( ) . put _RelativeFrom ( this . _state . HPositionFrom ) } e && ( this . cmbHAlign . setDisabled ( ! 0 ) , this . cmbHRelative . setDisabled ( ! 0 ) , this . spnX . setDisabled ( ! 1 ) , this . cmbHPosition . setDisabled ( ! 1 ) , this . _state . alignChanged = ! 1 ) } , onRadioVAlignChange : function ( t , e , i ) { this . _changedProps && ( null !== this . _changedProps . get _PositionV ( ) && void 0 !== this . _changedProps . get _PositionV ( ) || this . _changedProps . put _PositionV ( new Asc . CTablePositionV ) , this . _changedProps . get _PositionV ( ) . put _UseAlign ( e ) , e && ( this . _changedProps . get _PositionV ( ) . put _Align ( this . _state . VAlignType ) , this . _changedProps . get _PositionV ( ) . put _RelativeFrom ( this . _state . VAlignFrom ) , this . _state . verticalPropChanged = ! 0 ) ) , e && ( this . cmbVAlign . setDisabled ( ! 1 ) , this . cmbVRelative . setDisabled ( ! 1 ) , this . spnY . setDisabled ( ! 0 ) , this . cmbVPosition . setDisabled ( ! 0 ) , this . chMove . setValue ( this . _state . VAlignFrom == Asc . c _oAscVAnchor . Text , ! 0 ) ) } , onRadioVPositionChange : function ( t , e , i ) { if ( this . _changedProps && ( null !== this . _changedProps . get _PositionV ( ) && void 0 !== th
t && ! 1 === t . get _Checked ( ) && null !== t . get _Variants ( ) && void 0 !== t . get _Variants ( ) && ( i . addWordVariants ( ) , i . textMenu . isVisible ( ) && i . textMenu . alignPosition ( ) ) } ; this . addWordVariants = function ( t ) { e . isUndefined ( t ) && ( t = i . textMenu . isVisible ( ) ) , i . clearWordVariants ( t ) ; var n = t ? i . menuSpellMorePara : i . menuSpellMoreTable , o = t ? i . menuSpellPara : i . menuSpellTable , s = [ ] , a = [ ] , r = i . _currentSpellObj . get _Variants ( ) ; r . length > 0 ? ( n . setVisible ( r . length > 3 ) , n . setDisabled ( i . _currentParaObjDisabled ) , e . each ( r , function ( t , e ) { var n = new Common . UI . MenuItem ( { caption : t , spellword : ! 0 , disabled : i . _currentParaObjDisabled } ) . on ( "click" , function ( t , e ) { i . api && ( i . api . asc _replaceMisspelledWord ( t . caption , i . _currentSpellObj ) , i . fireEvent ( "editcomplete" , i ) ) } ) ; e < 3 ? s . push ( n ) : a . push ( n ) } ) , s . length > 0 && ( t ? e . each ( s , function ( t ) { i . textMenu . insertItem ( 0 , t ) } ) : e . each ( s , function ( t ) { i . menuSpellCheckTable . menu . insertItem ( 0 , t ) } ) ) , a . length > 0 && e . each ( a , function ( t ) { n . menu . insertItem ( 0 , t ) } ) , o . setVisible ( ! 1 ) ) : ( n . setVisible ( ! 1 ) , o . setVisible ( ! 0 ) , o . setCaption ( i . noSpellVariantsText , ! 0 ) ) } , this . clearWordVariants = function ( t ) { for ( var e = t ? i . textMenu : i . menuSpellCheckTable . menu , n = 0 ; n < e . items . length ; n ++ ) e . items [ n ] . options . spellword && ( e . checkeditem == e . items [ n ] && ( e . checkeditem = void 0 , e . activeItem = void 0 ) , e . removeItem ( e . items [ n ] ) , n -- ) ; t ? i . menuSpellMorePara . menu . removeAll ( ) : i . menuSpellMoreTable . menu . removeAll ( ) , i . menuSpellMorePara . menu . checkeditem = void 0 , i . menuSpellMorePara . menu . activeItem = void 0 , i . menuSpellMoreTable . menu . checkeditem = void 0 , i . menuSpellMoreTable . menu . activeItem = void 0 } , this . initEquationMenu = function ( ) { if ( i . _currentMathObj ) { var t , e = i . _currentMathObj . get _Type ( ) , n = i . _currentMathObj , o = [ ] ; switch ( e ) { case Asc . c _oAscMathInterfaceType . Accent : t = new Common . UI . MenuItem ( { caption : i . txtRemoveAccentChar , equation : ! 0 , disabled : i . _currentParaObjDisabled , equationProps : { type : e , callback : "remove_AccentCharacter" } } ) , o . push ( t ) ; break ; case Asc . c _oAscMathInterfaceType . BorderBox : t = new Common . UI . MenuItem ( { caption : i . txtBorderProps , equation : ! 0 , disabled : i . _currentParaObjDisabled , menu : new Common . UI . Menu ( { menuAlign : "tl-tr" , items : [ { caption : n . get _HideTop ( ) ? i . txtAddTop : i . txtHideTop , equationProps : { type : e , callback : "put_HideTop" , value : ! n . get _HideTop ( ) } } , { caption : n . get _HideBottom ( ) ? i . txtAddBottom : i . txtHideBottom , equationProps : { type : e , callback : "put_HideBottom" , value : ! n . get _HideBottom ( ) } } , { caption : n . get _HideLeft ( ) ? i . txtAddLeft : i . txtHideLeft , equationProps : { type : e , callback : "put_HideLeft" , value : ! n . get _HideLeft ( ) } } , { caption : n . get _HideRight ( ) ? i . txtAddRight : i . txtHideRight , equationProps : { type : e , callback : "put_HideRight" , value : ! n . get _HideRight ( ) } } , { caption : n . get _HideHor ( ) ? i . txtAddHor : i . txtHideHor , equationProps : { type : e , callback : "put_HideHor" , value : ! n . get _HideHor ( ) } } , { caption : n . get _HideVer ( ) ? i . txtAddVer : i . txtHideVer , equationProps : { type : e , callback : "put_HideVer" , value : ! n . get _HideVer ( ) } } , { caption : n . get _HideTopLTR ( ) ? i . txtAddLT : i . txtHideLT , equationProps : { type : e , callback : "put_HideTopLTR" , value : ! n . get _HideTopLTR ( ) } } , { caption : n . get _HideTopRTL ( ) ? i . txtAddLB : i . txtHideLB , equationProps : { type : e , callback : "put_HideTopRTL" , value : ! n . get _HideTopRTL ( ) } } ] } ) } ) , o . push ( t ) ; break ; case Asc . c _oAscMathInterfaceType . Bar : t = new Common . UI . MenuItem ( { caption : i . txtRemoveBar , equation : ! 0 , disabled : i . _currentParaObjDisabled , equationProps : { type : e , callback : "remove_Bar" } } ) , o . push ( t ) , t = new Common . UI . MenuItem ( { caption : n . get _Pos ( ) == Asc . c _oAscMathInterfaceBarPos . Top ? i . txtUnderbar : i . txtOverbar , equation : ! 0 , disabled : i . _currentParaObjDisabled , equationProps : { type : e , callback : "put_Pos" , value : n . get _Pos ( ) == Asc . c _oAscMathInterfaceBarPos . Top ? Asc . c _oAscMathInterfaceBarPos . Bottom : Asc . c _oAscMathInterfaceBarPos . Top } } ) , o . push ( t ) ; break ; case Asc . c _oAscMathInterfaceType . Script : var s = n . get _ScriptType ( ) ; s == Asc . c _oAscMathInterfaceScript . PreSubSup ? ( t = new Common . UI . MenuItem ( { caption : i . txtScriptsAfter , equation : ! 0 , disabled : i . _currentParaObjDisabled , equationProps : { type : e , callback : "put_ScriptType" , value : Asc . c _oAscMathInterfaceScript . SubSup } } ) , o . push ( t ) , t = new Common . UI . MenuItem ( { caption : i . txtRemScripts , equation : ! 0 , disabled : i . _currentParaObjDisabled , equationProps : { type : e , callback : "put_ScriptType" , value : Asc . c _oAscMathInterfaceScript . None
height : l . get _ImageHeight ( ) } ) ; var c = i . api . GetSectionInfo ( ) ; c = { width : c . get _PageWidth ( ) - ( c . get _MarginLeft ( ) + c . get _MarginRight ( ) ) , height : c . get _PageHeight ( ) - ( c . get _MarginTop ( ) + c . get _MarginBottom ( ) ) } ; var d = new DE . Views . ImageSettingsAdvanced ( { imageProps : s , sizeOriginal : l , sizeMax : c , sectionProps : i . api . asc _GetSectionProps ( ) , handler : function ( t , e ) { "ok" == t && i . api && i . api . ImgApply ( e . imageProps ) , i . fireEvent ( "editcomplete" , i ) } } ) ; d . show ( ) , d . btnOriginalSize . setVisible ( i . menuOriginalSize . isVisible ( ) ) ; break } } } ) , c = new Common . UI . MenuItem ( { caption : i . editChartText } ) . on ( "click" , e . bind ( i . editChartClick , i ) ) ; this . menuOriginalSize = new Common . UI . MenuItem ( { caption : i . originalSizeText } ) . on ( "click" , function ( t , e ) { if ( i . api ) { var n = i . api . get _OriginalSizeImage ( ) , o = new Asc . asc _CImgProperty ; o . put _Width ( n . get _ImageWidth ( ) ) , o . put _Height ( n . get _ImageHeight ( ) ) , i . api . ImgApply ( o ) , i . fireEvent ( "editcomplete" , this ) } } ) ; var d = new Common . UI . MenuItem ( { caption : i . textCopy , value : "copy" } ) . on ( "click" , e . bind ( i . onCutCopyPaste , i ) ) , h = new Common . UI . MenuItem ( { caption : i . textPaste , value : "paste" } ) . on ( "click" , e . bind ( i . onCutCopyPaste , i ) ) , p = new Common . UI . MenuItem ( { caption : i . textCut , value : "cut" } ) . on ( "click" , e . bind ( i . onCutCopyPaste , i ) ) ; this . pictureMenu = new Common . UI . Menu ( { initMenu : function ( t ) { if ( ! e . isUndefined ( t . imgProps ) ) { var m = ! t . imgProps . value . get _CanBeFlow ( ) , u = t . imgProps . value . get _WrappingStyle ( ) ; if ( i . menuImageWrap . _originalProps = t . imgProps . value , m ) for ( var g = 0 ; g < 6 ; g ++ ) i . menuImageWrap . menu . items [ g ] . setChecked ( ! 1 ) ; else switch ( u ) { case Asc . c _oAscWrapStyle2 . Inline : i . menuImageWrap . menu . items [ 0 ] . setChecked ( ! 0 ) ; break ; case Asc . c _oAscWrapStyle2 . Square : i . menuImageWrap . menu . items [ 1 ] . setChecked ( ! 0 ) ; break ; case Asc . c _oAscWrapStyle2 . Tight : i . menuImageWrap . menu . items [ 2 ] . setChecked ( ! 0 ) ; break ; case Asc . c _oAscWrapStyle2 . Through : i . menuImageWrap . menu . items [ 3 ] . setChecked ( ! 0 ) ; break ; case Asc . c _oAscWrapStyle2 . TopAndBottom : i . menuImageWrap . menu . items [ 4 ] . setChecked ( ! 0 ) ; break ; case Asc . c _oAscWrapStyle2 . Behind : i . menuImageWrap . menu . items [ 6 ] . setChecked ( ! 0 ) ; break ; case Asc . c _oAscWrapStyle2 . InFront : i . menuImageWrap . menu . items [ 5 ] . setChecked ( ! 0 ) ; break ; default : for ( var g = 0 ; g < 6 ; g ++ ) i . menuImageWrap . menu . items [ g ] . setChecked ( ! 1 ) } e . each ( i . menuImageWrap . menu . items , function ( t ) { t . setDisabled ( m ) } ) ; var b = t . imgProps . isImg && t . imgProps . isChart || t . imgProps . isImg && t . imgProps . isShape || t . imgProps . isShape && t . imgProps . isChart ; b ? l . setCaption ( i . advancedText , ! 0 ) : l . setCaption ( t . imgProps . isImg ? i . imageText : t . imgProps . isChart ? i . chartText : i . shapeText , ! 0 ) , c . setVisible ( ! e . isNull ( t . imgProps . value . get _ChartProperties ( ) ) && ! b ) , i . menuOriginalSize . setVisible ( t . imgProps . isOnlyImg ) , i . pictureMenu . items [ 7 ] . setVisible ( c . isVisible ( ) || i . menuOriginalSize . isVisible ( ) ) ; var f = t . imgProps . locked || void 0 !== t . headerProps && t . headerProps . locked ; c . isVisible ( ) && c . setDisabled ( f || t . imgProps . value . get _SeveralCharts ( ) ) , i . menuOriginalSize . setDisabled ( f || null === t . imgProps . value . get _ImageUrl ( ) || void 0 === t . imgProps . value . get _ImageUrl ( ) ) , l . setDisabled ( f ) , n . setDisabled ( f || u == Asc . c _oAscWrapStyle2 . Inline ) , a . setDisabled ( u == Asc . c _oAscWrapStyle2 . Inline ) , i . api && ( s . setDisabled ( f || ! i . api . CanUnGroup ( ) ) , o . setDisabled ( f || ! i . api . CanGroup ( ) ) , r . setDisabled ( f || ! i . api . CanChangeWrapPolygon ( ) ) ) , i . menuImageWrap . setDisabled ( f || t . imgProps . value . get _FromGroup ( ) || m && r . isDisabled ( ) ) ; var C = i . api && i . api . can _CopyCut ( ) ; d . setDisabled ( ! C ) , p . setDisabled ( f || ! C ) , h . setDisabled ( f ) } } , items : [ p , d , h , { caption : "--" } , a , n , i . menuImageWrap , { caption : "--" } , i . menuOriginalSize , c , { caption : "--" } , l ] } ) . on ( "hide:after" , function ( t , e , n ) { n || i . fireEvent ( "editcomplete" , i ) , i . currentMenu = null } ) ; var m = function ( t , e ) { i . _applyTableWrap ( c _tableWrap . TABLE _WRAP _NONE , t . options . align ) } , u = new Common . UI . MenuItem ( { caption : i . inlineText , toggleGroup : "popuptablewrapping" , checkable : ! 0 , menu : new Common . UI . Menu ( { menuAlign : "tl-tr" , items : [ i . menuTableAlignLeft = new Common . UI . MenuItem ( { caption : i . textShapeAlignLeft , toggleGroup : "popuptablealign" , checkable : ! 0 , checked : ! 1 , align : c _tableAlign . TABLE _ALIGN _LEFT } ) . on ( "click" , e . bind ( m , i ) ) , i . menuTableAlignCenter = new Common . UI . MenuItem ( { caption : i . textShapeAlignCenter , toggleGroup : "popuptablealign" , checkable : ! 0 , checked : ! 1 , align : c _tableAlign . TABL
this . api && this . api . asc _enableKeyEvents ( ! 0 ) } , this ) ) ) } } ) } ) , define ( "common/main/lib/view/ImageFromUrlDialog" , [ "common/main/lib/component/Window" ] , function ( ) { "use strict" ; Common . Views . ImageFromUrlDialog = Common . UI . Window . extend ( _ . extend ( { options : { width : 330 , header : ! 1 , cls : "modal-dlg" } , initialize : function ( t ) { _ . extend ( this . options , t || { } ) , this . template = [ '<div class="box">' , '<div class="input-row">' , "<label>" + this . textUrl + "</label>" , "</div>" , '<div id="id-dlg-url" class="input-row"></div>' , "</div>" , '<div class="footer right">' , '<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this . okButtonText + "</button>" , '<button class="btn normal dlg-btn" result="cancel">' + this . cancelButtonText + "</button>" , "</div>" ] . join ( "" ) , this . options . tpl = _ . template ( this . template ) ( this . options ) , Common . UI . Window . prototype . initialize . call ( this , this . options ) } , render : function ( ) { Common . UI . Window . prototype . render . call ( this ) ; var t = this ; t . inputUrl = new Common . UI . InputField ( { el : $ ( "#id-dlg-url" ) , allowBlank : ! 1 , blankError : t . txtEmpty , style : "width: 100%;" , validateOnBlur : ! 1 , validation : function ( e ) { return ! ! /((^https?)|(^ftp)):\/\/.+/i . test ( e ) || t . txtNotUrl } } ) ; var e = this . getChild ( ) ; e . find ( ".btn" ) . on ( "click" , _ . bind ( this . onBtnClick , this ) ) , e . find ( "input" ) . on ( "keypress" , _ . bind ( this . onKeyPress , this ) ) } , show : function ( ) { Common . UI . Window . prototype . show . apply ( this , arguments ) ; var t = this ; _ . delay ( function ( ) { t . getChild ( "input" ) . focus ( ) } , 500 ) } , onKeyPress : function ( t ) { t . keyCode == Common . UI . Keys . RETURN && this . _handleInput ( "ok" ) } , onBtnClick : function ( t ) { this . _handleInput ( t . currentTarget . attributes . result . value ) } , _handleInput : function ( t ) { if ( this . options . handler ) { if ( "ok" == t && ! 0 !== this . inputUrl . checkValidate ( ) ) return void this . inputUrl . cmpEl . find ( "input" ) . focus ( ) ; this . options . handler . call ( this , t , this . inputUrl . getValue ( ) ) } this . close ( ) } , textUrl : "Paste an image URL:" , cancelButtonText : "Cancel" , okButtonText : "Ok" , txtEmpty : "This field is required" , txtNotUrl : 'This field should be a URL in the format "http://www.example.com"' } , Common . Views . ImageFromUrlDialog || { } ) ) } ) , void 0 === Common ) var Common = { } ; if ( define ( "common/main/lib/util/define" , [ ] , function ( ) { "use strict" ; Common . define = { } , Common . define . c _oAscMathMainType = { Symbol : 0 , Fraction : 1 , Script : 2 , Radical : 3 , Integral : 4 , LargeOperator : 5 , Bracket : 6 , Function : 7 , Accent : 8 , LimitLog : 9 , Operator : 10 , Matrix : 11 } , Common . define . c _oAscMathType = { Symbol _pm : 0 , Symbol _infinity : 1 , Symbol _equals : 2 , Symbol _neq : 3 , Symbol _about : 4 , Symbol _times : 5 , Symbol _div : 6 , Symbol _factorial : 7 , Symbol _propto : 8 , Symbol _less : 9 , Symbol _ll : 10 , Symbol _greater : 11 , Symbol _gg : 12 , Symbol _leq : 13 , Symbol _geq : 14 , Symbol _mp : 15 , Symbol _cong : 16 , Symbol _approx : 17 , Symbol _equiv : 18 , Symbol _forall : 19 , Symbol _additional : 20 , Symbol _partial : 21 , Symbol _sqrt : 22 , Symbol _cbrt : 23 , Symbol _qdrt : 24 , Symbol _cup : 25 , Symbol _cap : 26 , Symbol _emptyset : 27 , Symbol _percent : 28 , Symbol _degree : 29 , Symbol _fahrenheit : 30 , Symbol _celsius : 31 , Symbol _inc : 32 , Symbol _nabla : 33 , Symbol _exists : 34 , Symbol _notexists : 35 , Symbol _in : 36 , Symbol _ni : 37 , Symbol _leftarrow : 38 , Symbol _uparrow : 39 , Symbol _rightarrow : 40 , Symbol _downarrow : 41 , Symbol _leftrightarrow : 42 , Symbol _therefore : 43 , Symbol _plus : 44 , Symbol _minus : 45 , Symbol _not : 46 , Symbol _ast : 47 , Symbol _bullet : 48 , Symbol _vdots : 49 , Symbol _cdots : 50 , Symbol _rddots : 51 , Symbol _ddots : 52 , Symbol _aleph : 53 , Symbol _beth : 54 , Symbol _QED : 55 , Symbol _alpha : 65536 , Symbol _beta : 65537 , Symbol _gamma : 65538 , Symbol _delta : 65539 , Symbol _varepsilon : 65540 , Symbol _epsilon : 65541 , Symbol _zeta : 65542 , Symbol _eta : 65543 , Symbol _theta : 65544 , Symbol _vartheta : 65545 , Symbol _iota : 65546 , Symbol _kappa : 65547 , Symbol _lambda : 65548 , Symbol _mu : 65549 , Symbol _nu : 65550 , Symbol _xsi : 65551 , Symbol _o : 65552 , Symbol _pi : 65553 , Symbol _varpi : 65554 , Symbol _rho : 65555 , Symbol _varrho : 65556 , Symbol _sigma : 65557 , Symbol _varsigma : 65558 , Symbol _tau : 65559 , Symbol _upsilon : 65560 , Symbol _varphi : 65561 , Symbol _phi : 65562 , Symbol _chi : 65563 , Symbol _psi : 65564 , Symbol _omega : 65565 , Symbol _Alpha : 131072 , Symbol _Beta : 131073 , Symbol _Gamma : 131074 , Symbol _Delta : 131075 , Symbol _Epsilon : 131076 , Symbol _Zeta : 131077 , Symbol _Eta : 131078 , Symbol _Theta : 131079 , Symbol _Iota : 131080 , Symbol _Kappa : 131081 , Symbol _Lambda : 131082 , Symbol _Mu : 131083 , Symbol _Nu : 131084 , Symbol _Xsi : 131085 , Symbol
e . openButton . menu . cmpEl . css ( "min-width" , e . itemWidth ) , e . openButton . menu . on ( "show:before" , _ . bind ( e . onBeforeShowMenu , e ) ) , e . openButton . menu . on ( "show:after" , _ . bind ( e . onAfterShowMenu , e ) ) , e . openButton . cmpEl . on ( "hide.bs.dropdown" , _ . bind ( e . onBeforeHideMenu , e ) ) , e . openButton . cmpEl . on ( "hidden.bs.dropdown" , _ . bind ( e . onAfterHideMenu , e ) ) ) , e . options . hint && ( e . cmpEl . attr ( "data-toggle" , "tooltip" ) , e . cmpEl . tooltip ( { title : e . options . hint , placement : e . options . hintAnchor || "cursor" } ) ) , e . fieldPicker . on ( "item:select" , _ . bind ( e . onFieldPickerSelect , e ) ) , e . menuPicker . on ( "item:select" , _ . bind ( e . onMenuPickerSelect , e ) ) , e . fieldPicker . on ( "item:click" , _ . bind ( e . onFieldPickerClick , e ) ) , e . menuPicker . on ( "item:click" , _ . bind ( e . onMenuPickerClick , e ) ) , e . fieldPicker . on ( "item:contextmenu" , _ . bind ( e . onPickerItemContextMenu , e ) ) , e . menuPicker . on ( "item:contextmenu" , _ . bind ( e . onPickerItemContextMenu , e ) ) , e . fieldPicker . el . addEventListener ( "contextmenu" , _ . bind ( e . onPickerComboContextMenu , e ) , ! 1 ) , e . menuPicker . el . addEventListener ( "contextmenu" , _ . bind ( e . onPickerComboContextMenu , e ) , ! 1 ) , e . onResize ( ) , e . rendered = ! 0 , e . trigger ( "render:after" , e ) } return this } , checkSize : function ( ) { if ( this . cmpEl && this . cmpEl . is ( ":visible" ) ) { var t = this , e = this . cmpEl . width ( ) , i = this . cmpEl . height ( ) ; if ( e < this . minWidth ) return ; this . rootWidth == e && this . rootHeight == i || ( this . rootWidth = e , this . rootHeight = i , setTimeout ( function ( ) { t . openButton . menu . cmpEl . outerWidth ( ) , t . rootWidth = t . cmpEl . width ( ) } , 10 ) , this . onResize ( ) ) } } , onResize : function ( ) { if ( this . openButton ) { var t = $ ( "button" , this . openButton . cmpEl ) ; t && t . css ( { width : $ ( ".button" , this . cmpEl ) . width ( ) , height : $ ( ".button" , this . cmpEl ) . height ( ) } ) , this . openButton . menu . hide ( ) ; var e = this . menuPicker ; if ( e ) { var i = e . getSelectedRec ( ) ; i && ( i = i [ 0 ] , this . fillComboView ( i || e . store . at ( 0 ) , ! ! i , ! 0 ) ) , e . onResize ( ) } } this . isSuspendEvents || this . trigger ( "resize" , this ) } , onBeforeShowMenu : function ( t ) { var e = this ; if ( _ . isFunction ( e . beforeOpenHandler ) ) e . beforeOpenHandler ( e , t ) ; else if ( e . openButton . menu . cmpEl ) { var i = 0 ; try { var n = $ ( $ ( ".dropdown-menu .dataview.inner .style" , e . cmpEl ) [ 0 ] ) ; i = n ? parseInt ( n . css ( "margin-left" ) ) + parseInt ( n . css ( "margin-right" ) ) : 0 } catch ( t ) { } e . openButton . menu . cmpEl . css ( { width : Math . round ( ( e . cmpEl . width ( ) + i * e . fieldPicker . store . length ) / e . itemWidth - . 2 ) * ( e . itemWidth + i ) , "min-height" : this . cmpEl . height ( ) } ) } if ( e . options . hint ) { var o = e . cmpEl . data ( "bs.tooltip" ) ; o && ( void 0 === o . dontShow && ( o . dontShow = ! 0 ) , o . hide ( ) ) } this . menuPicker . selectedBeforeHideRec = null } , onBeforeHideMenu : function ( t ) { if ( this . trigger ( "hide:before" , this , t ) , Common . UI . Scroller . isMouseCapture ( ) && t . preventDefault ( ) , this . isStylesNotClosable ) return ! 1 } , onAfterShowMenu : function ( t ) { var e = this ; e . menuPicker . scroller && e . menuPicker . scroller . update ( { includePadding : ! 0 , suppressScrollX : ! 0 , alwaysVisibleY : ! 0 } ) } , onAfterHideMenu : function ( t , e ) { this . menuPicker . selectedBeforeHideRec = this . menuPicker . getSelectedRec ( ) [ 0 ] , this . showLast ? this . menuPicker . showLastSelected ( ) : this . menuPicker . deselectAll ( ) , this . trigger ( "hide:after" , this , t , e ) } , onFieldPickerSelect : function ( t , e , i ) { } , onMenuPickerSelect : function ( t , e , i , n ) { this . needFillComboView = this . disabled , this . disabled || ! 0 === n || ( this . fillComboView ( i , ! 1 ) , i && ! this . isSuspendEvents && this . trigger ( "select" , this , i ) ) } , onFieldPickerClick : function ( t , e , i ) { if ( ! this . disabled ) { if ( this . isSuspendEvents || this . trigger ( "click" , this , i ) , this . options . hint ) { var n = this . cmpEl . data ( "bs.tooltip" ) ; n && ( void 0 === n . dontShow && ( n . dontShow = ! 0 ) , n . hide ( ) ) } this . showLast || this . fieldPicker . deselectAll ( ) } } , onMenuPickerClick : function ( t , e , i ) { this . disabled || this . isSuspendEvents || this . trigger ( "click" , this , i ) } , onPickerItemContextMenu : function ( t , e , i , n ) { if ( ! this . disabled ) return this . isSuspendEvents || this . trigger ( "contextmenu" , this , i , n ) , n . preventDefault ( ) , n . stopPropagation ( ) , ! 1 } , onPickerComboContextMenu : function ( t ) { this . disabled || this . isSuspendEvents || this . trigger ( "contextmenu" , this , void 0 , t ) } , setDisabled : function ( t ) { if ( this . disabled = t , this . rendered && ( this . cmpEl . toggleClass ( "disabled" , t ) , $ ( "button" , this . openButton . cmpEl ) . toggleClass ( "disabled" , t ) , this . fieldPicker . setDisabled ( t ) , this . needFillComboView && ! t ) ) { var e = this . menuPicker ; if ( e ) { var i = e . getSelectedRec ( ) ; i && ( i = i [ 0 ] , this . fillComboView ( i |
var o = t ( i . cmpEl . find ( ".dataview.inner .style" ) . get ( 0 ) ) . parent ( ) , s = o . is ( ":visible" ) ? parseInt ( o . css ( "width" ) ) : i . itemWidth + parseInt ( o . css ( "padding-left" ) ) + parseInt ( o . css ( "padding-right" ) ) + parseInt ( o . css ( "border-left-width" ) ) + parseInt ( o . css ( "border-right-width" ) ) , a = i . menuPicker . store . length >= 6 ? 6 : i . menuPicker . store . length , r = Math . min ( i . menuPicker . store . length , Math . round ( t ( ".dataview" , t ( i . fieldPicker . el ) ) . width ( ) / ( - 1 + s ) + . 5 ) ) ; r = r < a ? a : r , n . menuAlignEl = i . cmpEl , n . menuAlign = "tl-tl" ; var l = i . cmpEl . width ( ) - i . openButton . $el . width ( ) - r * ( - 1 + s ) - 1 ; n . setOffset ( Math . min ( l , 0 ) ) , n . cmpEl . css ( { width : r * ( s + - 1 ) , "min-height" : i . cmpEl . height ( ) } ) } i . menuPicker . scroller && i . menuPicker . scroller . update ( { includePadding : ! 0 , suppressScrollX : ! 0 } ) , i . removeTips ( ) } } ) , this . listStyles . fieldPicker . itemTemplate = e . template ( [ '<div class="style" id="<%= id %>">' , '<div style="background-image: url(<%= imageUrl %>); width: ' + this . listStyles . itemWidth + "px; height: " + this . listStyles . itemHeight + 'px;"/>' , "</div>" ] . join ( "" ) ) , this . listStyles . menuPicker . itemTemplate = e . template ( [ '<div class="style" id="<%= id %>">' , '<div style="background-image: url(<%= imageUrl %>); width: ' + this . listStyles . itemWidth + "px; height: " + this . listStyles . itemHeight + 'px;"/>' , "</div>" ] . join ( "" ) ) , this . paragraphControls . push ( this . listStyles ) , this . textOnlyControls . push ( this . listStyles ) , e . each ( this . toolbarControls . concat ( this . paragraphControls ) , function ( t ) { e . isFunction ( t . setDisabled ) && t . setDisabled ( ! 0 ) } ) , this . btnMailRecepients . setDisabled ( ! 0 ) ; var a = new Common . UI . MenuItem ( { caption : i . textStyleMenuUpdate } ) . on ( "click" , e . bind ( i . onStyleMenuUpdate , i ) ) , r = new Common . UI . MenuItem ( { caption : i . textStyleMenuDelete } ) . on ( "click" , e . bind ( i . onStyleMenuDelete , i ) ) , l = new Common . UI . MenuItem ( { caption : i . textStyleMenuRestore } ) . on ( "click" , e . bind ( i . onStyleMenuDelete , i ) ) , c = new Common . UI . MenuItem ( { caption : i . textStyleMenuRestoreAll } ) . on ( "click" , e . bind ( i . onStyleMenuRestoreAll , i ) ) , d = new Common . UI . MenuItem ( { caption : i . textStyleMenuDeleteAll } ) . on ( "click" , e . bind ( i . onStyleMenuDeleteAll , i ) ) ; return null == this . styleMenu && ( this . styleMenu = new Common . UI . Menu ( { items : [ a , r , l , c , d ] } ) ) , this } , render : function ( e ) { var i = this ; this . trigger ( "render:before" , this ) ; var n = Common . localStorage . getItem ( "de-pgmargins-top" ) , o = Common . localStorage . getItem ( "de-pgmargins-left" ) , s = Common . localStorage . getItem ( "de-pgmargins-bottom" ) , a = Common . localStorage . getItem ( "de-pgmargins-right" ) ; if ( null !== n && null !== o && null !== s && null !== a ) { var r = this . btnPageMargins . menu . items [ 0 ] ; r . options . value = r . value = [ parseFloat ( n ) , parseFloat ( o ) , parseFloat ( s ) , parseFloat ( a ) ] , r . setVisible ( ! 0 ) , t ( r . el ) . html ( r . template ( { id : Common . UI . getId ( ) , caption : r . caption , options : r . options } ) ) } else this . btnPageMargins . menu . items [ 0 ] . setVisible ( ! 1 ) ; var l = Common . localStorage . getItem ( "de-compact-toolbar" ) , c = ! ! ( null !== l && 1 == parseInt ( l ) || null === l && e . customization && e . customization . compactToolbar ) ; return i . $el . html ( this . template ( { isCompactView : c } ) ) , i . rendererComponents ( c ? "short" : "full" ) , i . isCompactView = c , this . trigger ( "render:after" , this ) , l = Common . localStorage . getItem ( "de-hide-synch" ) , this . showSynchTip = ! ( l && 1 == parseInt ( l ) ) , this . needShowSynchTip = ! 1 , this } , rendererComponents : function ( e ) { var i = "short" === e ? "short" : "full" , n = function ( e , i ) { var n = t ( e ) , o = n . get ( 0 ) ; o && ( i . rendered ? ( i . el = document . getElementById ( i . id ) , o . appendChild ( document . getElementById ( i . id ) ) ) : i . render ( n ) ) } ; n ( "#id-toolbar-" + i + "-placeholder-btn-newdocument" , this . btnNewDocument ) , n ( "#id-toolbar-" + i + "-placeholder-btn-opendocument" , this . btnOpenDocument ) , n ( "#id-toolbar-" + i + "-placeholder-field-fontname" , this . cmbFontName ) , n ( "#id-toolbar-" + i + "-placeholder-field-fontsize" , this . cmbFontSize ) , n ( "#id-toolbar-" + i + "-placeholder-btn-print" , this . btnPrint ) , n ( "#id-toolbar-" + i + "-placeholder-btn-save" , this . btnSave ) , n ( "#id-toolbar-" + i + "-placeholder-btn-undo" , this . btnUndo ) , n ( "#id-toolbar-" + i + "-placeholder-btn-redo" , this . btnRedo ) , n ( "#id-toolbar-" + i + "-placeholder-btn-copy" , this . btnCopy ) , n ( "#id-toolbar-" + i + "-placeholder-btn-paste" , this . btnPaste ) , n ( "#id-toolbar-" + i + "-placeholder-btn-incfont" , this . btnIncFontSize ) , n ( "#id-toolbar-" + i + "-placeholder-btn-decfont" , this . btnDecFontSize ) , n ( "#id-toolbar-" + i + "-placeholder-btn-
tipDropCap:" Insert drop cap ",txtScheme1:" Office ",txtScheme2:" Grayscale ",txtScheme3:" Apex ",txtScheme4:" Aspect ",txtScheme5:" Civic ",txtScheme6:" Concourse ",txtScheme7:" Equity ",txtScheme8:" Flow ",txtScheme9:" Foundry ",txtScheme10:" Median ",txtScheme11:" Metro ",txtScheme12:" Module ",txtScheme13:" Opulent ",txtScheme14:" Oriel ",txtScheme15:" Origin ",txtScheme16:" Paper ",txtScheme17:" Solstice ",txtScheme18:" Technic ",txtScheme19:" Trek ",txtScheme20:" Urban ",txtScheme21:" Verve ",textInsPageBreak:" Insert Page Break ",textInsColumnBreak:" Insert Column Break ",textInsSectionBreak:" Insert Section Break ",textNextPage:" Next Page ",textContPage:" Continuous Page ",textEvenPage:" Even Page ",textOddPage:" Odd Page ",tipSaveCoauth:" Save your changes for the other users to see them . ",tipMailRecepients:" Mail Merge ",textStyleMenuUpdate:" Update from select ",textStyleMenuRestore:" Restore to default ",textStyleMenuDelete:" Delete style ",textStyleMenuRestoreAll:" Restore all to default styles ",textStyleMenuDeleteAll:" Delete all custom styles ",textStyleMenuNew:" New style from selection ",textInsText:" Insert text box ",textInsTextArt:" Insert Text Art ",tipColumns:" Insert columns ",textColumnsOne:" One ",textColumnsTwo:" Two ",textColumnsThree:" Three ",textColumnsLeft:" Left ",textColumnsRight:" Right ",tipPageMargins:" Page Margins ",textMarginsLast:" Last Custom ",textMarginsNormal:" Normal ",textMarginsUsNormal:" US Normal ",textMarginsNarrow:" Narrow ",textMarginsModerate:" Moderate ",textMarginsWide:" Wide ",textPageMarginsCustom:" Custom margins ",textTop:" Top : ",textLeft:" Left : ",textBottom:" Bottom : ",textRight:" Right : ",textPageSizeCustom:" Custom Page Size ",textPortrait:" Portrait ",textLandscape:" Landscape ",textInsertPageCount:" Insert number of pages ",textCharts:" Charts ",tipNotes:" Footnotes ",mniInsFootnote:" Insert Footnote ",mniDelFootnote:" Delete All Footnotes ",mniNoteSettings:" Notes Settings ",textGotoFootnote:" Go to Footnotes ",tipChangeChart:" Change Chart Type ",textColumnsCustom:" Custom Columns ",textSurface:" Surface ",tipContents:" Insert or edit table of contents ",textContentsSettings:" Settings ",textContentsRemove:" Remove table of contents ",textUpdateAll:" Update entire table ",textUpdatePages:" Update page numbers only "},DE.Views.Toolbar||{}))}),void 0===Common)var Common={};if(define(" common / main / lib / component / LoadMask ",[" common / main / lib / component / BaseView "],function(){" use strict ";Common.UI.LoadMask=Common.UI.BaseView.extend(function(){var t,e,i;return{options:{cls:" ",style:" ",title:" Loading ... ",owner:document.body},template:_.template(['<div id=" < %= id % > " class=" asc - loadmask - body < %= cls % > " role=" presentation " tabindex=" - 1 ">','<div class=" asc - loadmask - image "></div>','<div class=" asc - loadmask - title "><%= title %></div>'," < / d i v > " ] . j o i n ( " " ) ) , i n i t i a l i z e : f u n c t i o n ( t ) { C o m m o n . U I . B a s e V i e w . p r o t o t y p e . i n i t i a l i z e . c a l l ( t h i s , t ) , t h i s . t e m p l a t e = t h i s . o p t i o n s . t e m p l a t e | | t h i s . t e m p l a t e , t h i s . c l s = t h i s . o p t i o n s . c l s , t h i s . s t y l e = t h i s . o p t i o n s . s t y l e , t h i s . t i t l e = t h i s . o p t i o n s . t i t l e , t h i s . o w n e r = t h i s . o p t i o n s . o w n e r } , r e n d e r : f u n c t i o n ( ) { r e t u r n t h i s } , s h o w : f u n c t i o n ( ) { i f ( ! e & & ! i ) { i f ( t = t h i s . o w n e r i n s t a n c e o f C o m m o n . U I . B a s e V i e w ? $ ( t h i s . o w n e r . e l ) : $ ( t h i s . o w n e r ) , t . h a s C l a s s ( " m a s k e d " ) ) r e t u r n t h i s ; v a r n = t h i s ; r e t u r n e = $ ( ' < d i v c l a s s = " a s c - l o a d m a s k " > < / d i v > ' ) , i = $ ( t h i s . t e m p l a t e ( { i d : n . i d , c l s : n . c l s , s t y l e : n . s t y l e , t i t l e : n . t i t l e } ) ) , t . a d d C l a s s ( " m a s k e d " ) , t . a p p e n d ( e ) , t . a p p e n d ( i ) , i . c s s ( { t o p : M a t h . r o u n d ( t . h e i g h t ( ) / 2 - ( i . h e i g h t ( ) + p a r s e I n t ( i . c s s ( " p a d d i n g - t o p " ) ) + p a r s e I n t ( i . c s s ( " p a d d i n g - b o t t o m " ) ) ) / 2 ) + " p x " , l e f t : M a t h . r o u n d ( t . w i d t h ( ) / 2 - ( i . w i d t h ( ) + p a r s e I n t ( i . c s s ( " p a d d i n g - l e f t " ) ) + p a r s e I n t ( i . c s s ( " p a d d i n g - r i g h t " ) ) ) / 2 ) + " p x " } ) , C o m m o n . u t i l . S h o r t c u t s . s u s p e n d E v e n t s ( ) , t h i s } } , h i d e : f u n c t i o n ( ) { t & & t . r e m o v e C l a s s ( " m a s k e d " ) , e & & e . r e m o v e ( ) , i & & i . r e m o v e ( ) , e = n u l l , i = n u l l , C o m m o n . u t i l . S h o r t c u t s . r e s u m e E v e n t s ( ) } , s e t T i t l e : f u n c t i o n ( e ) { t h i s . t i t l e = e , t & & t . h a s C l a s s ( " m a s k e d " ) & & i & & $ ( " . a s c - l o a d m a s k - t i t l e " , i ) . h t m l ( e ) } , i s V i s i b l e : f u n c t i o n ( ) { r e t u r n ! _ . i s E m p t y ( i ) } } } ( ) ) } ) , d e f i n e ( " d o c u m e n t e d i t o r / m a i n / a p p / v i e w / M a i l M e r g e R e c e p i e n t s " , [ " c o m m o n / m a i n / l i b / c o m p o n e n t / W i n d o w " , " c o m m o n / m a i n / l i b / c o m p o n e n t / L o a d M a s k " ] , f u n c t i o n ( ) { " u s e s t r i c t " ; D E . V i e w s . M a i l M e r g e R e c e p i e n t s = C o m m o n . U I . W i n d o w . e x t e n d ( _ . e x t e n d ( { i n i t i a l i z e : f u n c t i o n ( t ) { v a r e
template : [ '<div class="box" style="height:' + ( e . options . height - 85 ) + 'px;">' , '<div class="content-panel" style="padding: 15px 10px;"><div class="inner-content">' , '<div class="settings-panel active">' , '<table cols="2" style="width: 100%;">' , "<tr>" , '<td class="padding-small">' , '<div id="tableofcontents-chb-pages"></div>' , "</td>" , '<td rowspan="5" class="padding-small" style="vertical-align: top;">' , '<div style="border: 1px solid #cbcbcb;width: 240px; height: 182px; float: right;position:relative;overflow:hidden;">' , '<div id="tableofcontents-img" style="width: 230px; height: 100%;"></div>' , "</div>" , "</td>" , "</tr>" , "<tr>" , '<td class="padding-small">' , '<div id="tableofcontents-chb-align"></div>' , "</td>" , "</tr>" , "<tr>" , '<td class="padding-large">' , '<label class="input-label">' + e . textLeader + "</label>" , '<div id="tableofcontents-combo-leader" class="input-group-nr" style="display: inline-block; width:95px; margin-left: 10px;"></div>' , "</td>" , "</tr>" , "<tr>" , '<td class="padding-large">' , '<div id="tableofcontents-chb-links"></div>' , "</td>" , "</tr>" , "<tr>" , '<td class="padding-small">' , '<label class="input-label padding-small" style="display: block;">' + e . textBuildTable + "</label>" , '<div id="tableofcontents-radio-levels" class="padding-small" style="display: block;"></div>' , '<div id="tableofcontents-radio-styles" class="" style="display: block;"></div>' , "</td>" , "</tr>" , "<tr>" , '<td class="padding-small" style="vertical-align: top;">' , '<div id="tableofcontents-from-levels" style="width:220px;">' , '<label class="input-label">' + e . textLevels + "</label>" , '<div id="tableofcontents-spin-levels" style="display: inline-block; width:95px; margin-left: 10px;"></div>' , "</div>" , '<div id="tableofcontents-from-styles" class="hidden">' , '<table><tr><td style="height: 25px;">' , '<label class="input-label" style="width: 144px; margin-left: 23px;">' + e . textStyle + "</label>" , '<label class="input-label" style="">' + e . textLevel + "</label>" , "</td></tr>" , "<tr><td>" , '<div id="tableofcontents-styles-list" class="header-styles-tableview" style="width:100%; height: 122px;"></div>' , "</td></tr></table>" , "</div>" , "</td>" , '<td class="padding-small" style="vertical-align: top;">' , '<label class="input-label" style="margin-left: 10px;">' + e . textStyles + "</label>" , '<div id="tableofcontents-combo-styles" class="input-group-nr" style="display: inline-block; width:95px; margin-left: 10px;"></div>' , "</td>" , "</tr>" , "</table>" , "</div></div>" , "</div>" , "</div>" , '<div class="separator horizontal"/>' , '<div class="footer center">' , '<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px; width: 86px;">' + e . okButtonText + "</button>" , '<button class="btn normal dlg-btn" result="cancel" style="width: 86px;">' + e . cancelButtonText + "</button>" , "</div>" ] . join ( "" ) } , t ) , this . api = t . api , this . handler = t . handler , this . props = t . props , this . startLevel = 1 , this . endLevel = 3 , this . _noApply = ! 0 , this . _originalProps = null , Common . Views . AdvancedSettingsWindow . prototype . initialize . call ( this , this . options ) } , render : function ( ) { Common . Views . AdvancedSettingsWindow . prototype . render . call ( this ) ; var t = this ; this . chPages = new Common . UI . CheckBox ( { el : $ ( "#tableofcontents-chb-pages" ) , labelText : this . strShowPages , value : "checked" } ) , this . chPages . on ( "change" , _ . bind ( function ( t , e , i , n ) { var o = "checked" == t . getValue ( ) ; if ( this . chAlign . setDisabled ( ! o ) , this . cmbLeader . setDisabled ( ! o ) , this . api && ! this . _noApply ) { var s = this . _originalProps ? this . _originalProps : new Asc . CTableOfContentsPr ; s . put _ShowPageNumbers ( o ) , o && ( s . put _RightAlignTab ( "checked" == this . chAlign . getValue ( ) ) , s . put _TabLeader ( this . cmbLeader . getValue ( ) ) ) , this . api . SetDrawImagePlaceContents ( "tableofcontents-img" , s ) , this . scrollerY . update ( ) } } , this ) ) , this . chAlign = new Common . UI . CheckBox ( { el : $ ( "#tableofcontents-chb-align" ) , labelText : this . strAlign , value : "checked" } ) , this . chAlign . on ( "change" , _ . bind ( function ( t , e , i , n ) { var o = "checked" == t . getValue ( ) ; if ( this . cmbLeader . setDisabled ( ! o ) , this . api && ! this . _noApply ) { var s = this . _originalProps ? this . _originalProps : new Asc . CTableOfContentsPr ; s . put _RightAlignTab ( o ) , o && s . put _TabLeader ( this . cmbLeader . getValue ( ) ) , this . api . SetDrawImagePlaceContents ( "tableofcontents-img
onApiFocusObject:function(t){if(this.editMode){for(var e,i,n,o=-1,s=!1,a=!1,r=!1,l=!1,c=!1,d=void 0,h=!0,p=void 0,m=this.toolbar,u=!1,g=!1,b=!1,f=!1,C=!1;++o<t.length;)n=t[o].get_ObjectType(),e=t[o].get_ObjectValue(),n===Asc.c_oAscTypeSelectElement.Paragraph?(s=e.get_Locked(),l=e.get_CanAddTable(),c=e.get_CanAddImage(),p=e,i=e.get_Shade()):n===Asc.c_oAscTypeSelectElement.Header?(a=e.get_Locked(),u=!0):n===Asc.c_oAscTypeSelectElement.Image?(C=u=!0,r=e.get_Locked(),e&&e.get_ChartProperties()&&(g=!0)):n===Asc.c_oAscTypeSelectElement.Math&&(b=!0,Asc.c_oAscMathInterfaceType.Common===e.get_Type()&&(f=!0)),n!==Asc.c_oAscTypeSelectElement.Table&&n!==Asc.c_oAscTypeSelectElement.Header&&n!==Asc.c_oAscTypeSelectElement.Image||(d=!1),!1!==d&&n==Asc.c_oAscTypeSelectElement.Paragraph&&(d=!0);i&&this.onParagraphColor(i);var v=s||a;this._state.prcontrolsdisable!=v&&(this._state.activated&&(this._state.prcontrolsdisable=v),_.each(m.paragraphControls,function(t){t.setDisabled(v)},this));var y=s||a||g;if(this._state.textonlycontrolsdisable!=y&&(this._state.activated&&(this._state.textonlycontrolsdisable=y),v||_.each(m.textOnlyControls,function(t){t.setDisabled(y)},this),m.btnCopyStyle.setDisabled(y),m.btnClearStyle.setDisabled(y)),d&&p){var w=p.get_FramePr(),x=Asc.c_oAscDropCap.None;void 0!==w?(x=w.get_DropCap(),d=x===Asc.c_oAscDropCap.Drop||x===Asc.c_oAscDropCap.Margin,h=!1):d=p.get_CanAddDropCap(),d&&this.onDropCap(x)}v=v||!d||b,v!==m.btnDropCap.isDisabled()&&m.btnDropCap.setDisabled(v),m.btnDropCap.isDisabled()||h===m.mnuDropCapAdvanced.isDisabled()||m.mnuDropCapAdvanced.setDisabled(h),v=!l||a||b,v!=m.btnInsertTable.isDisabled()&&m.btnInsertTable.setDisabled(v),v=m.mnuPageNumCurrentPos.isDisabled()&&m.mnuPageNumberPosPicker.isDisabled(),v!=m.mnuInsertPageNum.isDisabled()&&m.mnuInsertPageNum.setDisabled(v);var S=this.api.asc_IsCursorInFootnote();v=s||a||u||b&&!f||S,v!=m.btnInsertPageBreak.isDisabled()&&m.btnInsertPageBreak.setDisabled(v),v=s||a||!c||b,v!=m.btnInsertImage.isDisabled()&&(m.btnInsertImage.setDisabled(v),m.btnInsertShape.setDisabled(v),m.btnInsertText.setDisabled(v)),(v||C||S)!=m.mnuInsertTextArt.isDisabled()&&m.mnuInsertTextArt.setDisabled(v||C||S),g!==this._state.in_chart&&(m.btnInsertChart.updateHint(g?m.tipChangeChart:m.tipInsertChart),this._state.in_chart=g),v=g&&r||!g&&v,v!=m.btnInsertChart.isDisabled()&&m.btnInsertChart.setDisabled(v),v=s||a||g||!c&&!b,v!==m.btnInsertEquation.isDisabled()&&m.btnInsertEquation.setDisabled(v),v=s||a||b,v!==m.btnSuperscript.isDisabled()&&(m.btnSuperscript.setDisabled(v),m.btnSubscript.setDisabled(v)),b!==m.btnEditHeader.isDisabled()&&m.btnEditHeader.setDisabled(b),v=s||b||C||u,v!==m.btnNotes.isDisabled()&&m.btnNotes.setDisabled(v),v=s||a||C,v!=m.btnColumns.isDisabled()&&m.btnColumns.setDisabled(v),m.listStylesAdditionalMenuItem&&void 0===p!==m.listStylesAdditionalMenuItem.isDisabled()&&m.listStylesAdditionalMenuItem.setDisabled(void 0===p),this._state.in_equation=b}},onApiStyleChange:function(t){this.toolbar.btnCopyStyle.toggle(t,!0),this.modeAlwaysSetStyle=!1},onApiParagraphStyleChange:function(t){if(this._state.prstyle!=t){var e=this.toolbar.listStyles;if(e.rendered){e.suspendEvents();var i=e.menuPicker.store.findWhere({title:t});this._state.prstyle=e.menuPicker.store.length>0||window.styles_loaded?t:void 0,e.menuPicker.selectRecord(i),e.resumeEvents()}}},onApiPageOrient:function(t){this._state.pgorient!==t&&(this.toolbar.btnPageOrient.menu.items[t?0:1].setChecked(!0),this._state.pgorient=t)},onApiLockDocumentProps:function(){!0!==this._state.lock_doc&&(this.toolbar.btnPageOrient.setDisabled(!0),this.toolbar.btnPageSize.setDisabled(!0),this._state.activated&&(this._state.lock_doc=!0))},onApiUnLockDocumentProps:function(){!1!==this._state.lock_doc&&(this.toolbar.btnPageOrient.setDisabled(!1),this.toolbar.btnPageSize.setDisabled(!1),this._state.activated&&(this._state.lock_doc=!1))},onApiLockDocumentSchema:function(){this.toolbar.btnColorSchemas.setDisabled(!0)},onApiUnLockDocumentSchema:function(){this.toolbar.btnColorSchemas.setDisabled(!1)},onApiLockHeaderFooters:function(){this.tool
this.api&&this.api.asc_GotoFootnote(!0);var e=this;setTimeout(function(){Common.NotificationCenter.trigger(" edit : complete ",e.toolbar)},50)},_clearBullets:function(){this.toolbar.btnMarkers.toggle(!1,!0),this.toolbar.btnNumbers.toggle(!1,!0),this.toolbar.btnMultilevels.toggle(!1,!0),this.toolbar.mnuMarkersPicker.selectByIndex(0,!0),this.toolbar.mnuNumbersPicker.selectByIndex(0,!0),this.toolbar.mnuMultilevelPicker.selectByIndex(0,!0)},_getApiTextSize:function(){var t=12,e=this.api.get_TextProps();return e&&e.get_TextPr&&(t=e.get_TextPr().get_FontSize()),t},onNewFontColor:function(t,e){this.toolbar.mnuFontColorPicker.addNewColor()},onAutoFontColor:function(t){this._state.clrtext=this._state.clrtext_asccolor=void 0;var e=new Asc.asc_CColor;e.put_auto(!0),this.api.put_TextColor(e),this.toolbar.btnFontColor.currentColor={color:e,isAuto:!0},$(" . btn - color - value - line ",this.toolbar.btnFontColor.cmpEl).css(" background - color "," # 000 "),this.toolbar.mnuFontColorPicker.clearSelection(),this.toolbar.mnuFontColorPicker.currentColor={color:e,isAuto:!0}},onNewParagraphColor:function(t,e){this.toolbar.mnuParagraphColorPicker.addNewColor()},onSelectHighlightColor:function(t,e){this._setMarkerColor(e," menu ")},onSelectFontColor:function(t,e){this._state.clrtext=this._state.clrtext_asccolor=void 0;var i=" object "==typeof e?e.isAuto?" # 000 ":e.color:e;this.toolbar.btnFontColor.currentColor=e,$(" . btn - color - value - line ",this.toolbar.btnFontColor.cmpEl).css(" background - color "," # "+i),this.toolbar.mnuFontColorPicker.currentColor=e,this.api&&this.api.put_TextColor(e.isAuto?e.color:Common.Utils.ThemeColor.getRgbColor(e)),Common.component.Analytics.trackEvent(" ToolBar "," Text Color ")},onParagraphColorPickerSelect:function(t,e){this._state.clrback=this._state.clrshd_asccolor=void 0;var i=" object "==typeof e?e.color:e;this.toolbar.btnParagraphColor.currentColor=e,$(" . btn - color - value - line ",this.toolbar.btnParagraphColor.cmpEl).css(" background - color "," transparent "!=e?" # "+i:i),this.toolbar.mnuParagraphColorPicker.currentColor=e,this.api&&(" transparent "==e?this.api.put_ParagraphShade(!1):this.api.put_ParagraphShade(!0,Common.Utils.ThemeColor.getRgbColor(e))),Common.NotificationCenter.trigger(" edit : complete ",this)},onBtnHighlightColor:function(t){t.pressed?(this._setMarkerColor(t.currentColor),Common.component.Analytics.trackEvent(" ToolBar "," Highlight Color ")):this.api.SetMarkerFormat(!1)},onBtnFontColor:function(){this.toolbar.mnuFontColorPicker.trigger(" select ",this.toolbar.mnuFontColorPicker,this.toolbar.mnuFontColorPicker.currentColor)},onBtnParagraphColor:function(){this.toolbar.mnuParagraphColorPicker.trigger(" select ",this.toolbar.mnuParagraphColorPicker,this.toolbar.mnuParagraphColorPicker.currentColor)},onHighlightTransparentClick:function(t,e){this._setMarkerColor(" transparent "," menu "),t.setChecked(!0,!0),this.toolbar.btnHighlightColor.currentColor=" transparent ",$(" . btn - color - value - line ",this.toolbar.btnHighlightColor.cmpEl).css(" background - color "," transparent ")},onParagraphColor:function(t){var e,i=this.toolbar.mnuParagraphColorPicker;if(null!==t&&void 0!==t&&t.get_Value()===Asc.c_oAscShdClear){var n=t.get_Color();e=n?n.get_type()==Asc.c_oAscColor.COLOR_TYPE_SCHEME?{color:Common.Utils.ThemeColor.getHexColor(n.get_r(),n.get_g(),n.get_b()),effectValue:n.get_value()}:Common.Utils.ThemeColor.getHexColor(n.get_r(),n.get_g(),n.get_b()):" transparent "}else e=" transparent ";var o=typeof e;if(o!==typeof this._state.clrback||" object "==o&&(e.effectValue!==this._state.clrback.effectValue||this._state.clrback.color.indexOf(e.color)<0)||" object "!=o&&this._state.clrback.indexOf(e)<0){if(" object "==typeof e){for(var s=!1,a=0;a<10;a++)if(Common.Utils.ThemeColor.ThemeValues[a]==e.effectValue){i.select(e,!0),s=!0;break}s||i.clearSelection()}else i.select(e,!0);this._state.clrback=e}this._state.clrshd_asccolor=t},onApiTextColor:function(t){if(t.get_auto()){if(" auto "!==this._state.clrtext){this.toolbar.mnuFontColorPicker.clearSelection();var e=this.toolbar.btnFontColor.menu.$el.find(" # id - toolbar - menu - auto - fontcolor > a ");!e.hasClass(" selected ")&&e.addClass(" selected "),this._state
return'\r\n<div class=" statusbar " style=" display : table ; ">\r\n <div class=" status - group dropup ">\r\n <label id=" label - pages " class=" status - label dropdown - toggle " style=" margin - left : 40 px ; " data-toggle=" dropdown "><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>\r\n <div id=" status - goto - box " class=" dropdown - menu ">\r\n <label style=" float : left ; line - height : 22 px ; "><%= scope.goToPageText %></label>\r\n <div id=" status - goto - page " style=" display : inline - block ; "></div>\r\n </div>\r\n </div>\r\n \x3c!-- /** coauthoring begin **/ --\x3e\r\n <div id=" status - users - ct " class=" status - group dropup " style=" display : none ; ">\r\n <div class=" separator short " style=" margin - right : 12 px ; margin - left : 40 px ; " />\r\n <div id=" status - users - block " style=" display : inline - block ; cursor : pointer ; ">\r\n <span id=" users - icon " class=" img - commonctrl " style=" margin - bottom : 2 px ; "/>\r\n <label id=" status - users - count " class=" status - label " style=" font - size : 14 px ; font - weight : normal ; margin - top : - 1 px ; ">+</label>\r\n </div>\r\n <div id=" status - users - menu " class=" dropdown - menu ">\r\n <label style=" display : block ; margin - right : 14 px ; "><%= scope.tipUsers %></label>\r\n <div id=" status - users - list "></div>\r\n <label id=" status - change - rights " class=" link " style=" margin - top : 15 px ; "><%= scope.txAccessRights %></label>\r\n </div>\r\n <div class=" separator short " style=" margin - left : 10 px ; " />\r\n </div>\r\n \x3c!-- /** coauthoring end **/ --\x3e\r\n <div class=" status - group " style=" width : 100 % ; text - align : center ; ">\r\n <label id=" label - action " class=" status - label "></label>\r\n </div>\r\n <div class=" status - group " style=" ">\r\n <div class=" separator short el - edit "></div>\r\n <div class=" cnt - lang el - edit ">\r\n <div class=" dropdown - toggle " data-toggle=" dropdown " style=" margin - right : 6 px ; ">\r\n <span class=" icon - lang - flag lang - flag " data-vertical-offset=" 10 " />\r\n <label id=" status - label - lang " class=" status - label ">English (United States)</label>\r\n <div class=" caret up img - commonctrl " />\r\n </div>\r\n </div>\r\n <button id=" btn - doc - lang " type=" button " class=" btn small btn - toolbar el - edit "><span class=" btn - icon btn - ic - doclang "> </span></button>\r\n <button id=" btn - doc - spell " type=" button " class=" btn small btn - toolbar el - edit "><span class=" btn - icon btn - ic - docspell "> </span></button>\r\n <div class=" separator short el - edit "></div>\r\n <div id=" btn - doc - review " class=" el - edit el - review " style=" display : inline - block ; "></div>\r\n <div class=" separator short el - edit el - review "></div>\r\n <button id=" btn - zoom - topage " type=" button " class=" btn small btn - toolbar "><span class=" btn - icon btn - ic - zoomtopage "> </span></button>\r\n <button id=" btn - zoom - towidth " type=" button " class=" btn small btn - toolbar "><span class=" btn - icon btn - ic - zoomtowidth "> </span></button>\r\n <button id=" btn - zoom - down " type=" button " class=" btn small btn - toolbar "><span class=" btn - icon btn - ic - zoomdown "> </span></button>\r\n <div class=" cnt - zoom ">\r\n <div class=" dropdown - toggle " data-toggle=" dropdown ">\r\n <label id=" label - zoom " class=" status - label ">Zoom 100%</label>\r\n </div>\r\n </div>\r\n <button id=" btn - zoom - up " type=" button " class=" btn small btn - toolbar " style=" margin - right : 40 px ; "><span class=" btn - icon btn - ic - zoomup "> </span></button>\r\n </div>\r\n</div>\r\n'}),define(" documenteditor / main / app / model / Pages ",[" underscore "," backbone "],function(t,e){" use strict ";DE.Models=DE.Models||{},DE.Models.Pages=e.Model.extend({defaults:{current:0,count:0}})}),define(" documenteditor / main / app / view / Statusbar ",[" text ! documenteditor / main / app / template / StatusBar . template "," jquery "," underscore "," backbone "," tip "," common / main / lib / component / Menu "," common / main / lib / component / Window "," documenteditor / main / app / model / Pages "],fun
this.reviewChangesView&&this.reviewChangesView.scroller&&this.reviewChangesView.scroller.update({minScrollbarLength:40,alwaysVisibleY:!0})},isVisible:function(){return this.$window&&this.$window.is(" : visible ")},setLeftTop:function(t,e,i,n){if(this.$window||this.render(),n&&(t=this.arrowPosX,e=this.arrowPosY,i=this.leftX),!_.isUndefined(t)||!_.isUndefined(e)){this.arrowPosX=t,this.arrowPosY=e,this.leftX=i;var o=$(" # id - review - popover "),s=$(" # id - review - arrow "),a=$(" # editor _sdk "),r=null,l=0,c=" ",d=0,h=" ",p=0,m=" ",u=0,g=" ",b=0,f=0,C=0,v=0,y=0,w=0;o&&s&&a&&a.get(0)&&(r=a.get(0).getBoundingClientRect())&&(l=r.height-2*this.sdkBounds.padding,this.$window.css({maxHeight:l+" px "}),this.sdkBounds.width=r.width,this.sdkBounds.height=r.height,_.isUndefined(t)||(c=$(" # id _vertical _scroll "),c.length?d=" none "!==c.css(" display ")?c.width():0:(c=$(" # ws - v - scrollbar "),c.length&&(d=" none "!==c.css(" display ")?c.width():0)),this.sdkBounds.width-=d,h=$(" # id _panel _left "),h.length&&(p=" none "!==h.css(" display ")?h.width():0),m=$(" # id _panel _thumbnails "),m.length&&(u=" none "!==m.css(" display ")?m.width():0,this.sdkBounds.width-=u),f=Math.min(0+t+this.arrow.width,0+this.sdkBounds.width-this.$window.outerWidth()),f=Math.max(0+p+this.arrow.width,f),s.removeClass(" right ").addClass(" left "),_.isUndefined(i)||(C=this.$window.outerWidth())&&(t+C>this.sdkBounds.width-this.arrow.width+5&&this.leftX>C?(f=this.leftX-C+0-this.arrow.width,s.removeClass(" left ").addClass(" right ")):f=0+t+this.arrow.width),this.$window.css(" left ",f+" px ")),_.isUndefined(e)||(g=$(" # id _panel _top "),w=0,g.length?(b=" none "!==g.css(" display ")?g.height():0,w+=this.sdkBounds.paddingTop):(g=$(" # ws - h - scrollbar "),g.length&&(b=" none "!==g.css(" display ")?g.height():0,w-=this.sdkBounds.paddingTop)),this.sdkBounds.height-=b,v=this.$window.outerHeight(),y=Math.min(0+l-v,this.arrowPosY+0-this.arrow.height),y=Math.max(y,w),this.$window.css(" top ",y+" px "))),this.calculateSizeOfContent()}},calculateSizeOfContent:function(t){if(!t||this.$window.is(" : visible ")){this.$window.css({overflow:" hidden "});var e=$(" # id - review - arrow "),i=$(" # id - review - popover "),n=null,o=null,s=null,a=0,r=" ",l=0,c=0,d=0,h=0,p=0,m=0;i&&e&&i.get(0)&&(i.css({height:" 100 % "}),(n=i.get(0).getBoundingClientRect())&&(o=$(" # editor _sdk "))&&o.get(0)&&(s=o.get(0).getBoundingClientRect())&&(a=s.height-2*this.sdkBounds.padding,m=0,d=this.$window.outerHeight(),r=$(" # id _panel _top "),r.length?(l=" none "!==r.css(" display ")?r.height():0,m+=this.sdkBounds.paddingTop):(r=$(" # ws - h - scrollbar "),r.length&&(l=" none "!==r.css(" display ")?r.height():0,m-=this.sdkBounds.paddingTop)),h=Math.max(i.outerHeight(),this.$window.outerHeight()),a<=h?(this.$window.css({maxHeight:a-l+" px ",top:0+l+" px "}),i.css({height:a-l-3+" px "}),c=Math.min(c,a-(l+this.arrow.margin+this.arrow.width)),e.css({top:c+" px "})):(h=d,h>0&&(n.top+h>a+0||0===n.height)&&(p=Math.min(0+a-h,this.arrowPosY+0-this.arrow.height),p=Math.max(p,m),this.$window.css({top:p+" px "})),c=Math.max(this.arrow.margin,this.arrowPosY-(a-h)-this.arrow.width),c=Math.min(c,h-this.arrow.margin-this.arrow.width),e.css({top:c+" px "})))),this.$window.css({overflow:" "})}}}),Common.Views.ReviewChanges=Common.UI.BaseView.extend(_.extend({el:" # review - changes - panel ",options:{},initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t),this.template=['<div class=" review - group " style=" ">','<div id=" id - review - button - prev " style=" "></div>','<div id=" id - review - button - next " style=" "></div>','<div class=" separator "/>'," < / d i v > " , ' < d i v c l a s s = " r e v i e w - g r o u p " s t y l e = " " > ' , ' < d i v i d = " i d - r e v i e w - b u t t o n - a c c e p t " s t y l e = " " > < / d i v > ' , ' < d i v i d = " i d - r e v i e w - b u t t o n - r e j e c t " s t y l e = " " > < / d i v > ' , ' < d i v c l a s s = " s e p a r a t o r " / > ' , " < / d i v > " , ' < d i v c l a s s = " r e v i e w - g r o u p " > ' , ' < d i v i d = " i d - r e v i e w - b u t t o n - c l o s e " s t y l e = " " > < / d i v > ' , " < / d i v > " ] . j o i n ( " " ) , t h i s . s t o r e = t h i s . o p t i o n s . s t o r e , t h i s . p o p o v e r C h a n g e s = t h i s . o p t i o n s . p o p o v e r C h a n g e s } , r e n d e r : f u n c t i o n ( ) { v a r t = $ ( t h i s . e l ) ; t . a d d C l a s s ( " r e v i e w - c h a n g e s " ) , t . h t m l ( _ . t e m p l a t e ( t h i s . t e m p l a t e ) ( { s c o p e : t h i s } ) ) , t h i s . b t n P r e v = n e w C o m m o n . U I . B u t t o n ( { c l s : " b t n - t o o l b a r " , i c o n C l s : " i m g - c o m m o n c t r l r e v i e w - p r e v " , v a l u e : 1 , h i n t : t h i s . t x t P r e v , h i n t A n c h o r : " t o p " } ) , t h i s . b t n P r e v . r e n
; if ( i && i . length > 0 ) for ( var n , o , s = i . length - 1 ; s >= 0 ; s -- ) if ( n = i [ s ] . get _ObjectType ( ) , o = i [ s ] . get _ObjectValue ( ) , Asc . c _oAscTypeSelectElement . Paragraph == n ) { new DE . Views . ParagraphSettingsAdvanced ( { tableStylerRows : 2 , tableStylerColumns : 1 , paragraphProps : o , borderProps : e . borderAdvancedProps , isChart : e . isChart , api : e . api , handler : function ( t , i ) { "ok" == t && e . api && ( e . borderAdvancedProps = i . borderProps , e . api . paraApply ( i . paragraphProps ) ) , e . fireEvent ( "editcomplete" , e ) } } ) . show ( ) ; break } } } } , addNewColor : function ( ) { this . mnuColorPicker . addNewColor ( "object" == typeof this . btnColor . color ? this . btnColor . color . color : this . btnColor . color ) } , UpdateThemeColors : function ( ) { this . mnuColorPicker || ( this . btnColor . setMenu ( new Common . UI . Menu ( { items : [ { template : i . template ( '<div id="paragraph-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>' ) } , { template : i . template ( '<a id="paragraph-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" ) } ] } ) ) , this . mnuColorPicker = new Common . UI . ThemeColorPalette ( { el : e ( "#paragraph-color-menu" ) , transparent : ! 0 } ) , this . mnuColorPicker . on ( "select" , i . bind ( this . onColorPickerSelect , this ) ) ) , this . mnuColorPicker . updateColors ( Common . Utils . ThemeColor . getEffectColors ( ) , Common . Utils . ThemeColor . getStandartColors ( ) ) } , onHideMenus : function ( t , e , i ) { i || this . fireEvent ( "editcomplete" , this ) } , setLocked : function ( t ) { this . _locked = t } , disableControls : function ( t ) { this . _state . DisabledControls !== t && ( this . _state . DisabledControls = t , i . each ( this . lockedControls , function ( e ) { e . setDisabled ( t ) } ) , this . linkAdvanced . toggleClass ( "disabled" , t ) ) } , hideTextOnlySettings : function ( t ) { this . _state . HideTextOnlySettings !== t && ( this . _state . HideTextOnlySettings = t , this . TextOnlySettings . toggleClass ( "hidden" , 1 == t ) ) } , strParagraphSpacing : "Paragraph Spacing" , strSomeParagraphSpace : "Don't add interval between paragraphs of the same style" , strLineHeight : "Line Spacing" , strSpacingBefore : "Before" , strSpacingAfter : "After" , textAuto : "Multiple" , textAtLeast : "At least" , textExact : "Exactly" , textAdvanced : "Show advanced settings" , textAt : "At" , txtAutoText : "Auto" , textBackColor : "Background color" , textNewColor : "Add New Custom Color" } , DE . Views . ParagraphSettings || { } ) ) } ) , define ( "text!documenteditor/main/app/template/HeaderFooterSettings.template" , [ ] , function ( ) { return '<table cols="1">\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.textPageNum %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="headerfooter-button-top-left" style="display: inline-block; margin-right:5px;"></div>\r\n <div id="headerfooter-button-top-center" style="display: inline-block; margin-right:5px;"></div>\r\n <div id="headerfooter-button-top-right" style="display: inline-block; margin-right:5px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="headerfooter-button-bottom-left" style="display: inline-block; margin-right:5px;"></div>\r\n <div id="headerfooter-button-bottom-center" style="display: inline-block; margin-right:5px;"></div>\r\n <div id="headerfooter-button-bottom-right" style="display: inline-block; margin-right:5px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.textPosition %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <label id="headerfooter-label-position" class="input-label"><%= scope.textHeaderFromTop %></label>\r\n <div id="headerfooter-spin-position"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.textOptions %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="headerfooter-check-diff-first"></div>\r\n
}),this.spnHeight.on("change",_.bind(function(t,e,i,n){var o=t.getNumberValue(),s=null;this.btnRatio.pressed&&(s=o*this._nRatio,s>this.sizeMax.width&&(s=this.sizeMax.width,o=s/this._nRatio,this.spnHeight.setValue(o,!0)),this.spnWidth.setValue(s,!0)),this._changedProps&&(this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())))},this)),this.spinners.push(this.spnHeight),this.btnOriginalSize=new Common.UI.Button({el:$("#image-advanced-button-original-size")}),this.btnOriginalSize.on("click",_.bind(function(t,e){this.spnWidth.setValue(this.sizeOriginal.width,!0),this.spnHeight.setValue(this.sizeOriginal.height,!0),this._nRatio=this.sizeOriginal.width/this.sizeOriginal.height,this._changedProps&&(this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue())),this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())))},this)),this.btnRatio=new Common.UI.Button({cls:"btn-toolbar",iconCls:"advanced-btn-ratio",style:"margin-bottom: 1px;",enableToggle:!0,hint:this.textKeepRatio}),this.btnRatio.render($("#image-advanced-button-ratio")),this.btnRatio.on("click",_.bind(function(t,e){t.pressed&&this.spnHeight.getNumberValue()>0&&(this._nRatio=this.spnWidth.getNumberValue()/this.spnHeight.getNumberValue()),this._changedProps&&this._changedProps.asc_putLockAspect(t.pressed)},this)),this.radioHSize=new Common.UI.RadioBox({el:$("#shape-radio-hsize"),name:"asc-radio-width",checked:!0}),this.radioHSize.on("change",_.bind(this.onRadioHSizeChange,this)),this.radioHSizePc=new Common.UI.RadioBox({el:$("#shape-radio-hsizepc"),name:"asc-radio-width"}),this.radioHSizePc.on("change",_.bind(this.onRadioHSizePcChange,this)),this.radioVSize=new Common.UI.RadioBox({el:$("#shape-radio-vsize"),name:"asc-radio-height",checked:!0}),this.radioVSize.on("change",_.bind(this.onRadioVSizeChange,this)),this.radioVSizePc=new Common.UI.RadioBox({el:$("#shape-radio-vsizepc"),name:"asc-radio-height"}),this.radioVSizePc.on("change",_.bind(this.onRadioVSizePcChange,this)),this.chRatio=new Common.UI.CheckBox({el:$("#shape-checkbox-ratio"),labelText:this.textAspectRatio}),this.chRatio.on("change",_.bind(function(t,e,i,n){"checked"==t.getValue()&&this.spnShapeHeight.getNumberValue()>0&&(this._nRatio=this.spnShapeWidth.getNumberValue()/this.spnShapeHeight.getNumberValue()),this._changedProps&&this._changedProps.asc_putLockAspect("checked"==t.getValue())},this)),this.spnShapeWidth=new Common.UI.MetricSpinner({el:$("#shape-advanced-spin-width"),step:.1,width:80,defaultUnit:"cm",value:"3 cm",maxValue:55.88,minValue:0}),this.spnShapeWidth.on("change",_.bind(function(t,e,i,n){if("checked"==this.chRatio.getValue()&&!this.chRatio.isDisabled()){var o=t.getNumberValue(),s=o/this._nRatio;s>this.sizeMax.height&&(s=this.sizeMax.height,o=s*this._nRatio,this.spnShapeWidth.setValue(o,!0)),this.spnShapeHeight.setValue(s,!0)}this._changedProps&&(this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this.fillShapeHeight())},this)),this.spinners.push(this.spnShapeWidth),this.spnShapeHeight=new Common.UI.MetricSpinner({el:$("#shape-advanced-spin-height"),step:.1,width:80,defaultUnit:"cm",value:"3 cm",maxValue:55.88,minValue:0}),this.spnShapeHeight.on("change",_.bind(function(t,e,i,n){var o=t.getNumberValue(),s=null;"checked"!=this.chRatio.getValue()||this.chRatio.isDisabled()||(s=o*this._nRatio,s>this.sizeMax.width&&(s=this.sizeMax.width,o=s/this._nRatio,this.spnShapeHeight.setValue(o,!0)),this.spnShapeWidth.setValue(s,!0)),this._changedProps&&(this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(t.getNumberValue())),this.fillShapeWidth())},this)),this.spinners.push(this.spnShapeHeight),this.spnShapeWidthPc=new Common.UI.MetricSpinner({el:$("#shape-advanced-spin-width-rel"),disabled:!0,step:1,width:80,defaultUnit:"%",value:"1 %",maxValue:1e3,minValue:1}),this.spnShapeWidthPc.on("change",_.bind(function(t,e,i,n){this._changedProps&&(null!==this._changedProps.get_S
}else for(this.radioVPosition.setValue(!0),e=n.get_Value(),this.spnY.setValue(Common.Utils.Metric.fnRecalcFromMM(e)),e=n.get_RelativeFrom(),o=0;o<this._arrVRelative.length;o++)if(e==this._arrVRelative[o].value){this.cmbVPosition.setValue(e),this._state.VPositionFrom=e;break}this.chMove.setValue(e==Asc.c_oAscRelativeFromV.Line||e==Asc.c_oAscRelativeFromV.Paragraph,!0),this.chMove.setDisabled(!n.get_UseAlign()&&n.get_Percent())}this.chOverlap.setValue(null!==t.get_AllowOverlap()&&void 0!==t.get_AllowOverlap()?t.get_AllowOverlap():"indeterminate",!0),t.get_Height()>0&&(this._nRatio=t.get_Width()/t.get_Height());var s=t.get_ShapeProperties(),a=t.get_ChartProperties();if(this.btnOriginalSize.setVisible(!(s||a)),this.btnOriginalSize.setDisabled(null===t.get_ImageUrl()||void 0===t.get_ImageUrl()),this.btnsCategory[4].setVisible(null!==s&&!s.get_FromChart()),this.btnsCategory[5].setVisible(null!==s&&!s.get_FromChart()),this.btnsCategory[2].setDisabled(t.get_FromGroup()),s){this._objectType=Asc.c_oAscTypeSelectElement.Shape,this._setShapeDefaults(s),this.setTitle(this.textTitleShape),e=t.asc_getLockAspect(),this.chRatio.setValue(e),this.spnShapeWidth.setMaxValue(this.sizeMax.width),this.spnShapeHeight.setMaxValue(this.sizeMax.height);var r=t.get_SizeRelH();if(r){for(this.radioHSizePc.setValue(!0),this.spnShapeWidthPc.setValue(r.get_Value()),e=r.get_RelativeFrom(),o=0;o<this._arrHRelativePc.length;o++)if(e==this._arrHRelativePc[o].value){this.cmbWidthPc.setValue(e),this.spnShapeWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrHRelativePc[o].size*r.get_Value()/100).toFixed(2),!0),this._state.ShapeWidthPcFrom=e;break}}else this.radioHSize.setValue(!0),e=t.get_Width(),this.spnShapeWidth.setValue(void 0!==e?Common.Utils.Metric.fnRecalcFromMM(e).toFixed(2):"",!0);var l=t.get_SizeRelV();if(l){for(this.radioVSizePc.setValue(!0),this.spnShapeHeightPc.setValue(l.get_Value()),e=l.get_RelativeFrom(),o=0;o<this._arrVRelativePc.length;o++)if(e==this._arrVRelativePc[o].value){this.cmbHeightPc.setValue(e),this.spnShapeHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrVRelativePc[o].size*l.get_Value()/100).toFixed(2),!0),this._state.ShapeHeightPcFrom=e;break}}else this.radioVSize.setValue(!0),e=t.get_Height(),this.spnShapeHeight.setValue(void 0!==e?Common.Utils.Metric.fnRecalcFromMM(e).toFixed(2):"",!0);this.chRatio.setDisabled(this.radioVSizePc.getValue()||this.radioHSizePc.getValue());var c=s.get_paddings();if(c){var d=c.get_Left();this.spnMarginLeft.setValue(null!==d&&void 0!==d?Common.Utils.Metric.fnRecalcFromMM(d):"",!0),d=c.get_Top(),this.spnMarginTop.setValue(null!==d&&void 0!==d?Common.Utils.Metric.fnRecalcFromMM(d):"",!0),d=c.get_Right(),this.spnMarginRight.setValue(null!==d&&void 0!==d?Common.Utils.Metric.fnRecalcFromMM(d):"",!0),d=c.get_Bottom(),this.spnMarginBottom.setValue(null!==d&&void 0!==d?Common.Utils.Metric.fnRecalcFromMM(d):"",!0)}this.btnsCategory[5].setDisabled(null===c)}else e=t.asc_getLockAspect(),a?(this._objectType=Asc.c_oAscTypeSelectElement.Chart,this.setTitle(this.textTitleChart)):this.setTitle(this.textTitle),this.btnRatio.toggle(e),this.spnWidth.setMaxValue(this.sizeMax.width),this.spnHeight.setMaxValue(this.sizeMax.height),e=t.get_Width(),this.spnWidth.setValue(void 0!==e?Common.Utils.Metric.fnRecalcFromMM(e).toFixed(2):"",!0),e=t.get_Height(),this.spnHeight.setValue(void 0!==e?Common.Utils.Metric.fnRecalcFromMM(e).toFixed(2):"",!0);e=t.asc_getTitle(),this.inputAltTitle.setValue(e||""),e=t.asc_getDescription(),this.textareaAltDescription.val(e||""),this._changedProps=new Asc.asc_CImgProperty}},getSettings:function(){var t=this._changedProps;if(this._objectType==Asc.c_oAscTypeSelectElement.Shape&&(t.put_ShapeProperties(this._changedShapeProps),this.Margins&&(null!==t.get_ShapeProperties()&&void 0!==t.get_ShapeProperties()||t.put_ShapeProperties(new Asc.asc_CShapeProperty),t.get_ShapeProperties().put_paddings(this.Margins))),this._originalProps.get_WrappingStyle()===Asc.c_oAscWrapStyle2.Inline&&void 0!==t.get_WrappingStyle()&&t.get_WrappingStyle()!==Asc.c_oAscWrapStyle2.Inline){if(null===t.get_Po
;this.labelWidth[0].innerHTML=this.textWidth+": "+Common.Utils.Metric.fnRecalcFromMM(e).toFixed(1)+" "+Common.Utils.Metric.getCurrentMetricName(),this.labelHeight[0].innerHTML=this.textHeight+": "+Common.Utils.Metric.fnRecalcFromMM(i).toFixed(1)+" "+Common.Utils.Metric.getCurrentMetricName();var n=new Asc.asc_CImgProperty;n.put_Width(e),n.put_Height(i),this.api.ImgApply(n),this.fireEvent("editcomplete",this)}},insertFromUrl:function(){var t=this;new Common.Views.ImageFromUrlDialog({handler:function(e,n){if("ok"==e&&t.api){var o=n.replace(/ /g,"");if(!i.isEmpty(o)){var s=new Asc.asc_CImgProperty;s.put_ImageUrl(o),t.api.ImgApply(s)}}t.fireEvent("editcomplete",t)}}).show()},openAdvancedSettings:function(t){if(!this.linkAdvanced.hasClass("disabled")){var e=this;if(e.api&&!this._locked){var i=e.api.getSelectedElements();if(i&&i.length>0)for(var n,o,s=i.length-1;s>=0;s--)if(n=i[s].get_ObjectType(),o=i[s].get_ObjectValue(),Asc.c_oAscTypeSelectElement.Image==n){var a;e.btnOriginalSize.isDisabled()||(a=e.api.get_OriginalSizeImage())&&(a={width:a.get_ImageWidth(),height:a.get_ImageHeight()});var r=this.api.GetSectionInfo();r={width:r.get_PageWidth()-(r.get_MarginLeft()+r.get_MarginRight()),height:r.get_PageHeight()-(r.get_MarginTop()+r.get_MarginBottom())},new DE.Views.ImageSettingsAdvanced({imageProps:o,sizeOriginal:a,sizeMax:r,sectionProps:e.api.asc_GetSectionProps(),handler:function(t,i){"ok"==t&&e.api&&e.api.ImgApply(i.imageProps),e.fireEvent("editcomplete",e)}}).show();break}}}},setLocked:function(t){this._locked=t},disableControls:function(t){this._initSettings||this._state.DisabledControls!==t&&(this._state.DisabledControls=t,i.each(this.lockedControls,function(e){e.setDisabled(t)}),this.linkAdvanced.toggleClass("disabled",t))},textSize:"Size",textWrap:"Wraping Style",textWidth:"Width",textHeight:"Height",textOriginalSize:"Default Size",textInsert:"Replace Image",textFromUrl:"From URL",textFromFile:"From File",textAdvanced:"Show advanced settings",txtInline:"Inline",txtSquare:"Square",txtTight:"Tight",txtThrough:"Through",txtTopAndBottom:"Top and bottom",txtBehind:"Behind",txtInFront:"In front",textEditObject:"Edit Object",textEdit:"Edit"},DE.Views.ImageSettings||{}))}),define("text!documenteditor/main/app/template/ChartSettings.template",[],function(){return' < table cols = "2" > \ r \ n < tr > \ r \ n < td colspan = 2 > \ r \ n < label class = "header" > < %= scope . textSize % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " w i d t h = " 5 0 % " > \ r \ n < l a b e l i d = " c h a r t - l a b e l - w i d t h " c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t W i d t h % > < / l a b e l > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " w i d t h = " 5 0 % " > \ r \ n < l a b e l i d = " c h a r t - l a b e l - h e i g h t " c l a s s = " i n p u t - l a b e l " > < % = s c o p e . t e x t H e i g h t % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < d i v c l a s s = " s e p a r a t o r h o r i z o n t a l " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c o l s p a n = 2 > \ r \ n < l a b e l c l a s s = " h e a d e r " > < % = s c o p e . t e x t W r a p % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < d i v i d = " c h a r t - b u t t o n - w r a p " s t y l e = " " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < d i v c l a s s = " s e p a r a t o r h o r i z o n t a l " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c o l s p a n = 2 > \ r \ n < l a b e l c l a s s = " h e a d e r " > < % = s c o p e . t e x t C h a r t T y p e % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < d i v i d = " c h a r t - b u t t o n - t y p e " s t y l e = " " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < d i v c l a s s = " " i d = " c h a r t - c o m b o - s t y l e " s t y l e = " w i d t h : 1 0 0 % ; " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < d i v c l a s s = " s e p a r a t o r h o r i z o n t a l " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " c o l s p a n = 2 > \ r \ n < b u t t o n t y p e = " b u t t o n " c l a s s = " b t n b t n -
CheckLast : ! 1 , CheckColBanded : ! 1 , WrapStyle : - 1 , CanBeFlow : ! 0 , TableAlignment : - 1 , TableIndent : 0 , BackColor : "#000000" , RepeatRow : ! 1 , DisabledControls : ! 1 } , this . lockedControls = [ ] , this . _locked = ! 1 , this . _originalLook = new Asc . CTablePropLook , this . _originalProps = null , this . CellBorders = { } , this . CellColor = { Value : 1 , Color : "transparent" } , this . BorderSize = 1 , this . _noApply = ! 1 , this . _wrapHandled = ! 1 , this . render ( ) } , onCheckTemplateChange : function ( t , e , i , n , o ) { if ( this . api ) { var s = new Asc . CTableProp , a = this . _originalLook ? this . _originalLook : new Asc . CTablePropLook ; switch ( t ) { case 0 : a . put _FirstRow ( "checked" == e . getValue ( ) ) ; break ; case 1 : a . put _LastRow ( "checked" == e . getValue ( ) ) ; break ; case 2 : a . put _BandHor ( "checked" == e . getValue ( ) ) ; break ; case 3 : a . put _FirstCol ( "checked" == e . getValue ( ) ) ; break ; case 4 : a . put _LastCol ( "checked" == e . getValue ( ) ) ; break ; case 5 : a . put _BandVer ( "checked" == e . getValue ( ) ) } s . put _TableLook ( a ) , this . api . tblApply ( s ) } this . fireEvent ( "editcomplete" , this ) } , onTableTemplateSelect : function ( t , e ) { if ( this . api && ! this . _noApply ) { var i = new Asc . CTableProp ; i . put _TableStyle ( e . get ( "templateId" ) ) , this . api . tblApply ( i ) } this . fireEvent ( "editcomplete" , this ) } , onBtnWrapClick : function ( t , e ) { if ( this . api && t . pressed && ! this . _noApply ) { var i = new Asc . CTableProp ; i . put _TableWrap ( t . options . posId ) , t . options . posId == c _tableWrap . TABLE _WRAP _NONE && ( this . _state . TableAlignment < 0 && ( this . _state . TableAlignment = c _tableAlign . TABLE _ALIGN _LEFT ) , i . put _TableAlignment ( this . _state . TableAlignment ) , i . put _TableIndent ( this . _state . TableIndent ) ) , i . put _CellSelect ( ! 0 ) , this . api . tblApply ( i ) } if ( this . _wrapHandled ) return void ( this . _wrapHandled = ! 1 ) ; this . _wrapHandled = ! 0 , this . fireEvent ( "editcomplete" , this ) } , onCheckRepeatRowChange : function ( t , e , i , n ) { if ( this . api ) { var o = new Asc . CTableProp ; o . put _RowsInHeader ( "checked" == t . getValue ( ) ) , this . api . tblApply ( o ) } this . fireEvent ( "editcomplete" , this ) } , onColorsBackSelect : function ( t , e ) { if ( this . btnBackColor . setColor ( e ) , this . CellColor = { Value : 1 , Color : e } , this . api ) { var i = new Asc . CTableProp , n = new Asc . CBackground ; i . put _CellsBackground ( n ) , "transparent" == this . CellColor . Color ? n . put _Value ( 1 ) : ( n . put _Value ( 0 ) , n . put _Color ( Common . Utils . ThemeColor . getRgbColor ( this . CellColor . Color ) ) ) , i . put _CellSelect ( ! 0 ) , this . api . tblApply ( i ) } this . fireEvent ( "editcomplete" , this ) } , addNewColor : function ( t , e ) { t . addNewColor ( "object" == typeof e . color ? e . color . color : e . color ) } , onColorsBorderSelect : function ( t , e ) { this . btnBorderColor . setColor ( e ) } , onBtnBordersClick : function ( t , e ) { if ( this . _UpdateBordersStyle ( t . options . strId , ! 0 ) , this . api ) { var i = new Asc . CTableProp ; i . put _CellBorders ( this . CellBorders ) , i . put _CellSelect ( ! 0 ) , this . api . tblApply ( i ) } this . fireEvent ( "editcomplete" , this ) } , onBorderSizeSelect : function ( t , e ) { this . BorderSize = e . value } , onEditClick : function ( t , e , i ) { if ( this . api ) switch ( e . value ) { case 0 : this . api . selectRow ( ) ; break ; case 1 : this . api . selectColumn ( ) ; break ; case 2 : this . api . selectCell ( ) ; break ; case 3 : this . api . selectTable ( ) ; break ; case 4 : this . api . addRowAbove ( ) ; break ; case 5 : this . api . addRowBelow ( ) ; break ; case 6 : this . api . addColumnLeft ( ) ; break ; case 7 : this . api . addColumnRight ( ) ; break ; case 8 : this . api . remRow ( ) ; break ; case 9 : this . api . remColumn ( ) ; break ; case 10 : this . api . remTable ( ) ; break ; case 11 : this . api . MergeCells ( ) ; break ; case 12 : this . splitCells ( t , e , i ) } this . fireEvent ( "editcomplete" , this ) } , splitCells : function ( t , e , i ) { var n = this ; new Common . Views . InsertTableDialog ( { handler : function ( t , e ) { "ok" == t && ( n . api && n . api . SplitCell ( e . columns , e . rows ) , n . fireEvent ( "editcomplete" , n ) ) } } ) . show ( ) } , render : function ( ) { e ( this . el ) . html ( this . template ( { scope : this } ) ) } , setApi : function ( t ) { return this . api = t , t && ( this . api . asc _registerCallback ( "asc_onTblWrapStyleChanged" , i . bind ( this . _TblWrapStyleChanged , this ) ) , this . api . asc _registerCallback ( "asc_onTblAlignChanged" , i . bind ( this . _TblAlignChanged , this ) ) , this . api . asc _registerCallback ( "asc_onInitTableTemplates" , i . bind ( this . _onInitTemplates , this ) ) ) , this } , createDelayedControls : function ( ) { this . chHeader = new Common . UI . CheckBox ( { el : e ( "#table-checkbox-header" ) , labelText : this . textHeader } ) , this . lockedControls . push ( this . chHeader ) , this . chTotal = new Common . UI . CheckBox ( { el : e ( "#table-checkbox-total" ) , labelText : this . textTotal } ) , this . lockedControls . push ( this . chTotal ) , this . chBanded = n
; n . find ( ".track-center" ) . width ( i . options . width - 14 ) , n . width ( i . options . width ) ; var o = function ( t ) { t . preventDefault ( ) , t . stopPropagation ( ) ; var e = t . data . index , n = i . thumbs [ e ] . value , a = e - 1 < 0 ? 0 : i . thumbs [ e - 1 ] . position , r = e + 1 < i . thumbs . length ? i . thumbs [ e + 1 ] . position : 100 , l = Math . round ( ( t . pageX * Common . Utils . zoom ( ) - i . cmpEl . offset ( ) . left - i . _dragstart ) / i . width * 100 ) , c = l < a || l > r , d = Math . max ( 0 , Math . min ( 100 , l ) ) , h = d / i . delta + i . minValue ; i . setThumbPosition ( e , d ) , i . thumbs [ e ] . value = h , c && i . sortThumbs ( ) , $ ( document ) . off ( "mouseup" , o ) , $ ( document ) . off ( "mousemove" , s ) , i . _dragstart = void 0 , i . trigger ( "changecomplete" , i , h , n ) } , s = function ( t ) { if ( ! i . disabled && void 0 !== i . _dragstart ) { t . preventDefault ( ) , t . stopPropagation ( ) ; var e = t . data . index , n = i . thumbs [ e ] . value , o = e - 1 < 0 ? 0 : i . thumbs [ e - 1 ] . position , s = e + 1 < i . thumbs . length ? i . thumbs [ e + 1 ] . position : 100 , a = Math . round ( ( t . pageX * Common . Utils . zoom ( ) - i . cmpEl . offset ( ) . left - i . _dragstart ) / i . width * 100 ) , r = a < o || a > s , l = Math . max ( 0 , Math . min ( 100 , a ) ) , c = l / i . delta + i . minValue ; i . setThumbPosition ( e , l ) , i . thumbs [ e ] . value = c , r && i . sortThumbs ( ) , Math . abs ( c - n ) > . 001 && i . trigger ( "change" , i , c , n ) } } , a = function ( t ) { if ( ! i . disabled ) { var n = t . data . index , a = i . thumbs [ n ] . thumb ; i . _dragstart = t . pageX * Common . Utils . zoom ( ) - a . offset ( ) . left - a . width ( ) / 2 , i . setActiveThumb ( n ) , e . each ( i . thumbs , function ( t , e ) { n == e ? t . thumb . css ( "z-index" , 500 ) : t . thumb . css ( "z-index" , "" ) } ) , $ ( document ) . on ( "mouseup" , null , t . data , o ) , $ ( document ) . on ( "mousemove" , null , t . data , s ) } } , r = function ( t ) { if ( ! i . disabled ) { var e = Math . max ( 0 , Math . min ( 100 , Math . round ( ( t . pageX * Common . Utils . zoom ( ) - i . cmpEl . offset ( ) . left ) / i . width * 100 ) ) ) , n = l ( e ) , o = i . thumbs [ n ] . value , s = e / i . delta + i . minValue ; i . setThumbPosition ( n , e ) , i . thumbs [ n ] . value = s , i . trigger ( "change" , i , s , o ) , i . trigger ( "changecomplete" , i , s , o ) } } , l = function ( t ) { for ( var e , n = 100 , o = 0 , s = i . thumbs . length , a = 0 ; a < s ; a ++ ) if ( e = Math . abs ( i . thumbs [ a ] . position - t ) , Math . abs ( e <= n ) ) { var r = i . thumbs [ a + 1 ] , l = i . thumbs [ a - 1 ] ; if ( void 0 !== l && t < l . position ) continue ; if ( void 0 !== r && t > r . position ) continue ; o = a , n = e } return o } ; return this . $thumbs = n . find ( ".thumb" ) , e . each ( this . $thumbs , function ( t , e ) { var n = $ ( t ) ; i . thumbs . push ( { thumb : n , index : e } ) , i . setValue ( e , i . options . values [ e ] ) , n . on ( "mousedown" , null , i . thumbs [ e ] , a ) } ) , i . setActiveThumb ( 0 , ! 0 ) , i . rendered || n . on ( "mousedown" , ".track" , r ) , i . rendered = ! 0 , this } , setActiveThumb : function ( t , e ) { this . currentThumb = t , this . $thumbs . removeClass ( "active" ) , this . thumbs [ t ] . thumb . addClass ( "active" ) , ! 0 !== e && this . trigger ( "thumbclick" , this , t ) } , setThumbPosition : function ( t , e ) { this . thumbs [ t ] . position = e , this . thumbs [ t ] . thumb . css ( { left : e + "%" } ) } , setValue : function ( t , e ) { this . thumbs [ t ] . value = Math . max ( this . minValue , Math . min ( this . maxValue , e ) ) , this . setThumbPosition ( t , Math . round ( ( e - this . minValue ) * this . delta ) ) } , getValue : function ( t ) { return this . thumbs [ t ] . value } , getValues : function ( ) { var t = [ ] ; return e . each ( this . thumbs , function ( e ) { t . push ( e . value ) } ) , t } , setDisabled : function ( t ) { t !== this . disabled && this . cmpEl . toggleClass ( "disabled" , t ) , this . disabled = t } , sortThumbs : function ( ) { this . thumbs . sort ( function ( t , e ) { return t . position - e . position } ) ; var t = [ ] ; return e . each ( this . thumbs , function ( e , i ) { t . push ( e . index ) , e . index = i } ) , t } } ) } ) , void 0 === Common ) var Common = { } ; if ( define ( "common/main/lib/component/MultiSliderGradient" , [ "common/main/lib/component/Slider" , "underscore" ] , function ( t , e ) { "use strict" ; Common . UI . MultiSliderGradient = Common . UI . MultiSlider . extend ( { options : { width : 100 , minValue : 0 , maxValue : 100 , values : [ 0 , 100 ] , colorValues : [ "#000000" , "#ffffff" ] , currentThumb : 0 } , disabled : ! 1 , template : e . template ( [ '<div class="slider multi-slider-gradient">' , '<div class="track"></div>' , "<% _.each(items, function(item) { %>" , '<div class="thumb img-commonctrl" style="">' , '<div class="thumb-top"></div>' , '<div class="thumb-bottom"></div>' , "</div>" , "<% }); %>" , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { this . styleStr = "" , Common . Utils . isChrome && Common . Utils . chromeVersion < 10 || Common . Utils . isSafari && Common . Utils . safariVersion < 5.1 ? this . styleStr = "-webkit-gradient(linear, left top, right top, color-stop({1}%,{0}), color-stop({3}%,{2})); /* Chrome,Safari4+ */" : Common . Utils . isChrome || Common . Utils . isSafari ? this . styleStr = "-webkit-linear-gradient(left, {0} {1}%, {2} {3}%)" : Common . Utils . isGecko ? this . styleStr = "-m
this.sldrGradient.setColorValue(Common.Utils.String.format(" # { 0 } "," object "==typeof this.GradColor.colors[0]?this.GradColor.colors[0].color:this.GradColor.colors[0]),0),this.sldrGradient.setColorValue(Common.Utils.String.format(" # { 0 } "," object "==typeof this.GradColor.colors[1]?this.GradColor.colors[1].color:this.GradColor.colors[1]),1),this.sldrGradient.setValue(0,this.GradColor.values[0]),this.sldrGradient.setValue(1,this.GradColor.values[1]),this.OriginalFillType=Asc.c_oAscFill.FILL_TYPE_GRAD,this.FGColor={Value:1,Color:this.GradColor.colors[0]},this.BGColor={Value:1,Color:" ffffff "},this.ShapeColor={Value:1,Color:this.GradColor.colors[0]}}this._state.FillType!==this.OriginalFillType&&(this.cmbFillSrc.setValue(null===this.OriginalFillType?" ":this.OriginalFillType),this._state.FillType=this.OriginalFillType,this.ShowHideElem(this.OriginalFillType)),e(this.btnTexture.el).find(" . form - control ").prop(" innerHTML ",this.textSelectTexture);var C=typeof this.ShapeColor.Color,v=typeof this._state.ShapeColor;if(C!==v||" object "==C&&(this.ShapeColor.Color.effectValue!==this._state.ShapeColor.effectValue||this._state.ShapeColor.color.indexOf(this.ShapeColor.Color.color)<0)||" object "!=C&&this._state.ShapeColor.indexOf(this.ShapeColor.Color)<0){if(this.btnBackColor.setColor(this.ShapeColor.Color)," object "==typeof this.ShapeColor.Color){for(var _=!1,y=0;y<10;y++)if(Common.Utils.ThemeColor.ThemeValues[y]==this.ShapeColor.Color.effectValue){this.colorsBack.select(this.ShapeColor.Color,!0),_=!0;break}_||this.colorsBack.clearSelection()}else this.colorsBack.select(this.ShapeColor.Color,!0);this._state.ShapeColor=this.ShapeColor.Color}var w,x=n.get_stroke(),S=x.get_type();if(x?(S==Asc.c_oAscStrokeType.STROKE_COLOR?(p=x.get_color(),p?p.get_type()==Asc.c_oAscColor.COLOR_TYPE_SCHEME?this.BorderColor={Value:1,Color:{color:Common.Utils.ThemeColor.getHexColor(p.get_r(),p.get_g(),p.get_b()),effectValue:p.get_value()}}:this.BorderColor={Value:1,Color:Common.Utils.ThemeColor.getHexColor(p.get_r(),p.get_g(),p.get_b())}:this.BorderColor={Value:1,Color:" transparent "}):this.BorderColor={Value:1,Color:" transparent "},w=x.asc_getPrstDash()):(S=null,this.BorderColor={Value:0,Color:" transparent "}),C=typeof this.BorderColor.Color,v=typeof this._state.StrokeColor,C!==v||" object "==C&&(this.BorderColor.Color.effectValue!==this._state.StrokeColor.effectValue||this._state.StrokeColor.color.indexOf(this.BorderColor.Color.color)<0)||" object "!=C&&(this._state.StrokeColor.indexOf(this.BorderColor.Color)<0||" object "==typeof this.btnBorderColor.color)){if(this.btnBorderColor.setColor(this.BorderColor.Color)," object "==typeof this.BorderColor.Color){for(var _=!1,y=0;y<10;y++)if(Common.Utils.ThemeColor.ThemeValues[y]==this.BorderColor.Color.effectValue){this.colorsBorder.select(this.BorderColor.Color,!0),_=!0;break}_||this.colorsBorder.clearSelection()}else this.colorsBorder.select(this.BorderColor.Color,!0);this._state.StrokeColor=this.BorderColor.Color}if(this._state.StrokeType!==S||S==Asc.c_oAscStrokeType.STROKE_COLOR){if(S==Asc.c_oAscStrokeType.STROKE_COLOR){var A=x.get_width(),T=Math.abs(this._state.StrokeWidth-A)<1e-5&&!new RegExp(this.txtPt+" \ \ s * $ ").test(this.cmbBorderSize.getRawValue());if(Math.abs(this._state.StrokeWidth-A)>1e-5||T||(null===this._state.StrokeWidth||null===A)&&this._state.StrokeWidth!==A){this._state.StrokeWidth=A,null!==A&&(A=this._mm2pt(A));var k=null===A?A:i.find(this.cmbBorderSize.store.models,function(t){if(A<t.attributes.value+1e-5&&A>t.attributes.value-1e-5)return!0});k?this.cmbBorderSize.selectRecord(k):this.cmbBorderSize.setValue(null!==A?parseFloat(A.toFixed(2))+" "+this.txtPt:" "),this.BorderSize=A}}else S==Asc.c_oAscStrokeType.STROKE_NONE?(this._state.StrokeWidth=0,this.BorderSize=this.cmbBorderSize.store.at(0).get(" value "),this.cmbBorderSize.setValue(this.BorderSize)):(this._state.StrokeWidth=null,this.BorderSize=-1,this.cmbBorderSize.setValue(null));this._state.StrokeType=S}if(this._state.StrokeBorderType!==w&&(this.BorderType=this._state.StrokeBorderType=w,this.cmbBorderType.setValue(w)),C=typeof this.FGColor.Color,v=typeof this._state.F
define(" documenteditor / main / app / view / MailMergeSaveDlg ",[" common / main / lib / component / Window "," common / main / lib / component / LoadMask "],function(){" use strict ";DE.Views.MailMergeSaveDlg=Common.UI.Window.extend(_.extend({initialize:function(t){var e={};_.extend(e,{title:this.textTitle,width:420,height:681,header:!0},t),this.template=['<div id=" id - mail - merge - folder - placeholder "></div>'].join(" "),e.tpl=_.template(this.template)(e),this.mergeFolderUrl=t.mergeFolderUrl||" ",this.mergedFileUrl=t.mergedFileUrl||" ",this.defFileName=t.defFileName||" ",this.mergeFolderUrl=this.mergeFolderUrl.replace(" { title } ",encodeURIComponent(this.defFileName)).replace(" { fileuri } ",encodeURIComponent(this.mergedFileUrl)),Common.UI.Window.prototype.initialize.call(this,e)},render:function(){Common.UI.Window.prototype.render.call(this),this.$window.find(" > . body ").css({height:" auto ",overflow:" hidden "});var t=document.createElement(" iframe ");t.width=" 100 % ",t.height=645,t.align=" top ",t.frameBorder=0,t.scrolling=" no ",t.onload=_.bind(this._onLoad,this),$(" # id - mail - merge - folder - placeholder ").append(t),this.loadMask=new Common.UI.LoadMask({owner:$(" # id - mail - merge - folder - placeholder ")}),this.loadMask.setTitle(this.textLoading),this.loadMask.show(),t.src=this.mergeFolderUrl;var e=this;this._eventfunc=function(t){e._onWindowMessage(t)},this._bindWindowEvents.call(this),this.on(" close ",function(t){e._unbindWindowEvents()})},_bindWindowEvents:function(){window.addEventListener?window.addEventListener(" message ",this._eventfunc,!1):window.attachEvent&&window.attachEvent(" onmessage ",this._eventfunc)},_unbindWindowEvents:function(){window.removeEventListener?window.removeEventListener(" message ",this._eventfunc):window.detachEvent&&window.detachEvent(" onmessage ",this._eventfunc)},_onWindowMessage:function(t){if(t&&window.JSON)try{this._onMessage.call(this,window.JSON.parse(t.data))}catch(t){}},_onMessage:function(t){t&&(_.isEmpty(t.error)||this.trigger(" mailmergeerror ",this,t.error),Common.NotificationCenter.trigger(" window : close ",this))},_onLoad:function(){this.loadMask&&this.loadMask.hide()},textTitle:" Folder for save ",textLoading:" Loading "},DE.Views.MailMergeSaveDlg||{}))}),define(" text ! documenteditor / main / app / template / MailMergeEmailDlg . template ",[],function(){return'<div id=" id - merge - email - dlg " class=" settings - panel active ">\r\n <div class=" inner - content ">\r\n <table cols=" 2 " style=" width : 100 % ; " cellpadding=" 10 ">\r\n <tr>\r\n <td class=" padding - small ">\r\n <label class=" input - label "><%= scope.textFrom %></label>\r\n <div id=" merge - email - dlg - from "></div>\r\n </td>\r\n <td class=" padding - small ">\r\n <label class=" input - label "><%= scope.textTo %></label>\r\n <div id=" merge - email - dlg - to "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=" 2 " class=" padding - small ">\r\n <label class=" input - label "><%= scope.textSubject %></label>\r\n <div id=" merge - email - dlg - subject " style=" width : 100 % ; "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=" 2 " class=" padding - small ">\r\n <label class=" input - label "><%= scope.textFormat %></label>\r\n <div id=" merge - email - dlg - format " style=" width : 170 px ; "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=" 2 " class=" padding - small ">\r\n <label id=" merge - email - dlg - lbl - filename " class=" input - label disabled "><%= scope.textFileName %></label>\r\n <div id=" merge - email - dlg - filename " style=" width : 100 % ; "></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=" 2 " class=" padding - small ">\r\n <label id=" merge - email - dlg - lbl - message " class=" input - label disabled "><%= scope.textMessage %></label>\r\n <textarea id=" merge - email - dlg - message " class=" disabled form - control
return '<table cols="1">\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.textTemplate %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="" id="textart-combo-template" style="width: 100%; height: 64px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.strFill %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="textart-combo-fill-src" style="width: 100%;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <div id="textart-panel-color-fill" class="padding-small" style="width: 100%;">\r\n <div id="textart-back-color-btn" style=""></div>\r\n </div>\r\n <div id="textart-panel-gradient-fill" class="settings-hidden padding-small" style="width: 100%;">\r\n <div style="height:80px;">\r\n <div style="display: inline-block;">\r\n <label class="input-label" style=""><%= scope.textStyle %></label>\r\n <div id="textart-combo-grad-type" style="width: 90px;"></div>\r\n </div>\r\n <div style="display: inline-block;float: right;">\r\n <label class="input-label" style=""><%= scope.textDirection %></label>\r\n <div id="textart-button-direction" style=""></div>\r\n </div>\r\n </div>\r\n <label class="header" style="display:block;margin-bottom: 5px;"><%= scope.textGradient %></label>\r\n <div style="display: inline-block; margin-top: 3px;">\r\n <div id="textart-slider-gradient" style="display: inline-block; vertical-align: middle;"></div>\r\n </div>\r\n <div id="textart-gradient-color-btn" style="display: inline-block;float: right;"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <div class="padding-small" id="textart-panel-transparent-fill" style="width: 100%;">\r\n <label class="header" style="display:block;"><%= scope.strTransparency %></label>\r\n <div style="display: inline-block; margin-top: 3px;">\r\n <label id="textart-lbl-transparency-start">0</label>\r\n <div id="textart-slider-transparency" style="display: inline-block;margin: 0 4px; vertical-align: middle;"></div>\r\n <label id="textart-lbl-transparency-end">100</label>\r\n </div>\r\n <div id="textart-spin-transparency" style="display: inline-block;float: right;"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <label class="header"><%= scope.strStroke %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div style="display:inline-block;width:100px;vertical-align: middle;">\r\n <label class="input-label" style=""><%= scope.strSize %></label>\r\n <div id="textart-combo-border-size" style="width: 93px;"></div>\r\n </div>\r\n <div style="display:inline-block;vertical-align: middle;">\r\n <label class="input-label" style=""><%= scope.strColor %></label>\r\n <div id="textart-border-color-btn" style=""></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div style="display:inline-block;width:100px;vertical-align: middle;">\r\n <label class="input-label" style=""><%= scope.strType %></label>\r\n <div id="textart-combo-border-type" style="width: 93px;"></div>\r\
;var n=this.application.getCollection("Common.Collections.TextArt").models,o=this.cmbTextArt.menuPicker.store.length;if(o>0&&o==n.length){var s=this.cmbTextArt.menuPicker.store.models;i.each(n,function(t,e){s[e].set("imageUrl",t.get("imageUrl"))})}else this.cmbTextArt.menuPicker.store.reset(n),this.cmbTextArt.menuPicker.store.length>0&&this.cmbTextArt.fillComboView(this.cmbTextArt.menuPicker.store.at(0))},onTextArtSelect:function(t,e){if(this.api&&!this._noApply){var i=new Asc.asc_TextArtProperties;i.asc_putStyle(e.get("data")),this.shapeprops.put_TextArtProperties(i),this.api.ImgApply(this.imgprops)}this.fireEvent("editcomplete",this)},fillTransform:function(t){if(t&&t.length>1&&t[1]){for(var e=[],n=t[1],o=0;o<n.length;o++){var s=n[o];s&&s.length>0&&i.each(s,function(t){e.push({imageUrl:t.Image,type:t.Type,selected:!1})})}this.cmbTransform.menuPicker.store.add(e),this.cmbTransform.menuPicker.store.length>0&&this.cmbTransform.fillComboView(this.cmbTransform.menuPicker.store.at(0),!0)}},onTransformSelect:function(t,e){if(this.api&&!this._noApply){var i=new Asc.asc_TextArtProperties;i.asc_putForm(e.get("type")),this.shapeprops.put_TextArtProperties(i),this.api.ImgApply(this.imgprops)}this.fireEvent("editcomplete",this)},UpdateThemeColors:function(){this.btnBackColor||(this.btnBorderColor=new Common.UI.ColorButton({style:"width:45px;",menu:new Common.UI.Menu({items:[{template:i.template(' < div id = "textart-border-color-menu" style = "width: 169px; height: 220px; margin: 10px;" > < / d i v > ' ) } , { t e m p l a t e : i . t e m p l a t e ( ' < a i d = " t e x t a r t - b o r d e r - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t h i s . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n B o r d e r C o l o r . r e n d e r ( e ( " # t e x t a r t - b o r d e r - c o l o r - b t n " ) ) , t h i s . b t n B o r d e r C o l o r . s e t C o l o r ( " 0 0 0 0 0 0 " ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . b t n B o r d e r C o l o r ) , t h i s . c o l o r s B o r d e r = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # t e x t a r t - b o r d e r - c o l o r - m e n u " ) , v a l u e : " 0 0 0 0 0 0 " } ) , t h i s . c o l o r s B o r d e r . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s B o r d e r S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # t e x t a r t - b o r d e r - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s B o r d e r , t h i s . b t n B o r d e r C o l o r ) ) , t h i s . b t n G r a d C o l o r = n e w C o m m o n . U I . C o l o r B u t t o n ( { s t y l e : " w i d t h : 4 5 p x ; " , m e n u : n e w C o m m o n . U I . M e n u ( { i t e m s : [ { t e m p l a t e : i . t e m p l a t e ( ' < d i v i d = " t e x t a r t - g r a d i e n t - c o l o r - m e n u " s t y l e = " w i d t h : 1 6 9 p x ; h e i g h t : 2 2 0 p x ; m a r g i n : 1 0 p x ; " > < / d i v > ' ) } , { t e m p l a t e : i . t e m p l a t e ( ' < a i d = " t e x t a r t - g r a d i e n t - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t h i s . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n G r a d C o l o r . r e n d e r ( e ( " # t e x t a r t - g r a d i e n t - c o l o r - b t n " ) ) , t h i s . b t n G r a d C o l o r . s e t C o l o r ( " 0 0 0 0 0 0 " ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . b t n G r a d C o l o r ) , t h i s . c o l o r s G r a d = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # t e x t a r t - g r a d i e n t - c o l o r - m e n u " ) , v a l u e : " 0 0 0 0 0 0 " } ) , t h i s . c o l o r s G r a d . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s G r a d i e n t S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # t e x t a r t - g r a d i e n t - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s G r a d , t h i s . b t n G r a d C o l o r ) ) , t h i s . b t n B a c k C o l o r = n e w C o m m o n . U I . C o l o r B u t t o n ( { s t y l e : " w i d t h : 4 5 p x ; " , m e n u : n e w C o m m o n . U I . M e n u ( { i t e m s : [ { t e m p l a t e : i . t e m p l a t e ( ' < d i v i d = " t e x t a r t - b a c k - c o l o r - m e n u " s t y l e = " w i d t h : 1 6 9 p x ; h e i g h t : 2 2 0 p x ; m a r g i n : 1 0 p x ; " > < / d i v > ' ) } , { t e m p l a t e : i . t e m p l a t e ( ' < a i d = " t e x t a r t - b a c k - c o l o r - n e w " s t y l e = " p a d d i n g - l e f t : 1 2 p x ; " > ' + t h i s . t e x t N e w C o l o r + " < / a > " ) } ] } ) } ) , t h i s . b t n B a c k C o l o r . r e n d e r ( e ( " # t e x t a r t - b a c k - c o l o r - b t n " ) ) , t h i s . b t n B a c k C o l o r . s e t C o l o r ( " t r a n s p a r e n t " ) , t h i s . l o c k e d C o n t r o l s . p u s h ( t h i s . b t n B a c k C o l o r ) , t h i s . c o l o r s B a c k = n e w C o m m o n . U I . T h e m e C o l o r P a l e t t e ( { e l : e ( " # t e x t a r t - b a c k - c o l o r - m e n u " ) , v a l u e : " t r a n s p a r e n t " , t r a n s p a r e n t : ! 0 } ) , t h i s . c o l o r s B a c k . o n ( " s e l e c t " , i . b i n d ( t h i s . o n C o l o r s B a c k S e l e c t , t h i s ) ) , e ( t h i s . e l ) . o n ( " c l i c k " , " # t e x t a r t - b a c k - c o l o r - n e w " , i . b i n d ( t h i s . a d d N e w C o l o r , t h i s , t h i s . c o l o r s B a c k , t h i s . b t n B a c k C o l o r ) ) ) , t h i s . c o l o r s B o r d e r . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) , t h i s . c o l o r s B a c k . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) , t h i s . c o l o r s G r a d . u p d a t e C o l o r s ( C o m m o n . U t i l s . T h e m e C o l o r . g e t E f f e c t C o l o r s ( ) , C o m m o n . U t i l s . T h e m e C o l o r . g e t S t a n d a r t C o l o r s ( ) ) } , _ p t 2 m m : f u n c t i o n ( t ) { r e t u r n 2 5 . 4 * t / 7 2 } , _ m m 2 p t : f u n c t i o n ( t ) { r e t u r n 7 2 * t / 2 5 . 4 } , S h o w H i d e E l e m : f u n c t i o n ( t ) { t h i s . F i l l C o l o r C o n t a i n e r . t o g g l e C l a s s ( " s e t t i n g s - h i d d e n " ,
; case "save-desktop" : this . api . asc _DownloadAs ( ) ; break ; case "saveas" : i ? n = ! 1 : this . clickSaveAsFormat ( void 0 ) ; break ; case "print" : this . api . asc _Print ( Common . Utils . isChrome || Common . Utils . isSafari || Common . Utils . isOpera ) ; break ; case "exit" : Common . NotificationCenter . trigger ( "goback" ) ; break ; case "edit" : this . getApplication ( ) . getController ( "Statusbar" ) . setStatusCaption ( this . requestEditRightsText ) , Common . Gateway . requestEditRights ( ) ; break ; case "new" : i ? n = ! 1 : this . onCreateNew ( void 0 , "blank" ) ; break ; case "history" : if ( ! this . leftMenu . panelHistory . isVisible ( ) ) if ( this . api . isDocumentModified ( ) ) { var o = this ; this . api . asc _stopSaving ( ) , Common . UI . warning ( { closable : ! 1 , width : 500 , title : this . notcriticalErrorTitle , msg : this . leavePageText , buttons : [ "ok" , "cancel" ] , primary : "ok" , callback : function ( t ) { "ok" == t ? ( o . api . asc _undoAllChanges ( ) , o . showHistory ( ) ) : o . api . asc _continueSaving ( ) } } ) } else this . showHistory ( ) ; break ; case "rename" : var o = this , s = o . api . asc _getDocumentName ( ) ; new Common . Views . RenameDialog ( { filename : s , handler : function ( t , e ) { "ok" != t || _ . isEmpty ( e . trim ( ) ) || s === e . trim ( ) || Common . Gateway . requestRename ( e ) , Common . NotificationCenter . trigger ( "edit:complete" , o ) } } ) . show ( ) ; break ; default : n = ! 1 } n && ( t . hide ( ) , this . leftMenu . btnFile . toggle ( ! 1 , ! 0 ) ) } , clickSaveAsFormat : function ( t , e ) { t ? e == Asc . c _oAscFileType . TXT ? Common . UI . warning ( { closable : ! 1 , title : this . notcriticalErrorTitle , msg : this . warnDownloadAs , buttons : [ "ok" , "cancel" ] , callback : _ . bind ( function ( i ) { "ok" == i && ( this . api . asc _DownloadAs ( e ) , t . hide ( ) , this . leftMenu . btnFile . toggle ( ! 1 , ! 0 ) ) } , this ) } ) : ( this . api . asc _DownloadAs ( e ) , t . hide ( ) , this . leftMenu . btnFile . toggle ( ! 1 , ! 0 ) ) : this . api . asc _DownloadOrigin ( ) } , applySettings : function ( t ) { var e = Common . localStorage . getItem ( "de-settings-inputmode" ) ; if ( this . api . SetTextBoxInputMode ( 1 == parseInt ( e ) ) , this . mode . isEdit && ! this . mode . isOffline && this . mode . canCoAuthoring ) { e = Common . localStorage . getItem ( "de-settings-coauthmode" ) ; var i = null === e || 1 == parseInt ( e ) ; switch ( this . api . asc _SetFastCollaborative ( i ) , e = Common . localStorage . getItem ( i ? "de-settings-showchanges-fast" : "de-settings-showchanges-strict" ) ) { case "all" : e = Asc . c _oAscCollaborativeMarksShowType . All ; break ; case "none" : e = Asc . c _oAscCollaborativeMarksShowType . None ; break ; case "last" : e = Asc . c _oAscCollaborativeMarksShowType . LastChanges ; break ; default : e = i ? Asc . c _oAscCollaborativeMarksShowType . None : Asc . c _oAscCollaborativeMarksShowType . LastChanges } this . api . SetCollaborativeMarksShowType ( e ) } e = Common . localStorage . getItem ( "de-settings-livecomment" ) ; var n = Common . localStorage . getItem ( "de-settings-resolvedcomment" ) ; switch ( null === e || 0 != parseInt ( e ) ? this . api . asc _showComments ( ! ( null !== n && 0 == parseInt ( n ) ) ) : this . api . asc _hideComments ( ) , e = Common . localStorage . getItem ( "de-settings-fontrender" ) ) { case "1" : this . api . SetFontRenderingMode ( 1 ) ; break ; case "2" : this . api . SetFontRenderingMode ( 2 ) ; break ; case "0" : this . api . SetFontRenderingMode ( 3 ) } this . mode . isEdit && ( e = Common . localStorage . getItem ( "de-settings-autosave" ) , this . api . asc _setAutoSaveGap ( parseInt ( e ) ) , e = Common . localStorage . getItem ( "de-settings-spellcheck" ) , this . api . asc _setSpellCheck ( null === e || 1 == parseInt ( e ) ) ) , e = Common . localStorage . getItem ( "de-settings-showsnaplines" ) , this . api . put _ShowSnapLines ( null === e || 1 == parseInt ( e ) ) , t . hide ( ) , this . leftMenu . btnFile . toggle ( ! 1 , ! 0 ) } , onCreateNew : function ( t , e ) { if ( ! 0 === this . mode . nativeApp ) this . api . OpenNewDocument ( "blank" == e ? "" : e ) ; else { var i = window . open ( "blank" == e ? this . mode . createUrl : e , "_blank" ) ; i && i . focus ( ) } t && ( t . hide ( ) , this . leftMenu . btnFile . toggle ( ! 1 , ! 0 ) ) } , onOpenRecent : function ( t , e ) { t && ( t . hide ( ) , this . leftMenu . btnFile . toggle ( ! 1 , ! 0 ) ) ; var i = window . open ( e ) ; i && i . focus ( ) , Common . component . Analytics . trackEvent ( "Open Recent" ) } , clickToolbarSettings : function ( t ) { this . leftMenu . btnFile . pressed && "opts" == this . leftMenu . btnFile . panel . active ? this . leftMenu . close ( ) : this . leftMenu . showMenu ( "file:opts" ) } , clickStatusbarUsers : function ( ) { this . leftMenu . btnFile . panel . panels . rights . changeAccessRights ( ) } , onHideChat : function ( ) { $ ( this . leftMenu . btnChat . el ) . blur ( ) , Common . NotificationCenter . trigger ( "layout:changed" , "leftmenu" ) } , onQuerySearch : function ( t , e , i ) { if ( i . textsearch && i . textsearch . length && ! this . api . asc _findText ( i . textsearch , "back" != t , i . matchcase , i . matchword ) ) { var n = this ; Co
t && ! 1 === t . result && Common . UI . error ( { title : this . criticalErrorTitle , msg : _ . isEmpty ( t . message ) ? this . errorProcessSaveResult : t . message } ) } , onProcessRightsChange : function ( t ) { if ( t && ! 1 === t . enabled ) { var e = this , i = this . _state . lostEditingRights ; this . _state . lostEditingRights = ! this . _state . lostEditingRights , this . api . asc _coAuthoringDisconnect ( ) , this . getApplication ( ) . getController ( "LeftMenu" ) . leftMenu . getMenu ( "file" ) . panels . rights . onLostEditRights ( ) , Common . NotificationCenter . trigger ( "api:disconnect" ) , i || Common . UI . warning ( { title : this . notcriticalErrorTitle , maxwidth : 600 , msg : _ . isEmpty ( t . message ) ? this . warnProcessRightsChange : t . message , callback : function ( ) { e . _state . lostEditingRights = ! 1 , e . onEditComplete ( ) } } ) } } , onDownloadAs : function ( ) { this . _state . isFromGatewayDownloadAs = ! 0 ; var t = /^(?:(pdf|djvu|xps))$/ . exec ( this . document . fileType ) ; t && "string" == typeof t [ 1 ] ? this . api . asc _DownloadOrigin ( ! 0 ) : this . api . asc _DownloadAs ( Asc . c _oAscFileType . DOCX , ! 0 ) } , onProcessMouse : function ( t ) { if ( "mouseup" == t . type ) { var e = document . getElementById ( "editor_sdk" ) ; if ( e ) { var i = e . getBoundingClientRect ( ) ; this . api . OnMouseUp ( t . x - i . left , t . y - i . top ) } } } , onRefreshHistory : function ( t ) { if ( this . loadMask && this . loadMask . hide ( ) , t . data . error || ! t . data . history ) { var e = this . getApplication ( ) . getCollection ( "Common.Collections.HistoryVersions" ) ; e && e . size ( ) > 0 && e . each ( function ( t ) { t . set ( "canRestore" , ! 1 ) } ) , Common . UI . alert ( { closable : ! 1 , title : this . notcriticalErrorTitle , msg : t . data . error ? t . data . error : this . txtErrorLoadHistory , iconCls : "warn" , buttons : [ "ok" ] , callback : _ . bind ( function ( t ) { this . onEditComplete ( ) } , this ) } ) } else { this . api . asc _coAuthoringDisconnect ( ) , this . getApplication ( ) . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) . setCanRename ( ! 1 ) , this . getApplication ( ) . getController ( "LeftMenu" ) . getView ( "LeftMenu" ) . showHistory ( ) , this . disableEditing ( ! 0 ) ; var i = t . data . history , e = this . getApplication ( ) . getCollection ( "Common.Collections.HistoryVersions" ) , n = null ; if ( e ) { var o , s , a = [ ] , r = - 1 , l = - 1 , c = [ ] , d = "" , h = this . getApplication ( ) . getCollection ( "Common.Collections.HistoryUsers" ) , p = null , m = 0 ; for ( o = i . length - 1 ; o >= 0 ; o -- ) if ( s = i [ o ] , void 0 !== s . versionGroup && null !== s . versionGroup || ( s . versionGroup = s . version ) , s ) { if ( s . user || ( s . user = { } ) , d = o > 0 && i [ o - 1 ] ? i [ o - 1 ] . key : s . key + "0" , p = h . findUser ( s . user . id ) , p || ( p = new Common . Models . User ( { id : s . user . id , username : s . user . name , colorval : Asc . c _oAscArrUserColors [ m ] , color : this . generateUserColor ( Asc . c _oAscArrUserColors [ m ++ ] ) } ) , h . add ( p ) ) , a . push ( new Common . Models . HistoryVersion ( { version : s . versionGroup , revision : s . version , userid : s . user . id , username : s . user . name , usercolor : p . get ( "color" ) , created : s . created , docId : s . key , markedAsVersion : r !== s . versionGroup , selected : t . data . currentVersion == s . version , canRestore : this . appOptions . canHistoryRestore && o < i . length - 1 , isExpanded : ! 0 , serverVersion : s . serverVersion } ) ) , t . data . currentVersion == s . version && ( n = a [ a . length - 1 ] ) , r = s . versionGroup , l !== s . version ) { for ( l = s . version , c . reverse ( ) , g = 0 ; g < c . length ; g ++ ) a [ a . length - g - 2 ] . set ( "arrColors" , c ) ; c = [ ] } c . push ( p . get ( "colorval" ) ) ; var u , g , b = s . changes ; if ( b && b . length > 0 ) { if ( a [ a . length - 1 ] . set ( "docIdPrev" , d ) , ! _ . isEmpty ( s . serverVersion ) && s . serverVersion == this . appOptions . buildVersion ) for ( a [ a . length - 1 ] . set ( "changeid" , b . length - 1 ) , a [ a . length - 1 ] . set ( "hasChanges" , b . length > 1 ) , g = b . length - 2 ; g >= 0 ; g -- ) u = b [ g ] , p = h . findUser ( u . user . id ) , p || ( p = new Common . Models . User ( { id : u . user . id , username : u . user . name , colorval : Asc . c _oAscArrUserColors [ m ] , color : this . generateUserColor ( Asc . c _oAscArrUserColors [ m ++ ] ) } ) , h . add ( p ) ) , a . push ( new Common . Models . HistoryVersion ( { version : s . versionGroup , revision : s . version , changeid : g , userid : u . user . id , username : u . user . name , usercolor : p . get ( "color" ) , created : u . created , docId : s . key , docIdPrev : d , selected : ! 1 , canRestore : this . appOptions . canHistoryRestore , isRevision : ! 1 , isVisible : ! 0 , serverVersion : s . serverVersion } ) ) , c . push ( p . get ( "colorval" ) ) } else 0 == o && 1 == i . length && a [ a . length - 1 ] . set ( "docId" , s . key + "1" ) } if ( c . length > 0 ) { for ( c . reverse ( ) , g = 0 ; g < c . length ; g ++ ) a [ a . length - g - 1 ] . set ( "arrColors" , c ) ; c = [ ] } e . reset ( a ) , null === n && e . size ( ) > 0 && ( n = e . at ( 0 ) , n . set ( "selected" , ! 0 ) ) , n && this . getApplication ( ) . getController ( "Common.Controllers.History" ) . onSelectRevision ( null , null , n ) } } } , generateUserColor : function ( t ) { return "
;return this.api.asc_stopSaving(),this.continueSavingTimer=window.setTimeout(function(){t.api.asc_continueSaving()},500),this.leavePageText}},onUnload:function(){this.continueSavingTimer&&clearTimeout(this.continueSavingTimer)},hidePreloader:function(){this._state.customizationDone||(this._state.customizationDone=!0,this.appOptions.customization&&(this.appOptions.isDesktopApp?this.appOptions.customization.about=!1:this.appOptions.canBrandingExt||(this.appOptions.customization.about=!0)),Common.Utils.applyCustomization(this.appOptions.customization,mapCustomizationElements),this.appOptions.canBrandingExt&&(Common.Utils.applyCustomization(this.appOptions.customization,mapCustomizationExtElements),Common.Utils.applyCustomizationPlugins(this.UICustomizePlugins))),Common.NotificationCenter.trigger(" layout : changed "," main "),$(" # loading - mask ").hide().remove()},onDownloadUrl:function(t){this._state.isFromGatewayDownloadAs&&Common.Gateway.downloadAs(t),this._state.isFromGatewayDownloadAs=!1},onUpdateVersion:function(t){var e=this;e.needToUpdateVersion=!0,e.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction,LoadingDocument),Common.UI.warning({title:e.titleUpdateVersion,msg:this.errorUpdateVersion,callback:function(){_.defer(function(){Common.Gateway.updateVersion(),t&&t.call(e),e.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction,LoadingDocument)})}})},onServerVersion:function(t){return!1},onCollaborativeChanges:function(){this._state.hasCollaborativeChanges||(this._state.hasCollaborativeChanges=!0,this.appOptions.isEdit&&this.getApplication().getController(" Statusbar ").setStatusCaption(this.txtNeedSynchronize,!0))},synchronizeChanges:function(){this.getApplication().getController(" Statusbar ").synchronizeChanges(),this.getApplication().getController(" DocumentHolder ").getView(" DocumentHolder ").hideTips(),this.getApplication().getController(" Toolbar ").getView(" Toolbar ").synchronizeChanges(),this._state.hasCollaborativeChanges=!1},initNames:function(){this.shapeGroupNames=[this.txtBasicShapes,this.txtFiguredArrows,this.txtMath,this.txtCharts,this.txtStarsRibbons,this.txtCallouts,this.txtButtons,this.txtRectangles,this.txtLines]},fillAutoShapes:function(t,e){if(!_.isEmpty(e)&&!_.isEmpty(t)&&e.length==t.length){var i=this,n=[],o=this.getCollection(" ShapeGroups ");o.reset();t.length;_.each(t,function(t,o){var s=new Backbone.Collection([],{model:DE.Models.ShapeModel}),a=e[o].length>18?7:6,r=35*Math.ceil(e[o].length/a)+3,l=30*a;_.each(e[o],function(t,e){s.add({imageUrl:t.Image,data:{shapeType:t.Type},tip:i.textShape+" "+(e+1),allowSelected:!0,selected:!1})}),n.push({groupName:i.shapeGroupNames[o],groupStore:s,groupWidth:l,groupHeight:r})}),o.add(n),setTimeout(function(){i.getApplication().getController(" Toolbar ").fillAutoShapes()},50)}},fillTextArt:function(t){if(!_.isEmpty(t)){var e=this,i=[],n=this.getCollection(" Common . Collections . TextArt ");_.each(t,function(t,e){i.push({imageUrl:t,data:e,allowSelected:!0,selected:!1})}),n.reset(i),setTimeout(function(){e.getApplication().getController(" Toolbar ").fillTextArt()},50),setTimeout(function(){e.getApplication().getController(" RightMenu ").fillTextArt()},50)}},updateThemeColors:function(){var t=this;setTimeout(function(){t.getApplication().getController(" RightMenu ").UpdateThemeColors()},50),setTimeout(function(){t.getApplication().getController(" DocumentHolder ").getView(" DocumentHolder ").updateThemeColors()},50),setTimeout(function(){t.getApplication().getController(" Toolbar ").updateThemeColors()},50)},onSendThemeColors:function(t,e){Common.Utils.ThemeColor.setColors(t,e),window.styles_loaded&&(this.updateThemeColors(),this.fillTextArt(this.api.asc_getTextArtPreviews()))},loadLanguages:function(t){var e,i=[];_.each(t,function(t,n,o){t=parseInt(t),e=Common.util.LanguageInfo.getLocalLanguageName(t),i.push({title:e[1],tip:e[0],code:t})},this),i.sort(function(t,e){return t.tip<e.tip?-1:t.tip>e.tip?1:0}),this.languages=i,window.styles_loaded&&this.setLanguages()},setLanguages:function(){this.languages&&this.languages.length>0&&(this.getApplication().getController(" DocumentHolder ").
Common.localStorage.setItem(" de - settings - fontrender ",this.cmbFontRender.getValue()),Common.localStorage.setItem(" de - settings - unit ",this.cmbUnit.getValue()),Common.localStorage.setItem(" de - settings - autosave ",this.chAutosave.isChecked()?1:0),this.mode.canForcesave&&Common.localStorage.setItem(" de - settings - forcesave ",this.chForcesave.isChecked()?1:0),Common.localStorage.setItem(" de - settings - spellcheck ",this.chSpell.isChecked()?1:0),Common.localStorage.setItem(" de - settings - showsnaplines ",this.chAlignGuides.isChecked()?1:0),Common.localStorage.save(),this.menu&&(this.menu.fireEvent(" settings : apply ",[this.menu]),this._oldUnits!==this.cmbUnit.getValue()&&Common.NotificationCenter.trigger(" settings : unitschanged ",this))},fillShowChanges:function(t){if(t&&3==this.cmbShowChanges.store.length||!t&&2==this.cmbShowChanges.store.length){var e=[{value:" none ",displayValue:this.txtNone},{value:" all ",displayValue:this.txtAll}];t||e.push({value:" last ",displayValue:this.txtLast}),this.cmbShowChanges.store.reset(e)}},onSelectCoAuthMode:function(t){this.lblCoAuthMode.text(t.descValue),this.fillShowChanges(1==t.value),this.cmbShowChanges.setValue(1==t.value?" none ":" last ")},strLiveComment:" Turn on option ",strInputMode:" Turn on hieroglyphs ",strZoom:" Default Zoom Value ",strShowChanges:" Realtime Collaboration Changes ",txtAll:" View All ",txtNone:" View Nothing ",txtLast:" View Last ",txtLiveComment:" Live Commenting ",okButtonText:" Apply ",txtInput:" Alternate Input ",txtWin:" as Windows ",txtMac:" as OS X ",txtNative:" Native ",strFontRender:" Font Hinting ",strUnit:" Unit of Measurement ",txtCm:" Centimeter ",txtPt:" Point ",textAutoSave:" Autosave ",strAutosave:" Turn on autosave ",txtSpellCheck:" Spell Checking ",strSpellCheckMode:" Turn on spell checking option ",textAlignGuides:" Alignment Guides ",strAlignGuides:" Turn on alignment guides ",strCoAuthMode:" Co - editing mode ",strCoAuthModeDescFast:" Other users will see your changes at once ",strCoAuthModeDescStrict:" You will need to accept changes before you can see them ",strFast:" Fast ",strStrict:" Strict ",textAutoRecover:" Autorecover ",strAutoRecover:" Turn on autorecover ",txtInch:" Inch ",txtFitPage:" Fit to Page ",txtFitWidth:" Fit to Width ",textForceSave:" Save to Server ",strForcesave:" Always save to server ( otherwise save to server on document close ) ",strResolvedComment:" Turn on display of the resolved comments "},DE.Views.FileMenuPanels.Settings||{})),DE.Views.FileMenuPanels.RecentFiles=Common.UI.BaseView.extend({el:" # panel - recentfiles ",menu:void 0,template:_.template(['<div id=" id - recent - view " style=" margin : 20 px 0 ; "></div>'].join(" ")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,arguments),this.menu=t.menu,this.recent=t.recent},render:function(){return $(this.el).html(this.template()),this.viewRecentPicker=new Common.UI.DataView({el:$(" # id - recent - view "),store:new Common.UI.DataViewStore(this.recent),itemTemplate:_.template(['<div class=" recent - wrap ">','<div class=" recent - icon "></div>','<div class=" file - name "><%= Common.Utils.String.htmlEncode(title) %></div>','<div class=" file - info "><%= Common.Utils.String.htmlEncode(folder) %></div>'," < / d i v > " ] . j o i n ( " " ) ) } ) , t h i s . v i e w R e c e n t P i c k e r . o n ( " i t e m : c l i c k " , _ . b i n d ( t h i s . o n R e c e n t F i l e C l i c k , t h i s ) ) , _ . i s U n d e f i n e d ( t h i s . s c r o l l e r ) & & ( t h i s . s c r o l l e r = n e w C o m m o n . U I . S c r o l l e r ( { e l : $ ( t h i s . e l ) , s u p p r e s s S c r o l l X : ! 0 } ) ) , t h i s } , o n R e c e n t F i l e C l i c k : f u n c t i o n ( t , e , i ) { t h i s . m e n u & & t h i s . m e n u . f i r e E v e n t ( " r e c e n t : o p e n " , [ t h i s . m e n u , i . g e t ( " u r l " ) ] ) } } ) , D E . V i e w s . F i l e M e n u P a n e l s . C r e a t e N e w = C o m m o n . U I . B a s e V i e w . e x t e n d ( _ . e x t e n d ( { e l : " # p a n e l - c r e a t e n e w " , m e n u : v o i d 0 , e v e n t s : f u n c t i o n ( ) { r e t u r n { " c l i c k . b l a n k - d o c u m e n t - b t n " : _ . b i n d ( t h i s . _ o n B l a n k D o c u m e n t , t h i s ) , " c l i c k . t h u m b - l i s t . t h u m b - w r a p " : _ . b i n d ( t h i s . _ o n D o c u m e n t T e m p l a t e , t h i s ) } } , t e m p l a t e : _ . t e m p l a t e ( [ ' < h 3 s t y l e = " m a r g i n - t o p : 2 0 p x ; " > < % = s c o p e . f r o m B l a n k T e x t % > < / h 3 > < h r n o s h a d e / > ' , ' < d i v c l a s s = " b l a n k - d o c u m e n t " > ' , ' < d i v c l a s s = " b l a n k - d o c u m e n t - b t n i m g - d o c - f o r m a t " > < / d i v > ' , ' < d i v c l a s s = " b l a n k - d o c u m e n t - i n f o " > ' , " < h 3 > < % = s c o p e . n e w D o c u m e n t T e x t % > < / h 3 > " , " < % = s c o p e . n e w D e s c r i p t i o n T e x t % > " , " < / d i v > " , " < / d i v > " , " < h 3 > < % = s c o p e . f r o m T e m p l a t e T e x t % > < / h 3 > < h r n o s h a d e / > " , ' < d i v c l a s s = " t h u m b - l i s t " > ' , " < % _ . e a c h ( d o c
n . subEditStrings [ e ] && delete n . subEditStrings [ e ] , n . subEditStrings [ e + "-R" ] && delete n . subEditStrings [ e + "-R" ] , s = l . get ( "replys" ) , s && s . length && s . forEach ( function ( e ) { ( a = t ( ) ) && ( a . asc _putText ( e . get ( "reply" ) ) , a . asc _putTime ( n . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putUserId ( e . get ( "userid" ) ) , a . asc _putUserName ( e . get ( "username" ) ) , r . asc _addReply ( a ) ) } ) , n . api . asc _changeComment ( e , r ) , ! 0 } return ! 1 } , onChangeReplyComment : function ( e , i , n ) { if ( n && n . length > 0 ) { var o = this , s = null , a = null , r = t ( ) , l = o . findComment ( e ) ; if ( r && l ) return r . asc _putText ( l . get ( "comment" ) ) , r . asc _putQuoteText ( l . get ( "quote" ) ) , r . asc _putTime ( o . utcDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putOnlyOfficeTime ( o . ooDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putUserId ( l . get ( "userid" ) ) , r . asc _putUserName ( l . get ( "username" ) ) , r . asc _putSolved ( l . get ( "resolved" ) ) , _ . isUndefined ( r . asc _putDocumentFlag ) || r . asc _putDocumentFlag ( l . get ( "unattached" ) ) , s = l . get ( "replys" ) , s && s . length && s . forEach ( function ( e ) { ( a = t ( ) ) && ( e . get ( "id" ) !== i || _ . isUndefined ( n ) ? ( a . asc _putText ( e . get ( "reply" ) ) , a . asc _putUserId ( e . get ( "userid" ) ) , a . asc _putUserName ( e . get ( "username" ) ) ) : ( a . asc _putText ( n ) , a . asc _putUserId ( o . currentUserId ) , a . asc _putUserName ( o . currentUserName ) ) , a . asc _putTime ( o . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( o . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , r . asc _addReply ( a ) ) } ) , o . api . asc _changeComment ( e , r ) , ! 0 } return ! 1 } , onAddReplyComment : function ( e , i ) { if ( i . length > 0 ) { var n = this , o = null , s = null , a = null , r = t ( ) , l = n . findComment ( e ) ; if ( r && l && ( o = l . get ( "uid" ) , o && ( n . subEditStrings [ o ] && delete n . subEditStrings [ o ] , n . subEditStrings [ o + "-R" ] && delete n . subEditStrings [ o + "-R" ] , l . set ( "showReplyInPopover" , ! 1 ) ) , r . asc _putText ( l . get ( "comment" ) ) , r . asc _putQuoteText ( l . get ( "quote" ) ) , r . asc _putTime ( n . utcDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( l . get ( "time" ) ) ) ) , r . asc _putUserId ( l . get ( "userid" ) ) , r . asc _putUserName ( l . get ( "username" ) ) , r . asc _putSolved ( l . get ( "resolved" ) ) , _ . isUndefined ( r . asc _putDocumentFlag ) || r . asc _putDocumentFlag ( l . get ( "unattached" ) ) , s = l . get ( "replys" ) , s && s . length && s . forEach ( function ( e ) { ( a = t ( ) ) && ( a . asc _putText ( e . get ( "reply" ) ) , a . asc _putTime ( n . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , a . asc _putUserId ( e . get ( "userid" ) ) , a . asc _putUserName ( e . get ( "username" ) ) , r . asc _addReply ( a ) ) } ) , a = t ( ) ) ) return a . asc _putText ( i ) , a . asc _putTime ( n . utcDateToString ( new Date ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ) ) , a . asc _putUserId ( n . currentUserId ) , a . asc _putUserName ( n . currentUserName ) , r . asc _addReply ( a ) , n . api . asc _changeComment ( e , r ) , ! 0 } return ! 1 } , onRemoveReplyComment : function ( e , i ) { if ( ! _ . isUndefined ( e ) && ! _ . isUndefined ( i ) ) { var n = this , o = null , s = null , a = t ( ) , r = n . findComment ( e ) ; if ( a && r ) return a . asc _putText ( r . get ( "comment" ) ) , a . asc _putQuoteText ( r . get ( "quote" ) ) , a . asc _putTime ( n . utcDateToString ( new Date ( r . get ( "time" ) ) ) ) , a . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( r . get ( "time" ) ) ) ) , a . asc _putUserId ( r . get ( "userid" ) ) , a . asc _putUserName ( r . get ( "username" ) ) , a . asc _putSolved ( r . get ( "resolved" ) ) , _ . isUndefined ( a . asc _putDocumentFlag ) || a . asc _putDocumentFlag ( r . get ( "unattached" ) ) , o = r . get ( "replys" ) , o && o . length && o . forEach ( function ( e ) { e . get ( "id" ) !== i && ( s = t ( ) ) && ( s . asc _putText ( e . get ( "reply" ) ) , s . asc _putTime ( n . utcDateToString ( new Date ( e . get ( "time" ) ) ) ) , s . asc _putOnlyOfficeTime ( n . ooDateToString ( new Date ( e . get ( "time" ) ) ) ) , s . asc _putUserId ( e . get ( "userid" ) ) , s . asc _putUserName ( e . get ( "username" ) ) , a . asc _addReply ( s ) ) } ) , n . api . asc _changeComment ( e , a ) , ! 0 } return ! 1 } , onShowEditReplyComment : function ( t , e , i ) { var n , o , s , a ; if ( ! _ . isUndefined ( t ) && ! _ . isUndefined ( e ) ) if ( i ) { if ( ( o = this . popoverComments . findWhere ( { uid : t } ) ) && ( s = o . get ( "replys" ) , a = _ . clone ( o . get ( "replys" ) ) ) ) for ( n = 0 ; n < a . length ; ++ n ) if ( e === a [ n ] . get ( "id" ) ) return a [ n ] . set ( "editTextInPopover" , ! 0 ) , s . length = 0 , o . set ( "replys" , a ) , ! 0 } else if ( ( o = this . collection . findWhere ( { uid : t } ) ) && ( s = o . get ( "replys" ) , a = _ . clone ( o . get ( "replys" ) ) ) ) for ( n = 0 ; n < a . length ; ++ n ) if ( e === a [ n ] . get ( "id" ) ) return a [ n ] . set ( "editText" , ! 0 ) , s . length = 0 , o . set ( "replys" , a ) , ! 0 ; return ! 1 } , onUpdateFilter : function ( t , e ) { if ( t ) { this . f
void 0 === Common ) var Common = { } ; if ( Common . Controllers = Common . Controllers || { } , define ( "common/main/lib/controller/ExternalDiagramEditor" , [ "core" , "common/main/lib/view/ExternalDiagramEditor" ] , function ( ) { "use strict" ; Common . Controllers . ExternalDiagramEditor = Backbone . Controller . extend ( _ . extend ( function ( ) { var t = "en" , e = void 0 , i = "" , n = null , o = function ( ) { n = new DocsAPI . DocEditor ( "id-diagram-editor-placeholder" , { width : "100%" , height : "100%" , documentType : "spreadsheet" , document : { url : "_chart_" , permissions : { edit : ! 0 , download : ! 1 } } , editorConfig : { mode : "editdiagram" , targetApp : i , lang : t , canCoAuthoring : ! 1 , canBackToFolder : ! 1 , canCreateNew : ! 1 , customization : e , user : { id : "uid-" + Date . now ( ) } } , events : { onAppReady : function ( ) { } , onDocumentStateChange : function ( ) { } , onError : function ( ) { } , onInternalMessage : _ . bind ( this . onInternalMessage , this ) } } ) , Common . Gateway . on ( "processmouse" , _ . bind ( this . onProcessMouse , this ) ) } ; return { views : [ "Common.Views.ExternalDiagramEditor" ] , initialize : function ( ) { this . addListeners ( { "Common.Views.ExternalDiagramEditor" : { setchartdata : _ . bind ( this . setChartData , this ) , drag : _ . bind ( function ( t , e ) { n && n . serviceCommand ( "window:drag" , "start" == e ) } , this ) , show : _ . bind ( function ( t ) { var e = this . diagramEditorView . getHeight ( ) , i = Common . Utils . innerHeight ( ) ; ( i > e && e < 700 || i < e ) && ( e = Math . min ( i , 700 ) , this . diagramEditorView . setHeight ( e ) ) , n ? ( n . serviceCommand ( "setAppDisabled" , ! 1 ) , this . needDisableEditing && this . diagramEditorView . _isExternalDocReady && this . onDiagrammEditingDisabled ( ) , n . attachMouseEvents ( ) ) : o . apply ( this ) , this . isExternalEditorVisible = ! 0 , this . isHandlerCalled = ! 1 } , this ) , hide : _ . bind ( function ( t ) { n && ( n . detachMouseEvents ( ) , this . isExternalEditorVisible = ! 1 ) } , this ) } } ) } , onLaunch : function ( ) { this . diagramEditorView = this . createView ( "Common.Views.ExternalDiagramEditor" , { handler : _ . bind ( this . handler , this ) } ) } , setApi : function ( t ) { return this . api = t , this . api . asc _registerCallback ( "asc_onCloseChartEditor" , _ . bind ( this . onDiagrammEditingDisabled , this ) ) , this } , handler : function ( t , e ) { this . isHandlerCalled || ( this . isHandlerCalled = ! 0 , n && n . serviceCommand ( "queryClose" , { mr : t } ) ) } , setChartData : function ( ) { n && n . serviceCommand ( "setChartData" , this . diagramEditorView . _chartData ) , this . diagramEditorView . _chartData = null } , loadConfig : function ( n ) { n && n . config && ( n . config . lang && ( t = n . config . lang ) , n . config . customization && ( e = n . config . customization ) , n . config . targetApp && ( i = n . config . targetApp ) ) } , onDiagrammEditingDisabled : function ( ) { if ( ! this . diagramEditorView . isVisible ( ) || ! this . diagramEditorView . _isExternalDocReady ) return void ( this . needDisableEditing = ! 0 ) ; this . diagramEditorView . setControlsDisabled ( ! 0 ) , Common . UI . alert ( { title : this . warningTitle , msg : this . warningText , iconCls : "warn" , buttons : [ "ok" ] , callback : _ . bind ( function ( t ) { this . setControlsDisabled ( ! 1 ) , this . diagramEditorView . hide ( ) } , this ) } ) , this . needDisableEditing = ! 1 } , onInternalMessage : function ( t ) { var e = t . data ; if ( this . diagramEditorView ) if ( "documentReady" == e . type ) this . diagramEditorView . _isExternalDocReady = ! 0 , this . diagramEditorView . _chartData && ( n && n . serviceCommand ( "setChartData" , this . diagramEditorView . _chartData ) , this . diagramEditorView . _chartData = null ) , this . needDisableEditing && this . onDiagrammEditingDisabled ( ) ; else if ( "chartDataReady" == e . type ) void 0 === this . needDisableEditing && this . diagramEditorView . setControlsDisabled ( ! 1 ) ; else if ( "shortcut" == e . type ) "escape" == e . data . key && this . diagramEditorView . hide ( ) ; else if ( "canClose" == e . type ) ! 0 === e . data . answer && ( n && ( n . serviceCommand ( "setAppDisabled" , ! 0 ) , n . serviceCommand ( "ok" == e . data . mr ? "getChartData" : "clearChartData" ) ) , this . diagramEditorView . hide ( ) ) , this . isHandlerCalled = ! 1 ; else if ( "processMouse" == e . type ) { if ( "mouse:up" == e . data . event ) this . diagramEditorView . binding . dragStop ( ) ; else if ( "mouse:move" == e . data . event ) { var i = parseInt ( this . diagramEditorView . $window . css ( "left" ) ) + e . data . pagex , o = parseInt ( this . diagramEditorView . $window . css ( "top" ) ) + e . data . pagey + 34 ; this . diagramEditorView . binding . drag ( { pageX : i , pageY : o } ) } } else this . diagramEditorView . fireEvent ( "internalmessage" , this . diagramEditorView , e ) } , onProcessMouse : function ( t ) { "mouseup" == t . type && this . isExternalEditorVisible && n && n . serviceCommand ( "processmouse" , t ) } , warningTitle : "Warning" , warningText : " The object is disabled b