2014-09-30 04:26:34 +00:00
( function ( ) { var t = this , e = t . _ , i = { } , n = Array . prototype , r = Object . prototype , s = Function . prototype , o = n . push , a = n . slice , h = n . concat , l = r . toString , c = r . hasOwnProperty , u = n . forEach , f = n . map , d = n . reduce , p = n . reduceRight , g = n . filter , v = n . every , m = n . some , y = n . indexOf , b = n . lastIndexOf , x = Array . isArray , w = Object . keys , _ = s . bind , C = function ( t ) { return t instanceof C ? t : this instanceof C ? void ( this . _wrapped = t ) : new C ( t ) } ; "undefined" != typeof exports ? ( "undefined" != typeof module && module . exports && ( exports = module . exports = C ) , exports . _ = C ) : t . _ = C , C . VERSION = "1.6.0" ; var S = C . each = C . forEach = function ( t , e , n ) { if ( null == t ) return t ; if ( u && t . forEach === u ) t . forEach ( e , n ) ; else if ( t . length === + t . length ) { for ( var r = 0 , s = t . length ; s > r ; r ++ ) if ( e . call ( n , t [ r ] , r , t ) === i ) return } else for ( var o = C . keys ( t ) , r = 0 , s = o . length ; s > r ; r ++ ) if ( e . call ( n , t [ o [ r ] ] , o [ r ] , t ) === i ) return ; return t } ; C . map = C . collect = function ( t , e , i ) { var n = [ ] ; return null == t ? n : f && t . map === f ? t . map ( e , i ) : ( S ( t , function ( t , r , s ) { n . push ( e . call ( i , t , r , s ) ) } ) , n ) } ; var k = "Reduce of empty array with no initial value" ; C . reduce = C . foldl = C . inject = function ( t , e , i , n ) { var r = arguments . length > 2 ; if ( null == t && ( t = [ ] ) , d && t . reduce === d ) return n && ( e = C . bind ( e , n ) ) , r ? t . reduce ( e , i ) : t . reduce ( e ) ; if ( S ( t , function ( t , s , o ) { r ? i = e . call ( n , i , t , s , o ) : ( i = t , r = ! 0 ) } ) , ! r ) throw new TypeError ( k ) ; return i } , C . reduceRight = C . foldr = function ( t , e , i , n ) { var r = arguments . length > 2 ; if ( null == t && ( t = [ ] ) , p && t . reduceRight === p ) return n && ( e = C . bind ( e , n ) ) , r ? t . reduceRight ( e , i ) : t . reduceRight ( e ) ; var s = t . length ; if ( s !== + s ) { var o = C . keys ( t ) ; s = o . length } if ( S ( t , function ( a , h , l ) { h = o ? o [ -- s ] : -- s , r ? i = e . call ( n , i , t [ h ] , h , l ) : ( i = t [ h ] , r = ! 0 ) } ) , ! r ) throw new TypeError ( k ) ; return i } , C . find = C . detect = function ( t , e , i ) { var n ; return T ( t , function ( t , r , s ) { return e . call ( i , t , r , s ) ? ( n = t , ! 0 ) : void 0 } ) , n } , C . filter = C . select = function ( t , e , i ) { var n = [ ] ; return null == t ? n : g && t . filter === g ? t . filter ( e , i ) : ( S ( t , function ( t , r , s ) { e . call ( i , t , r , s ) && n . push ( t ) } ) , n ) } , C . reject = function ( t , e , i ) { return C . filter ( t , function ( t , n , r ) { return ! e . call ( i , t , n , r ) } , i ) } , C . every = C . all = function ( t , e , n ) { e || ( e = C . identity ) ; var r = ! 0 ; return null == t ? r : v && t . every === v ? t . every ( e , n ) : ( S ( t , function ( t , s , o ) { return ( r = r && e . call ( n , t , s , o ) ) ? void 0 : i } ) , ! ! r ) } ; var T = C . some = C . any = function ( t , e , n ) { e || ( e = C . identity ) ; var r = ! 1 ; return null == t ? r : m && t . some === m ? t . some ( e , n ) : ( S ( t , function ( t , s , o ) { return r || ( r = e . call ( n , t , s , o ) ) ? i : void 0 } ) , ! ! r ) } ; C . contains = C . include = function ( t , e ) { return null == t ? ! 1 : y && t . indexOf === y ? - 1 != t . indexOf ( e ) : T ( t , function ( t ) { return t === e } ) } , C . invoke = function ( t , e ) { var i = a . call ( arguments , 2 ) , n = C . isFunction ( e ) ; return C . map ( t , function ( t ) { return ( n ? e : t [ e ] ) . apply ( t , i ) } ) } , C . pluck = function ( t , e ) { return C . map ( t , C . property ( e ) ) } , C . where = function ( t , e ) { return C . filter ( t , C . matches ( e ) ) } , C . findWhere = function ( t , e ) { return C . find ( t , C . matches ( e ) ) } , C . max = function ( t , e , i ) { if ( ! e && C . isArray ( t ) && t [ 0 ] === + t [ 0 ] && t . length < 65535 ) return Math . max . apply ( Math , t ) ; var n = - 1 / 0 , r = - 1 / 0 ; return S ( t , function ( t , s , o ) { var a = e ? e . call ( i , t , s , o ) : t ; a > r && ( n = t , r = a ) } ) , n } , C . min = function ( t , e , i ) { if ( ! e && C . isArray ( t ) && t [ 0 ] === + t [ 0 ] && t . length < 65535 ) return Math . min . apply ( Math , t ) ; var n = 1 / 0 , r = 1 / 0 ; return S ( t , function ( t , s , o ) { var a = e ? e . call ( i , t , s , o ) : t ; r > a && ( n = t , r = a ) } ) , n } , C . shuffle = function ( t ) { var e , i = 0 , n = [ ] ; return S ( t , function ( t ) { e = C . random ( i ++ ) , n [ i - 1 ] = n [ e ] , n [ e ] = t } ) , n } , C . sample = function ( t , e , i ) { return null == e || i ? ( t . length !== + t . length && ( t = C . values ( t ) ) , t [ C . random ( t . length - 1 ) ] ) : C . shuffle ( t ) . slice ( 0 , Math . max ( 0 , e ) ) } ; var O = function ( t ) { return null == t ? C . identity : C . isFunction ( t ) ? t : C . property ( t ) } ; C . sortBy = function ( t , e , i ) { return e = O ( e ) , C . pluck ( C . map ( t , function ( t , n , r ) { return { value : t , index : n , criteria : e . call ( i , t , n , r ) } } ) . sort ( function ( t , e ) { var i = t . criteria , n = e . criteria ; if ( i !== n ) { if ( i > n || void 0 === i ) return 1 ; if ( n > i || void 0 === n ) return - 1 } return t . index - e . index } ) , "value" ) } ; var E = function ( t ) { return function ( e , i , n ) { var r = { } ; return i = O ( i ) , S ( e , function ( s , o ) { var a = i . call ( n , s , o , e ) ; t ( r , a , s ) } ) , r } } ; C . groupBy = E ( function ( t , e , i ) { C . has ( t , e ) ? t [ e ] . push ( i ) : t [ e ] = [ i ] } ) , C . indexBy = E ( function ( t , e , i ) { t [ e ] = i } ) , C . countBy = E ( function ( t , e ) { C . has ( t , e ) ? t [ e ] ++ : t [ e ] = 1 } ) , C . sortedIndex = function ( t , e , i , n ) { i = O ( i ) ; for ( var r = i . call ( n , e ) , s = 0 , o = t . length ; o > s ; ) { var a = s + o >>> 1 ; i . call ( n , t [ a ] ) < r ? s = a + 1 : o = a } return s } , C . toArray = function ( t ) { return t ? C . isArray
"function" == typeof this . yy . parseError && ( this . parseError = this . yy . parseError ) ; for ( var d , p , g , v , m , y , b , x , w , _ = { } ; ; ) { if ( g = n [ n . length - 1 ] , this . defaultActions [ g ] ? v = this . defaultActions [ g ] : ( ( null === d || "undefined" == typeof d ) && ( d = e ( ) ) , v = o [ g ] && o [ g ] [ d ] ) , "undefined" == typeof v || ! v . length || ! v [ 0 ] ) { var C = "" ; if ( ! c ) { w = [ ] ; for ( y in o [ g ] ) this . terminals _ [ y ] && y > 2 && w . push ( "'" + this . terminals _ [ y ] + "'" ) ; C = this . lexer . showPosition ? "Parse error on line " + ( h + 1 ) + ":\n" + this . lexer . showPosition ( ) + "\nExpecting " + w . join ( ", " ) + ", got '" + ( this . terminals _ [ d ] || d ) + "'" : "Parse error on line " + ( h + 1 ) + ": Unexpected " + ( 1 == d ? "end of input" : "'" + ( this . terminals _ [ d ] || d ) + "'" ) , this . parseError ( C , { text : this . lexer . match , token : this . terminals _ [ d ] || d , line : this . lexer . yylineno , loc : u , expected : w } ) } } if ( v [ 0 ] instanceof Array && v . length > 1 ) throw new Error ( "Parse Error: multiple actions possible at state: " + g + ", token: " + d ) ; switch ( v [ 0 ] ) { case 1 : n . push ( d ) , r . push ( this . lexer . yytext ) , s . push ( this . lexer . yylloc ) , n . push ( v [ 1 ] ) , d = null , p ? ( d = p , p = null ) : ( l = this . lexer . yyleng , a = this . lexer . yytext , h = this . lexer . yylineno , u = this . lexer . yylloc , c > 0 && c -- ) ; break ; case 2 : if ( b = this . productions _ [ v [ 1 ] ] [ 1 ] , _ . $ = r [ r . length - b ] , _ . _$ = { first _line : s [ s . length - ( b || 1 ) ] . first _line , last _line : s [ s . length - 1 ] . last _line , first _column : s [ s . length - ( b || 1 ) ] . first _column , last _column : s [ s . length - 1 ] . last _column } , f && ( _ . _$ . range = [ s [ s . length - ( b || 1 ) ] . range [ 0 ] , s [ s . length - 1 ] . range [ 1 ] ] ) , m = this . performAction . call ( _ , a , l , h , this . yy , v [ 1 ] , r , s ) , "undefined" != typeof m ) return m ; b && ( n = n . slice ( 0 , - 1 * b * 2 ) , r = r . slice ( 0 , - 1 * b ) , s = s . slice ( 0 , - 1 * b ) ) , n . push ( this . productions _ [ v [ 1 ] ] [ 0 ] ) , r . push ( _ . $ ) , s . push ( _ . _$ ) , x = o [ n [ n . length - 2 ] ] [ n [ n . length - 1 ] ] , n . push ( x ) ; break ; case 3 : return ! 0 } } return ! 0 } } , n = function ( ) { var t = { EOF : 1 , parseError : function ( t , e ) { if ( ! this . yy . parser ) throw new Error ( t ) ; this . yy . parser . parseError ( t , e ) } , setInput : function ( t ) { return this . _input = t , this . _more = this . _less = this . done = ! 1 , this . yylineno = this . yyleng = 0 , this . yytext = this . matched = this . match = "" , this . conditionStack = [ "INITIAL" ] , this . yylloc = { first _line : 1 , first _column : 0 , last _line : 1 , last _column : 0 } , this . options . ranges && ( this . yylloc . range = [ 0 , 0 ] ) , this . offset = 0 , this } , input : function ( ) { var t = this . _input [ 0 ] ; this . yytext += t , this . yyleng ++ , this . offset ++ , this . match += t , this . matched += t ; var e = t . match ( /(?:\r\n?|\n).*/g ) ; return e ? ( this . yylineno ++ , this . yylloc . last _line ++ ) : this . yylloc . last _column ++ , this . options . ranges && this . yylloc . range [ 1 ] ++ , this . _input = this . _input . slice ( 1 ) , t } , unput : function ( t ) { var e = t . length , i = t . split ( /(?:\r\n?|\n)/g ) ; this . _input = t + this . _input , this . yytext = this . yytext . substr ( 0 , this . yytext . length - e - 1 ) , this . offset -= e ; var n = this . match . split ( /(?:\r\n?|\n)/g ) ; this . match = this . match . substr ( 0 , this . match . length - 1 ) , this . matched = this . matched . substr ( 0 , this . matched . length - 1 ) , i . length - 1 && ( this . yylineno -= i . length - 1 ) ; var r = this . yylloc . range ; return this . yylloc = { first _line : this . yylloc . first _line , last _line : this . yylineno + 1 , first _column : this . yylloc . first _column , last _column : i ? ( i . length === n . length ? this . yylloc . first _column : 0 ) + n [ n . length - i . length ] . length - i [ 0 ] . length : this . yylloc . first _column - e } , this . options . ranges && ( this . yylloc . range = [ r [ 0 ] , r [ 0 ] + this . yyleng - e ] ) , this } , more : function ( ) { return this . _more = ! 0 , this } , less : function ( t ) { this . unput ( this . match . slice ( t ) ) } , pastInput : function ( ) { var t = this . matched . substr ( 0 , this . matched . length - this . match . length ) ; return ( t . length > 20 ? "..." : "" ) + t . substr ( - 20 ) . replace ( /\n/g , "" ) } , upcomingInput : function ( ) { var t = this . match ; return t . length < 20 && ( t += this . _input . substr ( 0 , 20 - t . length ) ) , ( t . substr ( 0 , 20 ) + ( t . length > 20 ? "..." : "" ) ) . replace ( /\n/g , "" ) } , showPosition : function ( ) { var t = this . pastInput ( ) , e = new Array ( t . length + 1 ) . join ( "-" ) ; return t + this . upcomingInput ( ) + "\n" + e + "^" } , next : function ( ) { if ( this . done ) return this . EOF ; this . _input || ( this . done = ! 0 ) ; var t , e , i , n , r ; this . _more || ( this . yytext = "" , this . match = "" ) ; for ( var s = this . _currentRules ( ) , o = 0 ; o < s . length && ( i = this . _input . match ( this . rules [ s [ o ] ] ) , ! i || e && ! ( i [ 0 ] . length > e [ 0 ] . length ) || ( e = i , n = o , this . options . flex ) ) ; o ++ ) ; return e ? ( r = e [ 0 ] . match ( /(?:\r\n?|\n).*/g ) , r && ( this . yylineno += r . length ) , this . yylloc = { first _line : this . yylloc . last _line , last _line : this . yylineno + 1 , first _column : this . yylloc . last _column , last _column : r ? r [ r . length - 1 ]
return a . notifyWith ( t , [ l , s , i ] ) , 1 > s && h ? i : ( a . resolveWith ( t , [ l ] ) , ! 1 ) } , l = a . promise ( { elem : t , props : Z . extend ( { } , e ) , opts : Z . extend ( ! 0 , { specialEasing : { } } , i ) , originalProperties : e , originalOptions : i , startTime : Ke || A ( ) , duration : i . duration , tweens : [ ] , createTween : function ( e , i ) { var n = Z . Tween ( t , l . opts , e , i , l . opts . specialEasing [ e ] || l . opts . easing ) ; return l . tweens . push ( n ) , n } , stop : function ( e ) { var i = 0 , n = e ? l . tweens . length : 0 ; if ( r ) return this ; for ( r = ! 0 ; n > i ; i ++ ) l . tweens [ i ] . run ( 1 ) ; return e ? a . resolveWith ( t , [ l , e ] ) : a . rejectWith ( t , [ l , e ] ) , this } } ) , c = l . props ; for ( L ( c , l . opts . specialEasing ) ; o > s ; s ++ ) if ( n = ei [ s ] . call ( l , t , c , l . opts ) ) return n ; return Z . map ( c , P , l ) , Z . isFunction ( l . opts . start ) && l . opts . start . call ( t , l ) , Z . fx . timer ( Z . extend ( h , { elem : t , anim : l , queue : l . opts . queue } ) ) , l . progress ( l . opts . progress ) . done ( l . opts . done , l . opts . complete ) . fail ( l . opts . fail ) . always ( l . opts . always ) } function M ( t ) { return function ( e , i ) { "string" != typeof e && ( i = e , e = "*" ) ; var n , r = 0 , s = e . toLowerCase ( ) . match ( de ) || [ ] ; if ( Z . isFunction ( i ) ) for ( ; n = s [ r ++ ] ; ) "+" === n [ 0 ] ? ( n = n . slice ( 1 ) || "*" , ( t [ n ] = t [ n ] || [ ] ) . unshift ( i ) ) : ( t [ n ] = t [ n ] || [ ] ) . push ( i ) } } function $ ( t , e , i , n ) { function r ( a ) { var h ; return s [ a ] = ! 0 , Z . each ( t [ a ] || [ ] , function ( t , a ) { var l = a ( e , i , n ) ; return "string" != typeof l || o || s [ l ] ? o ? ! ( h = l ) : void 0 : ( e . dataTypes . unshift ( l ) , r ( l ) , ! 1 ) } ) , h } var s = { } , o = t === wi ; return r ( e . dataTypes [ 0 ] ) || ! s [ "*" ] && r ( "*" ) } function N ( t , e ) { var i , n , r = Z . ajaxSettings . flatOptions || { } ; for ( i in e ) void 0 !== e [ i ] && ( ( r [ i ] ? t : n || ( n = { } ) ) [ i ] = e [ i ] ) ; return n && Z . extend ( ! 0 , t , n ) , t } function R ( t , e , i ) { for ( var n , r , s , o , a = t . contents , h = t . dataTypes ; "*" === h [ 0 ] ; ) h . shift ( ) , void 0 === n && ( n = t . mimeType || e . getResponseHeader ( "Content-Type" ) ) ; if ( n ) for ( r in a ) if ( a [ r ] && a [ r ] . test ( n ) ) { h . unshift ( r ) ; break } if ( h [ 0 ] in i ) s = h [ 0 ] ; else { for ( r in i ) { if ( ! h [ 0 ] || t . converters [ r + " " + h [ 0 ] ] ) { s = r ; break } o || ( o = r ) } s = s || o } return s ? ( s !== h [ 0 ] && h . unshift ( s ) , i [ s ] ) : void 0 } function F ( t , e , i , n ) { var r , s , o , a , h , l = { } , c = t . dataTypes . slice ( ) ; if ( c [ 1 ] ) for ( o in t . converters ) l [ o . toLowerCase ( ) ] = t . converters [ o ] ; for ( s = c . shift ( ) ; s ; ) if ( t . responseFields [ s ] && ( i [ t . responseFields [ s ] ] = e ) , ! h && n && t . dataFilter && ( e = t . dataFilter ( e , t . dataType ) ) , h = s , s = c . shift ( ) ) if ( "*" === s ) s = h ; else if ( "*" !== h && h !== s ) { if ( o = l [ h + " " + s ] || l [ "* " + s ] , ! o ) for ( r in l ) if ( a = r . split ( " " ) , a [ 1 ] === s && ( o = l [ h + " " + a [ 0 ] ] || l [ "* " + a [ 0 ] ] ) ) { o === ! 0 ? o = l [ r ] : l [ r ] !== ! 0 && ( s = a [ 0 ] , c . unshift ( a [ 1 ] ) ) ; break } if ( o !== ! 0 ) if ( o && t [ "throws" ] ) e = o ( e ) ; else try { e = o ( e ) } catch ( u ) { return { state : "parsererror" , error : o ? u : "No conversion from " + h + " to " + s } } } return { state : "success" , data : e } } function B ( t , e , i , n ) { var r ; if ( Z . isArray ( e ) ) Z . each ( e , function ( e , r ) { i || ki . test ( t ) ? n ( t , r ) : B ( t + "[" + ( "object" == typeof r ? e : "" ) + "]" , r , i , n ) } ) ; else if ( i || "object" !== Z . type ( e ) ) n ( t , e ) ; else for ( r in e ) B ( t + "[" + r + "]" , e [ r ] , i , n ) } function H ( t ) { return Z . isWindow ( t ) ? t : 9 === t . nodeType && t . defaultView } var W = [ ] , G = W . slice , X = W . concat , V = W . push , z = W . indexOf , q = { } , Y = q . toString , U = q . hasOwnProperty , K = { } , J = t . document , Q = "2.1.1" , Z = function ( t , e ) { return new Z . fn . init ( t , e ) } , te = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g , ee = /^-ms-/ , ie = /-([\da-z])/gi , ne = function ( t , e ) { return e . toUpperCase ( ) } ; Z . fn = Z . prototype = { jquery : Q , constructor : Z , selector : "" , length : 0 , toArray : function ( ) { return G . call ( this ) } , get : function ( t ) { return null != t ? 0 > t ? this [ t + this . length ] : this [ t ] : G . call ( this ) } , pushStack : function ( t ) { var e = Z . merge ( this . constructor ( ) , t ) ; return e . prevObject = this , e . context = this . context , e } , each : function ( t , e ) { return Z . each ( this , t , e ) } , map : function ( t ) { return this . pushStack ( Z . map ( this , function ( e , i ) { return t . call ( e , i , e ) } ) ) } , slice : function ( ) { return this . pushStack ( G . apply ( this , arguments ) ) } , first : function ( ) { return this . eq ( 0 ) } , last : function ( ) { return this . eq ( - 1 ) } , eq : function ( t ) { var e = this . length , i = + t + ( 0 > t ? e : 0 ) ; return this . pushStack ( i >= 0 && e > i ? [ this [ i ] ] : [ ] ) } , end : function ( ) { return this . prevObject || this . constructor ( null ) } , push : V , sort : W . sort , splice : W . splice } , Z . extend = Z . fn . extend = function ( ) { var t , e , i , n , r , s , o = arguments [ 0 ] || { } , a = 1 , h = arguments . length , l = ! 1 ; for ( "boolean" == typeof o && ( l = o , o = arguments [ a ] || { } , a ++ ) , "object" == typeof o || Z . isFunction ( o ) || ( o = { } ) , a === h && ( o = this , a -- ) ; h > a ; a ++ ) if ( null != ( t = arguments [ a ] ) ) for ( e in t ) i = o [ e ] , n = t [ e ] , o !== n && ( l && n && ( Z . isPlainObject ( n ) || ( r = Z . isArray ( n ) ) ) ? ( r ? ( r = ! 1 , s = i && Z . isArray ( i ) ? i : [ ] ) : s = i && Z . isPlainOb
} , a . uid = 1 , a . accepts = Z . acceptData , a . prototype = { key : function ( t ) { if ( ! a . accepts ( t ) ) return 0 ; var e = { } , i = t [ this . expando ] ; if ( ! i ) { i = a . uid ++ ; try { e [ this . expando ] = { value : i } , Object . defineProperties ( t , e ) } catch ( n ) { e [ this . expando ] = i , Z . extend ( t , e ) } } return this . cache [ i ] || ( this . cache [ i ] = { } ) , i } , set : function ( t , e , i ) { var n , r = this . key ( t ) , s = this . cache [ r ] ; if ( "string" == typeof e ) s [ e ] = i ; else if ( Z . isEmptyObject ( s ) ) Z . extend ( this . cache [ r ] , e ) ; else for ( n in e ) s [ n ] = e [ n ] ; return s } , get : function ( t , e ) { var i = this . cache [ this . key ( t ) ] ; return void 0 === e ? i : i [ e ] } , access : function ( t , e , i ) { var n ; return void 0 === e || e && "string" == typeof e && void 0 === i ? ( n = this . get ( t , e ) , void 0 !== n ? n : this . get ( t , Z . camelCase ( e ) ) ) : ( this . set ( t , e , i ) , void 0 !== i ? i : e ) } , remove : function ( t , e ) { var i , n , r , s = this . key ( t ) , o = this . cache [ s ] ; if ( void 0 === e ) this . cache [ s ] = { } ; else { Z . isArray ( e ) ? n = e . concat ( e . map ( Z . camelCase ) ) : ( r = Z . camelCase ( e ) , e in o ? n = [ e , r ] : ( n = r , n = n in o ? [ n ] : n . match ( de ) || [ ] ) ) , i = n . length ; for ( ; i -- ; ) delete o [ n [ i ] ] } } , hasData : function ( t ) { return ! Z . isEmptyObject ( this . cache [ t [ this . expando ] ] || { } ) } , discard : function ( t ) { t [ this . expando ] && delete this . cache [ t [ this . expando ] ] } } ; var me = new a , ye = new a , be = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/ , xe = /([A-Z])/g ; Z . extend ( { hasData : function ( t ) { return ye . hasData ( t ) || me . hasData ( t ) } , data : function ( t , e , i ) { return ye . access ( t , e , i ) } , removeData : function ( t , e ) { ye . remove ( t , e ) } , _data : function ( t , e , i ) { return me . access ( t , e , i ) } , _removeData : function ( t , e ) { me . remove ( t , e ) } } ) , Z . fn . extend ( { data : function ( t , e ) { var i , n , r , s = this [ 0 ] , o = s && s . attributes ; if ( void 0 === t ) { if ( this . length && ( r = ye . get ( s ) , 1 === s . nodeType && ! me . get ( s , "hasDataAttrs" ) ) ) { for ( i = o . length ; i -- ; ) o [ i ] && ( n = o [ i ] . name , 0 === n . indexOf ( "data-" ) && ( n = Z . camelCase ( n . slice ( 5 ) ) , h ( s , n , r [ n ] ) ) ) ; me . set ( s , "hasDataAttrs" , ! 0 ) } return r } return "object" == typeof t ? this . each ( function ( ) { ye . set ( this , t ) } ) : ve ( this , function ( e ) { var i , n = Z . camelCase ( t ) ; if ( s && void 0 === e ) { if ( i = ye . get ( s , t ) , void 0 !== i ) return i ; if ( i = ye . get ( s , n ) , void 0 !== i ) return i ; if ( i = h ( s , n , void 0 ) , void 0 !== i ) return i } else this . each ( function ( ) { var i = ye . get ( this , n ) ; ye . set ( this , n , e ) , - 1 !== t . indexOf ( "-" ) && void 0 !== i && ye . set ( this , t , e ) } ) } , null , e , arguments . length > 1 , null , ! 0 ) } , removeData : function ( t ) { return this . each ( function ( ) { ye . remove ( this , t ) } ) } } ) , Z . extend ( { queue : function ( t , e , i ) { var n ; return t ? ( e = ( e || "fx" ) + "queue" , n = me . get ( t , e ) , i && ( ! n || Z . isArray ( i ) ? n = me . access ( t , e , Z . makeArray ( i ) ) : n . push ( i ) ) , n || [ ] ) : void 0 } , dequeue : function ( t , e ) { e = e || "fx" ; var i = Z . queue ( t , e ) , n = i . length , r = i . shift ( ) , s = Z . _queueHooks ( t , e ) , o = function ( ) { Z . dequeue ( t , e ) } ; "inprogress" === r && ( r = i . shift ( ) , n -- ) , r && ( "fx" === e && i . unshift ( "inprogress" ) , delete s . stop , r . call ( t , o , s ) ) , ! n && s && s . empty . fire ( ) } , _queueHooks : function ( t , e ) { var i = e + "queueHooks" ; return me . get ( t , i ) || me . access ( t , i , { empty : Z . Callbacks ( "once memory" ) . add ( function ( ) { me . remove ( t , [ e + "queue" , i ] ) } ) } ) } } ) , Z . fn . extend ( { queue : function ( t , e ) { var i = 2 ; return "string" != typeof t && ( e = t , t = "fx" , i -- ) , arguments . length < i ? Z . queue ( this [ 0 ] , t ) : void 0 === e ? this : this . each ( function ( ) { var i = Z . queue ( this , t , e ) ; Z . _queueHooks ( this , t ) , "fx" === t && "inprogress" !== i [ 0 ] && Z . dequeue ( this , t ) } ) } , dequeue : function ( t ) { return this . each ( function ( ) { Z . dequeue ( this , t ) } ) } , clearQueue : function ( t ) { return this . queue ( t || "fx" , [ ] ) } , promise : function ( t , e ) { var i , n = 1 , r = Z . Deferred ( ) , s = this , o = this . length , a = function ( ) { -- n || r . resolveWith ( s , [ s ] ) } ; for ( "string" != typeof t && ( e = t , t = void 0 ) , t = t || "fx" ; o -- ; ) i = me . get ( s [ o ] , t + "queueHooks" ) , i && i . empty && ( n ++ , i . empty . add ( a ) ) ; return a ( ) , r . promise ( e ) } } ) ; var we = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ . source , _e = [ "Top" , "Right" , "Bottom" , "Left" ] , Ce = function ( t , e ) { return t = e || t , "none" === Z . css ( t , "display" ) || ! Z . contains ( t . ownerDocument , t ) } , Se = /^(?:checkbox|radio)$/i ; ! function ( ) { var t = J . createDocumentFragment ( ) , e = t . appendChild ( J . createElement ( "div" ) ) , i = J . createElement ( "input" ) ; i . setAttribute ( "type" , "radio" ) , i . setAttribute ( "checked" , "checked" ) , i . setAttribute ( "name" , "t" ) , e . appendChild ( i ) , K . checkClone = e . cloneNode ( ! 0 ) . cloneNode ( ! 0 ) . lastChild . checked , e . innerHTML = "<textarea>x</textarea>" , K . noCloneChecked = ! ! e . cloneNode ( ! 0 ) . lastChild . defaultValue } ( ) ; var ke = "undefined" ; K . focusinBubbles = "onfocusin" in t ; var Te = /^key/ , Oe = /^(?:mouse|pointer|contextmenu)|click/ , Ee = / ^ ( ? : f o c u s i n
} } ) , Z . fn . extend ( { hover : function ( t , e ) { return this . mouseenter ( t ) . mouseleave ( e || t ) } , bind : function ( t , e , i ) { return this . on ( t , null , e , i ) } , unbind : function ( t , e ) { return this . off ( t , null , e ) } , delegate : function ( t , e , i , n ) { return this . on ( e , t , i , n ) } , undelegate : function ( t , e , i ) { return 1 === arguments . length ? this . off ( t , "**" ) : this . off ( e , t || "**" , i ) } } ) ; var li = Z . now ( ) , ci = /\?/ ; Z . parseJSON = function ( t ) { return JSON . parse ( t + "" ) } , Z . parseXML = function ( t ) { var e , i ; if ( ! t || "string" != typeof t ) return null ; try { i = new DOMParser , e = i . parseFromString ( t , "text/xml" ) } catch ( n ) { e = void 0 } return ( ! e || e . getElementsByTagName ( "parsererror" ) . length ) && Z . error ( "Invalid XML: " + t ) , e } ; var ui , fi , di = /#.*$/ , pi = /([?&])_=[^&]*/ , gi = /^(.*?):[ \t]*([^\r\n]*)$/gm , vi = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/ , mi = /^(?:GET|HEAD)$/ , yi = /^\/\// , bi = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/ , xi = { } , wi = { } , _i = "*/" . concat ( "*" ) ; try { fi = location . href } catch ( Ci ) { fi = J . createElement ( "a" ) , fi . href = "" , fi = fi . href } ui = bi . exec ( fi . toLowerCase ( ) ) || [ ] , Z . extend ( { active : 0 , lastModified : { } , etag : { } , ajaxSettings : { url : fi , type : "GET" , isLocal : vi . test ( ui [ 1 ] ) , global : ! 0 , processData : ! 0 , async : ! 0 , contentType : "application/x-www-form-urlencoded; charset=UTF-8" , accepts : { "*" : _i , text : "text/plain" , html : "text/html" , xml : "application/xml, text/xml" , json : "application/json, text/javascript" } , contents : { xml : /xml/ , html : /html/ , json : /json/ } , responseFields : { xml : "responseXML" , text : "responseText" , json : "responseJSON" } , converters : { "* text" : String , "text html" : ! 0 , "text json" : Z . parseJSON , "text xml" : Z . parseXML } , flatOptions : { url : ! 0 , context : ! 0 } } , ajaxSetup : function ( t , e ) { return e ? N ( N ( t , Z . ajaxSettings ) , e ) : N ( Z . ajaxSettings , t ) } , ajaxPrefilter : M ( xi ) , ajaxTransport : M ( wi ) , ajax : function ( t , e ) { function i ( t , e , i , o ) { var h , c , m , y , x , _ = e ; 2 !== b && ( b = 2 , a && clearTimeout ( a ) , n = void 0 , s = o || "" , w . readyState = t > 0 ? 4 : 0 , h = t >= 200 && 300 > t || 304 === t , i && ( y = R ( u , w , i ) ) , y = F ( u , y , w , h ) , h ? ( u . ifModified && ( x = w . getResponseHeader ( "Last-Modified" ) , x && ( Z . lastModified [ r ] = x ) , x = w . getResponseHeader ( "etag" ) , x && ( Z . etag [ r ] = x ) ) , 204 === t || "HEAD" === u . type ? _ = "nocontent" : 304 === t ? _ = "notmodified" : ( _ = y . state , c = y . data , m = y . error , h = ! m ) ) : ( m = _ , ( t || ! _ ) && ( _ = "error" , 0 > t && ( t = 0 ) ) ) , w . status = t , w . statusText = ( e || _ ) + "" , h ? p . resolveWith ( f , [ c , _ , w ] ) : p . rejectWith ( f , [ w , _ , m ] ) , w . statusCode ( v ) , v = void 0 , l && d . trigger ( h ? "ajaxSuccess" : "ajaxError" , [ w , u , h ? c : m ] ) , g . fireWith ( f , [ w , _ ] ) , l && ( d . trigger ( "ajaxComplete" , [ w , u ] ) , -- Z . active || Z . event . trigger ( "ajaxStop" ) ) ) } "object" == typeof t && ( e = t , t = void 0 ) , e = e || { } ; var n , r , s , o , a , h , l , c , u = Z . ajaxSetup ( { } , e ) , f = u . context || u , d = u . context && ( f . nodeType || f . jquery ) ? Z ( f ) : Z . event , p = Z . Deferred ( ) , g = Z . Callbacks ( "once memory" ) , v = u . statusCode || { } , m = { } , y = { } , b = 0 , x = "canceled" , w = { readyState : 0 , getResponseHeader : function ( t ) { var e ; if ( 2 === b ) { if ( ! o ) for ( o = { } ; e = gi . exec ( s ) ; ) o [ e [ 1 ] . toLowerCase ( ) ] = e [ 2 ] ; e = o [ t . toLowerCase ( ) ] } return null == e ? null : e } , getAllResponseHeaders : function ( ) { return 2 === b ? s : null } , setRequestHeader : function ( t , e ) { var i = t . toLowerCase ( ) ; return b || ( t = y [ i ] = y [ i ] || t , m [ t ] = e ) , this } , overrideMimeType : function ( t ) { return b || ( u . mimeType = t ) , this } , statusCode : function ( t ) { var e ; if ( t ) if ( 2 > b ) for ( e in t ) v [ e ] = [ v [ e ] , t [ e ] ] ; else w . always ( t [ w . status ] ) ; return this } , abort : function ( t ) { var e = t || x ; return n && n . abort ( e ) , i ( 0 , e ) , this } } ; if ( p . promise ( w ) . complete = g . add , w . success = w . done , w . error = w . fail , u . url = ( ( t || u . url || fi ) + "" ) . replace ( di , "" ) . replace ( yi , ui [ 1 ] + "//" ) , u . type = e . method || e . type || u . method || u . type , u . dataTypes = Z . trim ( u . dataType || "*" ) . toLowerCase ( ) . match ( de ) || [ "" ] , null == u . crossDomain && ( h = bi . exec ( u . url . toLowerCase ( ) ) , u . crossDomain = ! ( ! h || h [ 1 ] === ui [ 1 ] && h [ 2 ] === ui [ 2 ] && ( h [ 3 ] || ( "http:" === h [ 1 ] ? "80" : "443" ) ) === ( ui [ 3 ] || ( "http:" === ui [ 1 ] ? "80" : "443" ) ) ) ) , u . data && u . processData && "string" != typeof u . data && ( u . data = Z . param ( u . data , u . traditional ) ) , $ ( xi , u , e , w ) , 2 === b ) return w ; l = u . global , l && 0 === Z . active ++ && Z . event . trigger ( "ajaxStart" ) , u . type = u . type . toUpperCase ( ) , u . hasContent = ! mi . test ( u . type ) , r = u . url , u . hasContent || ( u . data && ( r = u . url += ( ci . test ( r ) ? "&" : "?" ) + u . data , delete u . data ) , u . cache === ! 1 && ( u . url = pi . test ( r ) ? r . replace ( pi , "$1_=" + li ++ ) : r + ( ci . test ( r ) ? "&" : "?" ) + "_=" + li ++ ) ) , u . ifModified && ( Z . lastModified [ r ] && w . setRequestHeader ( "If-Modified-Since" , Z . lastModified [ r ] ) , Z . etag [ r ] && w
} var n = function ( ) { for ( var t = [ function ( ) { return new ActiveXObject ( "Microsoft.XMLHTTP" ) } , function ( ) { return new ActiveXObject ( "Msxml2.XMLHTTP" ) } , function ( ) { return new ActiveXObject ( "Msxml2.XMLHTTP.3.0" ) } , function ( ) { return new XMLHttpRequest } ] , e = t . length ; e -- ; ) try { var i = t [ e ] ( ) ; if ( i ) return t [ e ] } catch ( n ) { } } ( ) ; fabric . util . request = i } ( ) , fabric . log = function ( ) { } , fabric . warn = function ( ) { } , "undefined" != typeof console && [ "log" , "warn" ] . forEach ( function ( t ) { "undefined" != typeof console [ t ] && console [ t ] . apply && ( fabric [ t ] = function ( ) { return console [ t ] . apply ( console , arguments ) } ) } ) , function ( ) { function t ( t ) { e ( function ( i ) { t || ( t = { } ) ; var n , r = i || + new Date , s = t . duration || 500 , o = r + s , a = t . onChange || function ( ) { } , h = t . abort || function ( ) { return ! 1 } , l = t . easing || function ( t , e , i , n ) { return - i * Math . cos ( t / n * ( Math . PI / 2 ) ) + i + e } , c = "startValue" in t ? t . startValue : 0 , u = "endValue" in t ? t . endValue : 100 , f = t . byValue || u - c ; t . onStart && t . onStart ( ) , function d ( i ) { n = i || + new Date ; var u = n > o ? s : n - r ; return h ( ) ? void ( t . onComplete && t . onComplete ( ) ) : ( a ( l ( u , c , f , s ) ) , n > o ? void ( t . onComplete && t . onComplete ( ) ) : void e ( d ) ) } ( r ) } ) } function e ( ) { return i . apply ( fabric . window , arguments ) } var i = fabric . window . requestAnimationFrame || fabric . window . webkitRequestAnimationFrame || fabric . window . mozRequestAnimationFrame || fabric . window . oRequestAnimationFrame || fabric . window . msRequestAnimationFrame || function ( t ) { fabric . window . setTimeout ( t , 1e3 / 60 ) } ; fabric . util . animate = t , fabric . util . requestAnimFrame = e } ( ) , function ( ) { function t ( t , e , i , n ) { return t < Math . abs ( e ) ? ( t = e , n = i / 4 ) : n = i / ( 2 * Math . PI ) * Math . asin ( e / t ) , { a : t , c : e , p : i , s : n } } function e ( t , e , i ) { return t . a * Math . pow ( 2 , 10 * ( e -= 1 ) ) * Math . sin ( 2 * ( e * i - t . s ) * Math . PI / t . p ) } function i ( t , e , i , n ) { return i * ( ( t = t / n - 1 ) * t * t + 1 ) + e } function n ( t , e , i , n ) { return t /= n / 2 , 1 > t ? i / 2 * t * t * t + e : i / 2 * ( ( t -= 2 ) * t * t + 2 ) + e } function r ( t , e , i , n ) { return i * ( t /= n ) * t * t * t + e } function s ( t , e , i , n ) { return - i * ( ( t = t / n - 1 ) * t * t * t - 1 ) + e } function o ( t , e , i , n ) { return t /= n / 2 , 1 > t ? i / 2 * t * t * t * t + e : - i / 2 * ( ( t -= 2 ) * t * t * t - 2 ) + e } function a ( t , e , i , n ) { return i * ( t /= n ) * t * t * t * t + e } function h ( t , e , i , n ) { return i * ( ( t = t / n - 1 ) * t * t * t * t + 1 ) + e } function l ( t , e , i , n ) { return t /= n / 2 , 1 > t ? i / 2 * t * t * t * t * t + e : i / 2 * ( ( t -= 2 ) * t * t * t * t + 2 ) + e } function c ( t , e , i , n ) { return - i * Math . cos ( t / n * ( Math . PI / 2 ) ) + i + e } function u ( t , e , i , n ) { return i * Math . sin ( t / n * ( Math . PI / 2 ) ) + e } function f ( t , e , i , n ) { return - i / 2 * ( Math . cos ( Math . PI * t / n ) - 1 ) + e } function d ( t , e , i , n ) { return 0 === t ? e : i * Math . pow ( 2 , 10 * ( t / n - 1 ) ) + e } function p ( t , e , i , n ) { return t === n ? e + i : i * ( - Math . pow ( 2 , - 10 * t / n ) + 1 ) + e } function g ( t , e , i , n ) { return 0 === t ? e : t === n ? e + i : ( t /= n / 2 , 1 > t ? i / 2 * Math . pow ( 2 , 10 * ( t - 1 ) ) + e : i / 2 * ( - Math . pow ( 2 , - 10 * -- t ) + 2 ) + e ) } function v ( t , e , i , n ) { return - i * ( Math . sqrt ( 1 - ( t /= n ) * t ) - 1 ) + e } function m ( t , e , i , n ) { return i * Math . sqrt ( 1 - ( t = t / n - 1 ) * t ) + e } function y ( t , e , i , n ) { return t /= n / 2 , 1 > t ? - i / 2 * ( Math . sqrt ( 1 - t * t ) - 1 ) + e : i / 2 * ( Math . sqrt ( 1 - ( t -= 2 ) * t ) + 1 ) + e } function b ( i , n , r , s ) { var o = 1.70158 , a = 0 , h = r ; if ( 0 === i ) return n ; if ( i /= s , 1 === i ) return n + r ; a || ( a = . 3 * s ) ; var l = t ( h , r , a , o ) ; return - e ( l , i , s ) + n } function x ( e , i , n , r ) { var s = 1.70158 , o = 0 , a = n ; if ( 0 === e ) return i ; if ( e /= r , 1 === e ) return i + n ; o || ( o = . 3 * r ) ; var h = t ( a , n , o , s ) ; return h . a * Math . pow ( 2 , - 10 * e ) * Math . sin ( 2 * ( e * r - h . s ) * Math . PI / h . p ) + h . c + i } function w ( i , n , r , s ) { var o = 1.70158 , a = 0 , h = r ; if ( 0 === i ) return n ; if ( i /= s / 2 , 2 === i ) return n + r ; a || ( a = . 3 * s * 1.5 ) ; var l = t ( h , r , a , o ) ; return 1 > i ? - . 5 * e ( l , i , s ) + n : l . a * Math . pow ( 2 , - 10 * ( i -= 1 ) ) * Math . sin ( 2 * ( i * s - l . s ) * Math . PI / l . p ) * . 5 + l . c + n } function _ ( t , e , i , n , r ) { return void 0 === r && ( r = 1.70158 ) , i * ( t /= n ) * t * ( ( r + 1 ) * t - r ) + e } function C ( t , e , i , n , r ) { return void 0 === r && ( r = 1.70158 ) , i * ( ( t = t / n - 1 ) * t * ( ( r + 1 ) * t + r ) + 1 ) + e } function S ( t , e , i , n , r ) { return void 0 === r && ( r = 1.70158 ) , t /= n / 2 , 1 > t ? i / 2 * t * t * ( ( ( r *= 1.525 ) + 1 ) * t - r ) + e : i / 2 * ( ( t -= 2 ) * t * ( ( ( r *= 1.525 ) + 1 ) * t + r ) + 2 ) + e } function k ( t , e , i , n ) { return i - T ( n - t , 0 , i , n ) + e } function T ( t , e , i , n ) { return ( t /= n ) < 1 / 2.75 ? 7.5625 * i * t * t + e : 2 / 2.75 > t ? i * ( 7.5625 * ( t -= 1.5 / 2.75 ) * t + . 75 ) + e : 2.5 / 2.75 > t ? i * ( 7.5625 * ( t -= 2.25 / 2.75 ) * t + . 9375 ) + e : i * ( 7.5625 * ( t -= 2.625 / 2.75 ) * t + . 984375 ) + e } function O ( t , e , i , n ) { return n / 2 > t ? . 5 * k ( 2 * t , 0 , i , n ) + e : . 5 * T ( 2 * t - n , 0 , i , n ) + . 5 * i + e } fabric . util . ease = { easeInQuad : function ( t , e , i , n ) { return i * ( t /= n ) * t + e } , easeOutQuad : function ( t , e , i , n ) { return - i * ( t /= n ) * ( t - 2 ) + e } , easeInOutQuad : function ( t , e , i , n ) { return t /= n / 2 , 1 > t ? i / 2 * t * t + e : - i / 2 * ( -- t * ( t - 2 ) - 1 ) + e } , easeInCubic : function ( t , e , i , n ) { return i * ( t /= n ) * t * t
} , calcOffset : function ( ) { return this . _offset = e ( this . lowerCanvasEl ) , this } , setOverlayImage : function ( t , e , i ) { return this . _ _setBgOverlayImage ( "overlayImage" , t , e , i ) } , setBackgroundImage : function ( t , e , i ) { return this . _ _setBgOverlayImage ( "backgroundImage" , t , e , i ) } , setOverlayColor : function ( t , e ) { return this . _ _setBgOverlayColor ( "overlayColor" , t , e ) } , setBackgroundColor : function ( t , e ) { return this . _ _setBgOverlayColor ( "backgroundColor" , t , e ) } , _setImageSmoothing : function ( ) { var t = this . getContext ( ) ; t . imageSmoothingEnabled = this . imageSmoothingEnabled , t . webkitImageSmoothingEnabled = this . imageSmoothingEnabled , t . mozImageSmoothingEnabled = this . imageSmoothingEnabled , t . msImageSmoothingEnabled = this . imageSmoothingEnabled , t . oImageSmoothingEnabled = this . imageSmoothingEnabled } , _ _setBgOverlayImage : function ( t , e , i , n ) { return "string" == typeof e ? fabric . util . loadImage ( e , function ( e ) { this [ t ] = new fabric . Image ( e , n ) , i && i ( ) } , this ) : ( this [ t ] = e , i && i ( ) ) , this } , _ _setBgOverlayColor : function ( t , e , i ) { if ( e && e . source ) { var n = this ; fabric . util . loadImage ( e . source , function ( r ) { n [ t ] = new fabric . Pattern ( { source : r , repeat : e . repeat , offsetX : e . offsetX , offsetY : e . offsetY } ) , i && i ( ) } ) } else this [ t ] = e , i && i ( ) ; return this } , _createCanvasElement : function ( ) { var t = fabric . document . createElement ( "canvas" ) ; if ( t . style || ( t . style = { } ) , ! t ) throw n ; return this . _initCanvasElement ( t ) , t } , _initCanvasElement : function ( t ) { if ( fabric . util . createCanvasElement ( t ) , "undefined" == typeof t . getContext ) throw n } , _initOptions : function ( t ) { for ( var e in t ) this [ e ] = t [ e ] ; this . width = this . width || parseInt ( this . lowerCanvasEl . width , 10 ) || 0 , this . height = this . height || parseInt ( this . lowerCanvasEl . height , 10 ) || 0 , this . lowerCanvasEl . style && ( this . lowerCanvasEl . width = this . width , this . lowerCanvasEl . height = this . height , this . lowerCanvasEl . style . width = this . width + "px" , this . lowerCanvasEl . style . height = this . height + "px" , this . viewportTransform = this . viewportTransform . slice ( ) ) } , _createLowerCanvas : function ( t ) { this . lowerCanvasEl = fabric . util . getById ( t ) || this . _createCanvasElement ( ) , this . _initCanvasElement ( this . lowerCanvasEl ) , fabric . util . addClass ( this . lowerCanvasEl , "lower-canvas" ) , this . interactive && this . _applyCanvasStyle ( this . lowerCanvasEl ) , this . contextContainer = this . lowerCanvasEl . getContext ( "2d" ) } , getWidth : function ( ) { return this . width } , getHeight : function ( ) { return this . height } , setWidth : function ( t , e ) { return this . setDimensions ( { width : t } , e ) } , setHeight : function ( t , e ) { return this . setDimensions ( { height : t } , e ) } , setDimensions : function ( t , e ) { var i ; e = e || { } ; for ( var n in t ) i = t [ n ] , e . cssOnly || ( this . _setBackstoreDimension ( n , t [ n ] ) , i += "px" ) , e . backstoreOnly || this . _setCssDimension ( n , i ) ; return e . cssOnly || this . renderAll ( ) , this . calcOffset ( ) , this } , _setBackstoreDimension : function ( t , e ) { return this . lowerCanvasEl [ t ] = e , this . upperCanvasEl && ( this . upperCanvasEl [ t ] = e ) , this . cacheCanvasEl && ( this . cacheCanvasEl [ t ] = e ) , this [ t ] = e , this } , _setCssDimension : function ( t , e ) { return this . lowerCanvasEl . style [ t ] = e , this . upperCanvasEl && ( this . upperCanvasEl . style [ t ] = e ) , this . wrapperEl && ( this . wrapperEl . style [ t ] = e ) , this } , getZoom : function ( ) { return Math . sqrt ( this . viewportTransform [ 0 ] * this . viewportTransform [ 3 ] ) } , setViewportTransform : function ( t ) { this . viewportTransform = t , this . renderAll ( ) ; for ( var e = 0 , i = this . _objects . length ; i > e ; e ++ ) this . _objects [ e ] . setCoords ( ) ; return this } , zoomToPoint : function ( t , e ) { var i = t ; t = fabric . util . transformPoint ( t , fabric . util . invertTransform ( this . viewportTransform ) ) , this . viewportTransform [ 0 ] = e , this . viewportTransform [ 3 ] = e ; var n = fabric . util . transformPoint ( t , this . viewportTransform ) ; this . viewportTransform [ 4 ] += i . x - n . x , this . viewportTransform [ 5 ] += i . y - n . y , this . renderAll ( ) ; for ( var r = 0 , s = this . _objects . length ; s > r ; r ++ ) this . _objects [ r ] . setCoords ( ) ; return this } , setZoom : function ( t ) { return this . zoomToPoint ( new fabric . Point ( 0 , 0 ) , t ) , this } , absolutePan : function ( t ) { this . viewportTransform [ 4 ] = - t . x , this . viewportTransform [ 5 ] = - t . y , this . renderAll ( ) ; for ( var e = 0 , i = this . _objects . length ; i > e ; e ++ ) this . _objects [ e ] . setCoords ( ) ; return this } , relativePan : function ( t ) { return this . absolutePan ( new fabric . Point ( - t . x - this . viewportTransform [ 4 ] , - t . y - this . viewportTransform [ 5 ] ) ) } , getElement : function ( ) { return this . lowerCanvasEl } , getActiveObject : function ( ) { return null } , getActi
return e && this . fire ( "before:selection:cleared" , { target : e , e : t } ) , this . deactivateAll ( ) , e && this . fire ( "selection:cleared" , { e : t } ) , this } , drawControls : function ( t ) { var e = this . getActiveGroup ( ) ; e ? this . _drawGroupControls ( t , e ) : this . _drawObjectsControls ( t ) } , _drawGroupControls : function ( t , e ) { e . _renderControls ( t ) } , _drawObjectsControls : function ( t ) { for ( var e = 0 , i = this . _objects . length ; i > e ; ++ e ) this . _objects [ e ] && this . _objects [ e ] . active && ( this . _objects [ e ] . _renderControls ( t ) , this . lastRenderedObjectWithControlsAboveOverlay = this . _objects [ e ] ) } } ) ; for ( var o in fabric . StaticCanvas ) "prototype" !== o && ( fabric . Canvas [ o ] = fabric . StaticCanvas [ o ] ) ; fabric . isTouchSupported && ( fabric . Canvas . prototype . _setCursorFromEvent = function ( ) { } ) , fabric . Element = fabric . Canvas } ( ) , function ( ) { var t = { mt : 0 , tr : 1 , mr : 2 , br : 3 , mb : 4 , bl : 5 , ml : 6 , tl : 7 } , e = fabric . util . addListener , i = fabric . util . removeListener ; fabric . util . object . extend ( fabric . Canvas . prototype , { cursorMap : [ "n-resize" , "ne-resize" , "e-resize" , "se-resize" , "s-resize" , "sw-resize" , "w-resize" , "nw-resize" ] , _initEventListeners : function ( ) { this . _bindEvents ( ) , e ( fabric . window , "resize" , this . _onResize ) , e ( this . upperCanvasEl , "mousedown" , this . _onMouseDown ) , e ( this . upperCanvasEl , "mousemove" , this . _onMouseMove ) , e ( this . upperCanvasEl , "mousewheel" , this . _onMouseWheel ) , e ( this . upperCanvasEl , "touchstart" , this . _onMouseDown ) , e ( this . upperCanvasEl , "touchmove" , this . _onMouseMove ) , "undefined" != typeof Event && "add" in Event && ( Event . add ( this . upperCanvasEl , "gesture" , this . _onGesture ) , Event . add ( this . upperCanvasEl , "drag" , this . _onDrag ) , Event . add ( this . upperCanvasEl , "orientation" , this . _onOrientationChange ) , Event . add ( this . upperCanvasEl , "shake" , this . _onShake ) ) } , _bindEvents : function ( ) { this . _onMouseDown = this . _onMouseDown . bind ( this ) , this . _onMouseMove = this . _onMouseMove . bind ( this ) , this . _onMouseUp = this . _onMouseUp . bind ( this ) , this . _onResize = this . _onResize . bind ( this ) , this . _onGesture = this . _onGesture . bind ( this ) , this . _onDrag = this . _onDrag . bind ( this ) , this . _onShake = this . _onShake . bind ( this ) , this . _onOrientationChange = this . _onOrientationChange . bind ( this ) , this . _onMouseWheel = this . _onMouseWheel . bind ( this ) } , removeListeners : function ( ) { i ( fabric . window , "resize" , this . _onResize ) , i ( this . upperCanvasEl , "mousedown" , this . _onMouseDown ) , i ( this . upperCanvasEl , "mousemove" , this . _onMouseMove ) , i ( this . upperCanvasEl , "mousewheel" , this . _onMouseWheel ) , i ( this . upperCanvasEl , "touchstart" , this . _onMouseDown ) , i ( this . upperCanvasEl , "touchmove" , this . _onMouseMove ) , "undefined" != typeof Event && "remove" in Event && ( Event . remove ( this . upperCanvasEl , "gesture" , this . _onGesture ) , Event . remove ( this . upperCanvasEl , "drag" , this . _onDrag ) , Event . remove ( this . upperCanvasEl , "orientation" , this . _onOrientationChange ) , Event . remove ( this . upperCanvasEl , "shake" , this . _onShake ) ) } , _onGesture : function ( t , e ) { this . _ _onTransformGesture && this . _ _onTransformGesture ( t , e ) } , _onDrag : function ( t , e ) { this . _ _onDrag && this . _ _onDrag ( t , e ) } , _onMouseWheel : function ( t , e ) { this . _ _onMouseWheel && this . _ _onMouseWheel ( t , e ) } , _onOrientationChange : function ( t , e ) { this . _ _onOrientationChange && this . _ _onOrientationChange ( t , e ) } , _onShake : function ( t , e ) { this . _ _onShake && this . _ _onShake ( t , e ) } , _onMouseDown : function ( t ) { this . _ _onMouseDown ( t ) , e ( fabric . document , "touchend" , this . _onMouseUp ) , e ( fabric . document , "touchmove" , this . _onMouseMove ) , i ( this . upperCanvasEl , "mousemove" , this . _onMouseMove ) , i ( this . upperCanvasEl , "touchmove" , this . _onMouseMove ) , "touchstart" === t . type ? i ( this . upperCanvasEl , "mousedown" , this . _onMouseDown ) : ( e ( fabric . document , "mouseup" , this . _onMouseUp ) , e ( fabric . document , "mousemove" , this . _onMouseMove ) ) } , _onMouseUp : function ( t ) { if ( this . _ _onMouseUp ( t ) , i ( fabric . document , "mouseup" , this . _onMouseUp ) , i ( fabric . document , "touchend" , this . _onMouseUp ) , i ( fabric . document , "mousemove" , this . _onMouseMove ) , i ( fabric . document , "touchmove" , this . _onMouseMove ) , e ( this . upperCanvasEl , "mousemove" , this . _onMouseMove ) , e ( this . upperCanvasEl , "touchmove" , this . _onMouseMove ) , "touchend" === t . type ) { var n = this ; setTimeout ( function ( ) { e ( n . upperCanvasEl , "mousedown" , n . _onMouseDown ) } , 400 ) } } , _onMouseMove : function ( t ) { ! this . allowTouchScrolling && t . preventDefault && t . preventDefault ( ) , this . _ _onMouseMove ( t ) } , _onResize : function ( ) { this . calcOffset ( ) } , _shouldRender : function ( t , e )
} , s = this . width , o = this . height , a = "round" === this . strokeLineCap || "square" === this . strokeLineCap , h = "line" === this . type && 1 === this . width , l = "line" === this . type && 1 === this . height , c = a && l || "line" !== this . type , u = a && h || "line" !== this . type ; h ? s = e : l && ( o = e ) , c && ( s += e ) , u && ( o += e ) , this . currentWidth = s * this . scaleX , this . currentHeight = o * this . scaleY , this . currentWidth < 0 && ( this . currentWidth = Math . abs ( this . currentWidth ) ) ; var f = Math . sqrt ( Math . pow ( this . currentWidth / 2 , 2 ) + Math . pow ( this . currentHeight / 2 , 2 ) ) , d = Math . atan ( isFinite ( this . currentHeight / this . currentWidth ) ? this . currentHeight / this . currentWidth : 0 ) , p = Math . cos ( d + i ) * f , g = Math . sin ( d + i ) * f , v = Math . sin ( i ) , m = Math . cos ( i ) , y = this . getCenterPoint ( ) , b = new fabric . Point ( this . currentWidth , this . currentHeight ) , x = new fabric . Point ( y . x - p , y . y - g ) , w = new fabric . Point ( x . x + b . x * m , x . y + b . x * v ) , _ = new fabric . Point ( x . x - b . y * v , x . y + b . y * m ) , C = new fabric . Point ( x . x + b . x / 2 * m , x . y + b . x / 2 * v ) , S = r ( x ) , k = r ( w ) , T = r ( new fabric . Point ( w . x - b . y * v , w . y + b . y * m ) ) , O = r ( _ ) , E = r ( new fabric . Point ( x . x - b . y / 2 * v , x . y + b . y / 2 * m ) ) , A = r ( C ) , j = r ( new fabric . Point ( w . x - b . y / 2 * v , w . y + b . y / 2 * m ) ) , P = r ( new fabric . Point ( _ . x + b . x / 2 * m , _ . y + b . x / 2 * v ) ) , D = r ( new fabric . Point ( C . x , C . y ) ) , L = Math . cos ( d + i ) * this . padding * Math . sqrt ( 2 ) , I = Math . sin ( d + i ) * this . padding * Math . sqrt ( 2 ) ; return S = S . add ( new fabric . Point ( - L , - I ) ) , k = k . add ( new fabric . Point ( I , - L ) ) , T = T . add ( new fabric . Point ( L , I ) ) , O = O . add ( new fabric . Point ( - I , L ) ) , E = E . add ( new fabric . Point ( ( - L - I ) / 2 , ( - I + L ) / 2 ) ) , A = A . add ( new fabric . Point ( ( I - L ) / 2 , - ( I + L ) / 2 ) ) , j = j . add ( new fabric . Point ( ( I + L ) / 2 , ( I - L ) / 2 ) ) , P = P . add ( new fabric . Point ( ( L - I ) / 2 , ( L + I ) / 2 ) ) , D = D . add ( new fabric . Point ( ( I - L ) / 2 , - ( I + L ) / 2 ) ) , this . oCoords = { tl : S , tr : k , br : T , bl : O , ml : E , mt : A , mr : j , mb : P , mtr : D } , this . _setCornerCoords && this . _setCornerCoords ( ) , this } } ) } ( ) , fabric . util . object . extend ( fabric . Object . prototype , { sendToBack : function ( ) { return this . group ? fabric . StaticCanvas . prototype . sendToBack . call ( this . group , this ) : this . canvas . sendToBack ( this ) , this } , bringToFront : function ( ) { return this . group ? fabric . StaticCanvas . prototype . bringToFront . call ( this . group , this ) : this . canvas . bringToFront ( this ) , this } , sendBackwards : function ( t ) { return this . group ? fabric . StaticCanvas . prototype . sendBackwards . call ( this . group , this , t ) : this . canvas . sendBackwards ( this , t ) , this } , bringForward : function ( t ) { return this . group ? fabric . StaticCanvas . prototype . bringForward . call ( this . group , this , t ) : this . canvas . bringForward ( this , t ) , this } , moveTo : function ( t ) { return this . group ? fabric . StaticCanvas . prototype . moveTo . call ( this . group , this , t ) : this . canvas . moveTo ( this , t ) , this } } ) , fabric . util . object . extend ( fabric . Object . prototype , { getSvgStyles : function ( ) { var t = this . fill ? this . fill . toLive ? "url(#SVGID_" + this . fill . id + ")" : this . fill : "none" , e = "destination-over" === this . fillRule ? "evenodd" : this . fillRule , i = this . stroke ? this . stroke . toLive ? "url(#SVGID_" + this . stroke . id + ")" : this . stroke : "none" , n = this . strokeWidth ? this . strokeWidth : "0" , r = this . strokeDashArray ? this . strokeDashArray . join ( " " ) : "" , s = this . strokeLineCap ? this . strokeLineCap : "butt" , o = this . strokeLineJoin ? this . strokeLineJoin : "miter" , a = this . strokeMiterLimit ? this . strokeMiterLimit : "4" , h = "undefined" != typeof this . opacity ? this . opacity : "1" , l = this . visible ? "" : " visibility: hidden;" , c = this . shadow && "text" !== this . type ? "filter: url(#SVGID_" + this . shadow . id + ");" : "" ; return [ "stroke: " , i , "; " , "stroke-width: " , n , "; " , "stroke-dasharray: " , r , "; " , "stroke-linecap: " , s , "; " , "stroke-linejoin: " , o , "; " , "stroke-miterlimit: " , a , "; " , "fill: " , t , "; " , "fill-rule: " , e , "; " , "opacity: " , h , ";" , c , l ] . join ( "" ) } , getSvgTransform : function ( ) { if ( this . group ) return "" ; var t = fabric . util . toFixed , e = this . getAngle ( ) , i = this . getViewportTransform ( ) , n = fabric . util . transformPoint ( this . getCenterPoint ( ) , i ) , r = fabric . Object . NUM _FRACTION _DIGITS , s = "path-group" === this . type ? "" : "translate(" + t ( n . x , r ) + " " + t ( n . y , r ) + ")" , o = 0 !== e ? " rotate(" + t ( e , r ) + ")" : "" , a = 1 === this . scaleX && 1 === this . scaleY && 1 === i [ 0 ] && 1 === i [ 3 ] ? "" : " scale(" + t ( this . scaleX * i [ 0 ] , r ) + " " + t ( this . scaleY * i [ 3 ] , r ) + ")" , h = "path-group" === this . type ? this . width * i [ 0 ] : 0 , l = this . flipX ? " matrix(-1 0 0 1 " + h + " 0) " : "" , c = "path-group" === this . type ? this . height * i [ 3 ] : 0 , u = this . flipY ? " matrix(1 0 0 -1 0 " + c + ")" : "" ; return [ s , o , a , l , u ] . join ( "" ) } , getSvgTransformMatrix : function ( ) { return this . transformMatrix ? " mat
} } , _set : function ( t , e ) { if ( "fill" === t && e && this . isSameColor ( ) ) for ( var i = this . paths . length ; i -- ; ) this . paths [ i ] . _set ( t , e ) ; return this . callSuper ( "_set" , t , e ) } , toObject : function ( t ) { var e = i ( r . call ( this , t ) , { paths : n ( this . getObjects ( ) , "toObject" , t ) } ) ; return this . sourcePath && ( e . sourcePath = this . sourcePath ) , e } , toDatalessObject : function ( t ) { var e = this . toObject ( t ) ; return this . sourcePath && ( e . paths = this . sourcePath ) , e } , toSVG : function ( t ) { for ( var e = this . getObjects ( ) , i = "translate(" + this . left + " " + this . top + ")" , n = [ "<g " , 'style="' , this . getSvgStyles ( ) , '" ' , 'transform="' , i , this . getSvgTransform ( ) , '" ' , ">\n" ] , r = 0 , s = e . length ; s > r ; r ++ ) n . push ( e [ r ] . toSVG ( t ) ) ; return n . push ( "</g>\n" ) , t ? t ( n . join ( "" ) ) : n . join ( "" ) } , toString : function ( ) { return "#<fabric.PathGroup (" + this . complexity ( ) + "): { top: " + this . top + ", left: " + this . left + " }>" } , isSameColor : function ( ) { var t = ( this . getObjects ( ) [ 0 ] . get ( "fill" ) || "" ) . toLowerCase ( ) ; return this . getObjects ( ) . every ( function ( e ) { return ( e . get ( "fill" ) || "" ) . toLowerCase ( ) === t } ) } , complexity : function ( ) { return this . paths . reduce ( function ( t , e ) { return t + ( e && e . complexity ? e . complexity ( ) : 0 ) } , 0 ) } , getObjects : function ( ) { return this . paths } } ) , e . PathGroup . fromObject = function ( t , i ) { "string" == typeof t . paths ? e . loadSVGFromURL ( t . paths , function ( n ) { var r = t . paths ; delete t . paths ; var s = e . util . groupSVGElements ( n , t , r ) ; i ( s ) } ) : e . util . enlivenObjects ( t . paths , function ( n ) { delete t . paths , i ( new e . PathGroup ( n , t ) ) } ) } , e . PathGroup . async = ! 0 , void 0 ) } ( "undefined" != typeof exports ? exports : this ) , function ( t ) { "use strict" ; var e = t . fabric || ( t . fabric = { } ) , i = e . util . object . extend , n = e . util . array . min , r = e . util . array . max , s = e . util . array . invoke ; if ( ! e . Group ) { var o = { lockMovementX : ! 0 , lockMovementY : ! 0 , lockRotation : ! 0 , lockScalingX : ! 0 , lockScalingY : ! 0 , lockUniScaling : ! 0 } ; e . Group = e . util . createClass ( e . Object , e . Collection , { type : "group" , initialize : function ( t , e ) { e = e || { } , this . _objects = t || [ ] ; for ( var n = this . _objects . length ; n -- ; ) this . _objects [ n ] . group = this ; this . originalState = { } , this . callSuper ( "initialize" ) , this . _calcBounds ( ) , this . _updateObjectsCoords ( ) , e && i ( this , e ) , this . _setOpacityIfSame ( ) , this . setCoords ( ) , this . saveCoords ( ) } , _updateObjectsCoords : function ( ) { this . forEachObject ( this . _updateObjectCoords , this ) } , _updateObjectCoords : function ( t ) { var e = t . getLeft ( ) , i = t . getTop ( ) ; t . set ( { originalLeft : e , originalTop : i , left : e - this . left , top : i - this . top } ) , t . setCoords ( ) , t . _ _origHasControls = t . hasControls , t . hasControls = ! 1 } , toString : function ( ) { return "#<fabric.Group: (" + this . complexity ( ) + ")>" } , addWithUpdate : function ( t ) { return this . _restoreObjectsState ( ) , t && ( this . _objects . push ( t ) , t . group = this ) , this . forEachObject ( this . _setObjectActive , this ) , this . _calcBounds ( ) , this . _updateObjectsCoords ( ) , this } , _setObjectActive : function ( t ) { t . set ( "active" , ! 0 ) , t . group = this } , removeWithUpdate : function ( t ) { return this . _moveFlippedObject ( t ) , this . _restoreObjectsState ( ) , this . forEachObject ( this . _setObjectActive , this ) , this . remove ( t ) , this . _calcBounds ( ) , this . _updateObjectsCoords ( ) , this } , _onObjectAdded : function ( t ) { t . group = this } , _onObjectRemoved : function ( t ) { delete t . group , t . set ( "active" , ! 1 ) } , delegatedProperties : { fill : ! 0 , opacity : ! 0 , fontFamily : ! 0 , fontWeight : ! 0 , fontSize : ! 0 , fontStyle : ! 0 , lineHeight : ! 0 , textDecoration : ! 0 , textAlign : ! 0 , backgroundColor : ! 0 } , _set : function ( t , e ) { if ( t in this . delegatedProperties ) { var i = this . _objects . length ; for ( this [ t ] = e ; i -- ; ) this . _objects [ i ] . set ( t , e ) } else this [ t ] = e } , toObject : function ( t ) { return i ( this . callSuper ( "toObject" , t ) , { objects : s ( this . _objects , "toObject" , t ) } ) } , render : function ( t ) { if ( this . visible ) { t . save ( ) , this . clipTo && e . util . clipContext ( this , t ) ; for ( var i = 0 , n = this . _objects . length ; n > i ; i ++ ) this . _renderObject ( this . _objects [ i ] , t ) ; this . clipTo && t . restore ( ) , t . restore ( ) } } , _renderControls : function ( t , e ) { this . callSuper ( "_renderControls" , t , e ) ; for ( var i = 0 , n = this . _objects . length ; n > i ; i ++ ) this . _objects [ i ] . _renderControls ( t ) } , _renderObject : function ( t , e ) { var i = t . hasRotatingPoint ; t . visible && ( t . hasRotatingPoint = ! 1 , t . render ( e ) , t . hasRotatingPoint = i ) } , _restoreObjectsState : function ( ) { return this . _objects . forEach ( this . _restoreObjectState , this ) , this } , _moveFlippedObject : function ( t ) { var e = t . get ( "originX" ) , i = t . get ( "originY" ) , n = t . getCenterPoint ( ) ; t . set ( { originX : "center" , originY : " center
n . push ( '<tspan x="' , a , '" ' , 0 === i || this . useNative ? "y" : "dy" , '="' , r ( this . useNative ? s * i - this . height / 2 : s * o , 2 ) , '" ' , this . _getFillAttributes ( this . fill ) , ">" , e . util . string . escapeXml ( t ) , "</tspan>" ) } , _setSVGTextLineBg : function ( t , e , i , n ) { t . push ( "<rect " , this . _getFillAttributes ( this . textBackgroundColor ) , ' x="' , r ( i + this . _boundaries [ e ] . left , 2 ) , '" y="' , r ( n * e - this . height / 2 , 2 ) , '" width="' , r ( this . _boundaries [ e ] . width , 2 ) , '" height="' , r ( this . _boundaries [ e ] . height , 2 ) , '"></rect>\n' ) } , _setSVGBg : function ( t ) { this . backgroundColor && this . _boundaries && t . push ( "<rect " , this . _getFillAttributes ( this . backgroundColor ) , ' x="' , r ( - this . width / 2 , 2 ) , '" y="' , r ( - this . height / 2 , 2 ) , '" width="' , r ( this . width , 2 ) , '" height="' , r ( this . height , 2 ) , '"></rect>' ) } , _getFillAttributes : function ( t ) { var i = t && "string" == typeof t ? new e . Color ( t ) : "" ; return i && i . getSource ( ) && 1 !== i . getAlpha ( ) ? 'opacity="' + i . getAlpha ( ) + '" fill="' + i . setAlpha ( 1 ) . toRgb ( ) + '"' : 'fill="' + t + '"' } , _set : function ( t , e ) { "fontFamily" === t && this . path && ( this . path = this . path . replace ( /(.*?)([^\/]*)(\.font\.js)/ , "$1" + e + "$3" ) ) , this . callSuper ( "_set" , t , e ) , t in this . _dimensionAffectingProps && ( this . _initDimensions ( ) , this . setCoords ( ) ) } , complexity : function ( ) { return 1 } } ) , e . Text . ATTRIBUTE _NAMES = e . SHARED _ATTRIBUTES . concat ( "x y dx dy font-family font-style font-weight font-size text-decoration text-anchor" . split ( " " ) ) , e . Text . DEFAULT _SVG _FONT _SIZE = 16 , e . Text . fromElement = function ( t , i ) { if ( ! t ) return null ; var n = e . parseAttributes ( t , e . Text . ATTRIBUTE _NAMES ) ; i = e . util . object . extend ( i ? e . util . object . clone ( i ) : { } , n ) , "dx" in n && ( i . left += n . dx ) , "dy" in n && ( i . top += n . dy ) , "fontSize" in i || ( i . fontSize = e . Text . DEFAULT _SVG _FONT _SIZE ) , i . originX || ( i . originX = "left" ) ; var r = new e . Text ( t . textContent , i ) , s = 0 ; return "left" === r . originX && ( s = r . getWidth ( ) / 2 ) , "right" === r . originX && ( s = - r . getWidth ( ) / 2 ) , r . set ( { left : r . getLeft ( ) + s , top : r . getTop ( ) - r . getHeight ( ) / 2 } ) , r } , e . Text . fromObject = function ( t ) { return new e . Text ( t . text , n ( t ) ) } , e . util . createAccessors ( e . Text ) } ( "undefined" != typeof exports ? exports : this ) , function ( ) { var t = fabric . util . object . clone ; fabric . IText = fabric . util . createClass ( fabric . Text , fabric . Observable , { type : "i-text" , selectionStart : 0 , selectionEnd : 0 , selectionColor : "rgba(17,119,255,0.3)" , isEditing : ! 1 , editable : ! 0 , editingBorderColor : "rgba(102,153,255,0.25)" , cursorWidth : 2 , cursorColor : "#333" , cursorDelay : 1e3 , cursorDuration : 600 , styles : null , caching : ! 0 , _skipFillStrokeCheck : ! 0 , _reSpace : /\s|\n/ , _fontSizeFraction : 4 , _currentCursorOpacity : 0 , _selectionDirection : null , _abortCursorAnimation : ! 1 , _charWidthsCache : { } , initialize : function ( t , e ) { this . styles = e ? e . styles || { } : { } , this . callSuper ( "initialize" , t , e ) , this . initBehavior ( ) , fabric . IText . instances . push ( this ) , this . _ _lineWidths = { } , this . _ _lineHeights = { } , this . _ _lineOffsets = { } } , isEmptyStyles : function ( ) { if ( ! this . styles ) return ! 0 ; var t = this . styles ; for ( var e in t ) for ( var i in t [ e ] ) for ( var n in t [ e ] [ i ] ) return ! 1 ; return ! 0 } , setSelectionStart : function ( t ) { this . selectionStart !== t && ( this . fire ( "selection:changed" ) , this . canvas && this . canvas . fire ( "text:selection:changed" , { target : this } ) ) , this . selectionStart = t , this . hiddenTextarea && ( this . hiddenTextarea . selectionStart = t ) } , setSelectionEnd : function ( t ) { this . selectionEnd !== t && ( this . fire ( "selection:changed" ) , this . canvas && this . canvas . fire ( "text:selection:changed" , { target : this } ) ) , this . selectionEnd = t , this . hiddenTextarea && ( this . hiddenTextarea . selectionEnd = t ) } , getSelectionStyles : function ( t , e ) { if ( 2 === arguments . length ) { for ( var i = [ ] , n = t ; e > n ; n ++ ) i . push ( this . getSelectionStyles ( n ) ) ; return i } var r = this . get2DCursorLocation ( t ) ; return this . styles [ r . lineIndex ] ? this . styles [ r . lineIndex ] [ r . charIndex ] || { } : { } } , setSelectionStyles : function ( t ) { if ( this . selectionStart === this . selectionEnd ) this . _extendStyles ( this . selectionStart , t ) ; else for ( var e = this . selectionStart ; e < this . selectionEnd ; e ++ ) this . _extendStyles ( e , t ) ; return this } , _extendStyles : function ( t , e ) { var i = this . get2DCursorLocation ( t ) ; this . styles [ i . lineIndex ] || ( this . styles [ i . lineIndex ] = { } ) , this . styles [ i . lineIndex ] [ i . charIndex ] || ( this . styles [ i . lineIndex ] [ i . charIndex ] = { } ) , fabric . util . object . extend ( this . styles [ i . lineIndex ] [ i . charIndex ] , e ) } , _render : function ( t ) { this . callSuper ( "_render" , t ) , this . ctx = t , this . isEditing && this .
} , _moveLeft : function ( t , e ) { this . _move ( t , e , "Left" ) } , _moveRight : function ( t , e ) { this . _move ( t , e , "Right" ) } , moveCursorLeftWithoutShift : function ( t ) { this . _selectionDirection = "left" , this . selectionEnd === this . selectionStart && this . _moveLeft ( t , "selectionStart" ) , this . selectionEnd = this . selectionStart } , moveCursorLeftWithShift : function ( t ) { "right" === this . _selectionDirection && this . selectionStart !== this . selectionEnd ? this . _moveLeft ( t , "selectionEnd" ) : ( this . _selectionDirection = "left" , this . _moveLeft ( t , "selectionStart" ) , "\n" === this . text . charAt ( this . selectionStart ) && this . selectionStart -- , this . selectionStart < 0 && ( this . selectionStart = 0 ) ) } , moveCursorRight : function ( t ) { this . selectionStart >= this . text . length && this . selectionEnd >= this . text . length || ( this . abortCursorAnimation ( ) , this . _currentCursorOpacity = 1 , t . shiftKey ? this . moveCursorRightWithShift ( t ) : this . moveCursorRightWithoutShift ( t ) , this . initDelayedCursor ( ) ) } , moveCursorRightWithShift : function ( t ) { "left" === this . _selectionDirection && this . selectionStart !== this . selectionEnd ? this . _moveRight ( t , "selectionStart" ) : ( this . _selectionDirection = "right" , this . _moveRight ( t , "selectionEnd" ) , "\n" === this . text . charAt ( this . selectionEnd - 1 ) && this . selectionEnd ++ , this . selectionEnd > this . text . length && ( this . selectionEnd = this . text . length ) ) } , moveCursorRightWithoutShift : function ( t ) { this . _selectionDirection = "right" , this . selectionStart === this . selectionEnd ? ( this . _moveRight ( t , "selectionStart" ) , this . selectionEnd = this . selectionStart ) : ( this . selectionEnd += this . getNumNewLinesInSelectedText ( ) , this . selectionEnd > this . text . length && ( this . selectionEnd = this . text . length ) , this . selectionStart = this . selectionEnd ) } , removeChars : function ( t ) { this . selectionStart === this . selectionEnd ? this . _removeCharsNearCursor ( t ) : this . _removeCharsFromTo ( this . selectionStart , this . selectionEnd ) , this . selectionEnd = this . selectionStart , this . _removeExtraneousStyles ( ) , this . canvas && this . canvas . renderAll ( ) . renderAll ( ) , this . setCoords ( ) , this . fire ( "changed" ) , this . canvas && this . canvas . fire ( "text:changed" , { target : this } ) } , _removeCharsNearCursor : function ( t ) { if ( 0 !== this . selectionStart ) if ( t . metaKey ) { var e = this . findLineBoundaryLeft ( this . selectionStart ) ; this . _removeCharsFromTo ( e , this . selectionStart ) , this . selectionStart = e } else if ( t . altKey ) { var i = this . findWordBoundaryLeft ( this . selectionStart ) ; this . _removeCharsFromTo ( i , this . selectionStart ) , this . selectionStart = i } else { var n = "\n" === this . text . slice ( this . selectionStart - 1 , this . selectionStart ) ; this . removeStyleObject ( n ) , this . selectionStart -- , this . text = this . text . slice ( 0 , this . selectionStart ) + this . text . slice ( this . selectionStart + 1 ) } } } ) , fabric . util . object . extend ( fabric . IText . prototype , { _setSVGTextLineText : function ( t , e , i , n , r , s ) { this . styles [ e ] ? this . _setSVGTextLineChars ( t , e , i , n , r , s ) : this . callSuper ( "_setSVGTextLineText" , t , e , i , n , r ) } , _setSVGTextLineChars : function ( t , e , i , n , r , s ) { for ( var o = 0 === e || this . useNative ? "y" : "dy" , a = t . split ( "" ) , h = 0 , l = this . _getSVGLineLeftOffset ( e ) , c = this . _getSVGLineTopOffset ( e ) , u = this . _getHeightOfLine ( this . ctx , e ) , f = 0 , d = a . length ; d > f ; f ++ ) { var p = this . styles [ e ] [ f ] || { } ; i . push ( this . _createTextCharSpan ( a [ f ] , p , l , c , o , h ) ) ; var g = this . _getWidthOfChar ( this . ctx , a [ f ] , e , f ) ; p . textBackgroundColor && s . push ( this . _createTextCharBg ( p , l , c , u , g , h ) ) , h += g } } , _getSVGLineLeftOffset : function ( t ) { return this . _boundaries && this . _boundaries [ t ] ? fabric . util . toFixed ( this . _boundaries [ t ] . left , 2 ) : 0 } , _getSVGLineTopOffset : function ( t ) { for ( var e = 0 , i = 0 ; t >= i ; i ++ ) e += this . _getHeightOfLine ( this . ctx , i ) ; return e - this . height / 2 } , _createTextCharBg : function ( t , e , i , n , r , s ) { return [ '<rect fill="' , t . textBackgroundColor , '" transform="translate(' , - this . width / 2 , " " , - this . height + n , ")" , '" x="' , e + s , '" y="' , i + n , '" width="' , r , '" height="' , n , '"></rect>' ] . join ( "" ) } , _createTextCharSpan : function ( t , e , i , n , r , s ) { var o = this . getSvgStyles . call ( fabric . util . object . extend ( { visible : ! 0 , fill : this . fill , stroke : this . stroke , type : "text" } , e ) ) ; return [ '<tspan x="' , i + s , '" ' , r , '="' , n , '" ' , e . fontFamily ? 'font-family="' + e . fontFamily . replace ( /"/g , "'" ) + '" ' : "" , e . fontSize ? 'font-size="' + e . fontSize + '" ' : "" , e . fontStyle ? 'font-style="' + e . fontStyle + '" ' : "" , e . fontWeight ? 'font-weight="' + e . fontWeight + '" ' : "" , e . textDecoration ? 'text-decoration="' + e . textDecoration + '" ' : "" , ' s
} ( jQuery ) , + function ( t ) { "use strict" ; function e ( e , n ) { return this . each ( function ( ) { var r = t ( this ) , s = r . data ( "bs.modal" ) , o = t . extend ( { } , i . DEFAULTS , r . data ( ) , "object" == typeof e && e ) ; s || r . data ( "bs.modal" , s = new i ( this , o ) ) , "string" == typeof e ? s [ e ] ( n ) : o . show && s . show ( n ) } ) } var i = function ( e , i ) { this . options = i , this . $body = t ( document . body ) , this . $element = t ( e ) , this . $backdrop = this . isShown = null , this . scrollbarWidth = 0 , this . options . remote && this . $element . find ( ".modal-content" ) . load ( this . options . remote , t . proxy ( function ( ) { this . $element . trigger ( "loaded.bs.modal" ) } , this ) ) } ; i . VERSION = "3.2.0" , i . DEFAULTS = { backdrop : ! 0 , keyboard : ! 0 , show : ! 0 } , i . prototype . toggle = function ( t ) { return this . isShown ? this . hide ( ) : this . show ( t ) } , i . prototype . show = function ( e ) { var i = this , n = t . Event ( "show.bs.modal" , { relatedTarget : e } ) ; this . $element . trigger ( n ) , this . isShown || n . isDefaultPrevented ( ) || ( this . isShown = ! 0 , this . checkScrollbar ( ) , this . $body . addClass ( "modal-open" ) , this . setScrollbar ( ) , this . escape ( ) , this . $element . on ( "click.dismiss.bs.modal" , '[data-dismiss="modal"]' , t . proxy ( this . hide , this ) ) , this . backdrop ( function ( ) { var n = t . support . transition && i . $element . hasClass ( "fade" ) ; i . $element . parent ( ) . length || i . $element . appendTo ( i . $body ) , i . $element . show ( ) . scrollTop ( 0 ) , n && i . $element [ 0 ] . offsetWidth , i . $element . addClass ( "in" ) . attr ( "aria-hidden" , ! 1 ) , i . enforceFocus ( ) ; var r = t . Event ( "shown.bs.modal" , { relatedTarget : e } ) ; n ? i . $element . find ( ".modal-dialog" ) . one ( "bsTransitionEnd" , function ( ) { i . $element . trigger ( "focus" ) . trigger ( r ) } ) . emulateTransitionEnd ( 300 ) : i . $element . trigger ( "focus" ) . trigger ( r ) } ) ) } , i . prototype . hide = function ( e ) { e && e . preventDefault ( ) , e = t . Event ( "hide.bs.modal" ) , this . $element . trigger ( e ) , this . isShown && ! e . isDefaultPrevented ( ) && ( this . isShown = ! 1 , this . $body . removeClass ( "modal-open" ) , this . resetScrollbar ( ) , this . escape ( ) , t ( document ) . off ( "focusin.bs.modal" ) , this . $element . removeClass ( "in" ) . attr ( "aria-hidden" , ! 0 ) . off ( "click.dismiss.bs.modal" ) , t . support . transition && this . $element . hasClass ( "fade" ) ? this . $element . one ( "bsTransitionEnd" , t . proxy ( this . hideModal , this ) ) . emulateTransitionEnd ( 300 ) : this . hideModal ( ) ) } , i . prototype . enforceFocus = function ( ) { t ( document ) . off ( "focusin.bs.modal" ) . on ( "focusin.bs.modal" , t . proxy ( function ( t ) { this . $element [ 0 ] === t . target || this . $element . has ( t . target ) . length || this . $element . trigger ( "focus" ) } , this ) ) } , i . prototype . escape = function ( ) { this . isShown && this . options . keyboard ? this . $element . on ( "keyup.dismiss.bs.modal" , t . proxy ( function ( t ) { 27 == t . which && this . hide ( ) } , this ) ) : this . isShown || this . $element . off ( "keyup.dismiss.bs.modal" ) } , i . prototype . hideModal = function ( ) { var t = this ; this . $element . hide ( ) , this . backdrop ( function ( ) { t . $element . trigger ( "hidden.bs.modal" ) } ) } , i . prototype . removeBackdrop = function ( ) { this . $backdrop && this . $backdrop . remove ( ) , this . $backdrop = null } , i . prototype . backdrop = function ( e ) { var i = this , n = this . $element . hasClass ( "fade" ) ? "fade" : "" ; if ( this . isShown && this . options . backdrop ) { var r = t . support . transition && n ; if ( this . $backdrop = t ( '<div class="modal-backdrop ' + n + '" />' ) . appendTo ( this . $body ) , this . $element . on ( "click.dismiss.bs.modal" , t . proxy ( function ( t ) { t . target === t . currentTarget && ( "static" == this . options . backdrop ? this . $element [ 0 ] . focus . call ( this . $element [ 0 ] ) : this . hide . call ( this ) ) } , this ) ) , r && this . $backdrop [ 0 ] . offsetWidth , this . $backdrop . addClass ( "in" ) , ! e ) return ; r ? this . $backdrop . one ( "bsTransitionEnd" , e ) . emulateTransitionEnd ( 150 ) : e ( ) } else if ( ! this . isShown && this . $backdrop ) { this . $backdrop . removeClass ( "in" ) ; var s = function ( ) { i . removeBackdrop ( ) , e && e ( ) } ; t . support . transition && this . $element . hasClass ( "fade" ) ? this . $backdrop . one ( "bsTransitionEnd" , s ) . emulateTransitionEnd ( 150 ) : s ( ) } else e && e ( ) } , i . prototype . checkScrollbar = function ( ) { document . body . clientWidth >= window . innerWidth || ( this . scrollbarWidth = this . scrollbarWidth || this . measureScrollbar ( ) ) } , i . prototype . setScrollbar = function ( ) { var t = parseInt ( this . $body . css ( "padding-right" ) || 0 , 10 ) ; this . scrollbarWidth && this . $body . css ( "padding-right" , t + this . scrollbarWidth ) } , i . prototype . resetScrollbar = function ( ) { this . $body . css ( "padding-right" , "" ) } , i . prototype . measureScrollbar = function ( ) { var t = document . createElement ( "div" ) ; t . className = "modal-scrollbar-measure" , this . $body . append ( t ) ; var e = t . offsetWidth - t . c
} ) } , tabIndex : function ( ) { this . $element . is ( "[tabindex]" ) && ( this . $element . data ( "tabindex" , this . $element . attr ( "tabindex" ) ) , this . $button . attr ( "tabindex" , this . $element . data ( "tabindex" ) ) ) } , clickListener : function ( ) { var e = this ; this . $newElement . on ( "touchstart.dropdown" , ".dropdown-menu" , function ( t ) { t . stopPropagation ( ) } ) , this . $newElement . on ( "click" , function ( ) { e . setSize ( ) , e . options . liveSearch || e . multiple || setTimeout ( function ( ) { e . $menu . find ( ".selected a" ) . focus ( ) } , 10 ) } ) , this . $menu . on ( "click" , "li a" , function ( i ) { var n = t ( this ) . parent ( ) . index ( ) , r = e . $element . val ( ) , s = e . $element . prop ( "selectedIndex" ) ; if ( e . multiple && i . stopPropagation ( ) , i . preventDefault ( ) , ! e . isDisabled ( ) && ! t ( this ) . parent ( ) . hasClass ( "disabled" ) ) { var o = e . $element . find ( "option" ) , a = o . eq ( n ) , h = a . prop ( "selected" ) , l = a . parent ( "optgroup" ) , c = e . options . maxOptions , u = l . data ( "maxOptions" ) || ! 1 ; if ( e . multiple ) { if ( a . prop ( "selected" , ! h ) , e . setSelected ( n , ! h ) , t ( this ) . blur ( ) , c !== ! 1 || u !== ! 1 ) { var f = c < o . filter ( ":selected" ) . length , d = u < l . find ( "option:selected" ) . length , p = e . options . maxOptionsText , g = p [ 0 ] . replace ( "{n}" , c ) , v = p [ 1 ] . replace ( "{n}" , u ) , m = t ( '<div class="notify"></div>' ) ; if ( c && f || u && d ) if ( c && 1 == c ) o . prop ( "selected" , ! 1 ) , a . prop ( "selected" , ! 0 ) , e . $menu . find ( ".selected" ) . removeClass ( "selected" ) , e . setSelected ( n , ! 0 ) ; else if ( u && 1 == u ) { l . find ( "option:selected" ) . prop ( "selected" , ! 1 ) , a . prop ( "selected" , ! 0 ) ; var y = t ( this ) . data ( "optgroup" ) ; e . $menu . find ( ".selected" ) . has ( 'a[data-optgroup="' + y + '"]' ) . removeClass ( "selected" ) , e . setSelected ( n , ! 0 ) } else p [ 2 ] && ( g = g . replace ( "{var}" , p [ 2 ] [ c > 1 ? 0 : 1 ] ) , v = v . replace ( "{var}" , p [ 2 ] [ u > 1 ? 0 : 1 ] ) ) , a . prop ( "selected" , ! 1 ) , e . $menu . append ( m ) , c && f && ( m . append ( t ( "<div>" + g + "</div>" ) ) , e . $element . trigger ( "maxReached.bs.select" ) ) , u && d && ( m . append ( t ( "<div>" + v + "</div>" ) ) , e . $element . trigger ( "maxReachedGrp.bs.select" ) ) , setTimeout ( function ( ) { e . setSelected ( n , ! 1 ) } , 10 ) , m . delay ( 750 ) . fadeOut ( 300 , function ( ) { t ( this ) . remove ( ) } ) } } else o . prop ( "selected" , ! 1 ) , a . prop ( "selected" , ! 0 ) , e . $menu . find ( ".selected" ) . removeClass ( "selected" ) , e . setSelected ( n , ! 0 ) ; e . multiple ? e . options . liveSearch && e . $searchbox . focus ( ) : e . $button . focus ( ) , ( r != e . $element . val ( ) && e . multiple || s != e . $element . prop ( "selectedIndex" ) && ! e . multiple ) && e . $element . change ( ) } } ) , this . $menu . on ( "click" , "li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)" , function ( t ) { t . target == this && ( t . preventDefault ( ) , t . stopPropagation ( ) , e . options . liveSearch ? e . $searchbox . focus ( ) : e . $button . focus ( ) ) } ) , this . $menu . on ( "click" , ".popover-title .close" , function ( ) { e . $button . focus ( ) } ) , this . $searchbox . on ( "click" , function ( t ) { t . stopPropagation ( ) } ) , this . $menu . on ( "click" , ".actions-btn" , function ( i ) { e . options . liveSearch ? e . $searchbox . focus ( ) : e . $button . focus ( ) , i . preventDefault ( ) , i . stopPropagation ( ) , t ( this ) . is ( ".bs-select-all" ) ? e . selectAll ( ) : e . deselectAll ( ) , e . $element . change ( ) } ) , this . $element . change ( function ( ) { e . render ( ! 1 ) } ) } , liveSearchListener : function ( ) { var e = this , i = t ( '<li class="no-results"></li>' ) ; this . $newElement . on ( "click.dropdown.data-api" , function ( ) { e . $menu . find ( ".active" ) . removeClass ( "active" ) , e . $searchbox . val ( ) && ( e . $searchbox . val ( "" ) , e . $lis . not ( ".is-hidden" ) . removeClass ( "hide" ) , i . parent ( ) . length && i . remove ( ) ) , e . multiple || e . $menu . find ( ".selected" ) . addClass ( "active" ) , setTimeout ( function ( ) { e . $searchbox . focus ( ) } , 10 ) } ) , this . $searchbox . on ( "input propertychange" , function ( ) { e . $searchbox . val ( ) ? ( e . $lis . not ( ".is-hidden" ) . removeClass ( "hide" ) . find ( "a" ) . not ( ":icontains(" + e . $searchbox . val ( ) + ")" ) . parent ( ) . addClass ( "hide" ) , e . $menu . find ( "li" ) . filter ( ":visible:not(.no-results)" ) . length ? i . parent ( ) . length && i . remove ( ) : ( i . parent ( ) . length && i . remove ( ) , i . html ( e . options . noneResultsText + ' "' + e . $searchbox . val ( ) + '"' ) . show ( ) , e . $menu . find ( "li" ) . last ( ) . after ( i ) ) ) : ( e . $lis . not ( ".is-hidden" ) . removeClass ( "hide" ) , i . parent ( ) . length && i . remove ( ) ) , e . $menu . find ( "li.active" ) . removeClass ( "active" ) , e . $menu . find ( "li" ) . filter ( ":visible:not(.divider)" ) . eq ( 0 ) . addClass ( "active" ) . find ( "a" ) . focus ( ) , t ( this ) . focus ( ) } ) , this . $menu . on ( "mouseenter" , "a" , function ( i ) { e . $menu . find ( ".active" ) . removeClass ( "active" ) , t ( i . currentTarget ) . parent ( ) . not ( ".disabled" ) . addClass ( "active" ) } ) , this . $menu . on ( "mouseleave" , "a" , function ( ) { e . $menu . find ( " . act