2018-01-25 11:06:58 +01:00
/*
2020-01-05 20:32:34 +01:00
* Copyright (C) Ascensio System SIA 2012-2020. All rights reserved
2018-01-25 11:06:58 +01:00
*
2020-01-05 20:32:34 +01:00
* https://www.onlyoffice.com/
2018-01-25 11:06:58 +01:00
*
* Version: 0.0.0 (build:0)
*/
2020-01-05 20:32:34 +01:00
function onDropDownKeyDown ( t ){ var e = $ ( this ), i = e . parent (), n = jQuery . Event ( "keydown.before.bs.dropdown" ,{ keyCode : t . keyCode }), o = jQuery . Event ( "keydown.after.bs.dropdown" ,{ keyCode : t . keyCode }); 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 = t . find ( "> li:not(.divider):not(.disabled):visible ul.internal-menu" ); e . length > 0 && i . length < 1 && n . length < 1 && e . index ( e . filter ( ":focus" )) < 0 && e . eq ( 0 ). 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" )), a = s ; if ( 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" ), a !== s ){ var l = o . eq ( a ). parent (). data ( "bs.tooltip" ); l && l . hide (), l = o . eq ( s ). parent (). data ( "bs.tooltip" ), l && l . show ()}}}}} 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 )}})} function toggle (){ $ ( ".dropdown-backdrop" ). remove ()} 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 , l = n . toString , r = n . hasOwnProperty , c = Array . isArray , h = Object . keys , d = Object . create , p = function (){}, u = function ( t ){ return t instanceof u ? t : this instanceof u ? void ( this . _wrapped = t ) : new u ( t )}; "undefined" == typeof exports || exports . nodeType ? t . _ = u : ( "undefined" != typeof module &&! module . nodeType && module . exports && ( exports = module . exports = u ), exports . _ = u ), u . VERSION = "1.8.3" ; var m , g = function ( t , e , i ){ if ( void 0 === e ) return t ; switch ( i ){ case 1 : return function ( i ){ return t . c
i || Ae . test ( t ) ? n ( t , o ) : Y ( t + "[" + ( "object" == typeof o && null != o ? e : "" ) + "]" , o , i , n )}); else if ( i || "object" !== mt . type ( e )) n ( t , e ); else for ( o in e ) Y ( t + "[" + o + "]" , e [ o ], i , n )} function X ( t ){ return function ( e , i ){ "string" != typeof e && ( i = e , e = "*" ); var n , o = 0 , s = e . toLowerCase (). match ( Pt ) || []; if ( mt . 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 Z ( t , e , i , n ){ function o ( l ){ var r ; return s [ l ] =! 0 , mt . each ( t [ l ] || [], function ( t , l ){ var c = l ( e , i , n ); return "string" != typeof c || a || s [ c ] ? a ?! ( r = c ) : void 0 : ( e . dataTypes . unshift ( c ), o ( c ), ! 1 )}), r } var s = {}, a = t === Re ; return o ( e . dataTypes [ 0 ]) ||! s [ "*" ] && o ( "*" )} function J ( t , e ){ var i , n , o = mt . ajaxSettings . flatOptions || {}; for ( i in e ) void 0 !== e [ i ] && (( o [ i ] ? t : n || ( n = {}))[ i ] = e [ i ]); return n && mt . extend ( ! 0 , t , n ), t } function Q ( t , e , i ){ for ( var n , o , s , a , l = t . contents , r = t . dataTypes ; "*" === r [ 0 ];) r . shift (), void 0 === n && ( n = t . mimeType || e . getResponseHeader ( "Content-Type" )); if ( n ) for ( o in l ) if ( l [ o ] && l [ o ]. test ( n )){ r . unshift ( o ); break } if ( r [ 0 ] in i ) s = r [ 0 ]; else { for ( o in i ){ if ( ! r [ 0 ] || t . converters [ o + " " + r [ 0 ]]){ s = o ; break } a || ( a = o )} s = s || a } if ( s ) return s !== r [ 0 ] && r . unshift ( s ), i [ s ]} function tt ( t , e , i , n ){ var o , s , a , l , r , c = {}, h = t . dataTypes . slice (); if ( h [ 1 ]) for ( a in t . converters ) c [ a . toLowerCase ()] = t . converters [ a ]; for ( s = h . shift (); s ;) if ( t . responseFields [ s ] && ( i [ t . responseFields [ s ]] = e ), ! r && n && t . dataFilter && ( e = t . dataFilter ( e , t . dataType )), r = s , s = h . shift ()) if ( "*" === s ) s = r ; else if ( "*" !== r && r !== s ){ if ( ! ( a = c [ r + " " + s ] || c [ "* " + s ])) for ( o in c ) if ( l = o . split ( " " ), l [ 1 ] === s && ( a = c [ r + " " + l [ 0 ]] || c [ "* " + l [ 0 ]])){ ! 0 === a ? a = c [ o ] :! 0 !== c [ o ] && ( s = l [ 0 ], h . unshift ( l [ 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 " + r + " to " + s }}} return { state : "success" , data : e }} var et = [], it = t . document , nt = Object . getPrototypeOf , ot = et . slice , st = et . concat , at = et . push , lt = et . indexOf , rt = {}, ct = rt . toString , ht = rt . hasOwnProperty , dt = ht . toString , pt = dt . call ( Object ), ut = {}, mt = function ( t , e ){ return new mt . fn . init ( t , e )}, gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g , ft = /^-ms-/ , bt = /-([a-z])/g , Ct = function ( t , e ){ return e . toUpperCase ()}; mt . fn = mt . prototype = { jquery : "3.2.1" , constructor : mt , 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 = mt . merge ( this . constructor (), t ); return e . prevObject = this , e }, each : function ( t ){ return mt . each ( this , t )}, map : function ( t ){ return this . pushStack ( mt . 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 }, mt . extend = mt . fn . extend = function (){ var t , e , i , n , o , s , a = arguments [ 0 ] || {}, l = 1 , r = arguments . length , c =! 1 ; for ( "boolean" == typeof a && ( c = a , a = arguments [ l ] || {}, l ++ ), "object" == typeof a || mt . isFunction ( a ) || ( a = {}), l === r && ( a = this , l -- ); l < r ; l ++ ) if ( null != ( t = arguments [ l ])) for ( e in t ) i = a [ e ], n = t [ e ], a !== n && ( c && n && ( mt . isPlainObject ( n ) || ( o = Array . isArray ( n ))) ? ( o ? ( o =! 1 , s = i && Array . isArray ( i ) ? i : []) : s = i && mt . isPlainObject ( i ) ? i : {}, a [ e ] = mt . extend ( c , s , n )) : void 0 !== n && ( a [ e ] = n )); return a }, mt . 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" === mt . type ( t )}, isWindow : function ( t ){ return null != t && t === t . window }, isNumeric : function ( t ){ var e = mt . 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 = ht . call ( e , "constructor" ) && e . constructor ) && dt . 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 ? rt [ ct . call ( t )] || "object" : typeof t }, globalEval : function ( t ){ i ( t )}, camelCase : function ( t ){ return t . replace ( ft , "ms-" ). replace ( bt , Ct )}, each : function ( t , e ){ var i , o = 0 ; if ( n ( t )) for ( i = t . length ; o < i &&
t . console && t . console . warn && e && Et . test ( e . name ) && t . console . warn ( "jQuery.Deferred exception: " + e . message , e . stack , i )}, mt . readyException = function ( e ){ t . setTimeout ( function (){ throw e })}; var Mt = mt . Deferred (); mt . fn . ready = function ( t ){ return Mt . then ( t ). catch ( function ( t ){ mt . readyException ( t )}), this }, mt . extend ({ isReady :! 1 , readyWait : 1 , ready : function ( t ){( ! 0 === t ?-- mt . readyWait : mt . isReady ) || ( mt . isReady =! 0 , ! 0 !== t &&-- mt . readyWait > 0 || Mt . resolveWith ( it ,[ mt ]))}}), mt . ready . then = Mt . then , "complete" === it . readyState || "loading" !== it . readyState &&! it . documentElement . doScroll ? t . setTimeout ( mt . ready ) : ( it . addEventListener ( "DOMContentLoaded" , d ), t . addEventListener ( "load" , d )); var Ut = function ( t , e , i , n , o , s , a ){ var l = 0 , r = t . length , c = null == i ; if ( "object" === mt . type ( i )){ o =! 0 ; for ( l in i ) Ut ( t , e , l , i [ l ], ! 0 , s , a )} else if ( void 0 !== n && ( o =! 0 , mt . isFunction ( n ) || ( a =! 0 ), c && ( a ? ( e . call ( t , n ), e = null ) : ( c = e , e = function ( t , e , i ){ return c . call ( mt ( t ), i )})), e )) for (; l < r ; l ++ ) e ( t [ l ], i , a ? n : n . call ( t [ l ], l , e ( t [ l ], i ))); return o ? t : c ? e . call ( t ) : r ? e ( t [ 0 ], i ) : s }, Dt = 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 = {}, Dt ( 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 [ mt . camelCase ( e )] = i ; else for ( n in e ) o [ mt . camelCase ( n )] = e [ n ]; return o }, get : function ( t , e ){ return void 0 === e ? this . cache ( t ) : t [ this . expando ] && t [ this . expando ][ mt . 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 ( mt . camelCase ) : ( e = mt . camelCase ( e ), e = e in n ? [ e ] : e . match ( Pt ) || []), i = e . length ; for (; i -- ;) delete n [ e [ i ]]}( void 0 === e || mt . 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 &&! mt . isEmptyObject ( e )}}; var Ft = new p , Bt = new p , Lt = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/ , Vt = /[A-Z]/g ; mt . extend ({ hasData : function ( t ){ return Bt . hasData ( t ) || Ft . hasData ( t )}, data : function ( t , e , i ){ return Bt . access ( t , e , i )}, removeData : function ( t , e ){ Bt . remove ( t , e )}, _data : function ( t , e , i ){ return Ft . access ( t , e , i )}, _removeData : function ( t , e ){ Ft . remove ( t , e )}}), mt . 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 = Bt . get ( s ), 1 === s . nodeType &&! Ft . get ( s , "hasDataAttrs" ))){ for ( i = a . length ; i -- ;) a [ i ] && ( n = a [ i ]. name , 0 === n . indexOf ( "data-" ) && ( n = mt . camelCase ( n . slice ( 5 )), m ( s , n , o [ n ]))); Ft . set ( s , "hasDataAttrs" , ! 0 )} return o } return "object" == typeof t ? this . each ( function (){ Bt . set ( this , t )}) : Ut ( this , function ( e ){ var i ; if ( s && void 0 === e ){ if ( void 0 !== ( i = Bt . get ( s , t ))) return i ; if ( void 0 !== ( i = m ( s , t ))) return i } else this . each ( function (){ Bt . set ( this , t , e )})}, null , e , arguments . length > 1 , null , ! 0 )}, removeData : function ( t ){ return this . each ( function (){ Bt . remove ( this , t )})}}), mt . extend ({ queue : function ( t , e , i ){ var n ; if ( t ) return e = ( e || "fx" ) + "queue" , n = Ft . get ( t , e ), i && ( ! n || Array . isArray ( i ) ? n = Ft . access ( t , e , mt . makeArray ( i )) : n . push ( i )), n || []}, dequeue : function ( t , e ){ e = e || "fx" ; var i = mt . queue ( t , e ), n = i . length , o = i . shift (), s = mt . _queueHooks ( t , e ), a = function (){ mt . 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 Ft . get ( t , i ) || Ft . access ( t , i ,{ empty : mt . Callbacks ( "once memory" ). add ( function (){ Ft . remove ( t ,[ e + "queue" , i ])})})}}), mt . fn . extend ({ queue : function ( t , e ){ var i = 2 ; return "string" != typeof t && ( e = t , t = "fx" , i -- ), arguments . length < i ? mt . queue ( this [ 0 ], t ) : void 0 === e ? this : this . each ( function (){ var i = mt . queue ( this , t , e ); mt . _queueHooks ( this , t ), "fx" === t && "inprogress" !== i [ 0 ] && mt . dequeue ( this , t )})}, dequeue : function ( t ){ return this . each ( function (){ mt . dequeue ( this , t )})}, clearQueue : function ( t ){ return this . queue ( t || "fx" ,[])}, promise : function ( t , e ){ var i , n = 1 , o = mt . Deferred (), s = this , a = this . length , l = function (){ -- n || o . resolveWith ( s ,[ s ])}; for ( "string" != typeof t && ( e = t , t = void 0 ), t = t || "fx" ; a -- ;)( i = Ft . get ( s [ a ], t + "queueHooks" )) && i . em
url : xe . href , type : "GET" , isLocal : Fe . test ( xe . protocol ), global :! 0 , processData :! 0 , async :! 0 , contentType : "application/x-www-form-urlencoded; charset=UTF-8" , accepts : { "*" : Oe , text : "text/plain" , html : "text/html" , xml : "application/xml, text/xml" , 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" : mt . parseXML }, flatOptions : { url :! 0 , context :! 0 }}, ajaxSetup : function ( t , e ){ return e ? J ( J ( t , mt . ajaxSettings ), e ) : J ( mt . ajaxSettings , t )}, ajaxPrefilter : X ( Ve ), ajaxTransport : X ( Re ), ajax : function ( e , i ){ function n ( e , i , n , l ){ var c , p , u , _ , y , w = i ; h || ( h =! 0 , r && t . clearTimeout ( r ), o = void 0 , a = l || "" , x . readyState = e > 0 ? 4 : 0 , c = e >= 200 && e < 300 || 304 === e , n && ( _ = Q ( m , x , n )), _ = tt ( m , _ , x , c ), c ? ( m . ifModified && ( y = x . getResponseHeader ( "Last-Modified" ), y && ( mt . lastModified [ s ] = y ),( y = x . getResponseHeader ( "etag" )) && ( mt . etag [ s ] = y )), 204 === e || "HEAD" === m . type ? w = "nocontent" : 304 === e ? w = "notmodified" : ( w = _ . state , p = _ . data , u = _ . error , c =! u )) : ( u = w , ! e && w || ( w = "error" , e < 0 && ( e = 0 ))), x . status = e , x . statusText = ( i || w ) + "" , c ? b . resolveWith ( g ,[ p , w , x ]) : b . rejectWith ( g ,[ x , w , u ]), x . statusCode ( v ), v = void 0 , d && f . trigger ( c ? "ajaxSuccess" : "ajaxError" ,[ x , m , c ? p : u ]), C . fireWith ( g ,[ x , w ]), d && ( f . trigger ( "ajaxComplete" ,[ x , m ]), -- mt . active || mt . event . trigger ( "ajaxStop" )))} "object" == typeof e && ( i = e , e = void 0 ), i = i || {}; var o , s , a , l , r , c , h , d , p , u , m = mt . ajaxSetup ({}, i ), g = m . context || m , f = m . context && ( g . nodeType || g . jquery ) ? mt ( g ) : mt . event , b = mt . Deferred (), C = mt . Callbacks ( "once memory" ), v = m . statusCode || {}, _ = {}, y = {}, w = "canceled" , x = { readyState : 0 , getResponseHeader : function ( t ){ var e ; if ( h ){ if ( ! l ) for ( l = {}; e = De . exec ( a );) l [ e [ 1 ]. toLowerCase ()] = e [ 2 ]; e = l [ t . toLowerCase ()]} return null == e ? null : e }, getAllResponseHeaders : function (){ return h ? a : null }, setRequestHeader : function ( t , e ){ return null == h && ( t = y [ t . toLowerCase ()] = y [ t . toLowerCase ()] || t , _ [ t ] = e ), this }, overrideMimeType : function ( t ){ return null == h && ( m . mimeType = t ), this }, statusCode : function ( t ){ var e ; if ( t ) if ( h ) 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 ( b . promise ( x ), m . url = (( e || m . url || xe . href ) + "" ). replace ( Le , xe . protocol + "//" ), m . type = i . method || i . type || m . method || m . type , m . dataTypes = ( m . dataType || "*" ). toLowerCase (). match ( Pt ) || [ "" ], null == m . crossDomain ){ c = it . createElement ( "a" ); try { c . href = m . url , c . href = c . href , m . crossDomain = Ne . protocol + "//" + Ne . host != c . protocol + "//" + c . host } catch ( t ){ m . crossDomain =! 0 }} if ( m . data && m . processData && "string" != typeof m . data && ( m . data = mt . param ( m . data , m . traditional )), Z ( Ve , m , i , x ), h ) return x ; d = mt . event && m . global , d && 0 == mt . active ++&& mt . event . trigger ( "ajaxStart" ), m . type = m . type . toUpperCase (), m . hasContent =! Be . test ( m . type ), s = m . url . replace ( Me , "" ), m . hasContent ? m . data && m . processData && 0 === ( m . contentType || "" ). indexOf ( "application/x-www-form-urlencoded" ) && ( m . data = m . data . replace ( Ee , "+" )) : ( u = m . url . slice ( s . length ), m . data && ( s += ( Te . test ( s ) ? "&" : "?" ) + m . data , delete m . data ), ! 1 === m . cache && ( s = s . replace ( Ue , "$1" ), u = ( Te . test ( s ) ? "&" : "?" ) + "_=" + Se +++ u ), m . url = s + u ), m . ifModified && ( mt . lastModified [ s ] && x . setRequestHeader ( "If-Modified-Since" , mt . lastModified [ s ]), mt . etag [ s ] && x . setRequestHeader ( "If-None-Match" , mt . etag [ s ])),( m . data && m . hasContent &&! 1 !== m . contentType || i . contentType ) && x . setRequestHeader ( "Content-Type" , m . contentType ), x . setRequestHeader ( "Accept" , m . dataTypes [ 0 ] && m . accepts [ m . dataTypes [ 0 ]] ? m . accepts [ m . dataTypes [ 0 ]] + ( "*" !== m . dataTypes [ 0 ] ? ", " + Oe + "; q=0.01" : "" ) : m . accepts [ "*" ]); for ( p in m . headers ) x . setRequestHeader ( p , m . headers [ p ]); if ( m . beforeSend && ( ! 1 === m . beforeSend . call ( g , x , m ) || h )) return x . abort (); if ( w = "abort" , C . add ( m . complete ), x . done ( m . success ), x . fail ( m . error ), o = Z ( Re , m , i , x )){ if ( x . readyState = 1 , d && f . trigger ( "ajaxSend" ,[ x , m ]), h ) return x ; m . async && m . timeout > 0 && ( r = t . setTimeout ( function (){ x . abort ( "timeout" )}, m . timeout )); try { h =! 1 , o . send ( _ , n )} catch ( t ){ if ( h ) throw t ; n ( - 1 , t )}} else n ( - 1 , "No Transport" ); return x }, getJSON : function ( t , e , i ){ return mt . get ( t , e , i , "json" )}, getScript : function ( t , e ){ return mt . get ( t , void 0 , e , "script" )}}), mt . each ([ "get" , "post" ], function ( t , e ){ mt [ e ] = function ( t , i , n , o ){ return
delegateType : t . support . transition . end , handle : function ( e ){ if ( t ( e . target ). is ( this )) return e . handleObj . handler . apply ( this , arguments )}})})}( jQuery ), function ( t ){ "use strict" ; function e ( e ){ return this . each ( function (){ var i = t ( this ), o = i . data ( "bs.alert" ); 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
var e = this . element , i = e . closest ( "ul:not(.dropdown-menu)" ), n = e . data ( "target" ); if ( n || ( n = e . attr ( "href" ), n = n && n . replace ( /.*(?=#[^\s]*$)/ , "" )), ! e . parent ( "li" ). hasClass ( "active" )){ var o = i . find ( ".active:last a" ), s = t . Event ( "hide.bs.tab" ,{ relatedTarget : e [ 0 ]}), a = t . Event ( "show.bs.tab" ,{ relatedTarget : o [ 0 ]}); if ( o . trigger ( s ), e . trigger ( a ), ! a . isDefaultPrevented () &&! s . isDefaultPrevented ()){ var l = t ( n ); this . activate ( e . closest ( "li" ), i ), this . activate ( l , l . 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 ), l ? ( 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" ), l = o && t . support . transition && ( a . length && a . hasClass ( "fade" ) ||!! n . find ( "> .fade" ). length ); a . length && l ? 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 l = null == this . affixed , r = l ? o : s . top , c = l ? a : e ; return null != i && o <= i ? "top" : null != n && r + 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 l = this . getState ( a , e , o , s ); if ( this . affixed != l ){ null != this . unpin && this . $element . css ( "top" , "" ); var r = "affix" + ( l ? "-" + l : "" ), c = t . Event ( r + ".bs.affix" ); if ( this . $element . trigger ( c ), c . isDefaultPrevented ()) return ; this . affixed = l , this . unpin = "bottom" == l ? this . getPinnedOffset () : null , this . $element . removeClass ( i . RESET ). addClass ( r ). trigger ( r . replace ( "affix" , "affixed" ) + ".bs.affix" )} "bottom" == l && 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" ; v
; var o = void 0 == window . innerHeight ? document . documentElement . offsetWidth : Common . Utils . innerWidth (), s = void 0 == window . innerHeight ? document . documentElement . offsetHeight : Common . Utils . innerHeight (), a = this . initConfig . maxwidth ? this . initConfig . maxwidth : o , l = this . initConfig . maxheight ? this . initConfig . maxheight : s ; this . resizing . type [ 0 ] > 0 ? ( this . resizing . maxx = Math . min ( o , i + a ), this . resizing . minx = i + this . initConfig . minwidth ) : this . resizing . type [ 0 ] < 0 && ( this . resizing . maxx = i + this . resizing . initw - this . initConfig . minwidth , this . resizing . minx = Math . max ( 0 , i + this . resizing . initw - a )), this . resizing . type [ 1 ] > 0 ? ( this . resizing . maxy = Math . min ( s , n + l ), this . resizing . miny = n + this . initConfig . minheight ) : this . resizing . type [ 1 ] < 0 && ( this . resizing . maxy = n + this . resizing . inith - this . initConfig . minheight , this . resizing . miny = Math . max ( 0 , n + this . resizing . inith - l )), $ ( document . body ). css ( "cursor" , e . css ( "cursor" )), this . $window . find ( ".resize-border" ). addClass ( "resizing" ), this . $window . find ( ".header" ). addClass ( "resizing" ), $ ( document ). on ( "mousemove" , this . binding . resize ), $ ( document ). on ( "mouseup" , this . binding . resizeStop ), this . fireEvent ( "resize" ,[ this , "start" ])} function h ( t ){ if ( this . resizing . enabled ){ var e =! 1 , i = t instanceof jQuery . Event ? Common . Utils . zoom () : 1 , n = t . pageX * i , o = t . pageY * i ; this . resizing . type [ 0 ] && n < this . resizing . maxx && n > this . resizing . minx && ( this . resizing . type [ 0 ] < 0 && this . $window . css ({ left : n - this . resizing . initx }), this . setWidth ( this . resizing . initw + ( n - this . resizing . initpage_x ) * this . resizing . type [ 0 ]), e =! 0 ), this . resizing . type [ 1 ] && o < this . resizing . maxy && o > this . resizing . miny && ( this . resizing . type [ 1 ] < 0 && this . $window . css ({ top : o - this . resizing . inity }), this . setHeight ( this . resizing . inith + ( o - this . resizing . initpage_y ) * this . resizing . type [ 1 ]), e =! 0 ), e && this . fireEvent ( "resizing" )}} function d (){ $ ( document ). off ( "mousemove" , this . binding . resize ), $ ( document ). off ( "mouseup" , this . binding . resizeStop ), $ ( document . body ). css ( "cursor" , "auto" ), this . $window . find ( ".resize-border" ). removeClass ( "resizing" ), this . $window . find ( ".header" ). removeClass ( "resizing" ), this . resizing . enabled =! 1 , this . fireEvent ( "resize" ,[ this , "end" ])} var p = { closable :! 0 , header :! 0 , modal :! 0 , width : "auto" , height : "auto" , title : "Title" , alias : "Window" , cls : "" , toolclose : "close" , maxwidth : void 0 , maxheight : void 0 , minwidth : 0 , minheight : 0 , enableKeyEvents :! 0 }; return Common . UI . alert = function ( t ){ function e ( e ){ var i = e . getChild ( ".info-box" ), n = e . getChild ( ".info-box span" ), o = e . getChild ( ".footer" ), s = e . getChild ( ".header" ), a = e . getChild ( ".body" ), l = e . getChild ( ".icon" ), r = l . length > 0 ? l . height () : 0 , c = e . getChild ( ".info-box .dont-show-checkbox" ); t . dontshow || a . css ( "padding-bottom" , "10px" ), t . maxwidth && "auto" == t . width && n . position (). left + n . width () + parseInt ( i . css ( "padding-right" )) > t . maxwidth && ( t . width = t . maxwidth ), "auto" == t . width ? ( i . height ( Math . max ( n . height () + ( c . length > 0 ? c . height () + parseInt ( c . css ( "margin-top" )) : 0 ), r )), a . height ( parseInt ( i . css ( "height" )) + parseInt ( o . css ( "height" ))), e . setSize ( n . position (). left + n . width () + parseInt ( i . css ( "padding-right" )), parseInt ( a . css ( "height" )) + parseInt ( s . css ( "height" )))) : ( n . css ( "white-space" , "normal" ), e . setWidth ( t . width ), i . height ( Math . max ( n . height () + ( c . length > 0 ? c . height () + parseInt ( c . css ( "margin-top" )) : 0 ), r )), a . height ( parseInt ( i . css ( "height" )) + parseInt ( o . css ( "height" ))), e . setHeight ( parseInt ( a . css ( "height" )) + parseInt ( s . css ( "height" )))), n . height () < r - 10 && n . css ({ "vertical-align" : "baseline" , "line-height" : r + "px" })} function i ( e ){ t . callback && t . callback . call ( l , e . currentTarget . attributes . result . value , !! r && "checked" == r . getValue ()), l . close ( ! 0 )} function n ( t ){ return i ({ currentTarget : l . getChild ( ".footer .dlg-btn" )[ 0 ]}), ! 1 } var o = this . Window . prototype , s = { ok : o . okButtonText , cancel : o . cancelButtonText , yes : o . yesButtonText , no : o . noButtonText , close : o . closeButtonText }; if ( t . buttons ){ if ( _ . isArray ( t . buttons )){ void 0 == t . primary && ( t . primary = "ok" ); var a = {}; _ . each ( t . buttons , function ( e ){ "object" == typeof e ? void 0 !== e . value && ( a [ e . value ] = { text : e . caption , cls : "custom" + ( e . primary || t . primary == e . value ? " primary" : "" )}) : ( a [ e ] = { text : "custom" == e ? t . customButtonText : s [ e ], cls : t . primary == e ? "primary" : "" }, "custom" == e && ( a [ e ]. cls += " custom" ))}), t . buttons = a }} else t . buttons = {}, t . buttons . ok = { text : s . ok , cls : "primary" }; t . donts
el : $ ( "#btn-preview-prev" , this . el ), hint : this . txtPrev , hintAnchor : "top" }), this . btnPrev . on ( "click" , _ . bind ( function (){ this . api && this . api . DemonstrationPrevSlide ()}, this )), this . btnNext = new Common . UI . Button ({ el : $ ( "#btn-preview-next" , this . el ), hint : this . txtNext , hintAnchor : "top" }), this . btnNext . on ( "click" , _ . bind ( function (){ this . api && this . api . DemonstrationNextSlide ()}, this )), this . btnPlay = new Common . UI . Button ({ el : $ ( "#btn-preview-play" , this . el ), hint : this . txtPlay , hintAnchor : "top" }), this . btnPlay . on ( "click" , _ . bind ( function ( t ){ var e = $ ( ".icon" , this . btnPlay . cmpEl ); e . hasClass ( "btn-pause" ) ? ( e . removeClass ( "btn-pause" ), this . btnPlay . updateHint ( this . txtPlay ), this . api && this . api . DemonstrationPause ()) : ( e . addClass ( "btn-pause" ), this . btnPlay . updateHint ( this . txtPause ), this . api && this . api . DemonstrationPlay ())}, this )), this . btnClose = new Common . UI . Button ({ el : $ ( "#btn-preview-close" , this . el ), hint : this . txtClose , hintAnchor : "top" }), this . btnClose . on ( "click" , _ . bind ( function (){ this . api && this . api . EndDemonstration ()}, this )), this . btnFullScreen = new Common . UI . Button ({ el : $ ( "#btn-preview-fullscreen" , this . el ), hint : this . txtFullScreen , hintAnchor : "top" }), this . btnFullScreen . on ( "click" , _ . bind ( function ( t ){ this . toggleFullScreen ()}, this )), this . txtGoToPage = new Common . UI . InputField ({ el : $ ( "#preview-goto-page" ), allowBlank :! 0 , validateOnChange :! 0 , style : "width: 60px;" , maskExp : /[0-9]/ , validation : function ( t ){ return !! ( /(^[0-9]+$)/ . test ( t ) && void 0 !== ( t = parseInt ( t )) && t > 0 && t <= e . pages . get ( "count" )) || e . txtPageNumInvalid }}). on ( "keypress:after" , function ( t , i ){ if ( i . keyCode === Common . UI . Keys . RETURN ){ var n = e . $el . find ( "#preview-goto-box" ), o = n . find ( "input[type=text]" ), s = parseInt ( o . val ()); return ! s || s -- > e . pages . get ( "count" ) || s < 0 ? ( o . select (), ! 1 ) : ( n . focus (), n . parent (). removeClass ( "open" ), e . api . DemonstrationGoToSlide ( s ), e . api . asc_enableKeyEvents ( ! 0 ), ! 1 )}}). on ( "keyup:after" , function ( t , i ){ if ( i . keyCode === Common . UI . Keys . ESC ){ var n = e . $el . find ( "#preview-goto-box" ); return n . focus (), n . parent (). removeClass ( "open" ), e . api . asc_enableKeyEvents ( ! 0 ), ! 1 }}); var i = this . $el . find ( "#preview-goto-box" ); i . on ( "click" , function (){ return ! 1 }), i . parent (). on ( "show.bs.dropdown" , function (){ var t = e . txtGoToPage . $el . find ( "input" ); _ . defer ( function (){ t . focus (), t . select ()}, 100 )}), i . parent (). on ( "hide.bs.dropdown" , function (){ var t = e . $el . find ( "#preview-goto-box" ); e . api && t && ( t . focus (), t . parent (). removeClass ( "open" ), e . api . asc_enableKeyEvents ( ! 0 ))}), this . previewControls = $ ( this . el ). find ( ".preview-controls" ), $ ( document ). on ( "webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange" , function (){ var t = document . fullscreenElement || document . mozFullScreenElement || document . webkitFullscreenElement || document . msFullscreenElement ; e . btnFullScreen . cmpEl . toggleClass ( "fullscreen" , void 0 !== t && null !== t ), setTimeout ( function (){ e . previewControls . css ( "display" , "" ), e . $el . css ( "cursor" , "" )}, 100 ), Common . Utils . isIE ? ( e . btnFullScreen . updateHint ( t ? "" : e . txtFullScreen ), e . btnPrev . updateHint ( t ? "" : e . txtPrev ), e . btnPlay . updateHint ( t ? "" : $ ( ".icon" , e . btnPlay . cmpEl ). hasClass ( "btn-pause" ) ? e . txtPause : e . txtPlay ), e . btnNext . updateHint ( t ? "" : e . txtNext ), e . btnClose . updateHint ( t ? "" : e . txtClose )) : e . btnFullScreen . updateHint ( t ? e . txtExitFullScreen : e . txtFullScreen )}), Common . Utils . isIE && e . previewControls . css ( "opacity" , "0.4" ), this . separatorFullScreen = t . find ( ".separator.fullscreen" ), e . previewControls . on ( "mouseenter" , function ( t ){ clearTimeout ( e . timerMove ), e . previewControls . addClass ( "over" )}), e . previewControls . on ( "mouseleave" , function ( t ){ e . previewControls . removeClass ( "over" )})}, show : function (){ var t = PE . getController ( "Toolbar" ). getView ( "Toolbar" ); t . _state . hasCollaborativeChanges && ( t . _state . hasCollaborativeChanges =! 1 , t . synchTooltip && t . synchTooltip . hide (), t . needShowSynchTip =! 0 ), Common . UI . BaseView . prototype . show . call ( this , arguments ); var e = $ ( ".icon" , this . btnPlay . cmpEl ); e . hasClass ( "btn-pause" ) || ( e . addClass ( "btn-pause" ), this . btnPlay . updateHint ( this . txtPause )); var i = this ; i . previewControls . css ( "display" , "none" ), i . $el . css ( "cursor" , "none" ), setTimeout ( function (){ i . $el . on ( "mousemove" , function (){ clearTimeout ( i . timerMove ), i . previewControls . css ( "display" , "" ), i . $el . css ( "cursor" , "" ), i . previewControls . hasClass ( "ov
isIE7:r,isIE7m:u||r,isIE7p:l&&!u,isIE8:c,isIE8m:u||r||c,isIE8p:l&&!(u||r),isIE9:h,isIE9m:u||r||c||h,isIE9p:l&&!(u||r||c),isIE10:d,isIE10m:u||r||c||h||d,isIE10p:l&&!(u||r||c||h),isIE11:p,isIE11m:u||r||c||h||d||p,isIE11p:l&&!(u||r||c||h||d),isGecko:w,isGecko3:x,isGecko4:S,isGecko5:T,isGecko10:A,isFF3_0:k,isFF3_5:I,isFF3_6:P,isFF4:4<=F&&F<5,isFF5:5<=F&&F<6,isFF10:10<=F&&F<11,isLinux:U,isWindows:E,isMac:M,chromeVersion:D,firefoxVersion:F,ieVersion:B,operaVersion:L,safariVersion:V,webKitVersion:R,isSecure:O,emailRe:N,ipRe:H,hostnameRe:z,localRe:G,emailStrongRe:j,emailAddStrongRe:W,ipStrongRe:q,hostnameStrongRe:K,documentSettingsType:Y,importTextType:X,zoom:function(){return J.zoom},innerWidth:function(){return J.innerWidth},innerHeight:function(){return J.innerHeight}}},Common.Utils||{}),Common.Utils.ThemeColor=new function(){return{ThemeValues:[6,15,7,16,0,1,2,3,4,5],setColors:function(t,e){var i,n,o;if(e&&e.length>0){var s=[];for(i=0;i<e.length;i++)o=this.getHexColor(e[i].get_r(),e[i].get_g(),e[i].get_b()),s.push(o);this.standartcolors=s}var a=[];for(i=0;i<6;i++)for(n=0;n<10;n++){var l=i+6*n;o={color:this.getHexColor(t[l].get_r(),t[l].get_g(),t[l].get_b()),effectId:l,effectValue:this.ThemeValues[n]},a.push(o)}this.effectcolors=a},getEffectColors:function(){return this.effectcolors},getStandartColors:function(){return this.standartcolors},getHexColor:function(t,e,i){return t=t.toString(16),e=e.toString(16),i=i.toString(16),1==t.length&&(t=" 0 "+t),1==e.length&&(e=" 0 "+e),1==i.length&&(i=" 0 "+i),t+e+i},getRgbColor:function(t){var e=" object "==typeof t?t.color:t;e=e.replace(/#/,""),3==e.length&&(e=e.replace(/(.)/g," $1$1 ")),e=parseInt(e,16);var i=new Asc.asc_CColor;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,l=i%60*(s-a)/60;360==i&&(i=0),i<60?(e.r=s,e.b=a,e.g=a+l):i<120?(e.g=s,e.b=a,e.r=s-l):i<180?(e.g=s,e.r=a,e.b=a+l):i<240?(e.b=s,e.r=a,e.g=s-l):i<300?(e.b=s,e.g=a,e.r=a+l):i<360?(e.r=s,e.g=a,e.b=s-l):(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})(
minScrollbarLength:30,suppressScrollX:!0,alwaysVisibleY:this.scrollAlwaysVisible})),n.css({position:"fixed",right:"auto",left:-1e3,top:-1e3}),this.parentEl=n.parent(),this.parentEl.on("show.bs.dropdown",_.bind(e.onBeforeShowMenu,e)),this.parentEl.on("shown.bs.dropdown",_.bind(e.onAfterShowMenu,e)),this.parentEl.on("hide.bs.dropdown",_.bind(e.onBeforeHideMenu,e)),this.parentEl.on("hidden.bs.dropdown",_.bind(e.onAfterHideMenu,e)),this.parentEl.on("keydown.after.bs.dropdown",_.bind(e.onAfterKeydownMenu,e)),n.hover(function(t){e.isOver=!0},function(t){e.isOver=!1})),this.rendered=!0,this.trigger("render:after",this),this},isVisible:function(){return this.rendered&&this.cmpEl.is(":visible")},show:function(){this.rendered&&this.parentEl&&!this.parentEl.hasClass("open")&&this.cmpEl.dropdown("toggle")},hide:function(){this.rendered&&this.parentEl&&(this.parentEl.hasClass("open")?this.cmpEl.dropdown("toggle"):this.parentEl.hasClass("over")&&this.parentEl.removeClass("over"))},insertItem:function(t,e){var i=this;this.cmpEl;if(e instanceof Common.UI.MenuItem||(e=new Common.UI.MenuItem(_.extend({tagName:"li",template:i.itemTemplate},e))),t<0||t>=i.items.length?i.items.push(e):i.items.splice(t,0,e),this.rendered){var n=this.menuRoot;n&&(t<0?n.append(e.render().el):0===t?n.prepend(e.render().el):n.children("li:nth-child("+(t+1)+")").before(e.render().el),e.on("click",_.bind(i.onItemClick,i)),e.on("toggle",_.bind(i.onItemToggle,i)))}},addItem:function(t){this.insertItem(-1,t)},removeItem:function(t){var e=this,i=e.items.indexOf(t);i>-1&&(e.items.splice(i,1),t.off("click").off("toggle"),t.remove())},removeItems:function(t,e){if(!(t>this.items.length-1)){t+e>this.items.length&&(e=this.items.length-t);for(var i=t;i<t+e;i++)this.items[i].off("click").off("toggle"),this.items[i].remove();this.items.splice(t,e)}},removeAll:function(){var t=this;_.each(t.items,function(t){t.off("click").off("toggle"),t.remove()}),t.items=[]},onBeforeShowMenu:function(t){Common.NotificationCenter.trigger("menu:show"),this.trigger("show:before",this,t),this.alignPosition()},onAfterShowMenu:function(t){if(this.trigger("show:after",this,t),this.scroller){this.scroller.update({alwaysVisibleY:this.scrollAlwaysVisible});var e=this.menuRoot,i=e.find("> li .checked");if(i.length){var n=i.position().top,o=i.height(),s=e.height();(n<0||n+o>s)&&e.scrollTop(e.scrollTop()+n+o-s/2),setTimeout(function(){i.focus()},1)}}this._search={}},onBeforeHideMenu:function(t){this.trigger("hide:before",this,t),Common.UI.Scroller.isMouseCapture()&&t.preventDefault()},onAfterHideMenu:function(t,e){this.trigger("hide:after",this,t,e),Common.NotificationCenter.trigger("menu:hide",this,e)},onAfterKeydownMenu:function(t){if(this.trigger("keydown:before",this,t),!t.isDefaultPrevented())if(t.keyCode==Common.UI.Keys.RETURN){var e=$(t.target).closest("li");if(e.length<=0&&(e=$(t.target).parent().find("li .dataview")),e.length>0&&e.click(),e.hasClass("dropdown-submenu")||Common.UI.Menu.Manager.hideAll(),$(t.currentTarget).closest("li").hasClass("dropdown-submenu"))return t.stopPropagation(),!1}else if(t.keyCode==Common.UI.Keys.UP||t.keyCode==Common.UI.Keys.DOWN)this.fromKeyDown=!0;else if(t.keyCode==Common.UI.Keys.ESC);else if(this.search&&t.keyCode>64&&t.keyCode<91&&t.key){var i=this;if(clearTimeout(this._search.timer),this._search.timer=setTimeout(function(){i._search={}},1e3),!this._search.text&&(this._search.text=""),!this._search.char&&(this._search.char=t.key),this._search.char!==t.key&&(this._search.full=!0),this._search.text+=t.key,void 0===this._search.index){var n=this.menuRoot.find("> li").find("> a");this._search.index=n.index(n.filter(":focus"))}this.selectCandidate()}},selectCandidate:function(){for(var t,e,i=this._search.index||0,n=new RegExp("^"+(this._search.full?this._search.text:this._search.char),"i"),o=0;o<this.items.length;o++){var s=this.items[o];if(n.test(s.caption)&&(t||(t=s,e=o),this._search.full&&o==i||o>i)){t=s,e=o;break}}if(t){this._search.index=e;var s=t.cmpEl.find("a");if(this.scroller){this.scroller.update({alwaysVisibleY:this.scrollAlwaysVisible});var a=s.position
this.$radio.toggleClass("checked",t)},setValue:function(t,e){if(this.rendered){var i=this.$radio.hasClass("checked");this.setRawValue(t),!0!==e&&i!==t&&this.trigger("change",this,this.$radio.hasClass("checked"))}else this.options.checked=t},getValue:function(){return this.$radio.hasClass("checked")}})}),void 0===Common)var Common={};var c_oHyperlinkType={InternalLink:0,WebLink:1};if(define("presentationeditor/main/app/view/HyperlinkSettingsDialog",["common/main/lib/util/utils","common/main/lib/component/InputField","common/main/lib/component/ComboBox","common/main/lib/component/RadioBox","common/main/lib/component/Window"],function(){"use strict";PE.Views.HyperlinkSettingsDialog=Common.UI.Window.extend(_.extend({options:{width:350,style:"min-width: 230px;",cls:"modal-dlg",id:"window-hyperlink-settings"},initialize:function(t){_.extend(this.options,{title:this.textTitle},t||{}),this.template=[' < div class = "box" style = "height: 250px;" > ',' < div class = "input-row" style = "margin-bottom: 10px;" > ',' < button type = "button" class = "btn btn-text-default auto" id = "id-dlg-hyperlink-external" style = "border-top-right-radius: 0;border-bottom-right-radius: 0;" > ',this.textExternalLink,"</button>",' < button type = "button" class = "btn btn-text-default auto" id = "id-dlg-hyperlink-internal" style = "border-top-left-radius: 0;border-bottom-left-radius: 0;" > ',this.textInternalLink,"</button>","</div>",' < div id = "id-external-link" > ',' < div class = "input-row" > ',"<label>"+this.strLinkTo+" *</label>","</div>",' < div id = "id-dlg-hyperlink-url" class = "input-row" style = "margin-bottom: 5px;" >< /div>',"</div>",'<div id="id-internal-link" class="hidden" style="margin-top: 15px;">','<div id="id-dlg-hyperlink-radio-next" style="display: block;margin-bottom: 5px;"></div>','<div id="id-dlg-hyperlink-radio-prev" style="display: block;margin-bottom: 5px;"></div>','<div id="id-dlg-hyperlink-radio-first" style="display: block;margin-bottom: 5px;"></div>','<div id="id-dlg-hyperlink-radio-last" style="display: block;margin-bottom: 5px;"></div>','<div id="id-dlg-hyperlink-radio-slide" style="display: inline-block;margin-bottom: 5px;margin-right: 10px;"></div>','<div id="id-dlg-hyperlink-slide" style="display: inline-block;margin-bottom: 10px;"></div>',"</div>",'<div class="input-row">',"<label>"+this.strDisplay+"</label>","</div>",'<div id="id-dlg-hyperlink-display" class="input-row" style="margin-bottom: 5px;"></div>','<div class="input-row">',"<label>"+this.textTipText+"</label>","</div>",'<div id="id-dlg-hyperlink-tip" class="input-row" style="margin-bottom: 5px;"></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),this.slides=this.options.slides,this.api=this.options.api,Common.UI.Window.prototype.initialize.call(this,this.options)},render:function(){Common.UI.Window.prototype.render.call(this);var t=this,e=this.getChild();t.btnExternal=new Common.UI.Button({el:$("#id-dlg-hyperlink-external"),enableToggle:!0,toggleGroup:"hyperlink-type",allowDepress:!1,pressed:!0}),t.btnExternal.on("click",_.bind(t.onLinkTypeClick,t,c_oHyperlinkType.WebLink)),t.btnInternal=new Common.UI.Button({el:$("#id-dlg-hyperlink-internal"),enableToggle:!0,toggleGroup:"hyperlink-type",allowDepress:!1}),t.btnInternal.on("click",_.bind(t.onLinkTypeClick,t,c_oHyperlinkType.InternalLink)),t.inputUrl=new Common.UI.InputField({el:$("#id-dlg-hyperlink-url"),allowBlank:!1,blankError:t.txtEmpty,validateOnBlur:!1,style:"width: 100%;",validation:function(e){var i=t.api.asc_getUrlType($.trim(e));return t.isEmail=2==i,i>0||t.txtNotUrl}}),t.inputDisplay=new Common.UI.InputField({el:$("#id-dlg-hyperlink-display"),allowBlank:!0,validateOnBlur:!1,style:"width: 100%;"}).on("changed:after",function(){t.isTextChanged=!0}),t.inputTip=new Common.UI.InputField({el:$("#id-dlg-hyperlink-tip"),style:"width: 100%;",maxLength:Asc.c_oAscMaxTooltipLength}),t.radioN
this . trigger ( "contextmenu" , this , this . model , t )}, onSelectChange : function ( t , e ){ this . trigger ( "select" , this , t , e )}}), Common . UI . DataView = Common . UI . BaseView . extend ({ options : { multiSelect :! 1 , handleSelect :! 0 , enableKeyEvents :! 0 , keyMoveDirection : "both" , restoreHeight : 0 , emptyText : "" , listenStoreEvents :! 0 , allowScrollbar :! 0 , scrollAlwaysVisible :! 1 , showLast :! 0 , useBSKeydown :! 1 }, template : _ . template ([ '<div class="dataview inner" style="<%= style %>">' , "<% _.each(groups, function(group) { %>" , "<% if (group.headername !== undefined) { %>" , '<div class="header-name"><%= group.headername %></div>' , "<% } %>" , '<div class="grouped-data <% if (group.inline) { %> inline <% } %> <% if (!_.isEmpty(group.caption)) { %> margin <% } %>" id="<%= group.id %>">' , "<% if (!_.isEmpty(group.caption)) { %>" , '<div class="group-description">' , "<span><%= group.caption %></span>" , "</div>" , "<% } %>" , '<div class="group-items-container">' , "</div>" , "</div>" , "<% }); %>" , "</div>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , t ); var e = this ; e . template = e . options . template || e . template , e . store = e . options . store || new Common . UI . DataViewStore , e . groups = e . options . groups || null , e . itemTemplate = e . options . itemTemplate || null , e . multiSelect = e . options . multiSelect , e . handleSelect = e . options . handleSelect , e . parentMenu = e . options . parentMenu , e . enableKeyEvents = e . options . enableKeyEvents , e . useBSKeydown = e . options . useBSKeydown , e . showLast = e . options . showLast , e . style = e . options . style || "" , e . emptyText = e . options . emptyText || "" , e . listenStoreEvents = void 0 === e . options . listenStoreEvents || e . options . listenStoreEvents , e . allowScrollbar = void 0 === e . options . allowScrollbar || e . options . allowScrollbar , e . scrollAlwaysVisible = e . options . scrollAlwaysVisible ||! 1 , e . parentMenu && ( e . parentMenu . options . restoreHeight = e . options . restoreHeight > 0 ), e . rendered =! 1 , e . dataViewItems = [], "vertical" == e . options . keyMoveDirection ? e . moveKeys = [ Common . UI . Keys . UP , Common . UI . Keys . DOWN ] : "horizontal" == e . options . keyMoveDirection ? e . moveKeys = [ Common . UI . Keys . LEFT , Common . UI . Keys . RIGHT ] : e . moveKeys = [ Common . UI . Keys . UP , Common . UI . Keys . DOWN , Common . UI . Keys . LEFT , Common . UI . Keys . RIGHT ], e . options . el && e . render ()}, render : function ( t ){ var e = this ; this . trigger ( "render:before" , this ), this . cmpEl = $ ( this . el ), t ? ( this . setElement ( t , ! 1 ), this . cmpEl = $ ( this . template ({ groups : e . groups ? e . groups . toJSON () : null , style : e . style })), t . html ( this . cmpEl )) : this . cmpEl . html ( this . template ({ groups : e . groups ? e . groups . toJSON () : null , style : e . style })); var i = this . cmpEl . closest ( ".asc-window" ); return i . length < 1 && ( i = this . cmpEl . closest ( '[id^="menu-container-"]' )), i . length > 0 && ( this . tipZIndex = parseInt ( i . css ( "z-index" )) + 10 ), this . rendered || ( this . listenStoreEvents && ( this . listenTo ( this . store , "add" , this . onAddItem ), this . listenTo ( this . store , "reset" , this . onResetItems )), this . onResetItems (), this . parentMenu && ( this . cmpEl . closest ( "li" ). css ( "height" , "100%" ), this . cmpEl . css ( "height" , "100%" ), this . parentMenu . on ( "show:after" , _ . bind ( this . alignPosition , this ))), this . enableKeyEvents && this . parentMenu && this . handleSelect && ( e . showLast || this . parentMenu . on ( "show:before" , function ( t ){ e . deselectAll ()}), this . parentMenu . on ( "show:after" , function ( t ){ e . showLast && e . showLastSelected (), Common . NotificationCenter . trigger ( "dataview:focus" ), _ . delay ( function (){ t . cmpEl . find ( ".dataview" ). focus ()}, 10 )}). on ( "hide:after" , function (){ Common . NotificationCenter . trigger ( "dataview:blur" )}))), _ . isUndefined ( this . scroller ) && this . allowScrollbar && ( this . scroller = new Common . UI . Scroller ({ el : $ ( this . el ). find ( ".inner" ). addBack (). filter ( ".inner" ), useKeyboard : this . enableKeyEvents &&! this . handleSelect , minScrollbarLength : 40 , wheelSpeed : 10 , alwaysVisibleY : this . scrollAlwaysVisible })), this . rendered =! 0 , this . cmpEl . on ( "click" , function ( t ){ if ( /dataview/ . test ( t . target . className )) return ! 1 }), this . trigger ( "render:after" , this ), this }, setStore : function ( t ){ t && ( this . stopListening ( this . store ), this . store = t , this . listenStoreEvents && ( this . listenTo ( this . store , "add" , this . onAddItem ), this . listenTo ( this . store , "reset" , this . onResetItems )))}, selectRecord : function ( t , e ){ if ( this . handleSelect ) return e && this . suspendEvents (), this . multiSelect ? t && t . set ({ selected :! t . get ( "selected" )}) : ( _ . each ( this . store . wh
this . checkGroup = 0 ), this . api &&! this . _noApply ){ var o = this . _originalProps ? this . _originalProps : new Asc . asc_CParagraphProperty ; o . put_SmallCaps ( "checked" == t . getValue ()), o . put_AllCaps ( "checked" == this . chAllCaps . getValue ()), this . api . SetDrawImagePlaceParagraph ( "paragraphadv-font-img" , o )}}, onAllCapsChange : function ( t , e , i , n ){ if ( this . _changedProps && 3 != this . checkGroup && this . _changedProps . put_AllCaps ( "checked" == t . getValue ()), this . checkGroup = 0 , "checked" == t . getValue () && ( this . checkGroup = 3 , this . chSmallCaps . setValue ( 0 ), this . _changedProps && this . _changedProps . put_SmallCaps ( ! 1 ), this . checkGroup = 0 ), this . api &&! this . _noApply ){ var o = this . _originalProps ? this . _originalProps : new Asc . asc_CParagraphProperty ; o . put_AllCaps ( "checked" == t . getValue ()), o . put_SmallCaps ( "checked" == this . chSmallCaps . getValue ()), this . api . SetDrawImagePlaceParagraph ( "paragraphadv-font-img" , o )}}, addTab : function ( t , e ){ var i = this . numTab . getNumberValue (), n = this . cmbAlign . getValue (), o = this . _arrKeyTabAlign [ n ], s = this . tabList . store , a = s . find ( function ( t ){ return Math . abs ( t . get ( "tabPos" ) - i ) < . 001 }); a ? ( a . set ( "tabAlign" , n ), a . set ( "displayTabAlign" , o ), this . _tabListChanged =! 0 ) : ( a = new Common . UI . DataViewModel , a . set ({ tabPos : i , value : i + " " + Common . Utils . Metric . getCurrentMetricName (), tabAlign : n , displayTabAlign : o }), s . add ( a )), this . tabList . selectRecord ( a ), this . tabList . scrollToRecord ( a )}, removeTab : function ( t , e ){ var i = this . tabList . getSelectedRec (); if ( i ){ var n = this . tabList . store , o = _ . indexOf ( n . models , i ); n . remove ( i ), o > n . length - 1 && ( o = n . length - 1 ), n . length > 0 && ( this . tabList . selectByIndex ( o ), this . tabList . scrollToRecord ( n . at ( o )))}}, removeAllTabs : function ( t , e ){ this . tabList . store . reset ()}, onSelectTab : function ( t , e , i ){ var n = {}; if ( _ . isFunction ( i . toJSON )){ if ( ! i . get ( "selected" )) return ; n = i . toJSON ()} else n = i ; this . numTab . setValue ( n . tabPos ), this . cmbAlign . setValue ( n . tabAlign )}, onSpecialSelect : function ( t , e ){ if ( this . CurSpecial = e . value , this . CurSpecial === c_paragraphSpecial . NONE_SPECIAL && this . numSpecialBy . setValue ( 0 , ! 0 ), this . _changedProps ){ null !== this . _changedProps . get_Ind () && void 0 !== this . _changedProps . get_Ind () || this . _changedProps . put_Ind ( new Asc . asc_CParagraphInd ); var i = Common . Utils . Metric . fnRecalcToMM ( this . numSpecialBy . getNumberValue ()); 0 === i && ( this . numSpecialBy . setValue ( Common . Utils . Metric . fnRecalcFromMM ( this . _arrSpecial [ e . value ]. defaultValue ), ! 0 ), i = this . _arrSpecial [ e . value ]. defaultValue ), this . CurSpecial === c_paragraphSpecial . HANGING && ( i =- i ), this . _changedProps . get_Ind (). put_FirstLine ( i )}}, onFirstLineChange : function ( t , e , i , n ){ if ( this . _changedProps ){ null !== this . _changedProps . get_Ind () && void 0 !== this . _changedProps . get_Ind () || this . _changedProps . put_Ind ( new Asc . asc_CParagraphInd ); var o = Common . Utils . Metric . fnRecalcToMM ( t . getNumberValue ()); this . CurSpecial === c_paragraphSpecial . HANGING ? o =- o : this . CurSpecial === c_paragraphSpecial . NONE_SPECIAL && o > 0 ? ( this . CurSpecial = c_paragraphSpecial . FIRST_LINE , this . cmbSpecial . setValue ( c_paragraphSpecial . FIRST_LINE )) : 0 === o && ( this . CurSpecial = c_paragraphSpecial . NONE_SPECIAL , this . cmbSpecial . setValue ( c_paragraphSpecial . NONE_SPECIAL )), this . _changedProps . get_Ind (). put_FirstLine ( o )}}, onLineRuleSelect : function ( t , e ){ if ( null === this . Spacing ){ var i = this . _originalProps ? this . _originalProps : new Asc . asc_CParagraphProperty ; this . Spacing = i . get_Spacing ()} this . Spacing . LineRule = e . value ; var n = _ . findWhere ( this . _arrLineRule ,{ value : e . value }), o = this . _arrLineRule . indexOf ( n ); this . CurLineRuleIdx !== o && ( this . numLineHeight . setDefaultUnit ( this . _arrLineRule [ o ]. defaultUnit ), this . numLineHeight . setMinValue ( this . _arrLineRule [ o ]. minValue ), this . numLineHeight . setStep ( this . _arrLineRule [ o ]. step ), this . Spacing . LineRule === c_paragraphLinerule . LINERULE_AUTO ? this . numLineHeight . setValue ( this . _arrLineRule [ o ]. defaultValue ) : this . numLineHeight . setValue ( Common . Utils . Metric . fnRecalcFromMM ( this . _arrLineRule [ o ]. defaultValue )), this . CurLineRuleIdx = o )}, onNumLineHeightChange : function ( t , e , i , n ){ if ( "" !== this . cmbLineRule . getRawValue ()){ if ( null === this . Spacing ){ var o = this . _originalProps ? this . _originalProps : new Asc . asc_CParagraphProperty ; this . Spacing = o . get_Spacing ()} this . Spacing . Line = this . cmbLineRule . getValue () == c_paragraphLinerule . LINERULE_AUTO ? t . getNumberValue () : Common . Utils . Metric . f
this . _selectStyleItem ( this . btnEndStyle , i )}, onSelectEndSize : function ( t , e , i ){ this . _changedProps && ( null === this . _changedProps . get_stroke () && this . _changedProps . put_stroke ( new Asc . asc_CStroke ), this . _changedProps . get_stroke (). put_lineendsize ( i . get ( "type" ))), this . _endSizeIdx = i . get ( "value" ), this . _selectStyleItem ( this . btnEndSize , i )}, textRound : "Round" , textMiter : "Miter" , textSquare : "Square" , textFlat : "Flat" , textBevel : "Bevel" , textTitle : "Shape - Advanced Settings" , cancelButtonText : "Cancel" , okButtonText : "Ok" , txtNone : "None" , textWeightArrows : "Weights & Arrows" , textArrows : "Arrows" , textLineStyle : "Line Style" , textCapType : "Cap Type" , textJoinType : "Join Type" , textBeginStyle : "Begin Style" , textBeginSize : "Begin Size" , textEndStyle : "End Style" , textEndSize : "End Size" , textSize : "Size" , textWidth : "Width" , textHeight : "Height" , textKeepRatio : "Constant Proportions" , textTop : "Top" , textLeft : "Left" , textBottom : "Bottom" , textRight : "Right" , strMargins : "Text Padding" , textAlt : "Alternative Text" , textAltTitle : "Title" , textAltDescription : "Description" , textAltTip : "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table." , strColumns : "Columns" , textSpacing : "Spacing between columns" , textColNumber : "Number of columns" , textRotation : "Rotation" , textAngle : "Angle" , textFlipped : "Flipped" , textHorizontally : "Horizontally" , textVertically : "Vertically" }, PE . Views . ShapeSettingsAdvanced || {}))}), define ( "text!presentationeditor/main/app/template/TableSettingsAdvanced.template" ,[], function (){ return '<div id="id-adv-table-cell-props" class="settings-panel active">\r\n <div class="inner-content">\r\n <table cols="2" style="width: 100%;">\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <label class="header"><%= scope.textMargins %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan="2" class="padding-small">\r\n <div id="tableadv-checkbox-margins"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" width="125px">\r\n <label class="input-label"><%= scope.textTop %></label>\r\n <div id="tableadv-number-margin-top"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textLeft %></label>\r\n <div id="tableadv-number-margin-left"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textBottom %></label>\r\n <div id="tableadv-number-margin-bottom"></div>\r\n </td>\r\n <td class="padding-large">\r\n <label class="input-label"><%= scope.textRight %></label>\r\n <div id="tableadv-number-margin-right"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <label class="header"><%= scope.textDefaultMargins %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" width="125px">\r\n <label class="input-label"><%= scope.textTop %></label>\r\n <div id="tableadv-number-margin-table-top"></div>\r\n </td>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textLeft %></label>\r\n <div id="tableadv-number-margin-table-left"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <label class="input-label"><%= scope.textBottom %></label>\r\n <div id="tableadv-number-margin-table-bottom"></div>\r\n
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}}),o.push(t)):(s==Asc.c_oAscMathInterfaceScript.SubSup&&(t=new Common.UI.MenuItem({caption:i.txtScriptsBefore,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_ScriptType",value:Asc.c_oAscMathInterfaceScript.PreSubSup}}),o.push(t)),s!=Asc.c_oAscMathInterfaceScript.SubSup&&s!=Asc.c_oAscMathInterfaceScript.Sub||(t=new Common.UI.MenuItem({caption:i.txtRemSubscript,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_ScriptType",value:s==Asc.c_oAscMathInterfaceScript.SubSup?Asc.c_oAscMathInterfaceScript.Sup:Asc.c_oAscMathInterfaceScript.None}}),o.push(t)),s!=Asc.c_oAscMathInterfaceScript.SubSup&&s!=Asc.c_oAscMathInterfaceScript.Sup||(t=new Common.UI.MenuItem({caption:i.txtRemSuperscript,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_ScriptType",value:s==Asc.c_oAscMathInterfaceScript.SubSup?Asc.c_oAscMathInterfaceScript.Sub:Asc.c_oAscMathInterfaceScript.None}}),o.push(t)));break;case Asc.c_oAscMathInterfaceType.Fraction:var a=n.get_FractionType();a!=Asc.c_oAscMathInterfaceFraction.Skewed&&a!=Asc.c_oAscMathInterfaceFraction.Linear||(t=new Common.UI.MenuItem({caption:i.txtFractionStacked,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_FractionType",value:Asc.c_oAscMathInterfaceFraction.Bar}}),o.push(t)),a!=Asc.c_oAscMathInterfaceFraction.Bar&&a!=Asc.c_oAscMathInterfaceFraction.Linear||(t=new Common.UI.MenuItem({caption:i.txtFractionSkewed,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_FractionType",value:Asc.c_oAscMathInterfaceFraction.Skewed}}),o.push(t)),a!=Asc.c_oAscMathInterfaceFraction.Bar&&a!=Asc.c_oAscMathInterfaceFraction.Skewed||(t=new Common.UI.MenuItem({caption:i.txtFractionLinear,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_FractionType",value:Asc.c_oAscMathInterfaceFraction.Linear}}),o.push(t)),a!=Asc.c_oAscMathInterfaceFraction.Bar&&a!=Asc.c_oAscMathInterfaceFraction.NoBar||(t=new Common.UI.MenuItem({caption:a==Asc.c_oAscMathInterfaceFraction.Bar?i.txtRemFractionBar:i.txtAddFractionBar,equation:!0,disabled:i._currentParaObjDisabled,equationProps:{type:e,callback:"put_FractionType",value:a==Asc.c_oAscMathInterfaceFraction.Bar?Asc.c_oAscMathInterfaceFraction.NoBar:Asc.c_oAscMathInterfaceFraction.Bar}}),o.push(t));break;case Asc.c_oAscMathInterfaceType.Limit:t=new Common.UI.MenuItem({caption:n.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top?i.txtLimitUnder:i.txtLimitOver,equation:!0,disabled:i._current
menu:new Common.UI.Menu({cls:"lang-menu",menuAlign:"tl-tr",restoreHeight:285,items:[],search:!0})});var w=new Common.UI.MenuItem({caption:i.ignoreSpellText}).on("click",function(t,e){i.api.asc_ignoreMisspelledWord(i._currentSpellObj,!1),i.fireEvent("editcomplete",i)}),x=new Common.UI.MenuItem({caption:i.ignoreAllSpellText}).on("click",function(t,e){i.api.asc_ignoreMisspelledWord(i._currentSpellObj,!0),i.fireEvent("editcomplete",i)}),S=new Common.UI.MenuItem({caption:i.toDictionaryText}).on("click",function(t,e){i.api.asc_spellCheckAddToDictionary(i._currentSpellObj),i.fireEvent("editcomplete",i)}),T=new Common.UI.MenuItem({caption:"--"}),A=new Common.UI.MenuItem({caption:"--"}),k=new Common.UI.MenuItem({caption:i.advancedTableText}).on("click",function(t){if(i.api){var e=i.api.getSelectedElements();if(e&&e.length>0)for(var n,o,s=e.length-1;s>=0;s--)if(n=e[s].get_ObjectType(),o=e[s].get_ObjectValue(),Asc.c_oAscTypeSelectElement.Table==n){new PE.Views.TableSettingsAdvanced({tableProps:o,handler:function(t,e){"ok"==t&&i.api&&i.api.tblApply(e.tableProps),i.fireEvent("editcomplete",i),Common.component.Analytics.trackEvent("DocumentHolder","Table Settings Advanced")}}).show();break}}}),I=new Common.UI.MenuItem({caption:i.advancedImageText}).on("click",function(t){if(i.api){var e=i.api.getSelectedElements();if(e&&e.length>0)for(var n,o,s=e.length-1;s>=0;s--)if(n=e[s].get_ObjectType(),o=e[s].get_ObjectValue(),Asc.c_oAscTypeSelectElement.Image==n){var a;X.isDisabled()||(a=i.api.get_OriginalSizeImage())&&(a={width:a.get_ImageWidth(),height:a.get_ImageHeight()}),new PE.Views.ImageSettingsAdvanced({imageProps:o,sizeOriginal:a,handler:function(t,e){"ok"==t&&i.api&&i.api.ImgApply(e.imageProps),i.fireEvent("editcomplete",i),Common.component.Analytics.trackEvent("DocumentHolder","Image Settings Advanced")}}).show();break}}}),P=new Common.UI.MenuItem({caption:i.advancedShapeText}).on("click",function(t){if(i.api){var e=i.api.getSelectedElements();if(e&&e.length>0)for(var n,o,s=e.length-1;s>=0;s--)if(n=e[s].get_ObjectType(),o=e[s].get_ObjectValue(),Asc.c_oAscTypeSelectElement.Shape==n){new PE.Views.ShapeSettingsAdvanced({shapeProps:o,handler:function(t,e){"ok"==t&&i.api&&i.api.ShapeApply(e.shapeProps),i.fireEvent("editcomplete",i),Common.component.Analytics.trackEvent("DocumentHolder","Image Shape Advanced")}}).show();break}}}),E=new Common.UI.MenuItem({caption:i.advancedParagraphText}).on("click",function(t){if(i.api){var e=i.api.getSelectedElements();if(e&&e.length>0)for(var n,o,s=e.length-1;s>=0;s--)if(n=e[s].get_ObjectType(),o=e[s].get_ObjectValue(),Asc.c_oAscTypeSelectElement.Paragraph==n){new PE.Views.ParagraphSettingsAdvanced({paragraphProps:o,api:i.api,handler:function(t,e){"ok"==t&&i.api&&i.api.paraApply(e.paragraphProps),i.fireEvent("editcomplete",i),Common.component.Analytics.trackEvent("DocumentHolder","Image Paragraph Advanced")}}).show();break}}}),M=new Common.UI.MenuItem({caption:"--"}),U=new Common.UI.MenuItem({caption:i.hyperlinkText}).on("click",e.bind(i.addHyperlink,i)),D=new Common.UI.MenuItem({caption:i.editHyperlinkText}).on("click",e.bind(i.editHyperlink,i)),F=new Common.UI.MenuItem({caption:i.removeHyperlinkText}).on("click",function(t){i.api&&i.api.remove_Hyperlink(),i.fireEvent("editcomplete",i),Common.component.Analytics.trackEvent("DocumentHolder","Remove Hyperlink")}),B=new Common.UI.MenuItem({caption:i.hyperlinkText,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[D,F]})}),L=new Common.UI.MenuItem({caption:i.hyperlinkText}).on("click",e.bind(i.addHyperlink,i)),V=new Common.UI.MenuItem({caption:i.editHyperlinkText}).on("click",e.bind(i.editHyperlink,i)),R=new Common.UI.MenuItem({caption:i.removeHyperlinkText}).on("click",function(t){i.api&&i.api.remove_Hyperlink(),i.fireEvent("editcomplete",i),Common.component.Analytics.trackEvent("DocumentHolder","Remove Hyperlink Table")}),O=new Common.UI.MenuItem({caption:i.hyperlinkText,menu:new Common.UI.Menu({menuAlign:"tl-tr",items:[V,R]})}),N=new Common.UI.MenuItem({caption:"--"}),H=new Common.UI.MenuItem({caption:this.txtGroup,iconCls:"mnu-group"}).on("click",functi
;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/view/InsertTableDialog",["common/main/lib/component/Window"],function(){"use strict";Common.Views.InsertTableDialog=Common.UI.Window.extend(_.extend({options:{width:230,height:156,style:"min-width: 230px;",cls:"modal-dlg",split:!1},initialize:function(t){_.extend(this.options,{title:t.split?this.txtTitleSplit:this.txtTitle},t||{}),this.template=[' < div class = "box" > ',' < div class = "input-row" > ',' < label class = "text columns-text" style = "width: 130px;" > '+this.txtColumns+' < /label><div class="columns-val" style="float: right;"></div>',"</div>",'<div class="input-row" style="margin-top: 10px;">','<label class="text rows-text" style="width: 130px;">'+this.txtRows+'</label><div class="rows-val" style="float: right;"></div>',"</div>","</div>",'<div class="footer center">','<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.getChild();t.find(".dlg-btn").on("click",_.bind(this.onBtnClick,this)),this.udColumns=new Common.UI.MetricSpinner({el:t.find(".columns-val"),step:1,width:64,value:2,defaultUnit:"",maxValue:63,minValue:1,allowDecimal:!1}),this.udRows=new Common.UI.MetricSpinner({el:t.find(".rows-val"),step:1,width:64,value:2,defaultUnit:"",maxValue:100,minValue:1,allowDecimal:!1})},onBtnClick:function(t){this.options.handler&&this.options.handler.call(this,t.currentTarget.attributes.result.value,{columns:this.udColumns.getValue(),rows:this.udRows.getValue()}),this.close()},onPrimary:function(){return this.options.handler&&this.options.handler.call(this,"ok",{columns:this.udColumns.getValue(),rows:this.udRows.getValue()}),this.close(),!1},txtTitle:"Table Size",txtTitleSplit:"Split Cell",txtColumns:"Number of Columns",txtRows:"Number of Rows",textInvalidRowsCols:"You need to specify valid rows and columns count.",cancelButtonText:"Cancel",okButtonText:"Ok",txtMinText:"The minimum value for this field is {0}",txtMaxText:"The maximum value for this field is {0}"},Common.Views.InsertTableDialog||{}))}),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>',"</div>"].join("")),initialize:function(t){Common.UI.BaseView.prototype.initialize.call(this,t),this.template=this.options.template||this.template,this.cls=this.options.cls,this.style=this.options.style,this.title=this.options.title,this.owner=this.options.owner},render:function(){return this},show:function(){if(!e&&!i){if(t=this.owner instanceof Common.UI.BaseView?$(this.owner.el):$(this.owner),t.hasClass("masked"))return this;var n=this;return e=$('<div class="asc-loadmask"></div>'),i=$(this.template({id:n.id,cls:n.cls,style:n.style,title:n.title})),t.addClass("masked"),t.append(e),t.append(i),i.css({top:Math.round(t.height()/2-(i.height()+parseInt(i.css("padding-top"))+parseInt(i.css("padding-bottom")))/2)+"px",left:Math.round(t.width()/2-(i.width()+parseInt(i.css("padding-left"))+parseInt(i.css("padding-right")))/2)+"px"}),(t.height()<1||t.width()<1)&&i.css({visibility:"hidden"}),Common.util.Shortcuts.suspendEvents(),this}},hide:function(){t&&t.rem
i . on ( "hide.bs.dropdown" , _ . bind ( c , e , ! 1 , "arrow" )), i . on ( "show.bs.dropdown" , _ . bind ( c , e , ! 0 , "arrow" )), i . on ( "hidden.bs.dropdown" , _ . bind ( m , e )), $ ( "button:first" , i ). on ( "click" , r )) : i . on ( "click" , r ), i . on ( "button.internal.active" , _ . bind ( d , e )), i . on ( "mouseover" , function ( t ){ e . disabled || ( e . cmpEl . addClass ( "over" ), e . trigger ( "mouseover" , e , t ))}), i . on ( "mouseout" , function ( t ){ e . cmpEl . removeClass ( "over" ), e . disabled || e . trigger ( "mouseout" , e , t )}), Common . UI . ToggleManager . register ( e )} return e . rendered =! 0 , e . pressed && e . toggle ( e . pressed , ! 0 ), e . disabled && e . setDisabled ( ! ( e . disabled =! 1 )), e . visible || e . setVisible ( e . visible ), e . trigger ( "render:after" , e ), this }, doToggle : function (){ var t = this ; ! t . enableToggle ||! 1 === t . allowDepress && t . pressed || t . toggle ()}, toggle : function ( t , e ){ var i = void 0 === t ?! this . pressed :!! t ; this . pressed = i , this . cmpEl && this . cmpEl . trigger ( "button.internal.active" ,[ i ]), e || this . trigger ( "toggle" , this , i )}, isActive : function (){ return this . enableToggle ? this . pressed : this . cmpEl . hasClass ( "active" )}, setDisabled : function ( t ){ if ( this . rendered && this . disabled != t ){ var e = this . cmpEl , i = e . hasClass ( "btn-group" ), n = this ; if (( t =! 0 === t ) !== e . hasClass ( "disabled" )){ var o = function ( e ){ e . toggleClass ( "disabled" , t ), n . options . allowMouseEventsOnDisabled || ( t ? e . attr ({ disabled : t }) : e . removeAttr ( "disabled" ))}; o ( e ), i && o ( e . children ( "button" ))} if (( t ||! Common . Utils . isGecko ) && this . options . hint ){ var s = this . btnEl . data ( "bs.tooltip" ); s && ( t && s . hide (), ! Common . Utils . isGecko && ( s . enabled =! t )), this . btnMenuEl && ( s = this . btnMenuEl . data ( "bs.tooltip" )) && ( t && s . hide (), ! Common . Utils . isGecko && ( s . enabled =! t ))} if ( t && this . menu && _ . isObject ( this . menu ) && this . menu . rendered && this . menu . isVisible () && setTimeout ( function (){ n . menu . hide ()}, 1 ), n . options . signals ){ n . options . signals . indexOf ( "disabled" ) < 0 || n . trigger ( "disabled" , n , t )}} this . disabled = t }, isDisabled : function (){ return this . disabled }, setIconCls : function ( t ){ var e = $ ( this . el ). find ( ".icon" ), i = this . iconCls ; this . iconCls = t , e . removeClass ( i ), e . addClass ( t || "" )}, setVisible : function ( t ){ this . cmpEl && this . cmpEl . toggleClass ( "hidden" , ! t ), this . visible = t }, isVisible : function (){ return this . cmpEl ? this . cmpEl . is ( ":visible" ) : $ ( this . el ). is ( ":visible" )}, updateHint : function ( t ){ if ( this . options . hint = t , this . rendered ){ var e = this . cmpEl , i = e . closest ( ".asc-window" ); if ( ! this . btnEl ) if ( "object" == typeof this . options . hint && this . options . hint . length > 1 && $ ( "button" , e ). length > 0 ){ var n = $ ( "button" , e ); this . btnEl = $ ( n [ 0 ]), this . btnMenuEl = $ ( n [ 1 ])} else this . btnEl = e , this . btnEl . attr ( "data-toggle" , "tooltip" ); if ( this . btnEl . data ( "bs.tooltip" ) && this . btnEl . removeData ( "bs.tooltip" ), this . btnMenuEl && this . btnMenuEl . data ( "bs.tooltip" ) && this . btnMenuEl . removeData ( "bs.tooltip" ), this . btnEl . tooltip ({ title : "string" == typeof t ? t : t [ 0 ], placement : this . options . hintAnchor || "cursor" }), this . btnMenuEl && this . btnMenuEl . tooltip ({ title : t [ 1 ], placement : this . options . hintAnchor || "cursor" }), i . length > 0 && ( this . btnEl . data ( "bs.tooltip" ). tip (). css ( "z-index" , parseInt ( i . css ( "z-index" )) + 10 ), this . btnMenuEl && this . btnMenuEl . data ( "bs.tooltip" ). tip (). css ( "z-index" , parseInt ( i . css ( "z-index" )) + 10 )), this . disabled ||! Common . Utils . isGecko ){ var o = this . btnEl . data ( "bs.tooltip" ); o && ( this . disabled && o . hide (), ! Common . Utils . isGecko && ( o . enabled =! this . disabled )), this . btnMenuEl && ( o = this . btnMenuEl . data ( "bs.tooltip" )) && ( this . disabled && o . hide (), ! Common . Utils . isGecko && ( o . enabled =! this . disabled ))}}}, setCaption : function ( t ){ if ( this . caption != t && ( this . caption = t , this . rendered )){ var e = this . cmpEl . find ( "button:first > .caption" ). addBack (). filter ( "button > .caption" ); e . length > 0 ? e . text ( t ) : this . cmpEl . find ( "button:first" ). addBack (). filter ( "button" ). text ( t )}}, setMenu : function ( t ){ t && _ . isObject ( t ) && _ . isFunction ( t . render ) && ( this . menu = t , this . rendered && this . menu . render ( this . cmpEl ))}})}), void 0 === Common ) var Common = {}; if ( define ( "common/main/lib/component/ColorPalette" ,[ "common/main/lib/component/BaseView" ], function (){ "use strict" ; Common . UI . ColorPalette = Common . UI . BaseView . extend ({ options : { allowReselect :! 0 , cls : "" , style : "" }, template : _ . template ([ '<div class="palette-color">' , "<% _.each(colors, function(color, index) { %>" , '<span class="color-item" data-color="<%= color %>" style="background-color: #<%= color %>;"></span>' , "
e.onAfterHideMenu(t)},10),!1):((t.keyCode==Common.UI.Keys.HOME&&!t.shiftKey||t.keyCode==Common.UI.Keys.END&&!t.shiftKey||t.keyCode==Common.UI.Keys.BACKSPACE&&!e._input.is(" : focus "))&&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.get(e.displayField),n=t.value;e.rendered&&(document.selection?document.selection.createRange().text=i:(t.selectionStart||" 0 "==t.selectionStart)&&(t.value=i,t.selectionStart=n.length,t.selectionEnd=i.length))}},10))}},onInputKeyDown:function(t){this._inInputKeyDown=new Date;var e=this;t.keyCode==Common.UI.Keys.ESC?(this._input.val(this.lastValue),setTimeout(function(){e.closeMenu(),e.onAfterHideMenu(t)},10)):t.keyCode!=Common.UI.Keys.RETURN&&t.keyCode!=Common.UI.Keys.CTRL&&t.keyCode!=Common.UI.Keys.SHIFT&&t.keyCode!=Common.UI.Keys.ALT?(this.isMenuOpen()||t.ctrlKey||this.openMenu(),t.keyCode==Common.UI.Keys.UP||t.keyCode==Common.UI.Keys.DOWN?_.delay(function(){var i=t.keyCode==Common.UI.Keys.DOWN?e.cmpEl.find(" ul li . selected ").nextAll(" li : not (. divider ) "):e.cmpEl.find(" ul li . selected ").prevAll(" li : not (. divider ) ");i=i.length>0?i.eq(0):t.keyCode==Common.UI.Keys.DOWN?e.cmpEl.find(" ul li : not (. divider ) : first "):e.cmpEl.find(" ul li : not (. divider ) : last "),i=i.find(" a "),e._skipInputChange=!0,i.focus(),e.updateVisibleFontsTiles()},10):e._skipInputChange=!1):t.keyCode==Common.UI.Keys.RETURN&&this._input.val()===e.lastValue&&this._input.trigger(" change ",{reapply:!0})},onInputChanged:function(t,e){if(!e||!e.synthetic){if(this._skipInputChange)return void(this._skipInputChange=!1);if(this._isMouseDownMenu)return void(this._isMouseDownMenu=!1);var i=$(t.target).val(),n={};if(!(this.lastValue!==i||e&&e.reapply))return void(e&&e.onkeydown&&this.trigger(" combo : blur ",this,t));n[this.valueField]=i,n[this.displayField]=i,this.trigger(" changed : before ",this,n,t),t.isDefaultPrevented()||(this._selectedItem?(n[this.valueField]=this._selectedItem.get(this.displayField),this.setRawValue(n[this.valueField]),this.trigger(" selected ",this,_.extend({},this._selectedItem.toJSON()),t),this.addItemToRecent(this._selectedItem),this.closeMenu()):(this.setRawValue(n[this.valueField]),n.isNewFont=!0,this.trigger(" selected ",this,n,t),this.closeMenu()),this.trigger(" changed : after ",this,n,t))}},getImageUri:function(o){if(o.cloneid){var s=$(this.el).find(" ul > li # "+o.cloneid+" img ");return null!=s?s[0].src:void 0}return e?(n.clearRect(0,0,604,2*t),n.drawImage(this.spriteThumbs,0,2*-Asc.FONT_THUMBNAIL_HEIGHT*o.imgidx)):(n.clearRect(0,0,302,t),n.drawImage(this.spriteThumbs,0,-Asc.FONT_THUMBNAIL_HEIGHT*o.imgidx)),i.toDataURL()},getImageWidth:function(){return 302},getImageHeight:function(){return t},getListItemHeight:function(){return 26},loadSprite:function(t){t&&(this.spriteThumbs=new Image,this.spriteThumbs.onload=t,this.spriteThumbs.src=window.devicePixelRatio>1?s:o)},fillFonts:function(t,e){var i=this;this.loadSprite(function(){if(i.store.set(t.toJSON()),i.rendered=!1,_.isUndefined(i.scroller)||(i.scroller.destroy(),delete i.scroller),i._scrollerIsInited=!1,i.render($(i.el)),i._fontsArray=i.store.toJSON(),i.recent>0){i.store.on(" add ",i.onInsertItem,i),i.store.on(" remove ",i.onRemoveItem,i),Common.Utils.InternalSettings.set(i.appPrefix+"
lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noTextSelected , o . shapeLock , o . inEquation ], enableToggle :! 0 , toggleGroup : "superscriptGroup" }), n . paragraphControls . push ( n . btnSubscript ), n . btnFontColor = new Common . UI . Button ({ id : "id-toolbar-btn-fontcolor" , cls : "btn-toolbar" , iconCls : "btn-fontcolor" , lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noTextSelected , o . shapeLock ], split :! 0 , menu : new Common . UI . Menu ({ items : [{ template : _ . template ( '<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>' )},{ template : _ . template ( '<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + n . textNewColor + "</a>" )}]})}), n . paragraphControls . push ( n . btnFontColor ), n . btnClearStyle = new Common . UI . Button ({ id : "id-toolbar-btn-clearstyle" , cls : "btn-toolbar" , iconCls : "btn-clearstyle" , lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noParagraphSelected ]}), n . paragraphControls . push ( n . btnClearStyle ), n . btnCopyStyle = new Common . UI . Button ({ id : "id-toolbar-btn-copystyle" , cls : "btn-toolbar" , iconCls : "btn-copystyle" , lock : [ o . slideDeleted , o . lostConnect , o . noSlides , o . noParagraphSelected , o . disableOnStart ], enableToggle :! 0 }), n . slideOnlyControls . push ( n . btnCopyStyle ), n . btnMarkers = new Common . UI . Button ({ id : "id-toolbar-btn-markers" , cls : "btn-toolbar" , iconCls : "btn-setmarkers" , lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noParagraphSelected ], enableToggle :! 0 , toggleGroup : "markersGroup" , split :! 0 , menu :! 0 }), n . paragraphControls . push ( n . btnMarkers ), n . btnNumbers = new Common . UI . Button ({ id : "id-toolbar-btn-numbering" , cls : "btn-toolbar" , iconCls : "btn-numbering" , lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noParagraphSelected ], enableToggle :! 0 , toggleGroup : "markersGroup" , split :! 0 , menu :! 0 }), n . paragraphControls . push ( n . btnNumbers ); var s = function ( t ){ var e = {}; for ( var i in t ) e [ i ] = "object" == typeof t [ i ] ? s ( t [ i ]) : t [ i ]; return e }; this . mnuMarkersPicker = { conf : { index : 0 }, selectByIndex : function ( t ){ this . conf . index = t }}, this . mnuNumbersPicker = s ( this . mnuMarkersPicker ), n . btnHorizontalAlign = new Common . UI . Button ({ id : "id-toolbar-btn-halign" , cls : "btn-toolbar" , iconCls : "btn-align-left" , icls : "btn-align-left" , lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noParagraphSelected ], menu : new Common . UI . Menu ({ items : [{ caption : n . textAlignLeft + Common . Utils . String . platformKey ( "Ctrl+L" ), iconCls : "mnu-align-left" , icls : "btn-align-left" , checkable :! 0 , toggleGroup : "halignGroup" , checked :! 0 , value : 1 },{ caption : n . textAlignCenter + Common . Utils . String . platformKey ( "Ctrl+E" ), iconCls : "mnu-align-center" , icls : "btn-align-center" , checkable :! 0 , toggleGroup : "halignGroup" , value : 2 },{ caption : n . textAlignRight + Common . Utils . String . platformKey ( "Ctrl+R" ), iconCls : "mnu-align-right" , icls : "btn-align-right" , checkable :! 0 , toggleGroup : "halignGroup" , value : 0 },{ caption : n . textAlignJust + Common . Utils . String . platformKey ( "Ctrl+J" ), iconCls : "mnu-align-just" , icls : "btn-align-just" , checkable :! 0 , toggleGroup : "halignGroup" , value : 3 }]})}), n . paragraphControls . push ( n . btnHorizontalAlign ), n . btnVerticalAlign = new Common . UI . Button ({ id : "id-toolbar-btn-valign" , cls : "btn-toolbar" , lock : [ o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noParagraphSelected , o . noObjectSelected ], iconCls : "btn-align-middle" , icls : "btn-align-middle" , menu : new Common . UI . Menu ({ items : [{ caption : n . textAlignTop , iconCls : "mnu-align-top" , icls : "btn-align-top" , checkable :! 0 , toggleGroup : "valignGroup" , value : Asc . c_oAscVAlign . Top },{ caption : n . textAlignMiddle , iconCls : "mnu-align-middle" , icls : "btn-align-middle" , checkable :! 0 , toggleGroup : "valignGroup" , value : Asc . c_oAscVAlign . Center , checked :! 0 },{ caption : n . textAlignBottom , iconCls : "mnu-align-bottom" , icls : "btn-align-bottom" , checkable :! 0 , toggleGroup : "valignGroup" , value : Asc . c_oAscVAlign . Bottom }]})}), n . paragraphControls . push ( n . btnVerticalAlign ), n . btnDecLeftOffset = new Common . UI . Button ({ id : "id-toolbar-btn-decoffset" , cls : "btn-toolbar" , iconCls : "btn-decoffset" , lock : [ o . decIndentLock , o . slideDeleted , o . paragraphLock , o . lostConnect , o . noSlides , o . noParagraphSelected ]}), n . paragraphControls . push ( n . btnDecLeftOffset ), n . btnIncLeftOffset = new Common . UI . Button ({ id : "id-toolbar-btn-incoffset" , cls : "bt
var e=t.dataViewItems,i=$(e[0].el),n=i.outerWidth()+parseInt(i.css(" margin - left "))+parseInt(i.css(" margin - right ")),o=Math.floor(t.options.restoreWidth/n+.5)||1,s=0,a=0;t.cmpEl.width(n*o+11);for(var l=0;l<e.length;l++){var r=$(e[l].el).find(" . title "),c=r.height();c>a?a=c:r.css({height:a}),s++,s>o-1&&(s=0,a=0)}t._needRecalcSlideLayout=!1}},updateTextartMenu:function(t){var e=this,i=e.btnInsertTextArt;i.textartPicker?i.textartPicker.store.size()==t.size()?i.textartPicker.store.each(function(e,i){e.set(" imageUrl ",t.at(i).get(" imageUrl "))}):i.textartPicker.store.reset(t.models):(i.textartPicker=new Common.UI.DataView({el:$(" # view - insert - art ",i.menu.$el),store:t,parentMenu:i.menu,showLast:!1,itemTemplate:_.template('<div class=" item - art "><img src=" <%= imageUrl %> " id=" <%= id %> " style=" width : 50 px ; height : 50 px ; "></div>')}),i.textartPicker.on(" item : click ",function(t,n,o,s){o&&e.fireEvent(" insert : textart ",[o.get(" data ")])," click "!==s.type&&i.menu.hide()}))},updateAutoshapeMenu:function(t){for(var e=this,i=0;i<t.size();i++){var n=t.at(i);e.btnsInsertShape.forEach(function(t,o){var s=new Common.UI.MenuItem({caption:n.get(" groupName "),menu:new Common.UI.Menu({menuAlign:" tl - tr ",items:[{template:_.template('<div class=" shapegroup - '+i+' " class=" menu - shape " style=" width : '+(n.get("groupWidth")-8)+' px ; margin - left : 5 px ; "></div>')}]})});t.menu.addItem(s),new Common.UI.DataView({el:$(" . shapegroup - "+i,s.$el),store:n.get(" groupStore "),parentMenu:s.menu,showLast:!1,itemTemplate:_.template('<div class=" item - shape " id=" <%= id %> "><svg width=" 20 " height=" 20 " class=" icon "><use xlink:href=" # svg - icon -<%= data . shapeType %> "></use></svg></div>')}).on(" item : click ",function(t,i,n,o){" click "!==o.type&&Common.UI.Menu.Manager.hideAll(),n&&e.fireEvent(" insert : shape ",[n.get(" data ").shapeType])})})}},updateAddSlideMenu:function(t){if(!(t.size()<1)){var e=this;e.btnsAddSlide.forEach(function(t,i){t.mnuAddSlidePicker||(t.mnuAddSlidePicker=new Common.UI.DataView({el:$(" # id - toolbar - menu - addslide - "+i),parentMenu:t.menu,showLast:!1,restoreHeight:300,restoreWidth:302,style:" max - height : 300 px ; ",store:PE.getCollection(" SlideLayouts "),itemTemplate:_.template(['<div class=" layout " id=" <%= id %> " style=" width : <%= itemWidth %> px ; ">','<div style=" background - image : url ( <%= imageUrl %> ); width : <%= itemWidth %> px ; height : <%= itemHeight %> px ; "/>','<div class=" title "><%= title %></div> '," < /div>"].join(""))}),t.mnuAddSlidePicker.on("item:click",function(t,i,n,o){"click"!==o.type&&Common.UI.Menu.Manager.hideAll(),n&&e.fireEvent("add:slide",[n.get("data").idx])}),t.menu&&t.menu.on("show:after",function(){e.onSlidePickerShowAfter(t.mnuAddSlidePicker),t.mnuAddSlidePicker.scroller.update({alwaysVisibleY:!0}),t.mnuAddSlidePicker.scroller.scrollTop(0)})),t.mnuAddSlidePicker._needRecalcSlideLayout=!0})}},textBold:"Bold",textItalic:"Italic",textUnderline:"Underline",textStrikeout:"Strikeout",textSuperscript:"Superscript",textSubscript:"Subscript",tipFontName:"Font Name",tipFontSize:"Font Size",tipCopy:"Copy",tipPaste:"Paste",tipUndo:"Undo",tipRedo:"Redo",tipPrint:"Print",tipSave:"Save",tipFontColor:"Font color",tipMarkers:"Bullets",tipNumbers:"Numbering",tipBack:"Back",tipClearStyle:"Clear Style",tipCopyStyle:"Copy Style",textTitleError:"Error",tipHAligh:"Horizontal Align",tipVAligh:"Vertical Align",textAlignTop:"Align text to the top",textAlignMiddle:"Align text to the middle",textAlignBottom:"Align text to the bottom",textAlignLeft:"Left align text",textAlignRight:"Right align text",textAlignCenter:"Center text",textAlignJust:"Justify",tipDecPrLeft:"Decrease Indent",tipIncPrLeft:"Increase Indent",tipLineSpace:"Line Spacing",tipInsertTable:"Insert Table",tipInsertImage:"Insert Image",mniImageFromFile:"Image from file",mniImageFromUrl:"Image from url",mniCustomTable:"Insert Custom Table",tipInsertHyperlink:"Add Hyperlink",tipInsertText:"Insert Text",tipInsertTextArt:"Insert Text Art",tipInsertShape:"Insert Autoshape",tipPreview:"Start Slideshow",tipAddSlide:"Add Slide",tipShapeAlign:"Align Shape",tipShapeArrange:"Arrange Shape",textShapeAlignLeft:"Align Left",textShapeAlignRight:"Al
this . diagramEditor = null , this . editMode =! 0 , this . addListeners ({ Toolbar : { "insert:image" : this . onInsertImageClick . bind ( this ), "insert:text" : this . onInsertText . bind ( this ), "insert:textart" : this . onInsertTextart . bind ( this ), "insert:shape" : this . onInsertShape . bind ( this ), "add:slide" : this . onAddSlide . bind ( this ), "change:compact" : this . onClickChangeCompact }, FileMenu : { "menu:hide" : this . onFileMenu . bind ( this , "hide" ), "menu:show" : this . onFileMenu . bind ( this , "show" )}, "Common.Views.Header" : { "toolbar:setcompact" : this . onChangeCompactView . bind ( this ), print : function ( t ){ this . getApplication (). getController ( "Main" ). onPrint ()}, save : function ( t ){ this . api . asc_Save ()}, undo : this . onUndo , redo : this . onRedo , downloadas : function ( t ){ var e , i = this . getApplication (). getController ( "Main" ), n = i . document . fileType ; n && ( e = Asc . c_oAscFileType [ n . toUpperCase ()]); var o = [ Asc . c_oAscFileType . PPTX , Asc . c_oAscFileType . ODP , Asc . c_oAscFileType . PDFA , Asc . c_oAscFileType . POTX , Asc . c_oAscFileType . OTP ];( ! e || o . indexOf ( e ) < 0 ) && ( e = Asc . c_oAscFileType . PDF ), i . api . asc_DownloadAs ( new Asc . asc_CDownloadOptions ( e ))}, "go:editor" : function (){ Common . Gateway . requestEditRights ()}}}); var t = this , e = function ( e ){ var i = $ ( e . target ), n = i . closest ( "#editor_sdk" ), o = i . closest ( "button" ). attr ( "id" ); void 0 === o && ( o = i . closest ( ".btn-group" ). attr ( "id" )), "editor_sdk" != i . attr ( "id" ) && n . length <= 0 && ( t . toolbar . btnsInsertText . pressed () &&! t . toolbar . btnsInsertText . contains ( o ) || t . toolbar . btnsInsertShape . pressed () &&! t . toolbar . btnsInsertShape . contains ( o ) ? ( t . _isAddingShape =! 1 , t . _addAutoshape ( ! 1 ), t . toolbar . btnsInsertShape . toggle ( ! 1 , ! 0 ), t . toolbar . btnsInsertText . toggle ( ! 1 , ! 0 ), Common . NotificationCenter . trigger ( "edit:complete" , t . toolbar )) : t . toolbar . btnsInsertShape . pressed () && t . toolbar . btnsInsertShape . contains ( o ) && _ . defer ( function (){ t . api . StartAddShape ( "" , ! 1 ), Common . NotificationCenter . trigger ( "edit:complete" , t . toolbar )}, 100 ))}; this . onApiEndAddShape = function (){ this . toolbar . fireEvent ( "insertshape" , this . toolbar ), this . toolbar . btnsInsertShape . pressed () && this . toolbar . btnsInsertShape . toggle ( ! 1 , ! 0 ), this . toolbar . btnsInsertText . pressed () && this . toolbar . btnsInsertText . toggle ( ! 1 , ! 0 ), $ ( document . body ). off ( "mouseup" , e )}, this . _addAutoshape = function ( t , i ){ this . api && ( t ? ( this . api . StartAddShape ( i , ! 0 ), $ ( document . body ). on ( "mouseup" , e )) : ( this . api . StartAddShape ( "" , ! 1 ), $ ( document . body ). off ( "mouseup" , e )))}}, onLaunch : function (){ var t = this ; t . toolbar = t . createView ( "Toolbar" ), Common . NotificationCenter . on ( "app:ready" , t . onAppReady . bind ( t )), Common . NotificationCenter . on ( "app:face" , t . onAppShowed . bind ( t )), PE . getCollection ( "Common.Collections.TextArt" ). bind ({ reset : t . onResetTextArt . bind ( this )}), PE . getCollection ( "ShapeGroups" ). bind ({ reset : t . onResetAutoshapes . bind ( this )}), PE . getCollection ( "SlideLayouts" ). bind ({ reset : t . onResetSlides . bind ( this )})}, setMode : function ( t ){ this . mode = t , this . toolbar . applyLayout ( t )}, attachUIEvents : function ( t ){ t . mnuChangeSlidePicker && t . mnuChangeSlidePicker . on ( "item:click" , _ . bind ( this . onChangeSlide , this )), t . btnPreview . on ( "click" , _ . bind ( this . onPreviewBtnClick , this )), t . btnPreview . menu . on ( "item:click" , _ . bind ( this . onPreviewItemClick , this )), t . btnPrint . on ( "click" , _ . bind ( this . onPrint , this )), t . btnPrint . on ( "disabled" , _ . bind ( this . onBtnChangeState , this , "print:disabled" )), t . btnSave . on ( "click" , _ . bind ( this . onSave , this )), t . btnUndo . on ( "click" , _ . bind ( this . onUndo , this )), t . btnUndo . on ( "disabled" , _ . bind ( this . onBtnChangeState , this , "undo:disabled" )), t . btnRedo . on ( "click" , _ . bind ( this . onRedo , this )), t . btnRedo . on ( "disabled" , _ . bind ( this . onBtnChangeState , this , "redo:disabled" )), t . btnCopy . on ( "click" , _ . bind ( this . onCopyPaste , this , ! 0 )), t . btnPaste . on ( "click" , _ . bind ( this . onCopyPaste , this , ! 1 )), t . btnBold . on ( "click" , _ . bind ( this . onBold , this )), t . btnItalic . on ( "click" , _ . bind ( this . onItalic , this )), t . btnUnderline . on ( "click" , _ . bind ( this . onUnderline , this )), t . btnStrikeout . on ( "click" , _ . bind ( this . onStrikeout , this )), t . btnSuperscript . on ( "click" , _ . bind ( this . onSuperscript , this )), t . btnSubscript . on ( "click" , _ . bind ( this . onSubscript , this )), t . btnHorizontalAlign . menu . on ( "item:click" , _ . bind ( this . onMenuHorizontalAlignSelect , this )), t . btnVerticalAlign . menu . on ( "item:click" , _ . bind ( this . onMenuVerticalAlignSelect , this )), t . btnDecLeftOffset . on ( "click" ,
onInsertTableClick : function ( t , e , i ){ if ( "custom" === e . value ){ var n = this ; new Common . Views . InsertTableDialog ({ handler : function ( t , e ){ "ok" == t && ( n . api && ( n . toolbar . fireEvent ( "inserttable" , n . toolbar ), n . api . put_Table ( e . columns , e . rows )), Common . component . Analytics . trackEvent ( "ToolBar" , "Table" )), Common . NotificationCenter . trigger ( "edit:complete" , n . toolbar )}}). show ()}}, onInsertImageClick : function ( t , e ){ var i = this ; "file" === t ? ( i . toolbar . fireEvent ( "insertimage" , this . toolbar ), i . api . asc_addImage (), Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ), Common . component . Analytics . trackEvent ( "ToolBar" , "Image" )) : "url" === t ? new Common . Views . ImageFromUrlDialog ({ handler : function ( t , e ){ if ( "ok" == t ){ if ( i . api ){ var n = e . replace ( / /g , "" ); _ . isEmpty ( n ) ? Common . UI . warning ({ msg : this . textEmptyImgUrl }) : ( i . toolbar . fireEvent ( "insertimage" , i . toolbar ), i . api . AddImageUrl ( n ), Common . component . Analytics . trackEvent ( "ToolBar" , "Image" ))} Common . NotificationCenter . trigger ( "edit:complete" , i . toolbar )}}}). show () : "storage" === t && ( this . toolbar . mode . canRequestInsertImage ? Common . Gateway . requestInsertImage () : new Common . Views . SelectFileDlg ({ fileChoiceUrl : this . toolbar . mode . fileChoiceUrl . replace ( "{fileExt}" , "" ). replace ( "{documentType}" , "ImagesOnly" )}). on ( "selectfile" , function ( t , e ){ i . insertImage ( e )}). show ())}, insertImage : function ( t ){ t && t . url && ( this . toolbar . fireEvent ( "insertimage" , this . toolbar ), this . api . AddImageUrl ( t . url , void 0 , t . token ), Common . component . Analytics . trackEvent ( "ToolBar" , "Image" ))}, onInsertText : function ( t ){ "begin" == t ? ( this . _addAutoshape ( ! 0 , "textRect" ), this . toolbar . btnsInsertText . pressed () || this . toolbar . btnsInsertText . toggle ( ! 0 , ! 0 )) : this . _addAutoshape ( ! 1 , "textRect" ), this . toolbar . btnsInsertShape . pressed () && this . toolbar . btnsInsertShape . toggle ( ! 1 , ! 0 ), Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ), Common . component . Analytics . trackEvent ( "ToolBar" , "Add Text" )}, onInsertShape : function ( t ){ var e = this ; "menu:hide" == t ? ( e . toolbar . btnsInsertShape . pressed () &&! e . _isAddingShape && e . toolbar . btnsInsertShape . toggle ( ! 1 , ! 0 ), e . _isAddingShape =! 1 , Common . NotificationCenter . trigger ( "edit:complete" , e . toolbar )) : ( e . _addAutoshape ( ! 0 , t ), e . _isAddingShape =! 0 , e . toolbar . btnsInsertText . pressed () && e . toolbar . btnsInsertText . toggle ( ! 1 , ! 0 ), Common . NotificationCenter . trigger ( "edit:complete" , e . toolbar ), Common . component . Analytics . trackEvent ( "ToolBar" , "Add Shape" ))}, onInsertTextart : function ( t ){ var e = this ; e . toolbar . fireEvent ( "inserttextart" , e . toolbar ), e . api . AddTextArt ( t ), e . toolbar . btnsInsertShape . pressed () && e . toolbar . btnsInsertShape . toggle ( ! 1 , ! 0 ), Common . NotificationCenter . trigger ( "edit:complete" , e . toolbar ), Common . component . Analytics . trackEvent ( "ToolBar" , "Add Text Art" )}, onEditHeaderClick : function ( t , e ){ for ( var i = this . api . getSelectedElements (), n =! 1 , o = 0 ; o < i . length ; o ++ ) if ( i [ o ]. get_ObjectType () == Asc . c_oAscTypeSelectElement . Paragraph ){ n =! 0 ; break } if ( n && "slidenum" == t ) this . api . asc_addSlideNumber (); else if ( n && "datetime" == t ){ var s = this ; new PE . Views . DateTimeDialog ({ api : this . api , lang : this . _state . lang , handler : function ( t , e ){ "ok" == t && s . api && s . api . asc_addDateTime ( e ), Common . NotificationCenter . trigger ( "edit:complete" , s . toolbar )}}). show ()} else { var s = this ; new PE . Views . HeaderFooterDialog ({ api : this . api , lang : this . api . asc_getDefaultLanguage (), props : this . api . asc_getHeaderFooterProperties (), handler : function ( t , e ){ "ok" != t && "all" != t || s . api && s . api . asc_setHeaderFooterProperties ( e , "all" == t ), Common . NotificationCenter . trigger ( "edit:complete" , s . toolbar )}}). show ()}}, onClearStyleClick : function ( t , e ){ this . api && this . api . ClearFormating (), Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar )}, onCopyStyleToggle : function ( t , e , i ){ this . api && this . api . SetPaintFormat ( e ? 1 : 0 ), Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ), this . modeAlwaysSetStyle = e }, onColorSchemaClick : function ( t , e ){ this . api && ( this . api . ChangeColorScheme ( e . value ), Common . component . Analytics . trackEvent ( "ToolBar" , "Color Scheme" )), Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar )}, onColorSchemaShow : function ( t ){ if ( this . api ){ var e = this . api . asc_GetCurrentColorSchemeName (), i = _ . find ( t . items , function ( t ){ return t . value == e }); i ? i . setChecked ( ! 0 ) : t . clearAll ()}}, onSli
return '\r\n<div class="statusbar" style="display:table;">\r\n <div class="status-group">\r\n <div id="slot-status-btn-preview" style="display: inline-block;margin-left: 9px;"></div>\r\n </div>\r\n <div class="status-group dropup">\r\n <label id="status-label-pages" class="status-label dropdown-toggle" style="margin-left: 7px; display: none;" 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:22px;"><%= scope.goToPageText %></label>\r\n <div id="status-goto-page" style="display:inline-block;"></div>\r\n </div>\r\n </div>\r\n <div id="status-users-ct" class="status-group dropup" style="display:none;">\r\n <div class="separator short" style="margin-right: 12px; margin-left: 40px;" />\r\n <div id="status-users-block" style="display:inline-block; cursor:pointer;">\r\n <span id="status-users-icon" class="img-commonctrl" style="margin-bottom: 2px;"/>\r\n <label id="status-users-count" class="status-label" style="font-size: 14px; font-weight: normal; margin-top: -1px;">+</label>\r\n </div>\r\n <div id="status-users-menu" class="dropdown-menu">\r\n <label style="display: block;margin-right: 14px;"><%= scope.tipUsers %></label>\r\n <div id="status-users-list"></div>\r\n <label id="status-change-rights" class="link" style="margin-top: 15px;"><%= scope.txAccessRights %></label>\r\n </div>\r\n <div class="separator short" style="margin-left: 10px;" />\r\n </div>\r\n <div class="status-group" style="width:100%; text-align:center;">\r\n <label id="status-label-action" class="status-label"></label>\r\n </div>\r\n <div class="status-group" style="">\r\n <div class="cnt-lang el-edit">\r\n <div class="dropdown-toggle" data-toggle="dropdown" style="margin-right: 6px;">\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 <span id="btn-doc-lang" class="el-edit"></span>\r\n <span id="btn-doc-spell" class="el-edit"></span>\r\n <div class="separator short el-edit"></div>\r\n <button id="btn-zoom-topage" type="button" class="btn small btn-toolbar"><i class="icon"></i></button>\r\n <button id="btn-zoom-towidth" type="button" class="btn small btn-toolbar"><i class="icon"></i></button>\r\n <button id="btn-zoom-down" type="button" class="btn small btn-toolbar"><i class="icon"></i></button>\r\n <div class="cnt-zoom">\r\n <div class="dropdown-toggle" data-toggle="dropdown">\r\n <label id="status-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:40px;"><i class="icon"></i></button>\r\n </div>\r\n</div>\r\n' }), define ( "presentationeditor/main/app/view/Statusbar" ,[ "text!presentationeditor/main/app/template/StatusBar.template" , "backbone" , "tip" , "common/main/lib/component/Menu" , "common/main/lib/component/Window" , "presentationeditor/main/app/model/Pages" ], function ( t , e ){ "use strict" ; function i ( t ){ this . pages . get ( "count" ) < 0 && $ ( "#status-label-pages" ). css ( "display" , "inline-block" ), this . pages . set ( "count" , t ); var e = t <= 0 ; this . btnPreview . isDisabled () !== e && this . btnPreview . setDisabled ( e )} function n ( t ){ this . pages . set ( "current" , t + 1 )} function o ( t , e , i ){ $ ( "#status-label-pages" ). text ( Common . Utils . String . format ( this . pageIndexText , t . get ( "current" ), t . get ( "count" )))} function s ( t , e , i ){ t . $el . parent (). find ( "#status-label-lang" ). text ( e . caption ), this . langMenu . prevTip = e . value . value , this . fireEvent ( "langchanged" ,[ this , e . value . code , e . caption ])} _ . template ( "Slide <%= current %> of <%= count %>" ); PE . Views . Statusbar = e . View . extend ( _ . extend ({ el : "#statusbar" , template : _ . template ( t ), events : {}, api : void 0 , pa
this . cmbLanguage . scroller && this . cmbLanguage . scroller . update ({ alwaysVisibleY :! 0 }), this . cmbLanguage . on ( "selected" , _ . bind ( this . onLangSelect , this )); var e = Common . util . LanguageInfo . getLocalLanguageName ( this . options . current ); this . cmbLanguage . setValue ( e [ 0 ], e [ 1 ]), this . onLangSelect ( this . cmbLanguage , this . cmbLanguage . getSelectedRecord ())}, close : function ( t ){ this . getChild (). find ( ".combobox.open" ). length || Common . UI . Window . prototype . close . call ( this , arguments )}, onBtnClick : function ( t ){ this . options . handler && this . options . handler . call ( this , t . currentTarget . attributes . result . value , this . cmbLanguage . getValue ()), this . close ()}, onLangSelect : function ( t , e , i ){ t . $el . find ( ".input-icon" ). toggleClass ( "spellcheck-lang" , e && e . spellcheck ), t . _input . css ( "padding-left" , e && e . spellcheck ? 25 : 3 )}, onPrimary : function (){ return this . options . handler && this . options . handler . call ( this , "ok" , this . cmbLanguage . getValue ()), this . close (), ! 1 }, labelSelect : "Select document language" , btnCancel : "Cancel" , btnOk : "Ok" }, Common . Views . LanguageDialog || {}))}), define ( "presentationeditor/main/app/controller/Statusbar" ,[ "core" , "presentationeditor/main/app/view/Statusbar" , "common/main/lib/util/LanguageInfo" , "common/main/lib/view/LanguageDialog" ], function (){ "use strict" ; PE . Controllers . Statusbar = Backbone . Controller . extend ( _ . extend ({ models : [], collections : [], views : [ "Statusbar" ], initialize : function (){ var t = this ; this . addListeners ({ Statusbar : { langchanged : this . onLangMenu }, "Common.Views.Header" : { "statusbar:hide" : function ( e , i ){ t . statusbar . setVisible ( ! i ), Common . localStorage . setBool ( "pe-hidden-status" , i ), Common . NotificationCenter . trigger ( "layout:changed" , "status" ), Common . NotificationCenter . trigger ( "edit:complete" , this . statusbar )}}}), this . _state = { zoom_type : void 0 , zoom_percent : void 0 }}, events : function (){ return { "click #btn-zoom-down" : _ . bind ( this . zoomDocument , this , "down" ), "click #btn-zoom-up" : _ . bind ( this . zoomDocument , this , "up" )}}, onLaunch : function (){ this . statusbar = this . createView ( "Statusbar" ,{}). render (), this . statusbar . $el . css ( "z-index" , 1 ), this . bindViewEvents ( this . statusbar , this . events ), $ ( "#status-label-zoom" ). css ( "min-width" , 80 ), this . statusbar . btnZoomToPage . on ( "click" , _ . bind ( this . onBtnZoomTo , this , "topage" )), this . statusbar . btnZoomToWidth . on ( "click" , _ . bind ( this . onBtnZoomTo , this , "towidth" )), this . statusbar . zoomMenu . on ( "item:click" , _ . bind ( this . menuZoomClick , this )), this . statusbar . btnPreview . on ( "click" , _ . bind ( this . onPreviewBtnClick , this )), this . statusbar . btnPreview . menu . on ( "item:click" , _ . bind ( this . onPreviewItemClick , this )); var t = this ; Common . NotificationCenter . on ( "app:face" , function ( e ){ if ( e . isEdit ){ var i = t . getApplication (). getController ( "Common.Controllers.ReviewChanges" ). getView (); t . btnSpelling = i . getButton ( "spelling" , "statusbar" ), t . btnSpelling . render ( t . statusbar . $el . find ( "#btn-doc-spell" )), t . btnDocLang = i . getButton ( "doclang" , "statusbar" ), t . btnDocLang . render ( t . statusbar . $el . find ( "#btn-doc-lang" ))} else t . statusbar . $el . find ( ".el-edit, .el-review" ). hide ()})}, setApi : function ( t ){ this . api = t , this . api . asc_registerCallback ( "asc_onZoomChange" , _ . bind ( this . _onZoomChange , this )), this . api . asc_registerCallback ( "asc_onTextLanguage" , _ . bind ( this . _onTextLanguage , this )), this . statusbar . setApi ( t )}, onBtnZoomTo : function ( t , e , i ){ this . _state . zoom_type = void 0 , this . _state . zoom_percent = void 0 , e . pressed ? this . api [ "topage" == t ? "zoomFitToPage" : "zoomFitToWidth" ]() : this . api . zoomCustomMode (), Common . NotificationCenter . trigger ( "edit:complete" , this . statusbar )}, zoomDocument : function ( t , e ){ switch ( this . _state . zoom_type = void 0 , this . _state . zoom_percent = void 0 , t ){ case "up" : this . api . zoomIn (); break ; case "down" : this . api . zoomOut ()} Common . NotificationCenter . trigger ( "edit:complete" , this . statusbar )}, menuZoomClick : function ( t , e ){ this . _state . zoom_type = void 0 , this . _state . zoom_percent = void 0 , this . api . zoom ( e . value ), Common . NotificationCenter . trigger ( "edit:complete" , this . statusbar )}, onPreview : function ( t , e ){ Common . NotificationCenter . trigger ( "preview:start" , _ . isNumber ( t ) ? t : 0 , e )}, onPreviewBtnClick : function ( t , e ){ this . onPreview ( this . api . getCurrentPage ())}, onPreviewItemClick : function ( t , e ){ switch ( e . value ){ case 0 : this . onPreview ( 0 ); break ; case 1 : this . onPreview ( this . api . getCurrentPage ()); break ; case
textHeight : "Height" , textTitle : "Image - Advanced Settings" , textKeepRatio : "Constant Proportions" , cancelButtonText : "Cancel" , okButtonText : "Ok" , textPlacement : "Placement" , textAlt : "Alternative Text" , textAltTitle : "Title" , textAltDescription : "Description" , textAltTip : "The alternative text-based representation of the visual object information, which will be read to the people with vision or cognitive impairments to help them better understand what information there is in the image, autoshape, chart or table." , textRotation : "Rotation" , textAngle : "Angle" , textFlipped : "Flipped" , textHorizontally : "Horizontally" , textVertically : "Vertically" }, PE . Views . ImageSettingsAdvanced || {}))}), define ( "presentationeditor/main/app/view/ImageSettings" ,[ "text!presentationeditor/main/app/template/ImageSettings.template" , "jquery" , "underscore" , "backbone" , "common/main/lib/component/Button" , "common/main/lib/view/ImageFromUrlDialog" , "presentationeditor/main/app/view/ImageSettingsAdvanced" ], function ( t , e , i , n ){ "use strict" ; PE . Views . ImageSettings = n . View . extend ( i . extend ({ el : "#id-image-settings" , template : i . template ( t ), events : {}, options : { alias : "ImageSettings" }, initialize : function (){ this . _initSettings =! 0 , this . _state = { Width : 0 , Height : 0 , DisabledControls :! 1 , isOleObject :! 1 , cropMode :! 1 }, this . lockedControls = [], this . _locked =! 1 , this . _noApply =! 1 , this . _originalProps = null , this . render (), this . labelWidth = e ( this . el ). find ( "#image-label-width" ), this . labelHeight = e ( this . el ). find ( "#image-label-height" )}, render : function (){ e ( this . el ). html ( this . template ({ scope : this }))}, setApi : function ( t ){ return this . api = t , this . api && this . api . asc_registerCallback ( "asc_ChangeCropState" , i . bind ( this . _changeCropState , this )), this }, updateMetricUnit : function (){ var t = Common . Utils . Metric . fnRecalcFromMM ( this . _state . Width ); this . labelWidth [ 0 ]. innerHTML = this . textWidth + ": " + t . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName (), t = Common . Utils . Metric . fnRecalcFromMM ( this . _state . Height ), this . labelHeight [ 0 ]. innerHTML = this . textHeight + ": " + t . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ()}, createDelayedControls : function (){ this . btnOriginalSize = new Common . UI . Button ({ el : e ( "#image-button-original-size" )}), this . lockedControls . push ( this . btnOriginalSize ), this . btnInsertFromFile = new Common . UI . Button ({ el : e ( "#image-button-from-file" )}), this . lockedControls . push ( this . btnInsertFromFile ), this . btnInsertFromUrl = new Common . UI . Button ({ el : e ( "#image-button-from-url" )}), this . lockedControls . push ( this . btnInsertFromUrl ), this . btnEditObject = new Common . UI . Button ({ el : e ( "#image-button-edit-object" )}), this . lockedControls . push ( this . btnEditObject ), this . btnOriginalSize . on ( "click" , i . bind ( this . setOriginalSize , this )), this . btnInsertFromFile . on ( "click" , i . bind ( function ( t ){ this . _isFromFile || ( this . _isFromFile =! 0 , this . api && this . api . ChangeImageFromFile (), this . fireEvent ( "editcomplete" , this ), this . _isFromFile =! 1 )}, this )), this . btnInsertFromUrl . on ( "click" , i . bind ( this . insertFromUrl , this )), this . btnEditObject . on ( "click" , i . bind ( function ( t ){ this . api && this . api . asc_startEditCurrentOleObject (), this . fireEvent ( "editcomplete" , this )}, this )), this . btnCrop = new Common . UI . Button ({ cls : "btn-text-split-default" , caption : this . textCrop , split :! 0 , enableToggle :! 0 , allowDepress :! 0 , pressed : this . _state . cropMode , width : 100 , menu : new Common . UI . Menu ({ style : "min-width: 100px;" , items : [{ caption : this . textCrop , checkable :! 0 , allowDepress :! 0 , checked : this . _state . cropMode , value : 0 },{ caption : this . textCropFill , value : 1 },{ caption : this . textCropFit , value : 2 }]})}), this . btnCrop . render ( e ( "#image-button-crop" )), this . btnCrop . on ( "click" , i . bind ( this . onCrop , this )), this . btnCrop . menu . on ( "item:click" , i . bind ( this . onCropMenu , this )), this . lockedControls . push ( this . btnCrop ), this . btnRotate270 = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "rotate-270" , value : 0 , hint : this . textHint270 }), this . btnRotate270 . render ( e ( "#image-button-270" , this . $el )), this . btnRotate270 . on ( "click" , i . bind ( this . onBtnRotateClick , this )), this . lockedControls . push ( this . btnRotate270 ), this . btnRotate90 = new Common . UI . Button ({ cls : "btn-toolbar" , iconCls : "rotate-90" , value : 1 , hint : this . textHint90 }), this . btnRotate90 . render ( e ( "#image-button-90" , this . $el )), this . btnRotate90 . on ( "click" , i
return '<table cols="2">\r\n <tr>\r\n <td width="50%">\r\n <label class="header"><%= scope.textRows %></label>\r\n </td>\r\n <td width="50%">\r\n <label class="header"><%= scope.textColumns %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="table-checkbox-header"></div>\r\n </td>\r\n <td class="padding-small">\r\n <div id="table-checkbox-first"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="table-checkbox-total"></div>\r\n </td>\r\n <td class="padding-small">\r\n <div id="table-checkbox-last"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small">\r\n <div id="table-checkbox-banded"></div>\r\n </td>\r\n <td class="padding-small">\r\n <div id="table-checkbox-col-banded"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=2>\r\n <label class="header"><%= scope.textTemplate %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <div class="" id="table-combo-template" style="width: 100%; height: 64px;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" colspan=2>\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <label class="header"><%= scope.textBorders %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" colspan=2>\r\n <div id="table-combo-border-size" style="display: inline-block; vertical-align: middle; width: 93px;"></div>\r\n <div style="display: inline-block; float:right;vertical-align: middle;">\r\n <label class="input-label" style="margin-right: 5px;"><%= scope.textBorderColor %></label>\r\n <div id="table-border-color-btn" style="display: inline-block;"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" colspan=2>\r\n <label class="input-label"><%= scope.textSelectBorders %></label>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <div id="table-button-border-all" style="display: inline-block;"></div>\r\n <div id="table-button-border-none" style="display: inline-block;"></div>\r\n <div id="table-button-border-inner" style="display: inline-block;"></div>\r\n <div id="table-button-border-outer" style="display: inline-block;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=2 class="padding-small">\r\n <div id="table-button-border-left" style="display: inline-block;"></div>\r\n <div id="table-button-border-inner-vert" style="display: inline-block;"></div>\r\n <div id="table-button-border-right" style="display: inline-block;"></div>\r\n <div id="table-button-border-top" style="display: inline-block;"></div>\r\n <div id="table-button-border-inner-hor" style="display: inline-block;"></div>\r\n <div id="table-button-border-bottom" style="display: inline-block;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" colspan=2 align="right">\r\n <label class="input-label" style="margin-right: 5px;"><%= scope.textBackColor %></label>\r\n <div id="table-back-color-btn" style="display: inline-block;text-align:left;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" colspan=2>\r\n <div class="separator horizontal"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class="padding-small" colspan=2>\r\n <label class="header" style="margin-top: 3px;"><%= scope.textEdit %></label>\r\n <div id="table-btn-edit" style="display: inline-block; float:right;"
tipRight:"Set Outer Right Border Only",tipAll:"Set Outer Border and All Inner Lines",tipNone:"Set No Borders",tipInner:"Set Inner Lines Only",tipInnerVert:"Set Vertical Inner Lines Only",tipInnerHor:"Set Horizontal Inner Lines Only",tipOuter:"Set Outer Border Only",textCellSize:"Cell Size",textHeight:"Height",textWidth:"Width",textDistributeRows:"Distribute rows",textDistributeCols:"Distribute columns"},PE.Views.TableSettings||{}))}),define("text!presentationeditor/main/app/template/ShapeSettings.template",[],function(){return' < table cols = "1" > \ 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="shape-combo-fill-src" style="width: 100%;"></div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <div id="shape-panel-color-fill" class="padding-small" style="width: 100%;">\r\n <div id="shape-back-color-btn" style=""></div>\r\n </div>\r\n <div id="shape-panel-image-fill" class="settings-hidden padding-small" style="width: 100%;">\r\n <table cols="2" style="width: 100%;">\r\n <tr>\r\n <td class="padding-small" width="50%">\r\n <button type="button" class="btn btn-text-default" id="shape-button-from-file" style="width:90px;"><%= scope.textFromFile %></button>\r\n </td>\r\n <td class="padding-small" width="50%">\r\n <button type="button" class="btn btn-text-default" id="shape-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: top">\r\n <div id="shape-combo-fill-type" style="width: 90px;"></div>\r\n </td>\r\n <td rowspan="2">\r\n <div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;float:right;">\r\n <div id="shape-texture-img" style="width: 50px;height: 50px;"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: bottom">\r\n <label class="input-label" style=""><%= scope.textTexture %></label>\r\n <div id="shape-combo-fill-texture" style="width: 90px;"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div id="shape-panel-pattern-fill" class="settings-hidden padding-small" style="width: 100%;">\r\n <label class="input-label" style="margin-top: 3px;"><%= scope.strPattern %></label>\r\n <div id="shape-combo-pattern" style="width: 100%; height: 42px; margin-bottom: 8px;"></div>\r\n <div style="width: 100%; height: 25px; margin-bottom: 8px;">\r\n <label class="input-label" style="margin-top: 3px;"><%= scope.strForeground %></label>\r\n <div id="shape-foreground-color-btn" style="display: inline-block; float:right;"></div>\r\n </div>\r\n <div style="width: 100%; height: 25px;">\r\n <label class="input-label" style="margin-top: 3px;"><%= scope.strBackground %></label>\r\n <div id="shape-background-color-btn" style="display: inline-block; float:right;"></div>\r\n </div>\r\n </div>\r\n <div id="shape-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="shape-combo-grad-type" style="width: 90px;"
e ? this . btnDirection . setIconCls ( "item-gradient " + e . get ( "iconcls" )) : this . btnDirection . setIconCls ( "" )} else this . GradFillType == Asc . c_oAscFillGradType . GRAD_PATH && ( this . mnuDirectionPicker . store . reset ( this . _viewDataRadial ), this . mnuDirectionPicker . cmpEl . width ( 60 ), this . mnuDirectionPicker . restoreHeight = 58 , this . mnuDirectionPicker . selectByIndex ( this . GradRadialDirectionIdx , ! 0 ), this . GradRadialDirectionIdx >= 0 ? this . btnDirection . setIconCls ( "item-gradient " + this . _viewDataRadial [ this . GradRadialDirectionIdx ]. iconcls ) : this . btnDirection . setIconCls ( "" )); if ( this . api &&! this . _noApply ){ var i = new Asc . asc_CShapeProperty , n = new Asc . asc_CShapeFill ; n . put_type ( Asc . c_oAscFill . FILL_TYPE_GRAD ), n . put_fill ( new Asc . asc_CFillGrad ), n . get_fill (). put_grad_type ( this . GradFillType ), this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR && ( n . get_fill (). put_linear_angle ( 6e4 * this . GradLinearDirectionType ), n . get_fill (). put_linear_scale ( ! 0 )), i . put_fill ( n ), this . api . ShapeApply ( i )} this . fireEvent ( "editcomplete" , this )}, onSelectGradient : function ( t , e , n , o ){ if ( ! this . _noApply ){ var s = {}; if ( i . isFunction ( o . toJSON )){ if ( ! o . get ( "selected" )) return ; s = o . toJSON ()} else s = o ; if ( this . btnDirection . setIconCls ( "item-gradient " + s . iconcls ), this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR ? this . GradLinearDirectionType = s . type : this . GradRadialDirectionIdx = 0 , this . api && this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR ){ var a = new Asc . asc_CShapeProperty , l = new Asc . asc_CShapeFill ; l . put_type ( Asc . c_oAscFill . FILL_TYPE_GRAD ), l . put_fill ( new Asc . asc_CFillGrad ), l . get_fill (). put_grad_type ( this . GradFillType ), l . get_fill (). put_linear_angle ( 6e4 * s . type ), l . get_fill (). put_linear_scale ( ! 0 ), a . put_fill ( l ), this . api . ShapeApply ( a )} this . fireEvent ( "editcomplete" , this )}}, onColorsGradientSelect : function ( t , e ){ if ( this . btnGradColor . setColor ( e ), this . GradColor . colors [ this . GradColor . currentIdx ] = e , this . sldrGradient . setColorValue ( Common . Utils . String . format ( "#{0}" , "object" == typeof e ? e . color : e )), this . api &&! this . _noApply ){ var i = new Asc . asc_CShapeProperty , n = new Asc . asc_CShapeFill ; n . put_type ( Asc . c_oAscFill . FILL_TYPE_GRAD ), n . put_fill ( new Asc . asc_CFillGrad ), n . get_fill (). put_grad_type ( this . GradFillType ); var o = []; this . GradColor . colors . forEach ( function ( t ){ o . push ( Common . Utils . ThemeColor . getRgbColor ( t ))}), n . get_fill (). put_colors ( o ), this . OriginalFillType !== Asc . c_oAscFill . FILL_TYPE_GRAD && ( this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR && ( n . get_fill (). put_linear_angle ( 6e4 * this . GradLinearDirectionType ), n . get_fill (). put_linear_scale ( ! 0 )), o = [], this . GradColor . values . forEach ( function ( t ){ o . push ( 1e3 * t )}), n . get_fill (). put_positions ( o )), i . put_fill ( n ), this . api . ShapeApply ( i )} this . fireEvent ( "editcomplete" , this )}, onGradientChange : function ( t , e , n ){ this . GradColor . values = t . getValues (), this . _sliderChanged =! 0 , this . api &&! this . _noApply && this . _sendUndoPoint && ( this . api . setStartPointHistory (), this . _sendUndoPoint =! 1 , this . updateslider = setInterval ( i . bind ( this . _gradientApplyFunc , this ), 100 ))}, onGradientChangeComplete : function ( t , e , i ){ clearInterval ( this . updateslider ), this . _sliderChanged =! 0 , this . _sendUndoPoint || ( this . api . setEndPointHistory (), this . _gradientApplyFunc ()), this . _sendUndoPoint =! 0 }, _gradientApplyFunc : function (){ if ( this . _sliderChanged ){ var t = new Asc . asc_CShapeProperty , e = new Asc . asc_CShapeFill ; e . put_type ( Asc . c_oAscFill . FILL_TYPE_GRAD ), e . put_fill ( new Asc . asc_CFillGrad ), e . get_fill (). put_grad_type ( this . GradFillType ); var i = []; this . GradColor . values . forEach ( function ( t ){ i . push ( 1e3 * t )}), e . get_fill (). put_positions ( i ), this . OriginalFillType !== Asc . c_oAscFill . FILL_TYPE_GRAD && ( this . GradFillType == Asc . c_oAscFillGradType . GRAD_LINEAR && ( e . get_fill (). put_linear_angle ( 6e4 * this . GradLinearDirectionType ), e . get_fill (). put_linear_scale ( ! 0 )), i = [], this . GradColor . colors . forEach ( function ( t ){ i . push ( Common . Utils . ThemeColor . getRgbColor ( t ))}), e . get_fill (). put_colors ( i )), t . put_fill ( e ), this . api . ShapeApply ( t ), this . _sliderChanged =! 1 }}, applyBorderSize : function ( t ){ if ( t = parseFloat ( t ), t = isNaN ( t ) ? 0 : Math . max ( 0 , Math . min ( 1584 , t )), this . BorderSize = t , this . api &&! this . _noApply ){ var e = new Asc . asc_CShapeProperty , i = new Asc . asc_CStroke ; this . BorderSize < 1e-5 ? ( i . put_type ( Asc . c_oAscStrokeType . STROKE_NONE ), this . _state . StrokeTyp
template : i . template ( '<a id="shape-foreground-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" )}]})}), this . btnFGColor . render ( e ( "#shape-foreground-color-btn" )), this . btnFGColor . setColor ( "000000" ), this . fillControls . push ( this . btnFGColor ), this . colorsFG = new Common . UI . ThemeColorPalette ({ el : e ( "#shape-foreground-color-menu" ), value : "000000" }), this . colorsFG . on ( "select" , i . bind ( this . onColorsFGSelect , this )), this . btnFGColor . menu . items [ 1 ]. on ( "click" , i . bind ( this . addNewColor , this , this . colorsFG , this . btnFGColor )), this . btnBGColor = new Common . UI . ColorButton ({ style : "width:45px;" , menu : new Common . UI . Menu ({ items : [{ template : i . template ( '<div id="shape-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>' )},{ template : i . template ( '<a id="shape-background-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" )}]})}), this . btnBGColor . render ( e ( "#shape-background-color-btn" )), this . btnBGColor . setColor ( "ffffff" ), this . fillControls . push ( this . btnBGColor ), this . colorsBG = new Common . UI . ThemeColorPalette ({ el : e ( "#shape-background-color-menu" ), value : "ffffff" }), this . colorsBG . on ( "select" , i . bind ( this . onColorsBGSelect , this )), this . btnBGColor . menu . items [ 1 ]. on ( "click" , i . bind ( this . addNewColor , this , this . colorsBG , this . btnBGColor )), this . btnGradColor = new Common . UI . ColorButton ({ style : "width:45px;" , menu : new Common . UI . Menu ({ items : [{ template : i . template ( '<div id="shape-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>' )},{ template : i . template ( '<a id="shape-gradient-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" )}]})}), this . btnGradColor . render ( e ( "#shape-gradient-color-btn" )), this . btnGradColor . setColor ( "000000" ), this . fillControls . push ( this . btnGradColor ), this . colorsGrad = new Common . UI . ThemeColorPalette ({ el : e ( "#shape-gradient-color-menu" ), value : "000000" }), this . colorsGrad . on ( "select" , i . bind ( this . onColorsGradientSelect , this )), this . btnGradColor . menu . items [ 1 ]. on ( "click" , i . bind ( this . addNewColor , this , this . colorsGrad , this . btnGradColor )), this . btnBorderColor = new Common . UI . ColorButton ({ style : "width:45px;" , menu : new Common . UI . Menu ({ items : [{ template : i . template ( '<div id="shape-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>' )},{ template : i . template ( '<a id="shape-border-color-new" style="padding-left:12px;">' + this . textNewColor + "</a>" )}]})}), this . btnBorderColor . render ( e ( "#shape-border-color-btn" )), this . btnBorderColor . setColor ( "000000" ), this . lockedControls . push ( this . btnBorderColor ), this . colorsBorder = new Common . UI . ThemeColorPalette ({ el : e ( "#shape-border-color-menu" ), value : "000000" }), this . colorsBorder . on ( "select" , i . bind ( this . onColorsBorderSelect , this )), this . btnBorderColor . menu . items [ 1 ]. on ( "click" , i . bind ( this . addNewColor , this , this . colorsBorder , this . btnBorderColor ))), this . colorsBorder . updateColors ( Common . Utils . ThemeColor . getEffectColors (), Common . Utils . ThemeColor . getStandartColors ()), this . colorsBack . updateColors ( Common . Utils . ThemeColor . getEffectColors (), Common . Utils . ThemeColor . getStandartColors ()), this . colorsFG . updateColors ( Common . Utils . ThemeColor . getEffectColors (), Common . Utils . ThemeColor . getStandartColors ()), this . colorsBG . updateColors ( Common . Utils . ThemeColor . getEffectColors (), Common . Utils . ThemeColor . getStandartColors ()), this . colorsGrad . updateColors ( Common . Utils . ThemeColor . getEffectColors (), Common . Utils . ThemeColor . getStandartColors ())}, onBtnRotateClick : function ( t ){ var e = new Asc . asc_CShapeProperty ; e . asc_putRotAdd ( 3.14159265358979 * ( 1 == t . options . value ? 90 : 270 ) / 180 ), this . api . ShapeApply ( e ), this . fireEvent ( "editcomplete" , this )}, onBtnFlipClick : function ( t ){ var e = new Asc . asc_CShapeProperty ; 1 == t . options . value ? e . asc_putFlipHInvert ( ! 0 ) : e . asc_putFlipVInvert ( ! 0 ), this . api . ShapeApply ( e ), this . fireEvent ( "editcomplete" , this )}, _pt2mm : function ( t ){ return 25.4 * t / 72 }, _mm2pt : function ( t ){ return 72 * t / 25.4 }, disableFillPanels : function ( t ){ this . _state . DisabledFillPanels !== t && ( this . _state . DisabledFillPanels = t , i . each ( this . fillControls , function ( e ){ e . setDisabled ( t )}), this . lblTransparencyStart . toggleClass ( "disabled" , t ), this . lblTransparencyEnd . toggleClass ( "disabled" , t ))}, ShowHideElem : function ( t ){ this . FillColorContainer . toggle
this . cmbPattern . on ( "click" , i . bind ( this . onPatternSelect , this )), this . FillItems . push ( this . cmbPattern ), this . btnInsertFromFile = new Common . UI . Button ({ el : e ( "#slide-button-from-file" )}), this . btnInsertFromFile . on ( "click" , i . bind ( function ( t ){ this . api && this . api . ChangeSlideImageFromFile ( this . BlipFillType ), this . fireEvent ( "editcomplete" , this )}, this )), this . FillItems . push ( this . btnInsertFromFile ), this . btnInsertFromUrl = new Common . UI . Button ({ el : e ( "#slide-button-from-url" )}), this . btnInsertFromUrl . on ( "click" , i . bind ( this . insertFromUrl , this )), this . FillItems . push ( this . btnInsertFromUrl ), this . _arrFillType = [{ displayValue : this . textStretch , value : Asc . c_oAscFillBlipType . STRETCH },{ displayValue : this . textTile , value : Asc . c_oAscFillBlipType . TILE }], this . cmbFillType = new Common . UI . ComboBox ({ el : e ( "#slide-combo-fill-type" ), cls : "input-group-nr" , menuStyle : "min-width: 90px;" , editable :! 1 , data : this . _arrFillType }), this . cmbFillType . setValue ( this . _arrFillType [ 0 ]. value ), this . cmbFillType . on ( "selected" , i . bind ( this . onFillTypeSelect , this )), this . FillItems . push ( this . cmbFillType ), this . _arrGradType = [{ displayValue : this . textLinear , value : Asc . c_oAscFillGradType . GRAD_LINEAR },{ displayValue : this . textRadial , value : Asc . c_oAscFillGradType . GRAD_PATH }], this . cmbGradType = new Common . UI . ComboBox ({ el : e ( "#slide-combo-grad-type" ), cls : "input-group-nr" , menuStyle : "min-width: 90px;" , editable :! 1 , data : this . _arrGradType }), this . cmbGradType . setValue ( this . _arrGradType [ 0 ]. value ), this . cmbGradType . on ( "selected" , i . bind ( this . onGradTypeSelect , this )), this . FillItems . push ( this . cmbGradType ), this . _viewDataLinear = [{ offsetx : 0 , offsety : 0 , type : 45 , subtype :- 1 , iconcls : "gradient-left-top" },{ offsetx : 50 , offsety : 0 , type : 90 , subtype : 4 , iconcls : "gradient-top" },{ offsetx : 100 , offsety : 0 , type : 135 , subtype : 5 , iconcls : "gradient-right-top" },{ offsetx : 0 , offsety : 50 , type : 0 , subtype : 6 , iconcls : "gradient-left" , cls : "item-gradient-separator" , selected :! 0 },{ offsetx : 100 , offsety : 50 , type : 180 , subtype : 1 , iconcls : "gradient-right" },{ offsetx : 0 , offsety : 100 , type : 315 , subtype : 2 , iconcls : "gradient-left-bottom" },{ offsetx : 50 , offsety : 100 , type : 270 , subtype : 3 , iconcls : "gradient-bottom" },{ offsetx : 100 , offsety : 100 , type : 225 , subtype : 7 , iconcls : "gradient-right-bottom" }], this . _viewDataRadial = [{ offsetx : 100 , offsety : 150 , type : 2 , subtype : 5 , iconcls : "gradient-radial-center" }], this . btnDirection = new Common . UI . Button ({ cls : "btn-large-dataview" , iconCls : "item-gradient gradient-left" , menu : new Common . UI . Menu ({ style : "min-width: 60px;" , menuAlign : "tr-br" , items : [{ template : i . template ( '<div id="id-slide-menu-direction" style="width: 175px; margin: 0 5px;"></div>' )}]})}), this . btnDirection . on ( "render:after" , function ( n ){ t . mnuDirectionPicker = new Common . UI . DataView ({ el : e ( "#id-slide-menu-direction" ), parentMenu : n . menu , restoreHeight : 174 , store : new Common . UI . DataViewStore ( t . _viewDataLinear ), itemTemplate : i . template ( '<div id="<%= id %>" class="item-gradient" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>' )})}), this . btnDirection . render ( e ( "#slide-button-direction" )), this . mnuDirectionPicker . on ( "item:click" , i . bind ( this . onSelectGradient , this , this . btnDirection )), this . FillItems . push ( this . btnDirection ), this . sldrGradient = new Common . UI . MultiSliderGradient ({ el : e ( "#slide-slider-gradient" ), width : 125 , minValue : 0 , maxValue : 100 , values : [ 0 , 100 ]}), this . sldrGradient . on ( "change" , i . bind ( this . onGradientChange , this )), this . sldrGradient . on ( "changecomplete" , i . bind ( this . onGradientChangeComplete , this )), this . sldrGradient . on ( "thumbclick" , function ( e , i ){ t . GradColor . currentIdx = i ; var n = t . GradColor . colors [ t . GradColor . currentIdx ]; t . btnGradColor . setColor ( n ), t . colorsGrad . select ( n , ! 1 )}), this . sldrGradient . on ( "thumbdblclick" , function ( e ){ t . btnGradColor . cmpEl . find ( "button" ). dropdown ( "toggle" )}), this . sldrGradient . on ( "sortthumbs" , function ( e , n ){ var o , s = []; i . each ( n , function ( e , i ){ s . push ( t . GradColor . colors [ e ]), t . GradColor . currentIdx == e && ( o = i )}), t . OriginalFillType = null , t . GradColor . colors = s , t . GradColor . currentIdx = o }), this . FillItems . push ( this . sldrGradient )}, createDelayedElements : function (){ this . createDelayedControls (); var t = [ 0 , 1 , 3 , 2 , 4 , 53 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 22 , 23 , 24 , 25 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 ,
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-image-fill" class="settings-hidden padding-small" style="width: 100%;">\r\n <table cols="2" style="width: 100%;">\r\n <tr>\r\n <td class="padding-small" width="50%">\r\n <button type="button" class="btn btn-text-default" id="textart-button-from-file" style="width:90px;"><%= scope.textFromFile %></button>\r\n </td>\r\n <td class="padding-small" width="50%">\r\n <button type="button" class="btn btn-text-default" id="textart-button-from-url" style="width:90px;float:right;"><%= scope.textFromUrl %></button>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: top">\r\n <div id="textart-combo-fill-type" style="width: 90px;"></div>\r\n </td>\r\n <td rowspan="2">\r\n <div style="width: 90px; height: 80px; padding: 14px 20px; border: 1px solid #AFAFAF; border-radius: 2px; background: #ffffff;float:right;">\r\n <div id="textart-texture-img" style="width: 50px;height: 50px;"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style="vertical-align: bottom">\r\n <label class="input-label" style=""><%= scope.textTexture %></label>\r\n <div id="textart-combo-fill-texture" style="width: 90px;"></div>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n <div id="textart-panel-pattern-fill" class="settings-hidden padding-small" style="width: 100%;">\r\n <label class="input-label" style="margin-top: 3px;"><%= scope.strPattern %></label>\r\n <div id="textart-combo-pattern" style="width: 100%; height: 42px; margin-bottom: 8px;"></div>\r\n <div style="width: 100%; height: 25px; margin-bottom: 8px;">\r\n <label class="input-label" style="margin-top: 3px;"><%= scope.strForeground %></label>\r\n <div id="textart-foreground-color-btn" style="display: inline-block; float:right;"></div>\r\n </div>\r\n <div style="width: 100%; height: 25px;">\r\n <label class="input-label" style="margin-top: 3px;"><%= scope.strBackground %></label>\r\n <div id="textart-background-color-btn" style="display: inline-block; float:right;"></div>\r\n </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
Color:"transparent"},b=typeof this.BorderColor.Color,C=typeof this._state.StrokeColor,S||b!==C||"object"==b&&(this.BorderColor.Color.effectValue!==this._state.StrokeColor.effectValue||this._state.StrokeColor.color.indexOf(this.BorderColor.Color.color)<0)||"object"!=b&&(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 v=!1,_=0;_<10;_++)if(Common.Utils.ThemeColor.ThemeValues[_]==this.BorderColor.Color.effectValue){this.colorsBorder.select(this.BorderColor.Color,!0),v=!0;break}v||this.colorsBorder.clearSelection()}else this.colorsBorder.select(this.BorderColor.Color,!0);this._state.StrokeColor=this.BorderColor.Color}if(this._state.StrokeType!==x||x==Asc.c_oAscStrokeType.STROKE_COLOR){if(x==Asc.c_oAscStrokeType.STROKE_COLOR){var T=w.get_width(),A=Math.abs(this._state.StrokeWidth-T)<1e-5&&!new RegExp(this.txtPt+"\\s*$").test(this.cmbBorderSize.getRawValue());if(Math.abs(this._state.StrokeWidth-T)>1e-5||A||(null===this._state.StrokeWidth||null===T)&&this._state.StrokeWidth!==T){this._state.StrokeWidth=T,null!==T&&(T=this._mm2pt(T));var k=null===T?T:i.find(this.cmbBorderSize.store.models,function(t){if(T<t.attributes.value+1e-5&&T>t.attributes.value-1e-5)return!0});k?this.cmbBorderSize.selectRecord(k):this.cmbBorderSize.setValue(null!==T?parseFloat(T.toFixed(2))+" "+this.txtPt:""),this.BorderSize=T}}else x==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=x}if(this._state.StrokeBorderType!==y&&(this.BorderType=this._state.StrokeBorderType=y,this.cmbBorderType.setValue(y)),b=typeof this.FGColor.Color,C=typeof this._state.FGColor,b!==C||"object"==b&&(this.FGColor.Color.effectValue!==this._state.FGColor.effectValue||this._state.FGColor.color.indexOf(this.FGColor.Color.color)<0)||"object"!=b&&this._state.FGColor.indexOf(this.FGColor.Color)<0){if(this.btnFGColor.setColor(this.FGColor.Color),"object"==typeof this.FGColor.Color){for(var v=!1,_=0;_<10;_++)if(Common.Utils.ThemeColor.ThemeValues[_]==this.FGColor.Color.effectValue){this.colorsFG.select(this.FGColor.Color,!0),v=!0;break}v||this.colorsFG.clearSelection()}else this.colorsFG.select(this.FGColor.Color,!0);this._state.FGColor=this.FGColor.Color}if(b=typeof this.BGColor.Color,C=typeof this._state.BGColor,b!==C||"object"==b&&(this.BGColor.Color.effectValue!==this._state.BGColor.effectValue||this._state.BGColor.color.indexOf(this.BGColor.Color.color)<0)||"object"!=b&&this._state.BGColor.indexOf(this.BGColor.Color)<0){if(this.btnBGColor.setColor(this.BGColor.Color),"object"==typeof this.BGColor.Color){for(var v=!1,_=0;_<10;_++)if(Common.Utils.ThemeColor.ThemeValues[_]==this.BGColor.Color.effectValue){this.colorsBG.select(this.BGColor.Color,!0),v=!0;break}v||this.colorsBG.clearSelection()}else this.colorsBG.select(this.BGColor.Color,!0);this._state.BGColor=this.BGColor.Color}if(l=this.GradColor.colors[this.GradColor.currentIdx],b=typeof l,C=typeof this._state.GradColor,b!==C||"object"==b&&(l.effectValue!==this._state.GradColor.effectValue||this._state.GradColor.color.indexOf(l.color)<0)||"object"!=b&&this._state.GradColor.indexOf(l)<0){if(this.btnGradColor.setColor(l),"object"==typeof l){for(var v=!1,_=0;_<10;_++)if(Common.Utils.ThemeColor.ThemeValues[_]==l.effectValue){this.colorsGrad.select(l,!0),v=!0;break}v||this.colorsGrad.clearSelection()}else this.colorsGrad.select(l,!0);this._state.GradColor=l}var I=n.asc_getForm();if(this._state.FormId!==I){this.cmbTransform.suspendEvents();var o=this.cmbTransform.menuPicker.store.findWhere({type:I});this.cmbTransform.menuPicker.selectRecord(o),this.cmbTransform.resumeEvents(),this._state.FormId=I}this._noApply=!1}},createDelayedControls:function(){var t=this;this._arrFillSrc=[{displayValue:this.textColor,value:Asc.c_oAscFill.FILL_TYPE_SOLID},{displayValue:this.t
disabled:!0,toggleGroup:"tabpanelbtnsGroup",allowMouseEventsOnDisabled:!0}),this.btnSlide=new Common.UI.Button({hint:this.txtSlideSettings,asctype:Common.Utils.documentSettingsType.Slide,enableToggle:!0,disabled:!0,toggleGroup:"tabpanelbtnsGroup",allowMouseEventsOnDisabled:!0}),this.btnChart=new Common.UI.Button({hint:this.txtChartSettings,asctype:Common.Utils.documentSettingsType.Chart,enableToggle:!0,disabled:!0,toggleGroup:"tabpanelbtnsGroup",allowMouseEventsOnDisabled:!0}),this.btnShape=new Common.UI.Button({hint:this.txtShapeSettings,asctype:Common.Utils.documentSettingsType.Shape,enableToggle:!0,disabled:!0,toggleGroup:"tabpanelbtnsGroup",allowMouseEventsOnDisabled:!0}),this.btnTextArt=new Common.UI.Button({hint:this.txtTextArtSettings,asctype:Common.Utils.documentSettingsType.TextArt,enableToggle:!0,disabled:!0,toggleGroup:"tabpanelbtnsGroup",allowMouseEventsOnDisabled:!0}),this._settings=[],this._settings[Common.Utils.documentSettingsType.Paragraph]={panel:"id-paragraph-settings",btn:this.btnText},this._settings[Common.Utils.documentSettingsType.Table]={panel:"id-table-settings",btn:this.btnTable},this._settings[Common.Utils.documentSettingsType.Image]={panel:"id-image-settings",btn:this.btnImage},this._settings[Common.Utils.documentSettingsType.Slide]={panel:"id-slide-settings",btn:this.btnSlide},this._settings[Common.Utils.documentSettingsType.Shape]={panel:"id-shape-settings",btn:this.btnShape},this._settings[Common.Utils.documentSettingsType.Chart]={panel:"id-chart-settings",btn:this.btnChart},this._settings[Common.Utils.documentSettingsType.TextArt]={panel:"id-textart-settings",btn:this.btnTextArt},this},render:function(t){var n=e(this.el);this.trigger("render:before",this),this.defaultHideRightMenu=t.customization&&!!t.customization.hideRightMenu;var o=!Common.localStorage.getBool("pe-hide-right-settings",this.defaultHideRightMenu);return n.css("width",(o?MENU_SCALE_PART:SCALE_MIN)+"px"),n.show(),n.html(this.template({})),this.btnText.setElement(e("#id-right-menu-text"),!1),this.btnText.render(),this.btnTable.setElement(e("#id-right-menu-table"),!1),this.btnTable.render(),this.btnImage.setElement(e("#id-right-menu-image"),!1),this.btnImage.render(),this.btnSlide.setElement(e("#id-right-menu-slide"),!1),this.btnSlide.render(),this.btnChart.setElement(e("#id-right-menu-chart"),!1),this.btnChart.render(),this.btnShape.setElement(e("#id-right-menu-shape"),!1),this.btnShape.render(),this.btnTextArt.setElement(e("#id-right-menu-textart"),!1),this.btnTextArt.render(),this.btnText.on("click",i.bind(this.onBtnMenuClick,this)),this.btnTable.on("click",i.bind(this.onBtnMenuClick,this)),this.btnImage.on("click",i.bind(this.onBtnMenuClick,this)),this.btnSlide.on("click",i.bind(this.onBtnMenuClick,this)),this.btnChart.on("click",i.bind(this.onBtnMenuClick,this)),this.btnShape.on("click",i.bind(this.onBtnMenuClick,this)),this.btnTextArt.on("click",i.bind(this.onBtnMenuClick,this)),this.paragraphSettings=new PE.Views.ParagraphSettings,this.slideSettings=new PE.Views.SlideSettings,this.imageSettings=new PE.Views.ImageSettings,this.chartSettings=new PE.Views.ChartSettings,this.tableSettings=new PE.Views.TableSettings,this.shapeSettings=new PE.Views.ShapeSettings,this.textartSettings=new PE.Views.TextArtSettings,t&&t.isSignatureSupport&&(this.btnSignature=new Common.UI.Button({hint:this.txtSignatureSettings,asctype:Common.Utils.documentSettingsType.Signature,enableToggle:!0,disabled:!0,toggleGroup:"tabpanelbtnsGroup",allowMouseEventsOnDisabled:!0}),this._settings[Common.Utils.documentSettingsType.Signature]={panel:"id-signature-settings",btn:this.btnSignature},this.btnSignature.el=e("#id-right-menu-signature"),this.btnSignature.render().setVisible(!0),this.btnSignature.on("click",i.bind(this.onBtnMenuClick,this)),this.signatureSettings=new PE.Views.SignatureSettings),i.isUndefined(this.scroller)&&(this.scroller=new Common.UI.Scroller({el:e(this.el).find(".right-panel"),suppressScrollX:!0,useKeyboard:!1})),o&&(e("#id-slide-settings").parent().css("display","inline-block"),e("#id-slide-settings").addClass("active")),this.trigg
return' <% if ( ! hide ) { %> \ r \ n < div id = "<%= id %>" class = "user-comment-item" > \ r \ n \ r \ n \ x3c !-- comment block -- \ x3e \ r \ n \ r \ n < div class = "user-name" > \ r \ n < div class = "color" style = "display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " >< /div><%= scope.getUserName(username) %>\r\n </div>\r\n <div class="user-date"><%=date%></div>\r\n <% if (quote!==null && quote!==\'\') { %>\r\n <div class="user-quote"><%=scope.getFixedQuote(quote)%></div>\r\n <% } %>\r\n <% if (!editText || scope.viewmode) { %>\r\n <div class="user-message" data-can-copy="true"><%=scope.pickLink(comment)%></div>\r\n <% } else { %>\r\n <div class="inner-edit-ct">\r\n <textarea class="msg-reply user-select" maxlength="maxCommLength"><%=comment%></textarea>\r\n <button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change">textEdit</button>\r\n <button class="btn normal dlg-btn btn-inner-close">textCancel</button>\r\n </div>\r\n <% } %>\r\n\r\n \x3c!-- replys elements --\x3e\r\n\r\n <% if (replys.length) { %>\r\n <div class="reply-arrow img-commonctrl"></div>\r\n <% _.each(replys, function (item, index) { %>\r\n <div class="reply-item-ct" <% if (scope.viewmode && index==replys.length-1) { %>style="padding-bottom: 0;" <% } %>;>\r\n <div class="user-name">\r\n <div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(item.get("username")) %>\r\n </div>\r\n <div class="user-date"><%=item.get("date")%></div>\r\n <% if (!item.get("editText")) { %>\r\n <div class="user-message" data-can-copy="true"><%=scope.pickLink(item.get("reply"))%></div>\r\n <% if (!scope.viewmode) { %>\r\n <div class="btns-reply-ct">\r\n <% if (item.get("editable")) { %>\r\n <div class="btn-edit img-commonctrl" data-value="<%=item.get("id")%>"></div>\r\n <div class="btn-delete img-commonctrl" data-value="<%=item.get("id")%>"></div>\r\n <% } %>\r\n </div>\r\n <%}%>\r\n <% } else { %>\r\n <div class="inner-edit-ct">\r\n <textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength"><%=item.get("reply")%></textarea>\r\n <button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change">textEdit</button>\r\n <button class="btn normal dlg-btn btn-inner-close">textClose</button>\r\n </div>\r\n <% } %>\r\n </div>\r\n <% }); %>\r\n <% } %>\r\n\r\n \x3c!-- add reply button --\x3e\r\n\r\n <% if (!showReply && !scope.viewmode) { %>\r\n <% if (replys.length) { %>\r\n <label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>\r\n <% } else { %>\r\n <label class="user-reply" role="presentation" tabindex="-1">textAddReply</label>\r\n <% } %>\r\n <% } %>\r\n\r\n \x3c!-- edit buttons --\x3e\r\n\r\n <% if (!editText && !lock && !scope.viewmode) { %>\r\n <div class="edit-ct">\r\n <% if (editable) { %>\r\n <div class="btn-edit img-commonctrl"></div>\r\n <div class="btn-delete img-commonctrl"></div>\r\n <% } %>\r\n <% if (resolved) { %>\r\n <div class="btn-
! 0 )}, closeInsideMode : function (){ this . pluginsPanel && ( this . iframePlugin && ( this . currentPluginFrame . empty (), this . iframePlugin = null ), this . currentPluginPanel . toggleClass ( "hidden" , ! 0 ), this . fireEvent ( "plugin:open" ,[ this , "onboard" , "close" ]))}, openedPluginMode : function ( t ){ var e = this . storePlugins . findWhere ({ guid : t }); if ( e ){ var i = e . get ( "button" ); i && ( i . toggle ( ! 0 ), i . menu && i . menu . items . length > 0 && i . menu . items [ 0 ]. setCaption ( this . textStop ))}}, closedPluginMode : function ( t ){ var e = this . storePlugins . findWhere ({ guid : t }); if ( e ){ var i = e . get ( "button" ); i && ( i . toggle ( ! 1 ), i . menu && i . menu . items . length > 0 && i . menu . items [ 0 ]. setCaption ( this . textStart ))}}, _onLoad : function (){ this . loadMask && this . loadMask . hide ()}, _onAppReady : function ( t ){}, createPluginButton : function ( t ){ if ( ! t . get ( "visible" )) return null ; var e = this , i = t . get ( "variations" ), n = t . get ( "guid" ), o = i [ t . get ( "currentVariation" )]. get ( "icons" ), s = t . get ( "baseUrl" ) + o [( window . devicePixelRatio > 1 ? 1 : 0 ) + ( o . length > 2 ? 2 : 0 )], a = []; _ . each ( t . get ( "variations" ), function ( t , i ){ t . get ( "visible" ) && a . push ({ caption : i > 0 ? t . get ( "description" ) : e . textStart , value : parseInt ( t . get ( "index" ))})}); var l = new Common . UI . Button ({ cls : "btn-toolbar x-huge icon-top" , iconImg : s , caption : t . get ( "name" ), menu : a . length > 1 , split : a . length > 1 , value : n , hint : t . get ( "name" )}); return l . split && ( l . setMenu ( new Common . UI . Menu ({ items : a , pluginGuid : t . get ( "guid" )})), l . menu . on ( "item:click" , function ( t , i , n ){ e . fireEvent ( "plugin:select" ,[ t . options . pluginGuid , i . value ])})), l . on ( "click" , function ( t , i ){ e . fireEvent ( "plugin:select" ,[ t . options . value , 0 ])}), t . set ( "button" , l ), e . lockedControls . push ( l ), l }, hide : function (){ Common . UI . BaseView . prototype . hide . call ( this , arguments ), this . fireEvent ( "hide" , this )}, strPlugins : "Plugins" , textLoading : "Loading" , textStart : "Start" , textStop : "Stop" , groupCaption : "Plugins" }, Common . Views . Plugins || {})), Common . Views . PluginDlg = Common . UI . Window . extend ( _ . extend ({ initialize : function ( t ){ var e = {}; _ . extend ( e ,{ header :! 0 , enableKeyEvents :! 1 }, t ); var i = e . buttons && _ . size ( e . buttons ) > 0 ? 85 : 34 ; e . header || ( i -= 34 ), this . bordersOffset = 40 , e . width = Common . Utils . innerWidth () - 2 * this . bordersOffset - e . width < 0 ? Common . Utils . innerWidth () - 2 * this . bordersOffset : e . width , e . height += i , e . height = Common . Utils . innerHeight () - 2 * this . bordersOffset - e . height < 0 ? Common . Utils . innerHeight () - 2 * this . bordersOffset : e . height , e . cls += " advanced-settings-dlg" , this . template = [ '<div id="id-plugin-container" class="box" style="height:' + ( e . height - i ) + 'px;">' , '<div id="id-plugin-placeholder" style="width: 100%;height: 100%;"></div>' , "</div>" , '<% if ((typeof buttons !== "undefined") && _.size(buttons) > 0) { %>' , '<div class="separator horizontal"/>' , '<div class="footer" style="text-align: center;">' , "<% for(var bt in buttons) { %>" , '<button class="btn normal dlg-btn <%= buttons[bt].cls %>" result="<%= bt %>" style="margin-right: 10px;"><%= buttons[bt].text %></button>' , "<% } %>" , "</div>" , "<% } %>" ]. join ( "" ), e . tpl = _ . template ( this . template )( e ), this . url = t . url || "" , this . frameId = t . frameId || "plugin_iframe" , 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" }), this . boxEl = this . $window . find ( ".body > .box" ), this . _headerFooterHeight = this . options . buttons && _ . size ( this . options . buttons ) > 0 ? 85 : 34 , this . options . header || ( this . _headerFooterHeight -= 34 ), this . _headerFooterHeight += parseInt ( this . $window . css ( "border-top-width" )) + parseInt ( this . $window . css ( "border-bottom-width" )); var t = document . createElement ( "iframe" ); t . id = this . frameId , t . name = "pluginFrameEditor" , t . width = "100%" , t . height = "100%" , t . align = "top" , t . frameBorder = 0 , t . scrolling = "no" , t . onload = _ . bind ( this . _onLoad , this ); var e = this ; setTimeout ( function (){ e . isLoaded || ( e . loadMask = new Common . UI . LoadMask ({ owner : $ ( "#id-plugin-placeholder" )}), e . loadMask . setTitle ( e . textLoading ), e . loadMask . show (), e . isLoaded && e . loadMask . hide ())}, 500 ), t . src = this . url , $ ( "#id-plugin-placeholder" ). append ( t ), this . on ( "resizing" , function ( t ){ e . boxEl . css ( "height" , parseInt ( e . $window . css ( "height" )) - e . _headerFooterHeight )}); var i = function (){ e . onWindowResize ()}; $ ( window ). on ( "resize" , i ), this . on ( "close" , function (){ $ ( window ). off ( "resize"
esc : _ . bind ( this . onShortcut , this , "escape" ), "alt+q" : _ . bind ( this . onShortcut , this , "chat" ), "command+shift+h,ctrl+shift+h" : _ . bind ( this . onShortcut , this , "comments" ), f1 : _ . bind ( this . onShortcut , this , "help" )}}), Common . util . Shortcuts . suspendEvents ()}, setApi : function ( t ){ if ( this . api = t , this . api . asc_registerCallback ( "asc_onThumbnailsShow" , _ . bind ( this . onThumbnailsShow , this )), this . api . asc_registerCallback ( "asc_onCoAuthoringDisconnect" , _ . bind ( this . onApiServerDisconnect , this )), Common . NotificationCenter . on ( "api:disconnect" , _ . bind ( this . onApiServerDisconnect , this )), this . api . asc_registerCallback ( "asc_onDownloadUrl" , _ . bind ( this . onDownloadUrl , this )), this . api . asc_registerCallback ( "asc_onReplaceAll" , _ . bind ( this . onApiTextReplaced , this )), this . mode . canCoAuthoring && ( this . mode . canChat && this . api . asc_registerCallback ( "asc_onCoAuthoringChatReceiveMessage" , _ . bind ( this . onApiChatMessage , this )), this . mode . canComments )){ this . api . asc_registerCallback ( "asc_onAddComment" , _ . bind ( this . onApiAddComment , this )), this . api . asc_registerCallback ( "asc_onAddComments" , _ . bind ( this . onApiAddComments , this )); for ( var e = this . getApplication (). getCollection ( "Common.Collections.Comments" ), i = 0 ; i < e . length ; ++ i ) if ( e . at ( i ). get ( "userid" ) !== this . mode . user . id ){ this . leftMenu . markCoauthOptions ( "comments" , ! 0 ); break }} return this . api . asc_registerCallback ( "asc_onCountPages" , _ . bind ( this . onApiCountPages , this )), this . onApiCountPages ( this . api . getCountPages ()), this . leftMenu . getMenu ( "file" ). setApi ( t ), this }, setMode : function ( t ){ return this . mode = t , this . leftMenu . setMode ( t ), this . leftMenu . getMenu ( "file" ). setMode ( t ), t . isEdit || Common . util . Shortcuts . removeShortcuts ({ shortcuts : { "command+shift+s,ctrl+shift+s" : _ . bind ( this . onShortcut , this , "save" ), "alt+f" : _ . bind ( this . onShortcut , this , "file" )}}), this }, createDelayedElements : function (){ return this . mode . canCoAuthoring ? ( this . leftMenu . btnComments [ this . mode . canViewComments &&! this . mode . isLightVersion ? "show" : "hide" ](), this . mode . canViewComments && this . leftMenu . setOptionsPanel ( "comment" , this . getApplication (). getController ( "Common.Controllers.Comments" ). getView ( "Common.Views.Comments" )), this . leftMenu . btnChat [ this . mode . canChat &&! this . mode . isLightVersion ? "show" : "hide" ](), this . mode . canChat && this . leftMenu . setOptionsPanel ( "chat" , this . getApplication (). getController ( "Common.Controllers.Chat" ). getView ( "Common.Views.Chat" ))) : ( this . leftMenu . btnChat . hide (), this . leftMenu . btnComments . hide ()), this . mode . trialMode && this . leftMenu . setDeveloperMode ( this . mode . trialMode ), Common . util . Shortcuts . resumeEvents (), this . leftMenu . btnThumbs . toggle ( ! 0 ), this }, enablePlugins : function (){ this . mode . canPlugins ? this . leftMenu . setOptionsPanel ( "plugins" , this . getApplication (). getController ( "Common.Controllers.Plugins" ). getView ( "Common.Views.Plugins" )) : this . leftMenu . btnPlugins . hide (), this . mode . trialMode && this . leftMenu . setDeveloperMode ( this . mode . trialMode )}, clickMenuFileItem : function ( t , e , i ){ var n =! 0 ; switch ( e ){ case "back" : break ; case "save" : this . api . asc_Save (); break ; case "save-desktop" : this . api . asc_DownloadAs (); break ; case "print" : this . api . asc_Print ( new Asc . asc_CDownloadOptions ( null , 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 "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 ()}, clickSaveAsFormat : function ( t , e ){ this . api . asc_DownloadAs ( new Asc . asc_CDownloadOptions ( e )), t . hide ()}, clickSaveCopyAsFormat : function ( t , e , i ){ this . isFromFileDownloadAs = i , this . api . asc_DownloadAs ( new Asc . asc_CDownloadOptions ( e , ! 0 )), t . hide ()}, onDownloadUrl : function ( t ){ if ( this . isFromFileDownloadAs ){ var e = this , i = this . getApplication (). getController ( "Viewport" ). getView ( "Common.Views.Header" ). getDocumentCaption (); if ( ! i && ( i = e . txtUntitled ), "string" == typeof thi
[ "blank" , "pixel" , "classic" , "official" , "green" , "lines" , "office" , "safari" , "dotted" , "corner" , "turtle" ]. forEach ( function ( e ){ t . translationTable [ e ] = t [ "txtTheme_" + e . replace ( / /g , "_" )] || e }), this . api && ( this . api . SetDrawingFreeze ( ! 0 ), this . api . SetThemesPath ( "../../../../sdkjs/slide/themes/" ), this . api . SetFontRenderingMode ( parseInt ( e )), this . api . asc_registerCallback ( "asc_onError" , _ . bind ( this . onError , this )), this . api . asc_registerCallback ( "asc_onDocumentContentReady" , _ . bind ( this . onDocumentContentReady , this )), this . api . asc_registerCallback ( "asc_onOpenDocumentProgress" , _ . bind ( this . onOpenDocument , this )), this . api . asc_registerCallback ( "asc_onThumbnailsShow" , _ . bind ( this . onThumbnailsShow , this )), this . api . asc_registerCallback ( "asc_onDocumentUpdateVersion" , _ . bind ( this . onUpdateVersion , this )), this . api . asc_registerCallback ( "asc_onServerVersion" , _ . bind ( this . onServerVersion , this )), this . api . asc_registerCallback ( "asc_onDocumentName" , _ . bind ( this . onDocumentName , this )), this . api . asc_registerCallback ( "asc_onPrintUrl" , _ . bind ( this . onPrintUrl , this )), this . api . asc_registerCallback ( "asc_onMeta" , _ . bind ( this . onMeta , this )), this . api . asc_registerCallback ( "asc_onAdvancedOptions" , _ . bind ( this . onAdvancedOptions , this )), this . api . asc_registerCallback ( "asc_onSpellCheckInit" , _ . bind ( this . loadLanguages , this )), Common . NotificationCenter . on ( "api:disconnect" , _ . bind ( this . onCoAuthoringDisconnect , this )), Common . NotificationCenter . on ( "goback" , _ . bind ( this . goBack , this )), this . isShowOpenDialog =! 1 , this . editorConfig = {}, this . appOptions = {}, Common . Gateway . on ( "init" , _ . bind ( this . loadConfig , this )), Common . Gateway . on ( "showmessage" , _ . bind ( this . onExternalMessage , this )), Common . Gateway . on ( "opendocument" , _ . bind ( this . loadDocument , this )), Common . Gateway . appReady (), this . getApplication (). getController ( "Viewport" ). setApi ( this . api ), this . getApplication (). getController ( "Statusbar" ). setApi ( t . api ), $ ( document . body ). on ( "focus" , "input, textarea" , function ( e ){ /area_id/ . test ( e . target . id ) || ( /msg-reply/ . test ( e . target . className ) ? t . dontCloseDummyComment =! 0 : /chat-msg-text/ . test ( e . target . id ) ? t . dontCloseChat =! 0 :! t . isModalShowed && /form-control/ . test ( e . target . className ) && ( t . inFormControl =! 0 ))}), $ ( document . body ). on ( "blur" , "input, textarea" , function ( e ){ if ( ! t . isModalShowed ){ if ( /form-control/ . test ( e . target . className ) && ( t . inFormControl =! 1 ), t . getApplication (). getController ( "LeftMenu" ). getView ( "LeftMenu" ). getMenu ( "file" ). isVisible ()) return ; if ( ! e . relatedTarget ||! /area_id/ . test ( e . target . id ) &&! ( "input" == e . target . localName && $ ( e . target ). parent (). find ( e . relatedTarget ). length > 0 ) &&! ( "textarea" == e . target . localName && $ ( e . target ). closest ( ".asc-window" ). find ( ".dropdown-menu" ). find ( e . relatedTarget ). length > 0 ) && ( "input" != e . relatedTarget . localName ||! /form-control/ . test ( e . relatedTarget . className )) && ( "textarea" != e . relatedTarget . localName || /area_id/ . test ( e . relatedTarget . id ))){ if ( Common . Utils . isIE && e . originalEvent && e . originalEvent . target && /area_id/ . test ( e . originalEvent . target . id ) && e . originalEvent . target === e . originalEvent . srcElement ) return ; t . api . asc_enableKeyEvents ( ! 0 ), /msg-reply/ . test ( e . target . className ) ? t . dontCloseDummyComment =! 1 : /chat-msg-text/ . test ( e . target . id ) && ( t . dontCloseChat =! 1 )}}}). on ( "dragover" , function ( t ){ var e = t . originalEvent ; if ( e . target && $ ( e . target ). closest ( "#editor_sdk" ). length < 1 ) return e . preventDefault (), e . dataTransfer . dropEffect = "none" , ! 1 }). on ( "dragstart" , function ( t ){ var e = t . originalEvent ; if ( e . target ){ var i = $ ( e . target );( i . closest ( ".combobox" ). length > 0 || i . closest ( ".dropdown-menu" ). length > 0 || i . closest ( ".ribtab" ). length > 0 || i . closest ( ".combo-dataview" ). length > 0 ) && e . preventDefault ()}}), Common . NotificationCenter . on ({ "modal:show" : function ( e ){ t . isModalShowed ++ , t . api . asc_enableKeyEvents ( ! 1 )}, "modal:close" : function ( e ){ -- t . isModalShowed || t . api . asc_enableKeyEvents ( ! 0 )}, "modal:hide" : function ( e ){ -- t . isModalShowed || t . api . asc_enableKeyEvents ( ! 0 )}, "settings:unitschanged" : _ . bind ( this . unitsChanged , this ), "dataview:focus" : function ( t ){}, "dataview:blur" : function ( e ){ t . isModalShowed || t . api . asc_enableKeyEvents ( ! 0 )}, "menu:show" : function ( t ){}, "menu:hide" : function ( e , i ){ t . isModalShowed || i || t . api . asc_enableKeyEvents ( ! 0 )}, "edit:complete" : _ . bind ( t . onEditComplete , t )}), this . initNam
}, showTips : function ( t ){ function e (){ var e = t . shift (); e && ( e += "\n" + i . textCloseTip , n . setTitle ( e ), n . show ())} var i = this ; if ( t . length ){ "object" != typeof t && ( t = [ t ]), this . tooltip || ( this . tooltip = new Common . UI . Tooltip ({ owner : this . getApplication (). getController ( "Toolbar" ). getView ( "Toolbar" ), hideonclick :! 0 , placement : "bottom" , cls : "main-info" , offset : 30 })); var n = this . tooltip ; n . on ( "tooltip:hide" , function (){ setTimeout ( e , 300 )}), e ()}}, updateWindowTitle : function ( e ){ var i = this . api . isDocumentModified (); if ( this . _state . isDocModified !== i || e ){ var n = this . defaultTitleText ; t &&! _ . isEmpty ( t . getDocumentCaption ()) && ( n = t . getDocumentCaption () + " - " + n ), i && ( clearTimeout ( this . _state . timerCaption ), _ . isUndefined ( n ) || ( n = "* " + n )), window . document . title != n && ( window . document . title = n ), Common . Gateway . setDocumentModified ( i ), i && ( ! this . _state . fastCoauth || this . _state . usersCount < 2 ) && this . getApplication (). getController ( "Statusbar" ). setStatusCaption ( "" , ! 0 ), this . _state . isDocModified = i }}, onDocumentChanged : function (){}, onDocumentModifiedChanged : function (){ var t = this . api . asc_isDocumentCanSave (); this . _state . isDocModified !== t && Common . Gateway . setDocumentModified ( this . api . isDocumentModified ()), this . updateWindowTitle (); var e = this . getApplication (). getController ( "Toolbar" ). getView ( "Toolbar" ); if ( e && e . btnCollabChanges ){ var i = e . btnCollabChanges . $icon . hasClass ( "btn-synch" ), n = this . appOptions . forcesave , o =! t &&! i &&! n || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 &&! n ; e . btnSave . setDisabled ( o )}}, onDocumentCanSaveChanged : function ( t ){ var e = this . getApplication (). getController ( "Toolbar" ). getView ( "Toolbar" ); if ( e ){ var i = e . btnCollabChanges . $icon . hasClass ( "btn-synch" ), n = this . appOptions . forcesave , o =! t &&! i &&! n || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 &&! n ; e . btnSave . setDisabled ( o )}}, onContextMenu : function ( t ){ var e = t . target . getAttribute ( "data-can-copy" ), i = t . target instanceof HTMLInputElement || t . target instanceof HTMLTextAreaElement ; if ( i && "false" === e ||! i && "true" !== e ) return t . stopPropagation (), t . preventDefault (), ! 1 }, onBeforeUnload : function (){ if ( Common . localStorage . save (), this . api . isDocumentModified ()){ var t = this ; 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 (){ var t ; 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 , e ), this . appOptions . canBrandingExt && ( Common . Utils . applyCustomization ( this . appOptions . customization , i ), t = this . getApplication (). getController ( "Common.Controllers.Plugins" ). applyUICustomization ())), Common . NotificationCenter . trigger ( "layout:changed" , "main" ),( t || new Promise ( function ( t , e ){ t ()})). then ( function (){ $ ( "#loading-mask" ). hide (). remove (), Common . Controllers . Desktop . process ( "preloader:hide" )})}, 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 , - 256 ), Common . UI . error ({ msg : this . errorUpdateVersion , callback : function (){ _ . defer ( function (){ Common . Gateway . updateVersion (), t && t . call ( e ), e . onLongActionBegin ( Asc . c_oAscAsyncActionType . BlockInteraction , - 256 )})}})}, onServerVersion : function ( t ){ return ! 1 }, fillUserStore : function ( t ){ if ( ! _ . isEmpty ( t )){ var e = this . getCommonStoreUsersStore (); e && e . add ( t )}}, 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" ). setStatusCaption ( "" ), this . getApplication (). getController ( "DocumentHolder" ). getView ( "DocumentHolder" ). hid
rows : this . formats })), $ ( ".btn-doc-format" , this . el ). on ( "click" , _ . bind ( this . onFormatClick , this )), _ . isUndefined ( this . scroller ) && ( this . scroller = new Common . UI . Scroller ({ el : $ ( this . el ), suppressScrollX :! 0 })), this }, onFormatClick : function ( t ){ var e = t . currentTarget . attributes . format ; ! _ . isUndefined ( e ) && this . menu && this . menu . fireEvent ( "saveas:format" ,[ this . menu , parseInt ( e . value )])}}), PE . Views . FileMenuPanels . ViewSaveCopy = Common . UI . BaseView . extend ({ el : "#panel-savecopy" , menu : void 0 , formats : [[{ name : "PPTX" , imgCls : "pptx" , type : Asc . c_oAscFileType . PPTX , ext : ".pptx" },{ name : "PDF" , imgCls : "pdf" , type : Asc . c_oAscFileType . PDF , ext : ".pdf" },{ name : "ODP" , imgCls : "odp" , type : Asc . c_oAscFileType . ODP , ext : ".odp" }],[{ name : "POTX" , imgCls : "potx" , type : Asc . c_oAscFileType . POTX , ext : ".potx" },{ name : "PDFA" , imgCls : "pdfa" , type : Asc . c_oAscFileType . PDFA , ext : ".pdf" },{ name : "OTP" , imgCls : "otp" , type : Asc . c_oAscFileType . OTP , ext : ".otp" }]], template : _ . template ([ "<table><tbody>" , "<% _.each(rows, function(row) { %>" , "<tr>" , "<% _.each(row, function(item) { %>" , '<td><div><svg class="btn-doc-format" format="<%= item.type %>", format-ext="<%= item.ext %>">' , '<use xlink:href="#svg-format-<%= item.imgCls %>"></use>' , "</svg></div></td>" , "<% }) %>" , "</tr>" , "<% }) %>" , "</tbody></table>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , arguments ), this . menu = t . menu }, render : function (){ return $ ( this . el ). html ( this . template ({ rows : this . formats })), $ ( ".btn-doc-format" , this . el ). on ( "click" , _ . bind ( this . onFormatClick , this )), _ . isUndefined ( this . scroller ) && ( this . scroller = new Common . UI . Scroller ({ el : $ ( this . el ), suppressScrollX :! 0 })), this }, onFormatClick : function ( t ){ var e = t . currentTarget . attributes . format , i = t . currentTarget . attributes [ "format-ext" ]; _ . isUndefined ( e ) || _ . isUndefined ( i ) ||! this . menu || this . menu . fireEvent ( "savecopy:format" ,[ this . menu , parseInt ( e . value ), i . value ])}}), PE . Views . FileMenuPanels . Settings = Common . UI . BaseView . extend ( _ . extend ({ el : "#panel-settings" , menu : void 0 , template : _ . template ([ "<table><tbody>" , '<tr class="edit">' , '<td class="left"><label><%= scope.txtSpellCheck %></label></td>' , '<td class="right"><div id="fms-chb-spell-check"/></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.txtInput %></label></td>' , '<td class="right"><div id="fms-chb-input-mode"/></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.textAlignGuides %></label></td>' , '<td class="right"><span id="fms-chb-align-guides" /></td>' , "</tr>" , '<tr class="divider edit"></tr>' , '<tr class="autosave">' , '<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>' , '<td class="right"><span id="fms-chb-autosave" /></td>' , "</tr>" , '<tr class="divider autosave"></tr>' , '<tr class="forcesave">' , '<td class="left"><label id="fms-lbl-forcesave"><%= scope.textForceSave %></label></td>' , '<td class="right"><span id="fms-chb-forcesave" /></td>' , "</tr>" , '<tr class="divider forcesave"></tr>' , '<tr class="coauth changes">' , '<td class="left"><label><%= scope.strCoAuthMode %></label></td>' , '<td class="right">' , '<div><div id="fms-cmb-coauth-mode" style="display: inline-block; margin-right: 15px;vertical-align: middle;"/>' , '<label id="fms-lbl-coauth-mode" style="vertical-align: middle;"><%= scope.strCoAuthModeDescFast %></label></div></td>' , "</tr>" , '<tr class="divider coauth changes"></tr>' , "<tr>" , '<td class="left"><label><%= scope.strZoom %></label></td>' , '<td class="right"><div id="fms-cmb-zoom" class="input-group-nr" /></td>' , "</tr>" , '<tr class="divider"></tr>' , "<tr>" , '<td class="left"><label><%= scope.strFontRender %></label></td>' , '<td class="right"><span id="fms-cmb-font-render" /></td>' , "</tr>" , '<tr class="divider"></tr>' , '<tr class="edit">' , '<td class="left"><label><%= scope.strUnit %></label></td>' , '<td class="right"><span id="fms-cmb-unit" /></td>' , "</tr>" , '<tr class="divider edit"></tr>' , "<tr>" , '<td class="left"></td>' , '<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>' , "</tr>" , "</tbody></table>" ]. join ( "" )), initialize : function ( t ){ Commo
template : _ . template ([ '<label id="id-fms-lbl-protect-header" style="font-size: 18px;"><%= scope.strProtect %></label>' , '<div id="id-fms-password">' , '<label class="header"><%= scope.strEncrypt %></label>' , '<div id="fms-btn-add-pwd" style="width:190px;"></div>' , '<table id="id-fms-view-pwd" cols="2" width="300">' , "<tr>" , '<td colspan="2"><label style="cursor: default;"><%= scope.txtEncrypted %></label></td>' , "</tr>" , "<tr>" , '<td><div id="fms-btn-change-pwd" style="width:190px;"></div></td>' , '<td align="right"><div id="fms-btn-delete-pwd" style="width:190px; margin-left:20px;"></div></td>' , "</tr>" , "</table>" , "</div>" , '<div id="id-fms-signature">' , '<label class="header"><%= scope.strSignature %></label>' , '<div id="fms-btn-invisible-sign" style="width:190px; margin-bottom: 20px;"></div>' , '<div id="id-fms-signature-view"></div>' , "</div>" ]. join ( "" )), initialize : function ( t ){ Common . UI . BaseView . prototype . initialize . call ( this , arguments ), this . menu = t . menu ; var e = this ; this . templateSignature = _ . template ([ '<table cols="2" width="300" class="<% if (!hasSigned) { %>hidden<% } %>"">' , "<tr>" , '<td colspan="2"><label style="cursor: default;"><%= tipText %></label></td>' , "</tr>" , "<tr>" , '<td><label class="link signature-view-link">' + e . txtView + "</label></td>" , '<td align="right"><label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>">' + e . txtEdit + "</label></td>" , "</tr>" , "</table>" ]. join ( "" ))}, render : function (){ $ ( this . el ). html ( this . template ({ scope : this })); var t = PE . getController ( "Common.Controllers.Protection" ). getView (); return this . btnAddPwd = t . getButton ( "add-password" ), this . btnAddPwd . render ( this . $el . find ( "#fms-btn-add-pwd" )), this . btnAddPwd . on ( "click" , _ . bind ( this . closeMenu , this )), this . btnChangePwd = t . getButton ( "change-password" ), this . btnChangePwd . render ( this . $el . find ( "#fms-btn-change-pwd" )), this . btnChangePwd . on ( "click" , _ . bind ( this . closeMenu , this )), this . btnDeletePwd = t . getButton ( "del-password" ), this . btnDeletePwd . render ( this . $el . find ( "#fms-btn-delete-pwd" )), this . btnDeletePwd . on ( "click" , _ . bind ( this . closeMenu , this )), this . cntPassword = $ ( "#id-fms-password" ), this . cntPasswordView = $ ( "#id-fms-view-pwd" ), this . btnAddInvisibleSign = t . getButton ( "signature" ), this . btnAddInvisibleSign . render ( this . $el . find ( "#fms-btn-invisible-sign" )), this . btnAddInvisibleSign . on ( "click" , _ . bind ( this . closeMenu , this )), this . cntSignature = $ ( "#id-fms-signature" ), this . cntSignatureView = $ ( "#id-fms-signature-view" ), _ . isUndefined ( this . scroller ) && ( this . scroller = new Common . UI . Scroller ({ el : $ ( this . el ), suppressScrollX :! 0 })), this . $el . on ( "click" , ".signature-edit-link" , _ . bind ( this . onEdit , this )), this . $el . on ( "click" , ".signature-view-link" , _ . bind ( this . onView , this )), this }, show : function (){ Common . UI . BaseView . prototype . show . call ( this , arguments ), this . updateSignatures (), this . updateEncrypt ()}, setMode : function ( t ){ this . mode = t , this . cntSignature . toggleClass ( "hidden" , ! this . mode . isSignatureSupport ), this . cntPassword . toggleClass ( "hidden" , ! this . mode . isPasswordSupport )}, setApi : function ( t ){ return this . api = t , this }, closeMenu : function (){ this . menu && this . menu . hide ()}, onEdit : function (){ this . menu && this . menu . hide (); var t = this ; Common . UI . warning ({ title : this . notcriticalErrorTitle , msg : this . txtEditWarning , buttons : [ "ok" , "cancel" ], primary : "ok" , callback : function ( e ){ "ok" == e && t . api . asc_RemoveAllSignatures ()}})}, onView : function (){ this . menu && this . menu . hide (), PE . getController ( "RightMenu" ). rightmenu . SetActivePane ( Common . Utils . documentSettingsType . Signature , ! 0 )}, updateSignatures : function (){ var t = this . api . asc_getSignatures (), e =! 1 , i =! 1 ; _ . each ( t , function ( t , n ){ 0 == t . asc_getValid () ? e =! 0 : i =! 0 }); var n = i ? this . txtSignedInvalid : e ? this . txtSigned : "" ; this . cntSignatureView . html ( this . templateSignature ({ tipText : n , hasSigned : e || i }))}, updateEncrypt : function (){ this . cntPasswordView . toggleClass ( "hidden" , this . btnAddPwd . isVisible ())}, strProtect : "Protect Presentation" , strSignature : "With Signature" , txtView : "View signatures" , txtEdit : "Edit presentation" , txtSigned : "Valid signatures has been added to the presentation. The presentation is protected from editing." , txtSignedInvalid : "Some of the digital signatures in presentation are invalid or could not be verified. The
;if(Common.Controllers=Common.Controllers||{},define(" common / main / lib / controller / Comments ",[" core "," common / main / lib / model / Comment "," common / main / lib / collection / Comments "," common / main / lib / view / Comments "," common / main / lib / view / ReviewPopover "],function(){" use strict ";function t(){return void 0!==Asc.asc_CCommentDataWord?new Asc.asc_CCommentDataWord(null):new Asc.asc_CCommentData(null)}Common.Controllers.Comments=Backbone.Controller.extend(_.extend({models:[],collections:[" Common . Collections . Comments "],views:[" Common . Views . Comments "," Common . Views . ReviewPopover "],sdkViewName:" # id_main ",subEditStrings:{},filter:void 0,hintmode:!1,viewmode:!1,isSelectedComment:!1,uids:[],oldUids:[],isDummyComment:!1,initialize:function(){this.addListeners({" Common . Views . Comments ":{" comment : add ":_.bind(this.onCreateComment,this)," comment : change ":_.bind(this.onChangeComment,this)," comment : remove ":_.bind(this.onRemoveComment,this)," comment : resolve ":_.bind(this.onResolveComment,this)," comment : show ":_.bind(this.onShowComment,this)," comment : addReply ":_.bind(this.onAddReplyComment,this)," comment : changeReply ":_.bind(this.onChangeReplyComment,this)," comment : removeReply ":_.bind(this.onRemoveReplyComment,this)," comment : editReply ":_.bind(this.onShowEditReplyComment,this)," comment : closeEditing ":_.bind(this.closeEditing,this)}," Common . Views . ReviewPopover ":{" comment : change ":_.bind(this.onChangeComment,this)," comment : remove ":_.bind(this.onRemoveComment,this)," comment : resolve ":_.bind(this.onResolveComment,this)," comment : show ":_.bind(this.onShowComment,this)," comment : addReply ":_.bind(this.onAddReplyComment,this)," comment : changeReply ":_.bind(this.onChangeReplyComment,this)," comment : removeReply ":_.bind(this.onRemoveReplyComment,this)," comment : editReply ":_.bind(this.onShowEditReplyComment,this)," comment : closeEditing ":_.bind(this.closeEditing,this)," comment : disableHint ":_.bind(this.disableHint,this)," comment : addDummyComment ":_.bind(this.onAddDummyComment,this)}}),Common.NotificationCenter.on(" comments : updatefilter ",_.bind(this.onUpdateFilter,this)),Common.NotificationCenter.on(" app : comment : add ",_.bind(this.onAppAddComment,this)),Common.NotificationCenter.on(" layout : changed ",function(t){Common.Utils.asyncCall(function(t){" toolbar "!=t&&" status "!=t||!this.view.$el.is(" : visible ")||this.onAfterShow()},this,t)}.bind(this))},onLaunch:function(){this.collection=this.getApplication().getCollection(" Common . Collections . Comments "),this.collection&&(this.collection.comparator=function(t){return-t.get(" time ")}),this.popoverComments=new Common.Collections.Comments,this.popoverComments&&(this.popoverComments.comparator=function(t){return t.get(" time ")}),this.groupCollection=[],this.view=this.createView(" Common . Views . Comments ",{store:this.collection}),this.view.render(),this.userCollection=this.getApplication().getCollection(" Common . Collections . Users "),this.userCollection.on(" reset ",_.bind(this.onUpdateUsers,this)),this.userCollection.on(" add ",_.bind(this.onUpdateUsers,this)),this.bindViewEvents(this.view,this.events)},setConfig:function(t,e){this.setApi(e),t&&(this.currentUserId=t.config.user.id,this.currentUserName=t.config.user.fullname,this.sdkViewName=t.sdkviewname||this.sdkViewName,this.hintmode=t.hintmode||!1,this.viewmode=t.viewmode||!1)},setApi:function(t){t&&(this.api=t,this.api.asc_registerCallback(" asc_onAddComment ",_.bind(this.onApiAddComment,this)),this.api.asc_registerCallback(" asc_onAddComments ",_.bind(this.onApiAddComments,this)),this.api.asc_registerCallback(" asc_onRemoveComment ",_.bind(this.onApiRemoveComment,this)),this.api.asc_registerCallback(" asc_onChangeComments ",_.bind(this.onChangeComments,this)),this.api.asc_registerCallback(" asc_onRemoveComments ",_.bind(this.onRemoveComments,this)),this.api.asc_registerCallback(" asc_onChangeCommentData ",_.bind(this.onApiChangeCommentData,this)),this.api.asc_registerCallback(" asc_onLockComment ",_.bind(this.onApiLockComment,this)),this.api.asc_registerCallback(" asc_onUnLockComment ",_.bind(this.onApiUnLockComment,this)),this.api.asc_registerCallback(" asc_onShowComment ",_.bind(this.onApiShowComment,this)),this.api.asc_register
var i=0;for(o in t)void 0!==o&&i++;if(i>1&&void 0==this._isCoAuthoringStopped)return this._isCoAuthoringStopped=!0,this.api.asc_coAuthoringDisconnect(),void Common.NotificationCenter.trigger(" api : disconnect ")}var n=this.getApplication().getCollection(" Common . Collections . Users ");if(n){var o,s,a=[];for(o in t)if(void 0!==o&&(s=t[o])){var l=new Common.Models.User({id:s.asc_getId(),idOriginal:s.asc_getIdOriginal(),username:s.asc_getUserName(),online:!0,color:s.asc_getColor(),view:s.asc_getView()});a[s.asc_getId()==e?" unshift ":" push "](l)}n[n.size()>0?" add ":" reset "](a)}},onUserConnection:function(t){var e=this.getApplication().getCollection(" Common . Collections . Users ");if(e){var i=e.findUser(t.asc_getId());i?i.set({online:t.asc_getState()}):e.add(new Common.Models.User({id:t.asc_getId(),idOriginal:t.asc_getIdOriginal(),username:t.asc_getUserName(),online:t.asc_getState(),color:t.asc_getColor(),view:t.asc_getView()}))}},onReceiveMessage:function(t,e){var i=this.getApplication().getCollection(" Common . Collections . ChatMessages ");if(i){var n=[];t.forEach(function(t){n.push(new Common.Models.ChatMessage({userid:t.useridoriginal,message:t.message,username:t.username}))}),i[i.size()<1||e?" reset ":" add "](n)}},onSendMessage:function(t,e){if(e.length>0){var i=this;(function(t,e){for(var i=[];t;){if(t.length<e){i.push(t);break}i.push(t.substr(0,e)),t=t.substr(e)}return i})(e,2048).forEach(function(t){i.api.asc_coAuthoringChatSendMessage(t)})}},notcriticalErrorTitle:" Warning "},Common.Controllers.Chat||{}))}),void 0===Common)var Common={};if(Common.Models=Common.Models||{},define(" common / main / lib / model / Plugin ",[" underscore "," backbone "," common / main / lib / component / BaseView "],function(t,e){" use strict ";Common.Models.PluginVariation=e.Model.extend({defaults:function(){return{description:"",url:"",index:0,icons:void 0,isSystem:!1,isViewer:!1,isDisplayedInViewer:!0,EditorsSupport:[" word "," cell "," slide "],isVisual:!1,isCustomWindow:!1,isModal:!1,isInsideMode:!1,initDataType:0,initData:"",isUpdateOleOnResize:!1,buttons:[],size:[800,600],initOnSelectionChanged:!1,visible:!0}}}),Common.Models.Plugin=e.Model.extend({defaults:function(){return{id:Common.UI.getId(),name:"",baseUrl:"",guid:Common.UI.getId(),variations:[],currentVariation:0,pluginObj:void 0,allowSelected:!1,selected:!1,visible:!0,groupName:"",groupRank:0}}})}),void 0===Common)var Common={};if(Common.Collections=Common.Collections||{},define(" common / main / lib / collection / Plugins ",[" underscore "," backbone "," common / main / lib / model / Plugin "],function(t,e){" use strict ";Common.Collections.Plugins=e.Collection.extend({model:Common.Models.Plugin,hasVisible:function(){return!!this.findWhere({visible:!0})}})}),define(" common / main / lib / controller / Plugins ",[" core "," common / main / lib / collection / Plugins "," common / main / lib / view / Plugins "],function(){" use strict ";Common.Controllers.Plugins=Backbone.Controller.extend(_.extend({models:[],appOptions:{},configPlugins:{autostart:[]},serverPlugins:{autostart:[]},collections:[" Common . Collections . Plugins "],views:[" Common . Views . Plugins "],initialize:function(){var t=this;this.addListeners({Toolbar:{" render : before ":function(e){var i=t.getApplication().getController(" Main ").appOptions;if(!i.isEditMailMerge&&!i.isEditDiagram){var n={action:" plugins ",caption:t.panelPlugins.groupCaption};t.$toolbarPanelPlugins=t.panelPlugins.getPanel(),e.addTab(n,t.$toolbarPanelPlugins,10)}}}," Common . Views . Plugins ":{" plugin : select ":function(e,i){t.api.asc_pluginRun(e,i,"")}}})},events:function(){return{" click # id - plugin - close ":_.bind(this.onToolClose,this)}},onLaunch:function(){var t=this.getApplication().getCollection(" Common . Collections . Plugins ");this.panelPlugins=this.createView(" Common . Views . Plugins ",{storePlugins:t}),this.panelPlugins.on(" render : after ",_.bind(this.onAfterRender,this)),t.on({add:this.onAddPlugin.bind(this),reset:this.onResetPlugins.bind(this)}),this._moveOffset={x:0,y:0},this.autostart=[],Common.Gateway.on(" init ",this.loadConfig.bind(this)),Common.NotificationCenter.on(" app : face ",this.onAppShowed.bind(this))},loadConfig:function(t){var e=this;e.configPlugins.config=t.config.plu
return this.$el=$(_.template('<section id=" review - changes - panel " class=" panel " data-tab=" review "><div class=" group no - group - mask "><span id=" slot - btn - sharing " class=" btn - slot text x - huge "></span><span id=" slot - btn - coauthmode " class=" btn - slot text x - huge "></span></div><div class=" separator long sharing "/><div class=" group "><span class=" btn - slot text x - huge slot - comment "></span></div><div class=" separator long comments "/><div class=" group "><span id=" btn - review - on " class=" btn - slot text x - huge "></span></div><div class=" group no - group - mask " style=" padding - left : 0 ; "><span id=" btn - review - view " class=" btn - slot text x - huge "></span></div><div class=" group move - changes " style=" padding - left : 0 ; "><span id=" btn - change - prev " class=" btn - slot text x - huge "></span><span id=" btn - change - next " class=" btn - slot text x - huge "></span><span id=" btn - change - accept " class=" btn - slot text x - huge "></span><span id=" btn - change - reject " class=" btn - slot text x - huge "></span></div><div class=" separator long review "/><div class=" group no - group - mask "><span id=" slot - btn - chat " class=" btn - slot text x - huge "></span></div><div class=" separator long chat "/><div class=" group no - group - mask "><span id=" slot - btn - history " class=" btn - slot text x - huge "></span></div></section>')({})),this.appConfig.canReview&&(this.btnAccept.render(this.$el.find(" # btn - change - accept ")),this.btnReject.render(this.$el.find(" # btn - change - reject ")),this.btnTurnOn.render(this.$el.find(" # btn - review - on "))),this.btnPrev&&this.btnPrev.render(this.$el.find(" # btn - change - prev ")),this.btnNext&&this.btnNext.render(this.$el.find(" # btn - change - next ")),this.btnReviewView&&this.btnReviewView.render(this.$el.find(" # btn - review - view ")),this.btnSharing&&this.btnSharing.render(this.$el.find(" # slot - btn - sharing ")),this.btnCoAuthMode&&this.btnCoAuthMode.render(this.$el.find(" # slot - btn - coauthmode ")),this.btnHistory&&this.btnHistory.render(this.$el.find(" # slot - btn - history ")),this.btnChat&&this.btnChat.render(this.$el.find(" # slot - btn - chat ")),this.$el},show:function(){Common.UI.BaseView.prototype.show.call(this),this.fireEvent(" show ",this)},getButton:function(t,e){if(" turn "==t&&" statusbar "==e){var i=new Common.UI.Button({cls:" btn - toolbar ",iconCls:" btn - ic - review ",hintAnchor:" top ",hint:this.tipReview,enableToggle:!0});return this.btnsTurnReview.push(i),i}return" spelling "==t?(i=new Common.UI.Button({cls:" btn - toolbar ",iconCls:" btn - ic - docspell ",hintAnchor:" top ",hint:this.tipSetSpelling,enableToggle:!0}),this.btnsSpelling.push(i),i):" doclang "==t&&" statusbar "==e?(i=new Common.UI.Button({cls:" btn - toolbar ",iconCls:" btn - ic - doclang ",hintAnchor:" top ",hint:this.tipSetDocLang,disabled:!0}),this.btnsDocLang.push(i),i):void 0},getUserName:function(t){return Common.Utils.String.htmlEncode(t)},turnChanges:function(t){this.btnsTurnReview.forEach(function(e){e&&e.pressed!=t&&e.toggle(t,!0)},this)},markChanges:function(t){this.btnsTurnReview.forEach(function(e){if(e){$(" . icon ",e.cmpEl)[t?" addClass ":" removeClass "](" btn - ic - changes ")}},this)},turnSpelling:function(t){this.btnsSpelling.forEach(function(e){e&&e.pressed!=t&&e.toggle(t,!0)},this)},turnCoAuthMode:function(t){this.btnCoAuthMode&&(this.btnCoAuthMode.menu.items[0].setChecked(t,!0),this.btnCoAuthMode.menu.items[1].setChecked(!t,!0))},turnChat:function(t){this.btnChat&&this.btnChat.toggle(t,!0)},turnDisplayMode:function(t){this.btnReviewView&&(this.btnReviewView.menu.items[0].setChecked(" markup "==t,!0),this.btnReviewView.menu.items[1].setChecked(" final "==t,!0),this.btnReviewView.menu.items[2].setChecked(" original "==t,!0))},SetDisabled:function(t,e){this.btnsSpelling&&this.btnsSpelling.forEach(function(e){e&&e.setDisabled(t)},this),this.btnsDocLang&&this.btnsDocLang.forEach(function(i){i&&i.setDisabled(t||e&&e.length<1)},this),this.btnsTurnReview&&this.btnsTurnReview.forEach(function(e){e&&e.setDisabled(t)},this),this.btnChat&&this.btnChat.setDisabled(t)},onLostEditRights:function(){this._readonlyRights=!0,this.rendered&&this.btnSharing&&this.btnSharing.setDisabled(!0)},txtAccept:" Accept ",txtAcceptCurrent:" Accept current Changes ",txtAcceptAll:" Accept all Changes ",txtReject:" Reject ",txtRejectCurr
this.fireEvent(" show ",this)},getButton:function(t,e){if(" signature "==t){var i=new Common.UI.Button({cls:" btn - text - default ",style:" width : 100 % ; ",caption:this.txtInvisibleSignature,disabled:this._state.invisibleSignDisabled});return this.btnsInvisibleSignature.push(i),i}if(" add - password "==t){var i=new Common.UI.Button({cls:" btn - text - default ",style:" width : 100 % ; ",caption:this.txtAddPwd,disabled:this._state.disabled||this._state.disabledPassword,visible:!this._state.hasPassword});return this.btnsAddPwd.push(i),i}if(" del - password "==t){var i=new Common.UI.Button({cls:" btn - text - default ",style:" width : 100 % ; ",caption:this.txtDeletePwd,disabled:this._state.disabled||this._state.disabledPassword,visible:this._state.hasPassword});return this.btnsDelPwd.push(i),i}if(" change - password "==t){var i=new Common.UI.Button({cls:" btn - text - default ",style:" width : 100 % ; ",caption:this.txtChangePwd,disabled:this._state.disabled||this._state.disabledPassword,visible:this._state.hasPassword});return this.btnsChangePwd.push(i),i}},SetDisabled:function(t,e){this._state.disabled=t,this._state.invisibleSignDisabled=t&&!e,this.btnsInvisibleSignature&&this.btnsInvisibleSignature.forEach(function(i){i&&i.setDisabled(t&&!e)},this),this.btnSignature&&this.btnSignature.menu&&(this.btnSignature.menu.items&&this.btnSignature.menu.items[1].setDisabled(t),this.btnSignature.setDisabled(t&&!e)),this.btnsAddPwd.concat(this.btnsDelPwd,this.btnsChangePwd).forEach(function(e){e&&e.setDisabled(t||this._state.disabledPassword)},this)},onDocumentPassword:function(t,e){this._state.hasPassword=t,this._state.disabledPassword=!!e;var i=this._state.disabledPassword||this._state.disabled;this.btnsAddPwd&&this.btnsAddPwd.forEach(function(e){e&&(e.setVisible(!t),e.setDisabled(i))},this),this.btnsDelPwd.concat(this.btnsChangePwd).forEach(function(e){e&&(e.setVisible(t),e.setDisabled(i))},this),this.btnPwd.setVisible(t)},txtEncrypt:" Encrypt ",txtSignature:" Signature ",hintAddPwd:" Encrypt with password ",hintPwd:" Change or delete password ",hintSignature:" Add digital signature or signature line ",txtChangePwd:" Change password ",txtDeletePwd:" Delete password ",txtAddPwd:" Add password ",txtInvisibleSignature:" Add digital signature ",txtSignatureLine:" Add Signature line "}}(),Common.Views.Protection||{}))}),define(" common / main / lib / view / PasswordDialog ",[" common / main / lib / component / Window "],function(){" use strict ";Common.Views.PasswordDialog=Common.UI.Window.extend(_.extend({applyFunction:void 0,initialize:function(t){var e=this,i={};_.extend(i,{width:350,height:220,header:!0,cls:" modal - dlg ",contentTemplate:"",title:e.txtTitle},t),this.template=t.template||['<div class=" box " style=" height : '+(i.height-85)+' px ; ">','<div class=" input - row " style=" margin - bottom : 10 px ; ">'," < label > "+e.txtDescription+" < /label>","</div>",'<div class="input-row">',"<label>"+e.txtPassword+"</label>","</div>",'<div id="id-password-txt" class="input-row" style="margin-bottom: 5px;"></div>','<div class="input-row">',"<label>"+e.txtRepeat+"</label>","</div>",'<div id="id-repeat-txt" class="input-row"></div>',"</div>",'<div class="separator horizontal"/>','<div class="footer center">','<button class="btn normal dlg-btn primary" result="ok" style="margin-right:10px;">'+e.okButtonText+"</button>",'<button class="btn normal dlg-btn" result="cancel">'+e.cancelButtonText+"</button>","</div>"].join(""),this.handler=t.handler,this.settings=t.settings,i.tpl=_.template(this.template)(i),Common.UI.Window.prototype.initialize.call(this,i)},render:function(){if(Common.UI.Window.prototype.render.call(this),this.$window){var t=this;this.$window.find(".dlg-btn").on("click",_.bind(this.onBtnClick,this)),this.inputPwd=new Common.UI.InputField({el:$("#id-password-txt"),type:"password",allowBlank:!1,style:"width: 100%;",validateOnBlur:!1}),this.repeatPwd=new Common.UI.InputField({el:$("#id-repeat-txt"),type:"password",allowBlank:!1,style:"width: 100%;",validateOnBlur:!1,validation:function(e){return t.txtIncorrectPwd}})}},show:function(){Common.UI.Window.prototype.show.apply(this,arguments);var t=this;setTimeout(function(){t.inputPwd.cmpEl.find("inp