ÿþ/ / M o o T o o l s   M o r e ,   < h t t p : / / m o o t o o l s . n e t / m o r e > .   C o p y r i g h t   ( c )   2 0 0 6 - 2 0 0 9   A a r o n   N e w t o n   < h t t p : / / c l i e n t c i d e . c o m / > ,   V a l e r i o   P r o i e t t i   < h t t p : / / m a d 4 m i l k . n e t >   &   t h e   M o o T o o l s   t e a m   < h t t p : / / m o o t o o l s . n e t / d e v e l o p e r s > ,   M I T   S t y l e   L i c e n s e . 
 
 M o o T o o l s . M o r e = { v e r s i o n : " 1 . 2 . 4 . 4 " , b u i l d : " 6 f 6 0 5 7 d c 6 4 5 f d b 7 5 4 7 6 8 9 1 8 3 b 2 3 1 1 0 6 3 b d 6 5 3 d d f " } ; ( f u n c t i o n ( ) { v a r   a = { l a n g u a g e : " e n - U S " , l a n g u a g e s : { " e n - U S " : { } } , c a s c a d e s : [ " e n - U S " ] } ; 
 v a r   b ; M o o T o o l s . l a n g = n e w   E v e n t s ( ) ; $ e x t e n d ( M o o T o o l s . l a n g , { s e t L a n g u a g e : f u n c t i o n ( c ) { i f ( ! a . l a n g u a g e s [ c ] ) { r e t u r n   t h i s ; } a . l a n g u a g e = c ; t h i s . l o a d ( ) ; t h i s . f i r e E v e n t ( " l a n g C h a n g e " , c ) ; 
 r e t u r n   t h i s ; } , l o a d : f u n c t i o n ( ) { v a r   c = t h i s . c a s c a d e ( t h i s . g e t C u r r e n t L a n g u a g e ( ) ) ; b = { } ; $ e a c h ( c , f u n c t i o n ( e , d ) { b [ d ] = t h i s . l a m b d a ( e ) ; } , t h i s ) ; } , g e t C u r r e n t L a n g u a g e : f u n c t i o n ( ) { r e t u r n   a . l a n g u a g e ; 
 } , a d d L a n g u a g e : f u n c t i o n ( c ) { a . l a n g u a g e s [ c ] = a . l a n g u a g e s [ c ] | | { } ; r e t u r n   t h i s ; } , c a s c a d e : f u n c t i o n ( e ) { v a r   c = ( a . l a n g u a g e s [ e ] | | { } ) . c a s c a d e s | | [ ] ; c . c o m b i n e ( a . c a s c a d e s ) ; 
 c . e r a s e ( e ) . p u s h ( e ) ; v a r   d = c . m a p ( f u n c t i o n ( f ) { r e t u r n   a . l a n g u a g e s [ f ] ; } , t h i s ) ; r e t u r n   $ m e r g e . a p p l y ( t h i s , d ) ; } , l a m b d a : f u n c t i o n ( c ) { ( c | | { } ) . g e t = f u n c t i o n ( e , d ) { r e t u r n   $ l a m b d a ( c [ e ] ) . a p p l y ( t h i s , $ s p l a t ( d ) ) ; 
 } ; r e t u r n   c ; } , g e t : f u n c t i o n ( e , d , c ) { i f ( b & & b [ e ] ) { r e t u r n ( d ? b [ e ] . g e t ( d , c ) : b [ e ] ) ; } } , s e t : f u n c t i o n ( d , e , c ) { t h i s . a d d L a n g u a g e ( d ) ; l a n g D a t a = a . l a n g u a g e s [ d ] ; i f ( ! l a n g D a t a [ e ] ) { l a n g D a t a [ e ] = { } ; 
 } $ e x t e n d ( l a n g D a t a [ e ] , c ) ; i f ( d = = t h i s . g e t C u r r e n t L a n g u a g e ( ) ) { t h i s . l o a d ( ) ; t h i s . f i r e E v e n t ( " l a n g C h a n g e " , d ) ; } r e t u r n   t h i s ; } , l i s t : f u n c t i o n ( ) { r e t u r n   H a s h . g e t K e y s ( a . l a n g u a g e s ) ; 
 } } ) ; } ) ( ) ; ( f u n c t i o n ( ) { v a r   c = t h i s ; v a r   b = f u n c t i o n ( ) { i f ( c . c o n s o l e & & c o n s o l e . l o g ) { t r y { c o n s o l e . l o g . a p p l y ( c o n s o l e , a r g u m e n t s ) ; } c a t c h ( d ) { c o n s o l e . l o g ( A r r a y . s l i c e ( a r g u m e n t s ) ) ; 
 } } e l s e { L o g . l o g g e d . p u s h ( a r g u m e n t s ) ; } r e t u r n   t h i s ; } ; v a r   a = f u n c t i o n ( ) { t h i s . l o g g e d . p u s h ( a r g u m e n t s ) ; r e t u r n   t h i s ; } ; t h i s . L o g = n e w   C l a s s ( { l o g g e d : [ ] , l o g : a , r e s e t L o g : f u n c t i o n ( ) { t h i s . l o g g e d . e m p t y ( ) ; 
 r e t u r n   t h i s ; } , e n a b l e L o g : f u n c t i o n ( ) { t h i s . l o g = b ; t h i s . l o g g e d . e a c h ( f u n c t i o n ( d ) { t h i s . l o g . a p p l y ( t h i s , d ) ; } , t h i s ) ; r e t u r n   t h i s . r e s e t L o g ( ) ; } , d i s a b l e L o g : f u n c t i o n ( ) { t h i s . l o g = a ; 
 r e t u r n   t h i s ; } } ) ; L o g . e x t e n d ( n e w   L o g ) . e n a b l e L o g ( ) ; L o g . l o g g e r = f u n c t i o n ( ) { r e t u r n   t h i s . l o g . a p p l y ( t h i s , a r g u m e n t s ) ; } ; } ) ( ) ; v a r   D e p e n d e r = { o p t i o n s : { l o a d e d S o u r c e s : [ ] , l o a d e d S c r i p t s : [ " C o r e " , " B r o w s e r " , " A r r a y " , " S t r i n g " , " F u n c t i o n " , " N u m b e r " , " H a s h " , " E l e m e n t " , " E v e n t " , " E l e m e n t . E v e n t " , " C l a s s " , " D o m R e a d y " , " C l a s s . E x t r a s " , " R e q u e s t " , " J S O N " , " R e q u e s t . J S O N " , " M o r e " , " D e p e n d e r " , " L o g " ] , u s e S c r i p t I n j e c t i o n : t r u e } , l o a d e d : [ ] , s o u r c e s : { } , l i b s : { } , i n c l u d e : f u n c t i o n ( b ) { t h i s . l o g ( " i n c l u d e :   " , b ) ; 
 t h i s . m a p L o a d e d = f a l s e ; v a r   a = f u n c t i o n ( c ) { t h i s . l i b s = $ m e r g e ( t h i s . l i b s , c ) ; $ e a c h ( t h i s . l i b s , f u n c t i o n ( d , e ) { i f ( d . s c r i p t s ) { t h i s . l o a d S o u r c e ( e , d . s c r i p t s ) ; } } , t h i s ) ; 
 } . b i n d ( t h i s ) ; i f ( $ t y p e ( b ) = = " s t r i n g " ) { t h i s . l o g ( " f e t c h i n g   l i b s   " , b ) ; t h i s . r e q u e s t ( b , a ) ; } e l s e { a ( b ) ; } r e t u r n   t h i s ; } , r e q u i r e d : [ ] , r e q u i r e : f u n c t i o n ( b ) { v a r   a = f u n c t i o n ( ) { v a r   c = t h i s . c a l c u l a t e D e p e n d e n c i e s ( b . s c r i p t s ) ; 
 i f ( b . s o u r c e s ) { b . s o u r c e s . e a c h ( f u n c t i o n ( d ) { c . c o m b i n e ( t h i s . l i b s [ d ] . f i l e s ) ; } , t h i s ) ; } i f ( b . s e r i a l ) { c . c o m b i n e ( t h i s . g e t L o a d e d S c r i p t s ( ) ) ; } b . s c r i p t s = c ; t h i s . r e q u i r e d . p u s h ( b ) ; 
 t h i s . f i r e E v e n t ( " r e q u i r e " , b ) ; t h i s . l o a d S c r i p t s ( b . s c r i p t s ) ; } ; i f ( t h i s . m a p L o a d e d ) { a . c a l l ( t h i s ) ; } e l s e { t h i s . a d d E v e n t ( " m a p L o a d e d " , a . b i n d ( t h i s ) ) ; } r e t u r n   t h i s ; } , c l e a n D o u b l e S l a s h : f u n c t i o n ( b ) { i f ( ! b ) { r e t u r n   b ; 
 } v a r   a = " " ; i f ( b . t e s t ( / ^ h t t p : \ / \ / / ) ) { a = " h t t p : / / " ; b = b . s u b s t r i n g ( 7 , b . l e n g t h ) ; } b = b . r e p l a c e ( / \ / \ / / g , " / " ) ; r e t u r n   a + b ; } , r e q u e s t : f u n c t i o n ( a , b ) { n e w   R e q u e s t . J S O N ( { u r l : a , s e c u r e : f a l s e , o n S u c c e s s : b } ) . s e n d ( ) ; 
 } , l o a d S o u r c e : f u n c t i o n ( b , a ) { i f ( t h i s . l i b s [ b ] . f i l e s ) { t h i s . d a t a L o a d e d ( ) ; r e t u r n ; } t h i s . l o g ( " l o a d i n g   s o u r c e :   " , a ) ; t h i s . r e q u e s t ( t h i s . c l e a n D o u b l e S l a s h ( a + " / s c r i p t s . j s o n " ) , f u n c t i o n ( c ) { t h i s . l o g ( " l o a d e d   s o u r c e :   " , a ) ; 
 t h i s . l i b s [ b ] . f i l e s = c ; t h i s . d a t a L o a d e d ( ) ; } . b i n d ( t h i s ) ) ; } , d a t a L o a d e d : f u n c t i o n ( ) { v a r   a = t r u e ; $ e a c h ( t h i s . l i b s , f u n c t i o n ( c , b ) { i f ( ! t h i s . l i b s [ b ] . f i l e s ) { a = f a l s e ; } } , t h i s ) ; 
 i f ( a ) { t h i s . m a p T r e e ( ) ; t h i s . m a p L o a d e d = t r u e ; t h i s . c a l c u l a t e L o a d e d ( ) ; t h i s . l a s t L o a d e d = t h i s . g e t L o a d e d S c r i p t s ( ) . g e t L e n g t h ( ) ; t h i s . f i r e E v e n t ( " m a p L o a d e d " ) ; t h i s . r e m o v e E v e n t s ( " m a p L o a d e d " ) ; 
 } } , c a l c u l a t e L o a d e d : f u n c t i o n ( ) { v a r   a = f u n c t i o n ( b ) { t h i s . s c r i p t s S t a t e [ b ] = t r u e ; } . b i n d ( t h i s ) ; i f ( t h i s . o p t i o n s . l o a d e d S c r i p t s ) { t h i s . o p t i o n s . l o a d e d S c r i p t s . e a c h ( a ) ; 
 } i f ( t h i s . o p t i o n s . l o a d e d S o u r c e s ) { t h i s . o p t i o n s . l o a d e d S o u r c e s . e a c h ( f u n c t i o n ( b ) { $ e a c h ( t h i s . l i b s [ b ] . f i l e s , f u n c t i o n ( c ) { $ e a c h ( c , f u n c t i o n ( e , d ) { a ( d ) ; } , t h i s ) ; } , t h i s ) ; 
 } , t h i s ) ; } } , d e p s : { } , p a t h M a p : { } , m a p T r e e : f u n c t i o n ( ) { $ e a c h ( t h i s . l i b s , f u n c t i o n ( b , a ) { $ e a c h ( b . f i l e s , f u n c t i o n ( c , d ) { $ e a c h ( c , f u n c t i o n ( f , e ) { v a r   g = a + " : " + d + " : " + e ; i f ( t h i s . d e p s [ g ] ) { r e t u r n ; 
 } t h i s . d e p s [ g ] = f . d e p s ; t h i s . p a t h M a p [ e ] = g ; } , t h i s ) ; } , t h i s ) ; } , t h i s ) ; } , g e t D e p s F o r S c r i p t : f u n c t i o n ( a ) { r e t u r n   t h i s . d e p s [ t h i s . p a t h M a p [ a ] ] | | [ ] ; } , c a l c u l a t e D e p e n d e n c i e s : f u n c t i o n ( a ) { v a r   b = [ ] ; 
 $ s p l a t ( a ) . e a c h ( f u n c t i o n ( c ) { i f ( c = = " N o n e " | | ! c ) { r e t u r n ; } v a r   d = t h i s . g e t D e p s F o r S c r i p t ( c ) ; i f ( ! d ) { i f ( w i n d o w . c o n s o l e & & c o n s o l e . w a r n ) { c o n s o l e . w a r n ( " d e p e n d e n c i e s   n o t   m a p p e d :   s c r i p t :   % o ,   m a p :   % o ,   : d e p s :   % o " , c , t h i s . p a t h M a p , t h i s . d e p s ) ; 
 } } e l s e { d . e a c h ( f u n c t i o n ( e ) { i f ( e = = c | | e = = " N o n e " | | ! e ) { r e t u r n ; } i f ( ! b . c o n t a i n s ( e ) ) { b . c o m b i n e ( t h i s . c a l c u l a t e D e p e n d e n c i e s ( e ) ) ; } b . i n c l u d e ( e ) ; } , t h i s ) ; } b . i n c l u d e ( c ) ; 
 } , t h i s ) ; r e t u r n   b ; } , g e t P a t h : f u n c t i o n ( a ) { t r y { v a r   f = t h i s . p a t h M a p [ a ] . s p l i t ( " : " ) ; v a r   d = t h i s . l i b s [ f [ 0 ] ] ; v a r   b = ( d . p a t h | | d . s c r i p t s ) + " / " ; f . s h i f t ( ) ; r e t u r n   t h i s . c l e a n D o u b l e S l a s h ( b + f . j o i n ( " / " ) + " . j s " ) ; 
 } c a t c h ( c ) { r e t u r n   a ; } } , l o a d S c r i p t s : f u n c t i o n ( a ) { a = a . f i l t e r ( f u n c t i o n ( b ) { i f ( ! t h i s . s c r i p t s S t a t e [ b ] & & b ! = " N o n e " ) { t h i s . s c r i p t s S t a t e [ b ] = f a l s e ; r e t u r n   t r u e ; } } , t h i s ) ; 
 i f ( a . l e n g t h ) { a . e a c h ( f u n c t i o n ( b ) { t h i s . l o a d S c r i p t ( b ) ; } , t h i s ) ; } e l s e { t h i s . c h e c k ( ) ; } } , t o L o a d : [ ] , l o a d S c r i p t : f u n c t i o n ( b ) { i f ( t h i s . s c r i p t s S t a t e [ b ] & & t h i s . t o L o a d . l e n g t h ) { t h i s . l o a d S c r i p t ( t h i s . t o L o a d . s h i f t ( ) ) ; 
 r e t u r n ; } e l s e { i f ( t h i s . l o a d i n g ) { t h i s . t o L o a d . p u s h ( b ) ; r e t u r n ; } } v a r   e = f u n c t i o n ( ) { t h i s . l o a d i n g = f a l s e ; t h i s . s c r i p t L o a d e d ( b ) ; i f ( t h i s . t o L o a d . l e n g t h ) { t h i s . l o a d S c r i p t ( t h i s . t o L o a d . s h i f t ( ) ) ; 
 } } . b i n d ( t h i s ) ; v a r   d = f u n c t i o n ( ) { t h i s . l o g ( " c o u l d   n o t   l o a d :   " , a ) ; } . b i n d ( t h i s ) ; t h i s . l o a d i n g = t r u e ; v a r   a = t h i s . g e t P a t h ( b ) ; i f ( t h i s . o p t i o n s . u s e S c r i p t I n j e c t i o n ) { t h i s . l o g ( " i n j e c t i n g   s c r i p t :   " , a ) ; 
 v a r   c = f u n c t i o n ( ) { t h i s . l o g ( " l o a d e d   s c r i p t :   " , a ) ; e ( ) ; } . b i n d ( t h i s ) ; n e w   E l e m e n t ( " s c r i p t " , { s r c : a + ( t h i s . o p t i o n s . n o C a c h e ? " ? n o C a c h e = " + n e w   D a t e ( ) . g e t T i m e ( ) : " " ) , e v e n t s : { l o a d : c , r e a d y s t a t e c h a n g e : f u n c t i o n ( ) { i f ( [ " l o a d e d " , " c o m p l e t e " ] . c o n t a i n s ( t h i s . r e a d y S t a t e ) ) { c ( ) ; 
 } } , e r r o r : d } } ) . i n j e c t ( t h i s . o p t i o n s . t a r g e t | | d o c u m e n t . h e a d ) ; } e l s e { t h i s . l o g ( " r e q u e s t i n g   s c r i p t :   " , a ) ; n e w   R e q u e s t ( { u r l : a , n o C a c h e : t h i s . o p t i o n s . n o C a c h e , o n C o m p l e t e : f u n c t i o n ( f ) { t h i s . l o g ( " l o a d e d   s c r i p t :   " , a ) ; 
 $ e x e c ( f ) ; e ( ) ; } . b i n d ( t h i s ) , o n F a i l u r e : d , o n E x c e p t i o n : d } ) . s e n d ( ) ; } } , s c r i p t s S t a t e : $ H ( ) , g e t L o a d e d S c r i p t s : f u n c t i o n ( ) { r e t u r n   t h i s . s c r i p t s S t a t e . f i l t e r ( f u n c t i o n ( a ) { r e t u r n   a ; 
 } ) ; } , s c r i p t L o a d e d : f u n c t i o n ( a ) { t h i s . l o g ( " l o a d e d   s c r i p t :   " , a ) ; t h i s . s c r i p t s S t a t e [ a ] = t r u e ; t h i s . c h e c k ( ) ; v a r   b = t h i s . g e t L o a d e d S c r i p t s ( ) ; v a r   d = b . g e t L e n g t h ( ) ; v a r   c = t h i s . s c r i p t s S t a t e . g e t L e n g t h ( ) ; 
 t h i s . f i r e E v e n t ( " s c r i p t L o a d e d " , { s c r i p t : a , t o t a l L o a d e d : ( d / c * 1 0 0 ) . r o u n d ( ) , c u r r e n t L o a d e d : ( ( d - t h i s . l a s t L o a d e d ) / ( c - t h i s . l a s t L o a d e d ) * 1 0 0 ) . r o u n d ( ) , l o a d e d : b } ) ; i f ( d = = c ) { t h i s . l a s t L o a d e d = d ; 
 } } , l a s t L o a d e d : 0 , c h e c k : f u n c t i o n ( ) { v a r   a = [ ] ; t h i s . r e q u i r e d . e a c h ( f u n c t i o n ( c ) { v a r   b = [ ] ; c . s c r i p t s . e a c h ( f u n c t i o n ( d ) { i f ( t h i s . s c r i p t s S t a t e [ d ] ) { b . p u s h ( d ) ; } } , t h i s ) ; 
 i f ( c . o n S t e p ) { c . o n S t e p ( { p e r c e n t : b . l e n g t h / c . s c r i p t s . l e n g t h * 1 0 0 , s c r i p t s : b } ) ; } i f ( c . s c r i p t s . l e n g t h ! = b . l e n g t h ) { r e t u r n ; } c . c a l l b a c k ( ) ; t h i s . r e q u i r e d . e r a s e ( c ) ; t h i s . f i r e E v e n t ( " r e q u i r e m e n t L o a d e d " , [ b , c ] ) ; 
 } , t h i s ) ; } } ; $ e x t e n d ( D e p e n d e r , n e w   E v e n t s ) ; $ e x t e n d ( D e p e n d e r , n e w   O p t i o n s ) ; $ e x t e n d ( D e p e n d e r , n e w   L o g ) ; D e p e n d e r . _ s e t O p t i o n s = D e p e n d e r . s e t O p t i o n s ; D e p e n d e r . s e t O p t i o n s = f u n c t i o n ( ) { D e p e n d e r . _ s e t O p t i o n s . a p p l y ( D e p e n d e r , a r g u m e n t s ) ; 
 i f ( t h i s . o p t i o n s . l o g ) { D e p e n d e r . e n a b l e L o g ( ) ; } r e t u r n   t h i s ; } ; C l a s s . r e f a c t o r = f u n c t i o n ( b , a ) { $ e a c h ( a , f u n c t i o n ( e , d ) { v a r   c = b . p r o t o t y p e [ d ] ; i f ( c & & ( c = c . _ o r i g i n ) & & t y p e o f   e = = " f u n c t i o n " ) { b . i m p l e m e n t ( d , f u n c t i o n ( ) { v a r   f = t h i s . p r e v i o u s ; 
 t h i s . p r e v i o u s = c ; v a r   g = e . a p p l y ( t h i s , a r g u m e n t s ) ; t h i s . p r e v i o u s = f ; r e t u r n   g ; } ) ; } e l s e { b . i m p l e m e n t ( d , e ) ; } } ) ; r e t u r n   b ; } ; C l a s s . M u t a t o r s . B i n d s = f u n c t i o n ( a ) { r e t u r n   a ; 
 } ; C l a s s . M u t a t o r s . i n i t i a l i z e = f u n c t i o n ( a ) { r e t u r n   f u n c t i o n ( ) { $ s p l a t ( t h i s . B i n d s ) . e a c h ( f u n c t i o n ( b ) { v a r   c = t h i s [ b ] ; i f ( c ) { t h i s [ b ] = c . b i n d ( t h i s ) ; } } , t h i s ) ; r e t u r n   a . a p p l y ( t h i s , a r g u m e n t s ) ; 
 } ; } ; C l a s s . O c c l u d e = n e w   C l a s s ( { o c c l u d e : f u n c t i o n ( c , b ) { b = d o c u m e n t . i d ( b | | t h i s . e l e m e n t ) ; v a r   a = b . r e t r i e v e ( c | | t h i s . p r o p e r t y ) ; i f ( a & & ! $ d e f i n e d ( t h i s . o c c l u d e d ) ) { r e t u r n   t h i s . o c c l u d e d = a ; 
 } t h i s . o c c l u d e d = f a l s e ; b . s t o r e ( c | | t h i s . p r o p e r t y , t h i s ) ; r e t u r n   t h i s . o c c l u d e d ; } } ) ; ( f u n c t i o n ( ) { v a r   a = { w a i t : f u n c t i o n ( b ) { r e t u r n   t h i s . c h a i n ( f u n c t i o n ( ) { t h i s . c a l l C h a i n . d e l a y ( $ p i c k ( b , 5 0 0 ) , t h i s ) ; 
 } . b i n d ( t h i s ) ) ; } } ; C h a i n . i m p l e m e n t ( a ) ; i f ( w i n d o w . F x ) { F x . i m p l e m e n t ( a ) ; [ " C s s " , " T w e e n " , " E l e m e n t s " ] . e a c h ( f u n c t i o n ( b ) { i f ( F x [ b ] ) { F x [ b ] . i m p l e m e n t ( a ) ; } } ) ; } E l e m e n t . i m p l e m e n t ( { c h a i n s : f u n c t i o n ( b ) { $ s p l a t ( $ p i c k ( b , [ " t w e e n " , " m o r p h " , " r e v e a l " ] ) ) . e a c h ( f u n c t i o n ( c ) { c = t h i s . g e t ( c ) ; 
 i f ( ! c ) { r e t u r n ; } c . s e t O p t i o n s ( { l i n k : " c h a i n " } ) ; } , t h i s ) ; r e t u r n   t h i s ; } , p a u s e F x : f u n c t i o n ( c , b ) { t h i s . c h a i n s ( b ) . g e t ( $ p i c k ( b , " t w e e n " ) ) . w a i t ( c ) ; r e t u r n   t h i s ; } } ) ; } ) ( ) ; 
 A r r a y . i m p l e m e n t ( { m i n : f u n c t i o n ( ) { r e t u r n   M a t h . m i n . a p p l y ( n u l l , t h i s ) ; } , m a x : f u n c t i o n ( ) { r e t u r n   M a t h . m a x . a p p l y ( n u l l , t h i s ) ; } , a v e r a g e : f u n c t i o n ( ) { r e t u r n   t h i s . l e n g t h ? t h i s . s u m ( ) / t h i s . l e n g t h : 0 ; 
 } , s u m : f u n c t i o n ( ) { v a r   a = 0 , b = t h i s . l e n g t h ; i f ( b ) { d o { a + = t h i s [ - - b ] ; } w h i l e ( b ) ; } r e t u r n   a ; } , u n i q u e : f u n c t i o n ( ) { r e t u r n [ ] . c o m b i n e ( t h i s ) ; } , s h u f f l e : f u n c t i o n ( ) { f o r ( v a r   b = t h i s . l e n g t h ; 
 b & & - - b ; ) { v a r   a = t h i s [ b ] , c = M a t h . f l o o r ( M a t h . r a n d o m ( ) * ( b + 1 ) ) ; t h i s [ b ] = t h i s [ c ] ; t h i s [ c ] = a ; } r e t u r n   t h i s ; } } ) ; ( f u n c t i o n ( ) { v a r   i = t h i s . D a t e ; i f ( ! i . n o w ) { i . n o w = $ t i m e ; 
 } i . M e t h o d s = { m s : " M i l l i s e c o n d s " , y e a r : " F u l l Y e a r " , m i n : " M i n u t e s " , m o : " M o n t h " , s e c : " S e c o n d s " , h r : " H o u r s " } ; [ " D a t e " , " D a y " , " F u l l Y e a r " , " H o u r s " , " M i l l i s e c o n d s " , " M i n u t e s " , " M o n t h " , " S e c o n d s " , " T i m e " , " T i m e z o n e O f f s e t " , " W e e k " , " T i m e z o n e " , " G M T O f f s e t " , " D a y O f Y e a r " , " L a s t M o n t h " , " L a s t D a y O f M o n t h " , " U T C D a t e " , " U T C D a y " , " U T C F u l l Y e a r " , " A M P M " , " O r d i n a l " , " U T C H o u r s " , " U T C M i l l i s e c o n d s " , " U T C M i n u t e s " , " U T C M o n t h " , " U T C S e c o n d s " ] . e a c h ( f u n c t i o n ( p ) { i . M e t h o d s [ p . t o L o w e r C a s e ( ) ] = p ; 
 } ) ; v a r   d = f u n c t i o n ( q , p ) { r e t u r n   n e w   A r r a y ( p - S t r i n g ( q ) . l e n g t h + 1 ) . j o i n ( " 0 " ) + q ; } ; i . i m p l e m e n t ( { s e t : f u n c t i o n ( t , r ) { s w i t c h ( $ t y p e ( t ) ) { c a s e " o b j e c t " : f o r ( v a r   s   i n   t ) { t h i s . s e t ( s , t [ s ] ) ; 
 } b r e a k ; c a s e " s t r i n g " : t = t . t o L o w e r C a s e ( ) ; v a r   q = i . M e t h o d s ; i f ( q [ t ] ) { t h i s [ " s e t " + q [ t ] ] ( r ) ; } } r e t u r n   t h i s ; } , g e t : f u n c t i o n ( q ) { q = q . t o L o w e r C a s e ( ) ; v a r   p = i . M e t h o d s ; i f ( p [ q ] ) { r e t u r n   t h i s [ " g e t " + p [ q ] ] ( ) ; 
 } r e t u r n   n u l l ; } , c l o n e : f u n c t i o n ( ) { r e t u r n   n e w   i ( t h i s . g e t ( " t i m e " ) ) ; } , i n c r e m e n t : f u n c t i o n ( p , r ) { p = p | | " d a y " ; r = $ p i c k ( r , 1 ) ; s w i t c h ( p ) { c a s e " y e a r " : r e t u r n   t h i s . i n c r e m e n t ( " m o n t h " , r * 1 2 ) ; 
 c a s e " m o n t h " : v a r   q = t h i s . g e t ( " d a t e " ) ; t h i s . s e t ( " d a t e " , 1 ) . s e t ( " m o " , t h i s . g e t ( " m o " ) + r ) ; r e t u r n   t h i s . s e t ( " d a t e " , q . m i n ( t h i s . g e t ( " l a s t d a y o f m o n t h " ) ) ) ; c a s e " w e e k " : r e t u r n   t h i s . i n c r e m e n t ( " d a y " , r * 7 ) ; 
 c a s e " d a y " : r e t u r n   t h i s . s e t ( " d a t e " , t h i s . g e t ( " d a t e " ) + r ) ; } i f ( ! i . u n i t s [ p ] ) { t h r o w   n e w   E r r o r ( p + "   i s   n o t   a   s u p p o r t e d   i n t e r v a l " ) ; } r e t u r n   t h i s . s e t ( " t i m e " , t h i s . g e t ( " t i m e " ) + r * i . u n i t s [ p ] ( ) ) ; 
 } , d e c r e m e n t : f u n c t i o n ( p , q ) { r e t u r n   t h i s . i n c r e m e n t ( p , - 1 * $ p i c k ( q , 1 ) ) ; } , i s L e a p Y e a r : f u n c t i o n ( ) { r e t u r n   i . i s L e a p Y e a r ( t h i s . g e t ( " y e a r " ) ) ; } , c l e a r T i m e : f u n c t i o n ( ) { r e t u r n   t h i s . s e t ( { h r : 0 , m i n : 0 , s e c : 0 , m s : 0 } ) ; 
 } , d i f f : f u n c t i o n ( q , p ) { i f ( $ t y p e ( q ) = = " s t r i n g " ) { q = i . p a r s e ( q ) ; } r e t u r n ( ( q - t h i s ) / i . u n i t s [ p | | " d a y " ] ( 3 , 3 ) ) . t o I n t ( ) ; } , g e t L a s t D a y O f M o n t h : f u n c t i o n ( ) { r e t u r n   i . d a y s I n M o n t h ( t h i s . g e t ( " m o " ) , t h i s . g e t ( " y e a r " ) ) ; 
 } , g e t D a y O f Y e a r : f u n c t i o n ( ) { r e t u r n ( i . U T C ( t h i s . g e t ( " y e a r " ) , t h i s . g e t ( " m o " ) , t h i s . g e t ( " d a t e " ) + 1 ) - i . U T C ( t h i s . g e t ( " y e a r " ) , 0 , 1 ) ) / i . u n i t s . d a y ( ) ; } , g e t W e e k : f u n c t i o n ( ) { r e t u r n ( t h i s . g e t ( " d a y o f y e a r " ) / 7 ) . c e i l ( ) ; 
 } , g e t O r d i n a l : f u n c t i o n ( p ) { r e t u r n   i . g e t M s g ( " o r d i n a l " , p | | t h i s . g e t ( " d a t e " ) ) ; } , g e t T i m e z o n e : f u n c t i o n ( ) { r e t u r n   t h i s . t o S t r i n g ( ) . r e p l a c e ( / ^ . * ?   ( [ A - Z ] { 3 } ) . [ 0 - 9 ] { 4 } . * $ / , " $ 1 " ) . r e p l a c e ( / ^ . * ? \ ( ( [ A - Z ] ) [ a - z ] +   ( [ A - Z ] ) [ a - z ] +   ( [ A - Z ] ) [ a - z ] + \ ) $ / , " $ 1 $ 2 $ 3 " ) ; 
 } , g e t G M T O f f s e t : f u n c t i o n ( ) { v a r   p = t h i s . g e t ( " t i m e z o n e O f f s e t " ) ; r e t u r n ( ( p > 0 ) ? " - " : " + " ) + d ( ( p . a b s ( ) / 6 0 ) . f l o o r ( ) , 2 ) + d ( p % 6 0 , 2 ) ; } , s e t A M P M : f u n c t i o n ( p ) { p = p . t o U p p e r C a s e ( ) ; 
 v a r   q = t h i s . g e t ( " h r " ) ; i f ( q > 1 1 & & p = = " A M " ) { r e t u r n   t h i s . d e c r e m e n t ( " h o u r " , 1 2 ) ; } e l s e { i f ( q < 1 2 & & p = = " P M " ) { r e t u r n   t h i s . i n c r e m e n t ( " h o u r " , 1 2 ) ; } } r e t u r n   t h i s ; } , g e t A M P M : f u n c t i o n ( ) { r e t u r n ( t h i s . g e t ( " h r " ) < 1 2 ) ? " A M " : " P M " ; 
 } , p a r s e : f u n c t i o n ( p ) { t h i s . s e t ( " t i m e " , i . p a r s e ( p ) ) ; r e t u r n   t h i s ; } , i s V a l i d : f u n c t i o n ( p ) { r e t u r n   ! ! ( p | | t h i s ) . v a l u e O f ( ) ; } , f o r m a t : f u n c t i o n ( p ) { i f ( ! t h i s . i s V a l i d ( ) ) { r e t u r n " i n v a l i d   d a t e " ; 
 } p = p | | " % x   % X " ; p = k [ p . t o L o w e r C a s e ( ) ] | | p ; v a r   q = t h i s ; r e t u r n   p . r e p l a c e ( / % ( [ a - z % ] ) / g i , f u n c t i o n ( s , r ) { s w i t c h ( r ) { c a s e " a " : r e t u r n   i . g e t M s g ( " d a y s " ) [ q . g e t ( " d a y " ) ] . s u b s t r ( 0 , 3 ) ; 
 c a s e " A " : r e t u r n   i . g e t M s g ( " d a y s " ) [ q . g e t ( " d a y " ) ] ; c a s e " b " : r e t u r n   i . g e t M s g ( " m o n t h s " ) [ q . g e t ( " m o n t h " ) ] . s u b s t r ( 0 , 3 ) ; c a s e " B " : r e t u r n   i . g e t M s g ( " m o n t h s " ) [ q . g e t ( " m o n t h " ) ] ; 
 c a s e " c " : r e t u r n   q . t o S t r i n g ( ) ; c a s e " d " : r e t u r n   d ( q . g e t ( " d a t e " ) , 2 ) ; c a s e " H " : r e t u r n   d ( q . g e t ( " h r " ) , 2 ) ; c a s e " I " : r e t u r n ( ( q . g e t ( " h r " ) % 1 2 ) | | 1 2 ) ; c a s e " j " : r e t u r n   d ( q . g e t ( " d a y o f y e a r " ) , 3 ) ; 
 c a s e " m " : r e t u r n   d ( ( q . g e t ( " m o " ) + 1 ) , 2 ) ; c a s e " M " : r e t u r n   d ( q . g e t ( " m i n " ) , 2 ) ; c a s e " o " : r e t u r n   q . g e t ( " o r d i n a l " ) ; c a s e " p " : r e t u r n   i . g e t M s g ( q . g e t ( " a m p m " ) ) ; c a s e " S " : r e t u r n   d ( q . g e t ( " s e c o n d s " ) , 2 ) ; 
 c a s e " U " : r e t u r n   d ( q . g e t ( " w e e k " ) , 2 ) ; c a s e " w " : r e t u r n   q . g e t ( " d a y " ) ; c a s e " x " : r e t u r n   q . f o r m a t ( i . g e t M s g ( " s h o r t D a t e " ) ) ; c a s e " X " : r e t u r n   q . f o r m a t ( i . g e t M s g ( " s h o r t T i m e " ) ) ; 
 c a s e " y " : r e t u r n   q . g e t ( " y e a r " ) . t o S t r i n g ( ) . s u b s t r ( 2 ) ; c a s e " Y " : r e t u r n   q . g e t ( " y e a r " ) ; c a s e " T " : r e t u r n   q . g e t ( " G M T O f f s e t " ) ; c a s e " Z " : r e t u r n   q . g e t ( " T i m e z o n e " ) ; } r e t u r n   r ; 
 } ) ; } , t o I S O S t r i n g : f u n c t i o n ( ) { r e t u r n   t h i s . f o r m a t ( " i s o 8 6 0 1 " ) ; } } ) ; i . a l i a s ( " t o I S O S t r i n g " , " t o J S O N " ) ; i . a l i a s ( " d i f f " , " c o m p a r e " ) ; i . a l i a s ( " f o r m a t " , " s t r f t i m e " ) ; v a r   k = { d b : " % Y - % m - % d   % H : % M : % S " , c o m p a c t : " % Y % m % d T % H % M % S " , i s o 8 6 0 1 : " % Y - % m - % d T % H : % M : % S % T " , r f c 8 2 2 : " % a ,   % d   % b   % Y   % H : % M : % S   % Z " , " s h o r t " : " % d   % b   % H : % M " , " l o n g " : " % B   % d ,   % Y   % H : % M " } ; 
 v a r   g = [ ] ; v a r   e = i . p a r s e ; v a r   n = f u n c t i o n ( s , u , r ) { v a r   q = - 1 ; v a r   t = i . g e t M s g ( s + " s " ) ; s w i t c h ( $ t y p e ( u ) ) { c a s e " o b j e c t " : q = t [ u . g e t ( s ) ] ; b r e a k ; c a s e " n u m b e r " : q = t [ m o n t h - 1 ] ; 
 i f ( ! q ) { t h r o w   n e w   E r r o r ( " I n v a l i d   " + s + "   i n d e x :   " + i n d e x ) ; } b r e a k ; c a s e " s t r i n g " : v a r   p = t . f i l t e r ( f u n c t i o n ( v ) { r e t u r n   t h i s . t e s t ( v ) ; } , n e w   R e g E x p ( " ^ " + u , " i " ) ) ; i f ( ! p . l e n g t h ) { t h r o w   n e w   E r r o r ( " I n v a l i d   " + s + "   s t r i n g " ) ; 
 } i f ( p . l e n g t h > 1 ) { t h r o w   n e w   E r r o r ( " A m b i g u o u s   " + s ) ; } q = p [ 0 ] ; } r e t u r n ( r ) ? t . i n d e x O f ( q ) : q ; } ; i . e x t e n d ( { g e t M s g : f u n c t i o n ( q , p ) { r e t u r n   M o o T o o l s . l a n g . g e t ( " D a t e " , q , p ) ; 
 } , u n i t s : { m s : $ l a m b d a ( 1 ) , s e c o n d : $ l a m b d a ( 1 0 0 0 ) , m i n u t e : $ l a m b d a ( 6 0 0 0 0 ) , h o u r : $ l a m b d a ( 3 6 0 0 0 0 0 ) , d a y : $ l a m b d a ( 8 6 4 0 0 0 0 0 ) , w e e k : $ l a m b d a ( 6 0 8 4 0 0 0 0 0 ) , m o n t h : f u n c t i o n ( q , p ) { v a r   r = n e w   i ; 
 r e t u r n   i . d a y s I n M o n t h ( $ p i c k ( q , r . g e t ( " m o " ) ) , $ p i c k ( p , r . g e t ( " y e a r " ) ) ) * 8 6 4 0 0 0 0 0 ; } , y e a r : f u n c t i o n ( p ) { p = p | | n e w   i ( ) . g e t ( " y e a r " ) ; r e t u r n   i . i s L e a p Y e a r ( p ) ? 3 1 6 2 2 4 0 0 0 0 0 : 3 1 5 3 6 0 0 0 0 0 0 ; 
 } } , d a y s I n M o n t h : f u n c t i o n ( q , p ) { r e t u r n [ 3 1 , i . i s L e a p Y e a r ( p ) ? 2 9 : 2 8 , 3 1 , 3 0 , 3 1 , 3 0 , 3 1 , 3 1 , 3 0 , 3 1 , 3 0 , 3 1 ] [ q ] ; } , i s L e a p Y e a r : f u n c t i o n ( p ) { r e t u r n ( ( p % 4 = = = 0 ) & & ( p % 1 0 0 ! = = 0 ) ) | | ( p % 4 0 0 = = = 0 ) ; 
 } , p a r s e : f u n c t i o n ( r ) { v a r   q = $ t y p e ( r ) ; i f ( q = = " n u m b e r " ) { r e t u r n   n e w   i ( r ) ; } i f ( q ! = " s t r i n g " ) { r e t u r n   r ; } r = r . c l e a n ( ) ; i f ( ! r . l e n g t h ) { r e t u r n   n u l l ; } v a r   p ; g . s o m e ( f u n c t i o n ( t ) { v a r   s = t . r e . e x e c ( r ) ; 
 r e t u r n ( s ) ? ( p = t . h a n d l e r ( s ) ) : f a l s e ; } ) ; r e t u r n   p | | n e w   i ( e ( r ) ) ; } , p a r s e D a y : f u n c t i o n ( p , q ) { r e t u r n   n ( " d a y " , p , q ) ; } , p a r s e M o n t h : f u n c t i o n ( q , p ) { r e t u r n   n ( " m o n t h " , q , p ) ; 
 } , p a r s e U T C : f u n c t i o n ( q ) { v a r   p = n e w   i ( q ) ; v a r   r = i . U T C ( p . g e t ( " y e a r " ) , p . g e t ( " m o " ) , p . g e t ( " d a t e " ) , p . g e t ( " h r " ) , p . g e t ( " m i n " ) , p . g e t ( " s e c " ) ) ; r e t u r n   n e w   i ( r ) ; } , o r d e r I n d e x : f u n c t i o n ( p ) { r e t u r n   i . g e t M s g ( " d a t e O r d e r " ) . i n d e x O f ( p ) + 1 ; 
 } , d e f i n e F o r m a t : f u n c t i o n ( p , q ) { k [ p ] = q ; } , d e f i n e F o r m a t s : f u n c t i o n ( p ) { f o r ( v a r   q   i n   p ) { i . d e f i n e F o r m a t ( q , p [ q ] ) ; } } , p a r s e P a t t e r n s : g , d e f i n e P a r s e r : f u n c t i o n ( p ) { g . p u s h ( ( p . r e & & p . h a n d l e r ) ? p : l ( p ) ) ; 
 } , d e f i n e P a r s e r s : f u n c t i o n ( ) { A r r a y . f l a t t e n ( a r g u m e n t s ) . e a c h ( i . d e f i n e P a r s e r ) ; } , d e f i n e 2 D i g i t Y e a r S t a r t : f u n c t i o n ( p ) { h = p % 1 0 0 ; m = p - h ; } } ) ; v a r   m = 1 9 0 0 ; v a r   h = 7 0 ; v a r   j = f u n c t i o n ( p ) { r e t u r n   n e w   R e g E x p ( " ( ? : " + i . g e t M s g ( p ) . m a p ( f u n c t i o n ( q ) { r e t u r n   q . s u b s t r ( 0 , 3 ) ; 
 } ) . j o i n ( " | " ) + " ) [ a - z ] * " ) ; } ; v a r   a = f u n c t i o n ( p ) { s w i t c h ( p ) { c a s e " x " : r e t u r n ( ( i . o r d e r I n d e x ( " m o n t h " ) = = 1 ) ? " % m [ . - / ] % d " : " % d [ . - / ] % m " ) + " ( [ . - / ] % y ) ? " ; c a s e " X " : r e t u r n " % H ( [ . : ] % M ) ? ( [ . : ] % S ( [ . : ] % s ) ? ) ?   ? % p ?   ? % T ? " ; 
 } r e t u r n   n u l l ; } ; v a r   o = { d : / [ 0 - 2 ] ? [ 0 - 9 ] | 3 [ 0 1 ] / , H : / [ 0 1 ] ? [ 0 - 9 ] | 2 [ 0 - 3 ] / , I : / 0 ? [ 1 - 9 ] | 1 [ 0 - 2 ] / , M : / [ 0 - 5 ] ? \ d / , s : / \ d + / , o : / [ a - z ] * / , p : / [ a p ] \ . ? m \ . ? / , y : / \ d { 2 } | \ d { 4 } / , Y : / \ d { 4 } / , T : / Z | [ + - ] \ d { 2 } ( ? : : ? \ d { 2 } ) ? / } ; 
 o . m = o . I ; o . S = o . M ; v a r   c ; v a r   b = f u n c t i o n ( p ) { c = p ; o . a = o . A = j ( " d a y s " ) ; o . b = o . B = j ( " m o n t h s " ) ; g . e a c h ( f u n c t i o n ( r , q ) { i f ( r . f o r m a t ) { g [ q ] = l ( r . f o r m a t ) ; } } ) ; } ; v a r   l = f u n c t i o n ( r ) { i f ( ! c ) { r e t u r n { f o r m a t : r } ; 
 } v a r   p = [ ] ; v a r   q = ( r . s o u r c e | | r ) . r e p l a c e ( / % ( [ a - z ] ) / g i , f u n c t i o n ( t , s ) { r e t u r n   a ( s ) | | t ; } ) . r e p l a c e ( / \ ( ( ? ! \ ? ) / g , " ( ? : " ) . r e p l a c e ( /   ( ? ! \ ? | \ * ) / g , " , ?   " ) . r e p l a c e ( / % ( [ a - z % ] ) / g i , f u n c t i o n ( t , s ) { v a r   u = o [ s ] ; 
 i f ( ! u ) { r e t u r n   s ; } p . p u s h ( s ) ; r e t u r n " ( " + u . s o u r c e + " ) " ; } ) . r e p l a c e ( / \ [ a - z \ ] / g i , " [ a - z \ \ u 0 0 c 0 - \ \ u f f f f ] " ) ; r e t u r n { f o r m a t : r , r e : n e w   R e g E x p ( " ^ " + q + " $ " , " i " ) , h a n d l e r : f u n c t i o n ( u ) { u = u . s l i c e ( 1 ) . a s s o c i a t e ( p ) ; 
 v a r   s = n e w   i ( ) . c l e a r T i m e ( ) ; i f ( " d "   i n   u ) { f . c a l l ( s , " d " , 1 ) ; } i f ( " m "   i n   u | | " b "   i n   u | | " B "   i n   u ) { f . c a l l ( s , " m " , 1 ) ; } f o r ( v a r   t   i n   u ) { f . c a l l ( s , t , u [ t ] ) ; } r e t u r n   s ; } } ; 
 } ; v a r   f = f u n c t i o n ( p , q ) { i f ( ! q ) { r e t u r n   t h i s ; } s w i t c h ( p ) { c a s e " a " : c a s e " A " : r e t u r n   t h i s . s e t ( " d a y " , i . p a r s e D a y ( q , t r u e ) ) ; c a s e " b " : c a s e " B " : r e t u r n   t h i s . s e t ( " m o " , i . p a r s e M o n t h ( q , t r u e ) ) ; 
 c a s e " d " : r e t u r n   t h i s . s e t ( " d a t e " , q ) ; c a s e " H " : c a s e " I " : r e t u r n   t h i s . s e t ( " h r " , q ) ; c a s e " m " : r e t u r n   t h i s . s e t ( " m o " , q - 1 ) ; c a s e " M " : r e t u r n   t h i s . s e t ( " m i n " , q ) ; c a s e " p " : r e t u r n   t h i s . s e t ( " a m p m " , q . r e p l a c e ( / \ . / g , " " ) ) ; 
 c a s e " S " : r e t u r n   t h i s . s e t ( " s e c " , q ) ; c a s e " s " : r e t u r n   t h i s . s e t ( " m s " , ( " 0 . " + q ) * 1 0 0 0 ) ; c a s e " w " : r e t u r n   t h i s . s e t ( " d a y " , q ) ; c a s e " Y " : r e t u r n   t h i s . s e t ( " y e a r " , q ) ; c a s e " y " : q = + q ; 
 i f ( q < 1 0 0 ) { q + = m + ( q < h ? 1 0 0 : 0 ) ; } r e t u r n   t h i s . s e t ( " y e a r " , q ) ; c a s e " T " : i f ( q = = " Z " ) { q = " + 0 0 " ; } v a r   r = q . m a t c h ( / ( [ + - ] ) ( \ d { 2 } ) : ? ( \ d { 2 } ) ? / ) ; r = ( r [ 1 ] + " 1 " ) * ( r [ 2 ] * 6 0 + ( + r [ 3 ] | | 0 ) ) + t h i s . g e t T i m e z o n e O f f s e t ( ) ; 
 r e t u r n   t h i s . s e t ( " t i m e " , t h i s - r * 6 0 0 0 0 ) ; } r e t u r n   t h i s ; } ; i . d e f i n e P a r s e r s ( " % Y ( [ - . / ] % m ( [ - . / ] % d ( ( T |   ) % X ) ? ) ? ) ? " , " % Y % m % d ( T % H ( % M % S ? ) ? ) ? " , " % x (   % X ) ? " , " % d % o (   % b (   % Y ) ? ) ? (   % X ) ? " , " % b (   % d % o ) ? (   % Y ) ? (   % X ) ? " , " % Y   % b (   % d % o (   % X ) ? ) ? " , " % o   % b   % d   % X   % T   % Y " ) ; 
 M o o T o o l s . l a n g . a d d E v e n t ( " l a n g C h a n g e " , f u n c t i o n ( p ) { i f ( M o o T o o l s . l a n g . g e t ( " D a t e " ) ) { b ( p ) ; } } ) . f i r e E v e n t ( " l a n g C h a n g e " , M o o T o o l s . l a n g . g e t C u r r e n t L a n g u a g e ( ) ) ; } ) ( ) ; 
 D a t e . i m p l e m e n t ( { t i m e D i f f I n W o r d s : f u n c t i o n ( a ) { r e t u r n   D a t e . d i s t a n c e O f T i m e I n W o r d s ( t h i s , a | | n e w   D a t e ) ; } , t i m e D i f f : f u n c t i o n ( g , b ) { i f ( g = = n u l l ) { g = n e w   D a t e ; } v a r   f = ( ( g - t h i s ) / 1 0 0 0 ) . t o I n t ( ) ; 
 i f ( ! f ) { r e t u r n " 0 s " ; } v a r   a = { s : 6 0 , m : 6 0 , h : 2 4 , d : 3 6 5 , y : 0 } ; v a r   e , d = [ ] ; f o r ( v a r   c   i n   a ) { i f ( ! f ) { b r e a k ; } i f ( ( e = a [ c ] ) ) { d . u n s h i f t ( ( f % e ) + c ) ; f = ( f / e ) . t o I n t ( ) ; } e l s e { d . u n s h i f t ( f + c ) ; 
 } } r e t u r n   d . j o i n ( b | | " : " ) ; } } ) ; D a t e . a l i a s ( " t i m e D i f f I n W o r d s " , " t i m e A g o I n W o r d s " ) ; D a t e . e x t e n d ( { d i s t a n c e O f T i m e I n W o r d s : f u n c t i o n ( b , a ) { r e t u r n   D a t e . g e t T i m e P h r a s e ( ( ( a - b ) / 1 0 0 0 ) . t o I n t ( ) ) ; 
 } , g e t T i m e P h r a s e : f u n c t i o n ( f ) { v a r   d = ( f < 0 ) ? " U n t i l " : " A g o " ; i f ( f < 0 ) { f * = - 1 ; } v a r   b = { m i n u t e : 6 0 , h o u r : 6 0 , d a y : 2 4 , w e e k : 7 , m o n t h : 5 2 / 1 2 , y e a r : 1 2 , e o n : I n f i n i t y } ; v a r   e = " l e s s T h a n M i n u t e " ; 
 f o r ( v a r   c   i n   b ) { v a r   a = b [ c ] ; i f ( f < 1 . 5 * a ) { i f ( f > 0 . 7 5 * a ) { e = c ; } b r e a k ; } f / = a ; e = c + " s " ; } r e t u r n   D a t e . g e t M s g ( e + d ) . s u b s t i t u t e ( { d e l t a : f . r o u n d ( ) } ) ; } } ) ; D a t e . d e f i n e P a r s e r s ( { r e : / ^ ( ? : t o d | t o m | y e s ) / i , h a n d l e r : f u n c t i o n ( a ) { v a r   b = n e w   D a t e ( ) . c l e a r T i m e ( ) ; 
 s w i t c h ( a [ 0 ] ) { c a s e " t o m " : r e t u r n   b . i n c r e m e n t ( ) ; c a s e " y e s " : r e t u r n   b . d e c r e m e n t ( ) ; d e f a u l t : r e t u r n   b ; } } } , { r e : / ^ ( n e x t | l a s t )   ( [ a - z ] + ) $ / i , h a n d l e r : f u n c t i o n ( e ) { v a r   f = n e w   D a t e ( ) . c l e a r T i m e ( ) ; 
 v a r   b = f . g e t D a y ( ) ; v a r   c = D a t e . p a r s e D a y ( e [ 2 ] , t r u e ) ; v a r   a = c - b ; i f ( c < = b ) { a + = 7 ; } i f ( e [ 1 ] = = " l a s t " ) { a - = 7 ; } r e t u r n   f . s e t ( " d a t e " , f . g e t D a t e ( ) + a ) ; } } ) ; H a s h . i m p l e m e n t ( { g e t F r o m P a t h : f u n c t i o n ( a ) { v a r   b = t h i s . g e t C l e a n ( ) ; 
 a . r e p l a c e ( / \ [ ( [ ^ \ ] ] + ) \ ] | \ . ( [ ^ . [ ] + ) | [ ^ [ . ] + / g , f u n c t i o n ( c ) { i f ( ! b ) { r e t u r n   n u l l ; } v a r   d = a r g u m e n t s [ 2 ] | | a r g u m e n t s [ 1 ] | | a r g u m e n t s [ 0 ] ; b = ( d   i n   b ) ? b [ d ] : n u l l ; r e t u r n   c ; 
 } ) ; r e t u r n   b ; } , c l e a n V a l u e s : f u n c t i o n ( a ) { a = a | | $ d e f i n e d ; t h i s . e a c h ( f u n c t i o n ( c , b ) { i f ( ! a ( c ) ) { t h i s . e r a s e ( b ) ; } } , t h i s ) ; r e t u r n   t h i s ; } , r u n : f u n c t i o n ( ) { v a r   a = a r g u m e n t s ; 
 t h i s . e a c h ( f u n c t i o n ( c , b ) { i f ( $ t y p e ( c ) = = " f u n c t i o n " ) { c . r u n ( a ) ; } } ) ; } } ) ; ( f u n c t i o n ( ) { v a r   b = [ " À " , " à " , " Á " , " á " , " Â " , " â " , " Ã " , " ã " , " Ä " , " ä " , " Å " , " å " , " " , " " , " " , " " , " " , " " , " " , " " , " Ç " , " ç " , " " , " " , " " , " " , " È " , " è " , " É " , " é " , " Ê " , " ê " , " Ë " , " ë " , " " , " " , " " , " " , " " , " " , " Ì " , " ì " , " Í " , " í " , " Î " , " î " , " Ï " , " ï " , " 9" , " :" , " =" , " >" , " A" , " B" , " Ñ " , " ñ " , " G" , " H" , " C" , " D" , " Ò " , " ò " , " Ó " , " ó " , " Ô " , " ô " , " Õ " , " õ " , " Ö " , " ö " , " Ø " , " ø " , " Q" , " X" , " Y" , " T" , " U" , " `" , " a" , " ^" , " _" , " Z" , " [" , " d" , " e" , " d" , " e" , " b" , " c" , " Ù " , " ù " , " Ú " , " ú " , " Û " , " û " , " Ü " , " ü " , " n" , " o" , " x" , " ÿ " , " ý " , " Ý " , " }" , " ~" , " y" , " z" , " {" , " |" , " Þ " , " þ " , " Ð " , " ð " , " ß " , " R" , " S" , " Æ " , " æ " , " µ " ] ; 
 v a r   a = [ " A " , " a " , " A " , " a " , " A " , " a " , " A " , " a " , " A e " , " a e " , " A " , " a " , " A " , " a " , " A " , " a " , " C " , " c " , " C " , " c " , " C " , " c " , " D " , " d " , " D " , " d " , " E " , " e " , " E " , " e " , " E " , " e " , " E " , " e " , " E " , " e " , " E " , " e " , " G " , " g " , " I " , " i " , " I " , " i " , " I " , " i " , " I " , " i " , " L " , " l " , " L " , " l " , " L " , " l " , " N " , " n " , " N " , " n " , " N " , " n " , " O " , " o " , " O " , " o " , " O " , " o " , " O " , " o " , " O e " , " o e " , " O " , " o " , " o " , " R " , " r " , " R " , " r " , " S " , " s " , " S " , " s " , " S " , " s " , " T " , " t " , " T " , " t " , " T " , " t " , " U " , " u " , " U " , " u " , " U " , " u " , " U e " , " u e " , " U " , " u " , " Y " , " y " , " Y " , " y " , " Z " , " z " , " Z " , " z " , " Z " , " z " , " T H " , " t h " , " D H " , " d h " , " s s " , " O E " , " o e " , " A E " , " a e " , " u " ] ; 
 v a r   d = { " [ \ x a 0 \ u 2 0 0 2 \ u 2 0 0 3 \ u 2 0 0 9 ] " : "   " , " \ x b 7 " : " * " , " [ \ u 2 0 1 8 \ u 2 0 1 9 ] " : " ' " , " [ \ u 2 0 1 c \ u 2 0 1 d ] " : ' " ' , " \ u 2 0 2 6 " : " . . . " , " \ u 2 0 1 3 " : " - " , " \ u 2 0 1 4 " : " - - " , " \ u F F F D " : " & r a q u o ; " } ; 
 v a r   c = f u n c t i o n ( e , f ) { e = e | | " " ; v a r   g = f ? " < " + e + " [ ^ > ] * > ( [ \ \ s \ \ S ] * ? ) < / " + e + " > " : " < / ? " + e + " ( [ ^ > ] + ) ? > " ; r e g = n e w   R e g E x p ( g , " g i " ) ; r e t u r n   r e g ; } ; S t r i n g . i m p l e m e n t ( { s t a n d a r d i z e : f u n c t i o n ( ) { v a r   e = t h i s ; 
 b . e a c h ( f u n c t i o n ( g , f ) { e = e . r e p l a c e ( n e w   R e g E x p ( g , " g " ) , a [ f ] ) ; } ) ; r e t u r n   e ; } , r e p e a t : f u n c t i o n ( e ) { r e t u r n   n e w   A r r a y ( e + 1 ) . j o i n ( t h i s ) ; } , p a d : f u n c t i o n ( f , h , e ) { i f ( t h i s . l e n g t h > = f ) { r e t u r n   t h i s ; 
 } v a r   g = ( h = = n u l l ? "   " : " " + h ) . r e p e a t ( f - t h i s . l e n g t h ) . s u b s t r ( 0 , f - t h i s . l e n g t h ) ; i f ( ! e | | e = = " r i g h t " ) { r e t u r n   t h i s + g ; } i f ( e = = " l e f t " ) { r e t u r n   g + t h i s ; } r e t u r n   g . s u b s t r ( 0 , ( g . l e n g t h / 2 ) . f l o o r ( ) ) + t h i s + g . s u b s t r ( 0 , ( g . l e n g t h / 2 ) . c e i l ( ) ) ; 
 } , g e t T a g s : f u n c t i o n ( e , f ) { r e t u r n   t h i s . m a t c h ( c ( e , f ) ) | | [ ] ; } , s t r i p T a g s : f u n c t i o n ( e , f ) { r e t u r n   t h i s . r e p l a c e ( c ( e , f ) , " " ) ; } , t i d y : f u n c t i o n ( ) { v a r   e = t h i s . t o S t r i n g ( ) ; 
 $ e a c h ( d , f u n c t i o n ( g , f ) { e = e . r e p l a c e ( n e w   R e g E x p ( f , " g " ) , g ) ; } ) ; r e t u r n   e ; } } ) ; } ) ( ) ; S t r i n g . i m p l e m e n t ( { p a r s e Q u e r y S t r i n g : f u n c t i o n ( ) { v a r   b = t h i s . s p l i t ( / [ & ; ] / ) , a = { } ; 
 i f ( b . l e n g t h ) { b . e a c h ( f u n c t i o n ( g ) { v a r   c = g . i n d e x O f ( " = " ) , d = c < 0 ? [ " " ] : g . s u b s t r ( 0 , c ) . m a t c h ( / [ ^ \ ] \ [ ] + / g ) , e = d e c o d e U R I C o m p o n e n t ( g . s u b s t r ( c + 1 ) ) , f = a ; d . e a c h ( f u n c t i o n ( j , h ) { v a r   k = f [ j ] ; 
 i f ( h < d . l e n g t h - 1 ) { f = f [ j ] = k | | { } ; } e l s e { i f ( $ t y p e ( k ) = = " a r r a y " ) { k . p u s h ( e ) ; } e l s e { f [ j ] = $ d e f i n e d ( k ) ? [ k , e ] : e ; } } } ) ; } ) ; } r e t u r n   a ; } , c l e a n Q u e r y S t r i n g : f u n c t i o n ( a ) { r e t u r n   t h i s . s p l i t ( " & " ) . f i l t e r ( f u n c t i o n ( e ) { v a r   b = e . i n d e x O f ( " = " ) , c = b < 0 ? " " : e . s u b s t r ( 0 , b ) , d = e . s u b s t r ( b + 1 ) ; 
 r e t u r n   a ? a . r u n ( [ c , d ] ) : $ c h k ( d ) ; } ) . j o i n ( " & " ) ; } } ) ; v a r   U R I = n e w   C l a s s ( { I m p l e m e n t s : O p t i o n s , o p t i o n s : { } , r e g e x : / ^ ( ? : ( \ w + ) : ) ? ( ? : \ / \ / ( ? : ( ? : ( [ ^ : @ \ / ] * ) : ? ( [ ^ : @ \ / ] * ) ) ? @ ) ? ( [ ^ : \ / ? # ] * ) ( ? : : ( \ d * ) ) ? ) ? ( \ . \ . ? $ | ( ? : [ ^ ? # \ / ] * \ / ) * ) ( [ ^ ? # ] * ) ( ? : \ ? ( [ ^ # ] * ) ) ? ( ? : # ( . * ) ) ? / , p a r t s : [ " s c h e m e " , " u s e r " , " p a s s w o r d " , " h o s t " , " p o r t " , " d i r e c t o r y " , " f i l e " , " q u e r y " , " f r a g m e n t " ] , s c h e m e s : { h t t p : 8 0 , h t t p s : 4 4 3 , f t p : 2 1 , r t s p : 5 5 4 , m m s : 1 7 5 5 , f i l e : 0 } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . s e t O p t i o n s ( a ) ; 
 v a r   c = t h i s . o p t i o n s . b a s e | | U R I . b a s e ; i f ( ! b ) { b = c ; } i f ( b & & b . p a r s e d ) { t h i s . p a r s e d = $ u n l i n k ( b . p a r s e d ) ; } e l s e { t h i s . s e t ( " v a l u e " , b . h r e f | | b . t o S t r i n g ( ) , c ? n e w   U R I ( c ) : f a l s e ) ; 
 } } , p a r s e : f u n c t i o n ( c , b ) { v a r   a = c . m a t c h ( t h i s . r e g e x ) ; i f ( ! a ) { r e t u r n   f a l s e ; } a . s h i f t ( ) ; r e t u r n   t h i s . m e r g e ( a . a s s o c i a t e ( t h i s . p a r t s ) , b ) ; } , m e r g e : f u n c t i o n ( b , a ) { i f ( ( ! b | | ! b . s c h e m e ) & & ( ! a | | ! a . s c h e m e ) ) { r e t u r n   f a l s e ; 
 } i f ( a ) { t h i s . p a r t s . e v e r y ( f u n c t i o n ( c ) { i f ( b [ c ] ) { r e t u r n   f a l s e ; } b [ c ] = a [ c ] | | " " ; r e t u r n   t r u e ; } ) ; } b . p o r t = b . p o r t | | t h i s . s c h e m e s [ b . s c h e m e . t o L o w e r C a s e ( ) ] ; b . d i r e c t o r y = b . d i r e c t o r y ? t h i s . p a r s e D i r e c t o r y ( b . d i r e c t o r y , a ? a . d i r e c t o r y : " " ) : " / " ; 
 r e t u r n   b ; } , p a r s e D i r e c t o r y : f u n c t i o n ( b , c ) { b = ( b . s u b s t r ( 0 , 1 ) = = " / " ? " " : ( c | | " / " ) ) + b ; i f ( ! b . t e s t ( U R I . r e g s . d i r e c t o r y D o t ) ) { r e t u r n   b ; } v a r   a = [ ] ; b . r e p l a c e ( U R I . r e g s . e n d S l a s h , " " ) . s p l i t ( " / " ) . e a c h ( f u n c t i o n ( d ) { i f ( d = = " . . " & & a . l e n g t h > 0 ) { a . p o p ( ) ; 
 } e l s e { i f ( d ! = " . " ) { a . p u s h ( d ) ; } } } ) ; r e t u r n   a . j o i n ( " / " ) + " / " ; } , c o m b i n e : f u n c t i o n ( a ) { r e t u r n   a . v a l u e | | a . s c h e m e + " : / / " + ( a . u s e r ? a . u s e r + ( a . p a s s w o r d ? " : " + a . p a s s w o r d : " " ) + " @ " : " " ) + ( a . h o s t | | " " ) + ( a . p o r t & & a . p o r t ! = t h i s . s c h e m e s [ a . s c h e m e ] ? " : " + a . p o r t : " " ) + ( a . d i r e c t o r y | | " / " ) + ( a . f i l e | | " " ) + ( a . q u e r y ? " ? " + a . q u e r y : " " ) + ( a . f r a g m e n t ? " # " + a . f r a g m e n t : " " ) ; 
 } , s e t : f u n c t i o n ( b , d , c ) { i f ( b = = " v a l u e " ) { v a r   a = d . m a t c h ( U R I . r e g s . s c h e m e ) ; i f ( a ) { a = a [ 1 ] ; } i f ( a & & ! $ d e f i n e d ( t h i s . s c h e m e s [ a . t o L o w e r C a s e ( ) ] ) ) { t h i s . p a r s e d = { s c h e m e : a , v a l u e : d } ; 
 } e l s e { t h i s . p a r s e d = t h i s . p a r s e ( d , ( c | | t h i s ) . p a r s e d ) | | ( a ? { s c h e m e : a , v a l u e : d } : { v a l u e : d } ) ; } } e l s e { i f ( b = = " d a t a " ) { t h i s . s e t D a t a ( d ) ; } e l s e { t h i s . p a r s e d [ b ] = d ; } } r e t u r n   t h i s ; 
 } , g e t : f u n c t i o n ( a , b ) { s w i t c h ( a ) { c a s e " v a l u e " : r e t u r n   t h i s . c o m b i n e ( t h i s . p a r s e d , b ? b . p a r s e d : f a l s e ) ; c a s e " d a t a " : r e t u r n   t h i s . g e t D a t a ( ) ; } r e t u r n   t h i s . p a r s e d [ a ] | | " " ; 
 } , g o : f u n c t i o n ( ) { d o c u m e n t . l o c a t i o n . h r e f = t h i s . t o S t r i n g ( ) ; } , t o U R I : f u n c t i o n ( ) { r e t u r n   t h i s ; } , g e t D a t a : f u n c t i o n ( c , b ) { v a r   a = t h i s . g e t ( b | | " q u e r y " ) ; i f ( ! $ c h k ( a ) ) { r e t u r n   c ? n u l l : { } ; 
 } v a r   d = a . p a r s e Q u e r y S t r i n g ( ) ; r e t u r n   c ? d [ c ] : d ; } , s e t D a t a : f u n c t i o n ( a , c , b ) { i f ( t y p e o f   a = = " s t r i n g " ) { d a t a = t h i s . g e t D a t a ( ) ; d a t a [ a r g u m e n t s [ 0 ] ] = a r g u m e n t s [ 1 ] ; a = d a t a ; 
 } e l s e { i f ( c ) { a = $ m e r g e ( t h i s . g e t D a t a ( ) , a ) ; } } r e t u r n   t h i s . s e t ( b | | " q u e r y " , H a s h . t o Q u e r y S t r i n g ( a ) ) ; } , c l e a r D a t a : f u n c t i o n ( a ) { r e t u r n   t h i s . s e t ( a | | " q u e r y " , " " ) ; } } ) ; U R I . p r o t o t y p e . t o S t r i n g = U R I . p r o t o t y p e . v a l u e O f = f u n c t i o n ( ) { r e t u r n   t h i s . g e t ( " v a l u e " ) ; 
 } ; U R I . r e g s = { e n d S l a s h : / \ / $ / , s c h e m e : / ^ ( \ w + ) : / , d i r e c t o r y D o t : / \ . \ / | \ . $ / } ; U R I . b a s e = n e w   U R I ( d o c u m e n t . g e t E l e m e n t s ( " b a s e [ h r e f ] " , t r u e ) . g e t L a s t ( ) , { b a s e : d o c u m e n t . l o c a t i o n } ) ; 
 S t r i n g . i m p l e m e n t ( { t o U R I : f u n c t i o n ( a ) { r e t u r n   n e w   U R I ( t h i s , a ) ; } } ) ; U R I = C l a s s . r e f a c t o r ( U R I , { c o m b i n e : f u n c t i o n ( f , e ) { i f ( ! e | | f . s c h e m e ! = e . s c h e m e | | f . h o s t ! = e . h o s t | | f . p o r t ! = e . p o r t ) { r e t u r n   t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; 
 } v a r   a = f . f i l e + ( f . q u e r y ? " ? " + f . q u e r y : " " ) + ( f . f r a g m e n t ? " # " + f . f r a g m e n t : " " ) ; i f ( ! e . d i r e c t o r y ) { r e t u r n ( f . d i r e c t o r y | | ( f . f i l e ? " " : " . / " ) ) + a ; } v a r   d = e . d i r e c t o r y . s p l i t ( " / " ) , c = f . d i r e c t o r y . s p l i t ( " / " ) , g = " " , h ; 
 v a r   b = 0 ; f o r ( h = 0 ; h < d . l e n g t h & & h < c . l e n g t h & & d [ h ] = = c [ h ] ; h + + ) { } f o r ( b = 0 ; b < d . l e n g t h - h - 1 ; b + + ) { g + = " . . / " ; } f o r ( b = h ; b < c . l e n g t h - 1 ; b + + ) { g + = c [ b ] + " / " ; } r e t u r n ( g | | ( f . f i l e ? " " : " . / " ) ) + a ; 
 } , t o A b s o l u t e : f u n c t i o n ( a ) { a = n e w   U R I ( a ) ; i f ( a ) { a . s e t ( " d i r e c t o r y " , " " ) . s e t ( " f i l e " , " " ) ; } r e t u r n   t h i s . t o R e l a t i v e ( a ) ; } , t o R e l a t i v e : f u n c t i o n ( a ) { r e t u r n   t h i s . g e t ( " v a l u e " , n e w   U R I ( a ) ) ; 
 } } ) ; E l e m e n t . i m p l e m e n t ( { t i d y : f u n c t i o n ( ) { t h i s . s e t ( " v a l u e " , t h i s . g e t ( " v a l u e " ) . t i d y ( ) ) ; } , g e t T e x t I n R a n g e : f u n c t i o n ( b , a ) { r e t u r n   t h i s . g e t ( " v a l u e " ) . s u b s t r i n g ( b , a ) ; 
 } , g e t S e l e c t e d T e x t : f u n c t i o n ( ) { i f ( t h i s . s e t S e l e c t i o n R a n g e ) { r e t u r n   t h i s . g e t T e x t I n R a n g e ( t h i s . g e t S e l e c t i o n S t a r t ( ) , t h i s . g e t S e l e c t i o n E n d ( ) ) ; } r e t u r n   d o c u m e n t . s e l e c t i o n . c r e a t e R a n g e ( ) . t e x t ; 
 } , g e t S e l e c t e d R a n g e : f u n c t i o n ( ) { i f ( $ d e f i n e d ( t h i s . s e l e c t i o n S t a r t ) ) { r e t u r n { s t a r t : t h i s . s e l e c t i o n S t a r t , e n d : t h i s . s e l e c t i o n E n d } ; } v a r   e = { s t a r t : 0 , e n d : 0 } ; v a r   a = t h i s . g e t D o c u m e n t ( ) . s e l e c t i o n . c r e a t e R a n g e ( ) ; 
 i f ( ! a | | a . p a r e n t E l e m e n t ( ) ! = t h i s ) { r e t u r n   e ; } v a r   c = a . d u p l i c a t e ( ) ; i f ( t h i s . t y p e = = " t e x t " ) { e . s t a r t = 0 - c . m o v e S t a r t ( " c h a r a c t e r " , - 1 0 0 0 0 0 ) ; e . e n d = e . s t a r t + a . t e x t . l e n g t h ; 
 } e l s e { v a r   b = t h i s . g e t ( " v a l u e " ) ; v a r   d = b . l e n g t h ; c . m o v e T o E l e m e n t T e x t ( t h i s ) ; c . s e t E n d P o i n t ( " S t a r t T o E n d " , a ) ; i f ( c . t e x t . l e n g t h ) { d - = b . m a t c h ( / [ \ n \ r ] * $ / ) [ 0 ] . l e n g t h ; 
 } e . e n d = d - c . t e x t . l e n g t h ; c . s e t E n d P o i n t ( " S t a r t T o S t a r t " , a ) ; e . s t a r t = d - c . t e x t . l e n g t h ; } r e t u r n   e ; } , g e t S e l e c t i o n S t a r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t S e l e c t e d R a n g e ( ) . s t a r t ; 
 } , g e t S e l e c t i o n E n d : f u n c t i o n ( ) { r e t u r n   t h i s . g e t S e l e c t e d R a n g e ( ) . e n d ; } , s e t C a r e t P o s i t i o n : f u n c t i o n ( a ) { i f ( a = = " e n d " ) { a = t h i s . g e t ( " v a l u e " ) . l e n g t h ; } t h i s . s e l e c t R a n g e ( a , a ) ; 
 r e t u r n   t h i s ; } , g e t C a r e t P o s i t i o n : f u n c t i o n ( ) { r e t u r n   t h i s . g e t S e l e c t e d R a n g e ( ) . s t a r t ; } , s e l e c t R a n g e : f u n c t i o n ( e , a ) { i f ( t h i s . s e t S e l e c t i o n R a n g e ) { t h i s . f o c u s ( ) ; t h i s . s e t S e l e c t i o n R a n g e ( e , a ) ; 
 } e l s e { v a r   c = t h i s . g e t ( " v a l u e " ) ; v a r   d = c . s u b s t r ( e , a - e ) . r e p l a c e ( / \ r / g , " " ) . l e n g t h ; e = c . s u b s t r ( 0 , e ) . r e p l a c e ( / \ r / g , " " ) . l e n g t h ; v a r   b = t h i s . c r e a t e T e x t R a n g e ( ) ; b . c o l l a p s e ( t r u e ) ; 
 b . m o v e E n d ( " c h a r a c t e r " , e + d ) ; b . m o v e S t a r t ( " c h a r a c t e r " , e ) ; b . s e l e c t ( ) ; } r e t u r n   t h i s ; } , i n s e r t A t C u r s o r : f u n c t i o n ( b , a ) { v a r   d = t h i s . g e t S e l e c t e d R a n g e ( ) ; v a r   c = t h i s . g e t ( " v a l u e " ) ; 
 t h i s . s e t ( " v a l u e " , c . s u b s t r i n g ( 0 , d . s t a r t ) + b + c . s u b s t r i n g ( d . e n d , c . l e n g t h ) ) ; i f ( $ p i c k ( a , t r u e ) ) { t h i s . s e l e c t R a n g e ( d . s t a r t , d . s t a r t + b . l e n g t h ) ; } e l s e { t h i s . s e t C a r e t P o s i t i o n ( d . s t a r t + b . l e n g t h ) ; 
 } r e t u r n   t h i s ; } , i n s e r t A r o u n d C u r s o r : f u n c t i o n ( b , a ) { b = $ e x t e n d ( { b e f o r e : " " , d e f a u l t M i d d l e : " " , a f t e r : " " } , b ) ; v a r   c = t h i s . g e t S e l e c t e d T e x t ( ) | | b . d e f a u l t M i d d l e ; v a r   g = t h i s . g e t S e l e c t e d R a n g e ( ) ; 
 v a r   f = t h i s . g e t ( " v a l u e " ) ; i f ( g . s t a r t = = g . e n d ) { t h i s . s e t ( " v a l u e " , f . s u b s t r i n g ( 0 , g . s t a r t ) + b . b e f o r e + c + b . a f t e r + f . s u b s t r i n g ( g . e n d , f . l e n g t h ) ) ; t h i s . s e l e c t R a n g e ( g . s t a r t + b . b e f o r e . l e n g t h , g . e n d + b . b e f o r e . l e n g t h + c . l e n g t h ) ; 
 } e l s e { v a r   d = f . s u b s t r i n g ( g . s t a r t , g . e n d ) ; t h i s . s e t ( " v a l u e " , f . s u b s t r i n g ( 0 , g . s t a r t ) + b . b e f o r e + d + b . a f t e r + f . s u b s t r i n g ( g . e n d , f . l e n g t h ) ) ; v a r   e = g . s t a r t + b . b e f o r e . l e n g t h ; 
 i f ( $ p i c k ( a , t r u e ) ) { t h i s . s e l e c t R a n g e ( e , e + d . l e n g t h ) ; } e l s e { t h i s . s e t C a r e t P o s i t i o n ( e + f . l e n g t h ) ; } } r e t u r n   t h i s ; } } ) ; E l e m e n t s . f r o m = f u n c t i o n ( e , d ) { i f ( $ p i c k ( d , t r u e ) ) { e = e . s t r i p S c r i p t s ( ) ; 
 } v a r   b , c = e . m a t c h ( / ^ \ s * < ( t [ d h r ] | t b o d y | t f o o t | t h e a d ) / i ) ; i f ( c ) { b = n e w   E l e m e n t ( " t a b l e " ) ; v a r   a = c [ 1 ] . t o L o w e r C a s e ( ) ; i f ( [ " t d " , " t h " , " t r " ] . c o n t a i n s ( a ) ) { b = n e w   E l e m e n t ( " t b o d y " ) . i n j e c t ( b ) ; 
 i f ( a ! = " t r " ) { b = n e w   E l e m e n t ( " t r " ) . i n j e c t ( b ) ; } } } r e t u r n ( b | | n e w   E l e m e n t ( " d i v " ) ) . s e t ( " h t m l " , e ) . g e t C h i l d r e n ( ) ; } ; ( f u n c t i o n ( d , e ) { v a r   c = / ( . * ? ) : r e l a y \ ( ( [ ^ ) ] + ) \ ) $ / , b = / [ + > ~ \ s ] / , f = f u n c t i o n ( g ) { v a r   h = g . m a t c h ( c ) ; 
 r e t u r n   ! h ? { e v e n t : g } : { e v e n t : h [ 1 ] , s e l e c t o r : h [ 2 ] } ; } , a = f u n c t i o n ( m , g ) { v a r   k = m . t a r g e t ; i f ( b . t e s t ( g = g . t r i m ( ) ) ) { v a r   j = t h i s . g e t E l e m e n t s ( g ) ; f o r ( v a r   h = j . l e n g t h ; h - - ; 
 ) { v a r   l = j [ h ] ; i f ( k = = l | | l . h a s C h i l d ( k ) ) { r e t u r n   l ; } } } e l s e { f o r ( ; k & & k ! = t h i s ; k = k . p a r e n t N o d e ) { i f ( E l e m e n t . m a t c h ( k , g ) ) { r e t u r n   d o c u m e n t . i d ( k ) ; } } } r e t u r n   n u l l ; } ; E l e m e n t . i m p l e m e n t ( { a d d E v e n t : f u n c t i o n ( j , i ) { v a r   k = f ( j ) ; 
 i f ( k . s e l e c t o r ) { v a r   h = t h i s . r e t r i e v e ( " $ m o o : d e l e g a t e M o n i t o r s " , { } ) ; i f ( ! h [ j ] ) { v a r   g = f u n c t i o n ( m ) { v a r   l = a . c a l l ( t h i s , m , k . s e l e c t o r ) ; i f ( l ) { t h i s . f i r e E v e n t ( j , [ m , l ] , 0 , l ) ; 
 } } . b i n d ( t h i s ) ; h [ j ] = g ; d . c a l l ( t h i s , k . e v e n t , g ) ; } } r e t u r n   d . a p p l y ( t h i s , a r g u m e n t s ) ; } , r e m o v e E v e n t : f u n c t i o n ( j , i ) { v a r   k = f ( j ) ; i f ( k . s e l e c t o r ) { v a r   h = t h i s . r e t r i e v e ( " e v e n t s " ) ; 
 i f ( ! h | | ! h [ j ] | | ( i & & ! h [ j ] . k e y s . c o n t a i n s ( i ) ) ) { r e t u r n   t h i s ; } i f ( i ) { e . a p p l y ( t h i s , [ j , i ] ) ; } e l s e { e . a p p l y ( t h i s , j ) ; } h = t h i s . r e t r i e v e ( " e v e n t s " ) ; i f ( h & & h [ j ] & & h [ j ] . k e y s . l e n g t h = = 0 ) { v a r   g = t h i s . r e t r i e v e ( " $ m o o : d e l e g a t e M o n i t o r s " , { } ) ; 
 e . a p p l y ( t h i s , [ k . e v e n t , g [ j ] ] ) ; d e l e t e   g [ j ] ; } r e t u r n   t h i s ; } r e t u r n   e . a p p l y ( t h i s , a r g u m e n t s ) ; } , f i r e E v e n t : f u n c t i o n ( j , h , g , k ) { v a r   i = t h i s . r e t r i e v e ( " e v e n t s " ) ; i f ( ! i | | ! i [ j ] ) { r e t u r n   t h i s ; 
 } i [ j ] . k e y s . e a c h ( f u n c t i o n ( l ) { l . c r e a t e ( { b i n d : k | | t h i s , d e l a y : g , a r g u m e n t s : h } ) ( ) ; } , t h i s ) ; r e t u r n   t h i s ; } } ) ; } ) ( E l e m e n t . p r o t o t y p e . a d d E v e n t , E l e m e n t . p r o t o t y p e . r e m o v e E v e n t ) ; 
 E l e m e n t . i m p l e m e n t ( { m e a s u r e : f u n c t i o n ( e ) { v a r   g = f u n c t i o n ( h ) { r e t u r n   ! ! ( ! h | | h . o f f s e t H e i g h t | | h . o f f s e t W i d t h ) ; } ; i f ( g ( t h i s ) ) { r e t u r n   e . a p p l y ( t h i s ) ; } v a r   d = t h i s . g e t P a r e n t ( ) , f = [ ] , b = [ ] ; 
 w h i l e ( ! g ( d ) & & d ! = d o c u m e n t . b o d y ) { b . p u s h ( d . e x p o s e ( ) ) ; d = d . g e t P a r e n t ( ) ; } v a r   c = t h i s . e x p o s e ( ) ; v a r   a = e . a p p l y ( t h i s ) ; c ( ) ; b . e a c h ( f u n c t i o n ( h ) { h ( ) ; } ) ; r e t u r n   a ; } , e x p o s e : f u n c t i o n ( ) { i f ( t h i s . g e t S t y l e ( " d i s p l a y " ) ! = " n o n e " ) { r e t u r n   $ e m p t y ; 
 } v a r   a = t h i s . s t y l e . c s s T e x t ; t h i s . s e t S t y l e s ( { d i s p l a y : " b l o c k " , p o s i t i o n : " a b s o l u t e " , v i s i b i l i t y : " h i d d e n " } ) ; r e t u r n   f u n c t i o n ( ) { t h i s . s t y l e . c s s T e x t = a ; } . b i n d ( t h i s ) ; 
 } , g e t D i m e n s i o n s : f u n c t i o n ( a ) { a = $ m e r g e ( { c o m p u t e S i z e : f a l s e } , a ) ; v a r   f = { } ; v a r   d = f u n c t i o n ( g , e ) { r e t u r n ( e . c o m p u t e S i z e ) ? g . g e t C o m p u t e d S i z e ( e ) : g . g e t S i z e ( ) ; } ; v a r   b = t h i s . g e t P a r e n t ( " b o d y " ) ; 
 i f ( b & & t h i s . g e t S t y l e ( " d i s p l a y " ) = = " n o n e " ) { f = t h i s . m e a s u r e ( f u n c t i o n ( ) { r e t u r n   d ( t h i s , a ) ; } ) ; } e l s e { i f ( b ) { t r y { f = d ( t h i s , a ) ; } c a t c h ( c ) { } } e l s e { f = { x : 0 , y : 0 } ; } } r e t u r n   $ c h k ( f . x ) ? $ e x t e n d ( f , { w i d t h : f . x , h e i g h t : f . y } ) : $ e x t e n d ( f , { x : f . w i d t h , y : f . h e i g h t } ) ; 
 } , g e t C o m p u t e d S i z e : f u n c t i o n ( a ) { a = $ m e r g e ( { s t y l e s : [ " p a d d i n g " , " b o r d e r " ] , p l a i n s : { h e i g h t : [ " t o p " , " b o t t o m " ] , w i d t h : [ " l e f t " , " r i g h t " ] } , m o d e : " b o t h " } , a ) ; v a r   c = { w i d t h : 0 , h e i g h t : 0 } ; 
 s w i t c h ( a . m o d e ) { c a s e " v e r t i c a l " : d e l e t e   c . w i d t h ; d e l e t e   a . p l a i n s . w i d t h ; b r e a k ; c a s e " h o r i z o n t a l " : d e l e t e   c . h e i g h t ; d e l e t e   a . p l a i n s . h e i g h t ; b r e a k ; } v a r   b = [ ] ; $ e a c h ( a . p l a i n s , f u n c t i o n ( g , f ) { g . e a c h ( f u n c t i o n ( h ) { a . s t y l e s . e a c h ( f u n c t i o n ( i ) { b . p u s h ( ( i = = " b o r d e r " ) ? i + " - " + h + " - w i d t h " : i + " - " + h ) ; 
 } ) ; } ) ; } ) ; v a r   e = { } ; b . e a c h ( f u n c t i o n ( f ) { e [ f ] = t h i s . g e t C o m p u t e d S t y l e ( f ) ; } , t h i s ) ; v a r   d = [ ] ; $ e a c h ( a . p l a i n s , f u n c t i o n ( g , f ) { v a r   h = f . c a p i t a l i z e ( ) ; c [ " t o t a l " + h ] = c [ " c o m p u t e d " + h ] = 0 ; 
 g . e a c h ( f u n c t i o n ( i ) { c [ " c o m p u t e d " + i . c a p i t a l i z e ( ) ] = 0 ; b . e a c h ( f u n c t i o n ( k , j ) { i f ( k . t e s t ( i ) ) { e [ k ] = e [ k ] . t o I n t ( ) | | 0 ; c [ " t o t a l " + h ] = c [ " t o t a l " + h ] + e [ k ] ; c [ " c o m p u t e d " + i . c a p i t a l i z e ( ) ] = c [ " c o m p u t e d " + i . c a p i t a l i z e ( ) ] + e [ k ] ; 
 } i f ( k . t e s t ( i ) & & f ! = k & & ( k . t e s t ( " b o r d e r " ) | | k . t e s t ( " p a d d i n g " ) ) & & ! d . c o n t a i n s ( k ) ) { d . p u s h ( k ) ; c [ " c o m p u t e d " + h ] = c [ " c o m p u t e d " + h ] - e [ k ] ; } } ) ; } ) ; } ) ; [ " W i d t h " , " H e i g h t " ] . e a c h ( f u n c t i o n ( g ) { v a r   f = g . t o L o w e r C a s e ( ) ; 
 i f ( ! $ c h k ( c [ f ] ) ) { r e t u r n ; } c [ f ] = c [ f ] + t h i s [ " o f f s e t " + g ] + c [ " c o m p u t e d " + g ] ; c [ " t o t a l " + g ] = c [ f ] + c [ " t o t a l " + g ] ; d e l e t e   c [ " c o m p u t e d " + g ] ; } , t h i s ) ; r e t u r n   $ e x t e n d ( e , c ) ; } } ) ; 
 ( f u n c t i o n ( ) { v a r   a = f a l s e ; w i n d o w . a d d E v e n t ( " d o m r e a d y " , f u n c t i o n ( ) { v a r   b = n e w   E l e m e n t ( " d i v " ) . s e t S t y l e s ( { p o s i t i o n : " f i x e d " , t o p : 0 , r i g h t : 0 } ) . i n j e c t ( d o c u m e n t . b o d y ) ; 
 a = ( b . o f f s e t T o p = = = 0 ) ; b . d i s p o s e ( ) ; } ) ; E l e m e n t . i m p l e m e n t ( { p i n : f u n c t i o n ( d ) { i f ( t h i s . g e t S t y l e ( " d i s p l a y " ) = = " n o n e " ) { r e t u r n   n u l l ; } v a r   f , b = w i n d o w . g e t S c r o l l ( ) ; i f ( d ! = = f a l s e ) { f = t h i s . g e t P o s i t i o n ( ) ; 
 i f ( ! t h i s . r e t r i e v e ( " p i n n e d " ) ) { v a r   h = { t o p : f . y - b . y , l e f t : f . x - b . x } ; i f ( a ) { t h i s . s e t S t y l e ( " p o s i t i o n " , " f i x e d " ) . s e t S t y l e s ( h ) ; } e l s e { t h i s . s t o r e ( " p i n n e d B y J S " , t r u e ) ; 
 t h i s . s e t S t y l e s ( { p o s i t i o n : " a b s o l u t e " , t o p : f . y , l e f t : f . x } ) . a d d C l a s s ( " i s P i n n e d " ) ; t h i s . s t o r e ( " s c r o l l F i x e r " , ( f u n c t i o n ( ) { i f ( t h i s . r e t r i e v e ( " p i n n e d " ) ) { v a r   i = w i n d o w . g e t S c r o l l ( ) ; 
 } t h i s . s e t S t y l e s ( { t o p : h . t o p . t o I n t ( ) + i . y , l e f t : h . l e f t . t o I n t ( ) + i . x } ) ; } ) . b i n d ( t h i s ) ) ; w i n d o w . a d d E v e n t ( " s c r o l l " , t h i s . r e t r i e v e ( " s c r o l l F i x e r " ) ) ; } t h i s . s t o r e ( " p i n n e d " , t r u e ) ; 
 } } e l s e { v a r   g ; i f ( ! B r o w s e r . E n g i n e . t r i d e n t ) { v a r   e = t h i s . g e t P a r e n t ( ) ; g = ( e . g e t C o m p u t e d S t y l e ( " p o s i t i o n " ) ! = " s t a t i c " ? e : e . g e t O f f s e t P a r e n t ( ) ) ; } f = t h i s . g e t P o s i t i o n ( g ) ; 
 t h i s . s t o r e ( " p i n n e d " , f a l s e ) ; v a r   c ; i f ( a & & ! t h i s . r e t r i e v e ( " p i n n e d B y J S " ) ) { c = { t o p : f . y + b . y , l e f t : f . x + b . x } ; } e l s e { t h i s . s t o r e ( " p i n n e d B y J S " , f a l s e ) ; w i n d o w . r e m o v e E v e n t ( " s c r o l l " , t h i s . r e t r i e v e ( " s c r o l l F i x e r " ) ) ; 
 c = { t o p : f . y , l e f t : f . x } ; } t h i s . s e t S t y l e s ( $ m e r g e ( c , { p o s i t i o n : " a b s o l u t e " } ) ) . r e m o v e C l a s s ( " i s P i n n e d " ) ; } r e t u r n   t h i s ; } , u n p i n : f u n c t i o n ( ) { r e t u r n   t h i s . p i n ( f a l s e ) ; } , t o g g l e p i n : f u n c t i o n ( ) { t h i s . p i n ( ! t h i s . r e t r i e v e ( " p i n n e d " ) ) ; 
 } } ) ; } ) ( ) ; ( f u n c t i o n ( ) { v a r   a = E l e m e n t . p r o t o t y p e . p o s i t i o n ; E l e m e n t . i m p l e m e n t ( { p o s i t i o n : f u n c t i o n ( g ) { i f ( g & & ( $ d e f i n e d ( g . x ) | | $ d e f i n e d ( g . y ) ) ) { r e t u r n   a ? a . a p p l y ( t h i s , a r g u m e n t s ) : t h i s ; 
 } $ e a c h ( g | | { } , f u n c t i o n ( u , t ) { i f ( ! $ d e f i n e d ( u ) ) { d e l e t e   g [ t ] ; } } ) ; g = $ m e r g e ( { r e l a t i v e T o : d o c u m e n t . b o d y , p o s i t i o n : { x : " c e n t e r " , y : " c e n t e r " } , e d g e : f a l s e , o f f s e t : { x : 0 , y : 0 } , r e t u r n P o s : f a l s e , r e l F i x e d P o s i t i o n : f a l s e , i g n o r e M a r g i n s : f a l s e , i g n o r e S c r o l l : f a l s e , a l l o w N e g a t i v e : f a l s e } , g ) ; 
 v a r   r = { x : 0 , y : 0 } , e = f a l s e ; v a r   c = t h i s . m e a s u r e ( f u n c t i o n ( ) { r e t u r n   d o c u m e n t . i d ( t h i s . g e t O f f s e t P a r e n t ( ) ) ; } ) ; i f ( c & & c ! = t h i s . g e t D o c u m e n t ( ) . b o d y ) { r = c . m e a s u r e ( f u n c t i o n ( ) { r e t u r n   t h i s . g e t P o s i t i o n ( ) ; 
 } ) ; e = c ! = d o c u m e n t . i d ( g . r e l a t i v e T o ) ; g . o f f s e t . x = g . o f f s e t . x - r . x ; g . o f f s e t . y = g . o f f s e t . y - r . y ; } v a r   s = f u n c t i o n ( t ) { i f ( $ t y p e ( t ) ! = " s t r i n g " ) { r e t u r n   t ; } t = t . t o L o w e r C a s e ( ) ; 
 v a r   u = { } ; i f ( t . t e s t ( " l e f t " ) ) { u . x = " l e f t " ; } e l s e { i f ( t . t e s t ( " r i g h t " ) ) { u . x = " r i g h t " ; } e l s e { u . x = " c e n t e r " ; } } i f ( t . t e s t ( " u p p e r " ) | | t . t e s t ( " t o p " ) ) { u . y = " t o p " ; } e l s e { i f ( t . t e s t ( " b o t t o m " ) ) { u . y = " b o t t o m " ; 
 } e l s e { u . y = " c e n t e r " ; } } r e t u r n   u ; } ; g . e d g e = s ( g . e d g e ) ; g . p o s i t i o n = s ( g . p o s i t i o n ) ; i f ( ! g . e d g e ) { i f ( g . p o s i t i o n . x = = " c e n t e r " & & g . p o s i t i o n . y = = " c e n t e r " ) { g . e d g e = { x : " c e n t e r " , y : " c e n t e r " } ; 
 } e l s e { g . e d g e = { x : " l e f t " , y : " t o p " } ; } } t h i s . s e t S t y l e ( " p o s i t i o n " , " a b s o l u t e " ) ; v a r   f = d o c u m e n t . i d ( g . r e l a t i v e T o ) | | d o c u m e n t . b o d y , d = f = = d o c u m e n t . b o d y ? w i n d o w . g e t S c r o l l ( ) : f . g e t P o s i t i o n ( ) , l = d . y , h = d . x ; 
 v a r   n = t h i s . g e t D i m e n s i o n s ( { c o m p u t e S i z e : t r u e , s t y l e s : [ " p a d d i n g " , " b o r d e r " , " m a r g i n " ] } ) ; v a r   j = { } , o = g . o f f s e t . y , q = g . o f f s e t . x , k = w i n d o w . g e t S i z e ( ) ; s w i t c h ( g . p o s i t i o n . x ) { c a s e " l e f t " : j . x = h + q ; 
 b r e a k ; c a s e " r i g h t " : j . x = h + q + f . o f f s e t W i d t h ; b r e a k ; d e f a u l t : j . x = h + ( ( f = = d o c u m e n t . b o d y ? k . x : f . o f f s e t W i d t h ) / 2 ) + q ; b r e a k ; } s w i t c h ( g . p o s i t i o n . y ) { c a s e " t o p " : j . y = l + o ; b r e a k ; 
 c a s e " b o t t o m " : j . y = l + o + f . o f f s e t H e i g h t ; b r e a k ; d e f a u l t : j . y = l + ( ( f = = d o c u m e n t . b o d y ? k . y : f . o f f s e t H e i g h t ) / 2 ) + o ; b r e a k ; } i f ( g . e d g e ) { v a r   b = { } ; s w i t c h ( g . e d g e . x ) { c a s e " l e f t " : b . x = 0 ; 
 b r e a k ; c a s e " r i g h t " : b . x = - n . x - n . c o m p u t e d R i g h t - n . c o m p u t e d L e f t ; b r e a k ; d e f a u l t : b . x = - ( n . t o t a l W i d t h / 2 ) ; b r e a k ; } s w i t c h ( g . e d g e . y ) { c a s e " t o p " : b . y = 0 ; b r e a k ; c a s e " b o t t o m " : b . y = - n . y - n . c o m p u t e d T o p - n . c o m p u t e d B o t t o m ; 
 b r e a k ; d e f a u l t : b . y = - ( n . t o t a l H e i g h t / 2 ) ; b r e a k ; } j . x + = b . x ; j . y + = b . y ; } j = { l e f t : ( ( j . x > = 0 | | e | | g . a l l o w N e g a t i v e ) ? j . x : 0 ) . t o I n t ( ) , t o p : ( ( j . y > = 0 | | e | | g . a l l o w N e g a t i v e ) ? j . y : 0 ) . t o I n t ( ) } ; 
 v a r   i = { l e f t : " x " , t o p : " y " } ; [ " m i n i m u m " , " m a x i m u m " ] . e a c h ( f u n c t i o n ( t ) { [ " l e f t " , " t o p " ] . e a c h ( f u n c t i o n ( u ) { v a r   v = g [ t ] ? g [ t ] [ i [ u ] ] : n u l l ; i f ( v ! = n u l l & & j [ u ] < v ) { j [ u ] = v ; } } ) ; 
 } ) ; i f ( f . g e t S t y l e ( " p o s i t i o n " ) = = " f i x e d " | | g . r e l F i x e d P o s i t i o n ) { v a r   m = w i n d o w . g e t S c r o l l ( ) ; j . t o p + = m . y ; j . l e f t + = m . x ; } i f ( g . i g n o r e S c r o l l ) { v a r   p = f . g e t S c r o l l ( ) ; j . t o p - = p . y ; 
 j . l e f t - = p . x ; } i f ( g . i g n o r e M a r g i n s ) { j . l e f t + = ( g . e d g e . x = = " r i g h t " ? n [ " m a r g i n - r i g h t " ] : g . e d g e . x = = " c e n t e r " ? - n [ " m a r g i n - l e f t " ] + ( ( n [ " m a r g i n - r i g h t " ] + n [ " m a r g i n - l e f t " ] ) / 2 ) : - n [ " m a r g i n - l e f t " ] ) ; 
 j . t o p + = ( g . e d g e . y = = " b o t t o m " ? n [ " m a r g i n - b o t t o m " ] : g . e d g e . y = = " c e n t e r " ? - n [ " m a r g i n - t o p " ] + ( ( n [ " m a r g i n - b o t t o m " ] + n [ " m a r g i n - t o p " ] ) / 2 ) : - n [ " m a r g i n - t o p " ] ) ; } j . l e f t = M a t h . c e i l ( j . l e f t ) ; 
 j . t o p = M a t h . c e i l ( j . t o p ) ; i f ( g . r e t u r n P o s ) { r e t u r n   j ; } e l s e { t h i s . s e t S t y l e s ( j ) ; } r e t u r n   t h i s ; } } ) ; } ) ( ) ; E l e m e n t . i m p l e m e n t ( { i s D i s p l a y e d : f u n c t i o n ( ) { r e t u r n   t h i s . g e t S t y l e ( " d i s p l a y " ) ! = " n o n e " ; 
 } , i s V i s i b l e : f u n c t i o n ( ) { v a r   a = t h i s . o f f s e t W i d t h , b = t h i s . o f f s e t H e i g h t ; r e t u r n ( a = = 0 & & b = = 0 ) ? f a l s e : ( a > 0 & & b > 0 ) ? t r u e : t h i s . i s D i s p l a y e d ( ) ; } , t o g g l e : f u n c t i o n ( ) { r e t u r n   t h i s [ t h i s . i s D i s p l a y e d ( ) ? " h i d e " : " s h o w " ] ( ) ; 
 } , h i d e : f u n c t i o n ( ) { v a r   b ; t r y { b = t h i s . g e t S t y l e ( " d i s p l a y " ) ; } c a t c h ( a ) { } r e t u r n   t h i s . s t o r e ( " o r i g i n a l D i s p l a y " , b | | " " ) . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; } , s h o w : f u n c t i o n ( a ) { a = a | | t h i s . r e t r i e v e ( " o r i g i n a l D i s p l a y " ) | | " b l o c k " ; 
 r e t u r n   t h i s . s e t S t y l e ( " d i s p l a y " , ( a = = " n o n e " ) ? " b l o c k " : a ) ; } , s w a p C l a s s : f u n c t i o n ( a , b ) { r e t u r n   t h i s . r e m o v e C l a s s ( a ) . a d d C l a s s ( b ) ; } } ) ; i f ( ! w i n d o w . F o r m ) { w i n d o w . F o r m = { } ; 
 } ( f u n c t i o n ( ) { F o r m . R e q u e s t = n e w   C l a s s ( { B i n d s : [ " o n S u b m i t " , " o n F o r m V a l i d a t e " ] , I m p l e m e n t s : [ O p t i o n s , E v e n t s , C l a s s . O c c l u d e ] , o p t i o n s : { r e q u e s t O p t i o n s : { e v a l S c r i p t s : t r u e , u s e S p i n n e r : t r u e , e m u l a t i o n : f a l s e , l i n k : " i g n o r e " } , e x t r a D a t a : { } , r e s e t F o r m : t r u e } , p r o p e r t y : " f o r m . r e q u e s t " , i n i t i a l i z e : f u n c t i o n ( b , c , a ) { t h i s . e l e m e n t = d o c u m e n t . i d ( b ) ; 
 i f ( t h i s . o c c l u d e ( ) ) { r e t u r n   t h i s . o c c l u d e d ; } t h i s . u p d a t e = d o c u m e n t . i d ( c ) ; t h i s . s e t O p t i o n s ( a ) ; t h i s . m a k e R e q u e s t ( ) ; i f ( t h i s . o p t i o n s . r e s e t F o r m ) { t h i s . r e q u e s t . a d d E v e n t ( " s u c c e s s " , f u n c t i o n ( ) { $ t r y ( f u n c t i o n ( ) { t h i s . e l e m e n t . r e s e t ( ) ; 
 } . b i n d ( t h i s ) ) ; i f ( w i n d o w . O v e r T e x t ) { O v e r T e x t . u p d a t e ( ) ; } } . b i n d ( t h i s ) ) ; } t h i s . a t t a c h ( ) ; } , t o E l e m e n t : f u n c t i o n ( ) { r e t u r n   t h i s . e l e m e n t ; } , m a k e R e q u e s t : f u n c t i o n ( ) { t h i s . r e q u e s t = n e w   R e q u e s t . H T M L ( $ m e r g e ( { u p d a t e : t h i s . u p d a t e , e m u l a t i o n : f a l s e , s p i n n e r T a r g e t : t h i s . e l e m e n t , m e t h o d : t h i s . e l e m e n t . g e t ( " m e t h o d " ) | | " p o s t " } , t h i s . o p t i o n s . r e q u e s t O p t i o n s ) ) . a d d E v e n t s ( { s u c c e s s : f u n c t i o n ( b , a ) { [ " c o m p l e t e " , " s u c c e s s " ] . e a c h ( f u n c t i o n ( c ) { t h i s . f i r e E v e n t ( c , [ t h i s . u p d a t e , b , a ] ) ; 
 } , t h i s ) ; } . b i n d ( t h i s ) , f a i l u r e : f u n c t i o n ( a ) { t h i s . f i r e E v e n t ( " c o m p l e t e " ) . f i r e E v e n t ( " f a i l u r e " , a ) ; } . b i n d ( t h i s ) , e x c e p t i o n : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " f a i l u r e " , x h r ) ; 
 } . b i n d ( t h i s ) } ) ; } , a t t a c h : f u n c t i o n ( a ) { a = $ p i c k ( a , t r u e ) ; m e t h o d = a ? " a d d E v e n t " : " r e m o v e E v e n t " ; v a r   b = t h i s . e l e m e n t . r e t r i e v e ( " v a l i d a t o r " ) ; i f ( b ) { b [ m e t h o d ] ( " o n F o r m V a l i d a t e " , t h i s . o n F o r m V a l i d a t e ) ; 
 } i f ( ! b | | ! a ) { t h i s . e l e m e n t [ m e t h o d ] ( " s u b m i t " , t h i s . o n S u b m i t ) ; } } , d e t a c h : f u n c t i o n ( ) { t h i s . a t t a c h ( f a l s e ) ; } , e n a b l e : f u n c t i o n ( ) { t h i s . a t t a c h ( ) ; } , d i s a b l e : f u n c t i o n ( ) { t h i s . d e t a c h ( ) ; 
 } , o n F o r m V a l i d a t e : f u n c t i o n ( b , a , d ) { v a r   c = t h i s . e l e m e n t . r e t r i e v e ( " v a l i d a t o r " ) ; i f ( b | | ( c & & ! c . o p t i o n s . s t o p O n F a i l u r e ) ) { i f ( d & & d . s t o p ) { d . s t o p ( ) ; } t h i s . s e n d ( ) ; } } , o n S u b m i t : f u n c t i o n ( a ) { i f ( t h i s . e l e m e n t . r e t r i e v e ( " v a l i d a t o r " ) ) { t h i s . d e t a c h ( ) ; 
 r e t u r n ; } a . s t o p ( ) ; t h i s . s e n d ( ) ; } , s e n d : f u n c t i o n ( ) { v a r   b = t h i s . e l e m e n t . t o Q u e r y S t r i n g ( ) . t r i m ( ) ; v a r   a = $ H ( t h i s . o p t i o n s . e x t r a D a t a ) . t o Q u e r y S t r i n g ( ) ; i f ( b ) { b + = " & " + a ; 
 } e l s e { b = a ; } t h i s . f i r e E v e n t ( " s e n d " , [ t h i s . e l e m e n t , b . p a r s e Q u e r y S t r i n g ( ) ] ) ; t h i s . r e q u e s t . s e n d ( { d a t a : b , u r l : t h i s . e l e m e n t . g e t ( " a c t i o n " ) } ) ; r e t u r n   t h i s ; } } ) ; E l e m e n t . P r o p e r t i e s . f o r m R e q u e s t = { s e t : f u n c t i o n ( ) { v a r   a = A r r a y . l i n k ( a r g u m e n t s , { o p t i o n s : O b j e c t . t y p e , u p d a t e : E l e m e n t . t y p e , u p d a t e I d : S t r i n g . t y p e } ) ; 
 v a r   c = a . u p d a t e | | a . u p d a t e I d ; v a r   b = t h i s . r e t r i e v e ( " f o r m . r e q u e s t " ) ; i f ( c ) { i f ( b ) { b . u p d a t e = d o c u m e n t . i d ( c ) ; } t h i s . s t o r e ( " f o r m . r e q u e s t : u p d a t e " , c ) ; } i f ( a . o p t i o n s ) { i f ( b ) { b . s e t O p t i o n s ( a . o p t i o n s ) ; 
 } t h i s . s t o r e ( " f o r m . r e q u e s t : o p t i o n s " , a . o p t i o n s ) ; } r e t u r n   t h i s ; } , g e t : f u n c t i o n ( ) { v a r   a = A r r a y . l i n k ( a r g u m e n t s , { o p t i o n s : O b j e c t . t y p e , u p d a t e : E l e m e n t . t y p e , u p d a t e I d : S t r i n g . t y p e } ) ; 
 v a r   b = a . u p d a t e | | a . u p d a t e I d ; i f ( a . o p t i o n s | | b | | ! t h i s . r e t r i e v e ( " f o r m . r e q u e s t " ) ) { i f ( a . o p t i o n s | | ! t h i s . r e t r i e v e ( " f o r m . r e q u e s t : o p t i o n s " ) ) { t h i s . s e t ( " f o r m . r e q u e s t " , a . o p t i o n s ) ; 
 } i f ( b ) { t h i s . s e t ( " f o r m . r e q u e s t " , b ) ; } t h i s . s t o r e ( " f o r m . r e q u e s t " , n e w   F o r m . R e q u e s t ( t h i s , t h i s . r e t r i e v e ( " f o r m . r e q u e s t : u p d a t e " ) , t h i s . r e t r i e v e ( " f o r m . r e q u e s t : o p t i o n s " ) ) ) ; 
 } r e t u r n   t h i s . r e t r i e v e ( " f o r m . r e q u e s t " ) ; } } ; E l e m e n t . i m p l e m e n t ( { f o r m U p d a t e : f u n c t i o n ( b , a ) { t h i s . g e t ( " f o r m . r e q u e s t " , b , a ) . s e n d ( ) ; r e t u r n   t h i s ; } } ) ; } ) ( ) ; i f ( ! w i n d o w . F o r m ) { w i n d o w . F o r m = { } ; 
 } v a r   I n p u t V a l i d a t o r = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s ] , o p t i o n s : { e r r o r M s g : " V a l i d a t i o n   f a i l e d . " , t e s t : f u n c t i o n ( a ) { r e t u r n   t r u e ; } } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . s e t O p t i o n s ( a ) ; 
 t h i s . c l a s s N a m e = b ; } , t e s t : f u n c t i o n ( b , a ) { i f ( d o c u m e n t . i d ( b ) ) { r e t u r n   t h i s . o p t i o n s . t e s t ( d o c u m e n t . i d ( b ) , a | | t h i s . g e t P r o p s ( b ) ) ; } e l s e { r e t u r n   f a l s e ; } } , g e t E r r o r : f u n c t i o n ( c , a ) { v a r   b = t h i s . o p t i o n s . e r r o r M s g ; 
 i f ( $ t y p e ( b ) = = " f u n c t i o n " ) { b = b ( d o c u m e n t . i d ( c ) , a | | t h i s . g e t P r o p s ( c ) ) ; } r e t u r n   b ; } , g e t P r o p s : f u n c t i o n ( a ) { i f ( ! d o c u m e n t . i d ( a ) ) { r e t u r n { } ; } r e t u r n   a . g e t ( " v a l i d a t o r P r o p s " ) ; 
 } } ) ; E l e m e n t . P r o p e r t i e s . v a l i d a t o r P r o p s = { s e t : f u n c t i o n ( a ) { r e t u r n   t h i s . e l i m i n a t e ( " v a l i d a t o r P r o p s " ) . s t o r e ( " v a l i d a t o r P r o p s " , a ) ; } , g e t : f u n c t i o n ( a ) { i f ( a ) { t h i s . s e t ( a ) ; 
 } i f ( t h i s . r e t r i e v e ( " v a l i d a t o r P r o p s " ) ) { r e t u r n   t h i s . r e t r i e v e ( " v a l i d a t o r P r o p s " ) ; } i f ( t h i s . g e t P r o p e r t y ( " v a l i d a t o r P r o p s " ) ) { t r y { t h i s . s t o r e ( " v a l i d a t o r P r o p s " , J S O N . d e c o d e ( t h i s . g e t P r o p e r t y ( " v a l i d a t o r P r o p s " ) ) ) ; 
 } c a t c h ( c ) { r e t u r n { } ; } } e l s e { v a r   b = t h i s . g e t ( " c l a s s " ) . s p l i t ( "   " ) . f i l t e r ( f u n c t i o n ( d ) { r e t u r n   d . t e s t ( " : " ) ; } ) ; i f ( ! b . l e n g t h ) { t h i s . s t o r e ( " v a l i d a t o r P r o p s " , { } ) ; } e l s e { a = { } ; 
 b . e a c h ( f u n c t i o n ( d ) { v a r   f = d . s p l i t ( " : " ) ; i f ( f [ 1 ] ) { t r y { a [ f [ 0 ] ] = J S O N . d e c o d e ( f [ 1 ] ) ; } c a t c h ( g ) { } } } ) ; t h i s . s t o r e ( " v a l i d a t o r P r o p s " , a ) ; } } r e t u r n   t h i s . r e t r i e v e ( " v a l i d a t o r P r o p s " ) ; 
 } } ; F o r m . V a l i d a t o r = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s , E v e n t s ] , B i n d s : [ " o n S u b m i t " ] , o p t i o n s : { f i e l d S e l e c t o r s : " i n p u t ,   s e l e c t ,   t e x t a r e a " , i g n o r e H i d d e n : t r u e , i g n o r e D i s a b l e d : t r u e , u s e T i t l e s : f a l s e , e v a l u a t e O n S u b m i t : t r u e , e v a l u a t e F i e l d s O n B l u r : t r u e , e v a l u a t e F i e l d s O n C h a n g e : t r u e , s e r i a l : t r u e , s t o p O n F a i l u r e : t r u e , w a r n i n g P r e f i x : f u n c t i o n ( ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " w a r n i n g P r e f i x " ) | | " W a r n i n g :   " ; 
 } , e r r o r P r e f i x : f u n c t i o n ( ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " e r r o r P r e f i x " ) | | " E r r o r :   " ; } } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . s e t O p t i o n s ( a ) ; t h i s . e l e m e n t = d o c u m e n t . i d ( b ) ; 
 t h i s . e l e m e n t . s t o r e ( " v a l i d a t o r " , t h i s ) ; t h i s . w a r n i n g P r e f i x = $ l a m b d a ( t h i s . o p t i o n s . w a r n i n g P r e f i x ) ( ) ; t h i s . e r r o r P r e f i x = $ l a m b d a ( t h i s . o p t i o n s . e r r o r P r e f i x ) ( ) ; i f ( t h i s . o p t i o n s . e v a l u a t e O n S u b m i t ) { t h i s . e l e m e n t . a d d E v e n t ( " s u b m i t " , t h i s . o n S u b m i t ) ; 
 } i f ( t h i s . o p t i o n s . e v a l u a t e F i e l d s O n B l u r | | t h i s . o p t i o n s . e v a l u a t e F i e l d s O n C h a n g e ) { t h i s . w a t c h F i e l d s ( t h i s . g e t F i e l d s ( ) ) ; } } , t o E l e m e n t : f u n c t i o n ( ) { r e t u r n   t h i s . e l e m e n t ; 
 } , g e t F i e l d s : f u n c t i o n ( ) { r e t u r n ( t h i s . f i e l d s = t h i s . e l e m e n t . g e t E l e m e n t s ( t h i s . o p t i o n s . f i e l d S e l e c t o r s ) ) ; } , w a t c h F i e l d s : f u n c t i o n ( a ) { a . e a c h ( f u n c t i o n ( b ) { i f ( t h i s . o p t i o n s . e v a l u a t e F i e l d s O n B l u r ) { b . a d d E v e n t ( " b l u r " , t h i s . v a l i d a t i o n M o n i t o r . p a s s ( [ b , f a l s e ] , t h i s ) ) ; 
 } i f ( t h i s . o p t i o n s . e v a l u a t e F i e l d s O n C h a n g e ) { b . a d d E v e n t ( " c h a n g e " , t h i s . v a l i d a t i o n M o n i t o r . p a s s ( [ b , t r u e ] , t h i s ) ) ; } } , t h i s ) ; } , v a l i d a t i o n M o n i t o r : f u n c t i o n ( ) { $ c l e a r ( t h i s . t i m e r ) ; 
 t h i s . t i m e r = t h i s . v a l i d a t e F i e l d . d e l a y ( 5 0 , t h i s , a r g u m e n t s ) ; } , o n S u b m i t : f u n c t i o n ( a ) { i f ( ! t h i s . v a l i d a t e ( a ) & & a ) { a . p r e v e n t D e f a u l t ( ) ; } e l s e { t h i s . r e s e t ( ) ; } } , r e s e t : f u n c t i o n ( ) { t h i s . g e t F i e l d s ( ) . e a c h ( t h i s . r e s e t F i e l d , t h i s ) ; 
 r e t u r n   t h i s ; } , v a l i d a t e : f u n c t i o n ( b ) { v a r   a = t h i s . g e t F i e l d s ( ) . m a p ( f u n c t i o n ( c ) { r e t u r n   t h i s . v a l i d a t e F i e l d ( c , t r u e ) ; } , t h i s ) . e v e r y ( f u n c t i o n ( c ) { r e t u r n   c ; } ) ; t h i s . f i r e E v e n t ( " f o r m V a l i d a t e " , [ a , t h i s . e l e m e n t , b ] ) ; 
 i f ( t h i s . o p t i o n s . s t o p O n F a i l u r e & & ! a & & b ) { b . p r e v e n t D e f a u l t ( ) ; } r e t u r n   a ; } , v a l i d a t e F i e l d : f u n c t i o n ( i , a ) { i f ( t h i s . p a u s e d ) { r e t u r n   t r u e ; } i = d o c u m e n t . i d ( i ) ; v a r   d = ! i . h a s C l a s s ( " v a l i d a t i o n - f a i l e d " ) ; 
 v a r   f , h ; i f ( t h i s . o p t i o n s . s e r i a l & & ! a ) { f = t h i s . e l e m e n t . g e t E l e m e n t ( " . v a l i d a t i o n - f a i l e d " ) ; h = t h i s . e l e m e n t . g e t E l e m e n t ( " . w a r n i n g " ) ; } i f ( i & & ( ! f | | a | | i . h a s C l a s s ( " v a l i d a t i o n - f a i l e d " ) | | ( f & & ! t h i s . o p t i o n s . s e r i a l ) ) ) { v a r   c = i . c l a s s N a m e . s p l i t ( "   " ) . s o m e ( f u n c t i o n ( j ) { r e t u r n   t h i s . g e t V a l i d a t o r ( j ) ; 
 } , t h i s ) ; v a r   g = [ ] ; i . c l a s s N a m e . s p l i t ( "   " ) . e a c h ( f u n c t i o n ( j ) { i f ( j & & ! t h i s . t e s t ( j , i ) ) { g . i n c l u d e ( j ) ; } } , t h i s ) ; d = g . l e n g t h = = = 0 ; i f ( c & & ! i . h a s C l a s s ( " w a r n O n l y " ) ) { i f ( d ) { i . a d d C l a s s ( " v a l i d a t i o n - p a s s e d " ) . r e m o v e C l a s s ( " v a l i d a t i o n - f a i l e d " ) ; 
 t h i s . f i r e E v e n t ( " e l e m e n t P a s s " , i ) ; } e l s e { i . a d d C l a s s ( " v a l i d a t i o n - f a i l e d " ) . r e m o v e C l a s s ( " v a l i d a t i o n - p a s s e d " ) ; t h i s . f i r e E v e n t ( " e l e m e n t F a i l " , [ i , g ] ) ; } } i f ( ! h ) { v a r   e = i . c l a s s N a m e . s p l i t ( "   " ) . s o m e ( f u n c t i o n ( j ) { i f ( j . t e s t ( " ^ w a r n - " ) | | i . h a s C l a s s ( " w a r n O n l y " ) ) { r e t u r n   t h i s . g e t V a l i d a t o r ( j . r e p l a c e ( / ^ w a r n - / , " " ) ) ; 
 } e l s e { r e t u r n   n u l l ; } } , t h i s ) ; i . r e m o v e C l a s s ( " w a r n i n g " ) ; v a r   b = i . c l a s s N a m e . s p l i t ( "   " ) . m a p ( f u n c t i o n ( j ) { i f ( j . t e s t ( " ^ w a r n - " ) | | i . h a s C l a s s ( " w a r n O n l y " ) ) { r e t u r n   t h i s . t e s t ( j . r e p l a c e ( / ^ w a r n - / , " " ) , i , t r u e ) ; 
 } e l s e { r e t u r n   n u l l ; } } , t h i s ) ; } } r e t u r n   d ; } , t e s t : f u n c t i o n ( b , d , e ) { d = d o c u m e n t . i d ( d ) ; i f ( ( t h i s . o p t i o n s . i g n o r e H i d d e n & & ! d . i s V i s i b l e ( ) ) | | ( t h i s . o p t i o n s . i g n o r e D i s a b l e d & & d . g e t ( " d i s a b l e d " ) ) ) { r e t u r n   t r u e ; 
 } v a r   a = t h i s . g e t V a l i d a t o r ( b ) ; i f ( d . h a s C l a s s ( " i g n o r e V a l i d a t i o n " ) ) { r e t u r n   t r u e ; } e = $ p i c k ( e , f a l s e ) ; i f ( d . h a s C l a s s ( " w a r n O n l y " ) ) { e = t r u e ; } v a r   c = a ? a . t e s t ( d ) : t r u e ; 
 i f ( a & & d . i s V i s i b l e ( ) ) { t h i s . f i r e E v e n t ( " e l e m e n t V a l i d a t e " , [ c , d , b , e ] ) ; } i f ( e ) { r e t u r n   t r u e ; } r e t u r n   c ; } , r e s e t F i e l d : f u n c t i o n ( a ) { a = d o c u m e n t . i d ( a ) ; i f ( a ) { a . c l a s s N a m e . s p l i t ( "   " ) . e a c h ( f u n c t i o n ( b ) { i f ( b . t e s t ( " ^ w a r n - " ) ) { b = b . r e p l a c e ( / ^ w a r n - / , " " ) ; 
 } a . r e m o v e C l a s s ( " v a l i d a t i o n - f a i l e d " ) ; a . r e m o v e C l a s s ( " w a r n i n g " ) ; a . r e m o v e C l a s s ( " v a l i d a t i o n - p a s s e d " ) ; } , t h i s ) ; } r e t u r n   t h i s ; } , s t o p : f u n c t i o n ( ) { t h i s . p a u s e d = t r u e ; 
 r e t u r n   t h i s ; } , s t a r t : f u n c t i o n ( ) { t h i s . p a u s e d = f a l s e ; r e t u r n   t h i s ; } , i g n o r e F i e l d : f u n c t i o n ( a , b ) { a = d o c u m e n t . i d ( a ) ; i f ( a ) { t h i s . e n f o r c e F i e l d ( a ) ; i f ( b ) { a . a d d C l a s s ( " w a r n O n l y " ) ; 
 } e l s e { a . a d d C l a s s ( " i g n o r e V a l i d a t i o n " ) ; } } r e t u r n   t h i s ; } , e n f o r c e F i e l d : f u n c t i o n ( a ) { a = d o c u m e n t . i d ( a ) ; i f ( a ) { a . r e m o v e C l a s s ( " w a r n O n l y " ) . r e m o v e C l a s s ( " i g n o r e V a l i d a t i o n " ) ; 
 } r e t u r n   t h i s ; } } ) ; F o r m . V a l i d a t o r . g e t M s g = f u n c t i o n ( a ) { r e t u r n   M o o T o o l s . l a n g . g e t ( " F o r m . V a l i d a t o r " , a ) ; } ; F o r m . V a l i d a t o r . a d d e r s = { v a l i d a t o r s : { } , a d d : f u n c t i o n ( b , a ) { t h i s . v a l i d a t o r s [ b ] = n e w   I n p u t V a l i d a t o r ( b , a ) ; 
 i f ( ! t h i s . i n i t i a l i z e ) { t h i s . i m p l e m e n t ( { v a l i d a t o r s : t h i s . v a l i d a t o r s } ) ; } } , a d d A l l T h e s e : f u n c t i o n ( a ) { $ A ( a ) . e a c h ( f u n c t i o n ( b ) { t h i s . a d d ( b [ 0 ] , b [ 1 ] ) ; } , t h i s ) ; } , g e t V a l i d a t o r : f u n c t i o n ( a ) { r e t u r n   t h i s . v a l i d a t o r s [ a . s p l i t ( " : " ) [ 0 ] ] ; 
 } } ; $ e x t e n d ( F o r m . V a l i d a t o r , F o r m . V a l i d a t o r . a d d e r s ) ; F o r m . V a l i d a t o r . i m p l e m e n t ( F o r m . V a l i d a t o r . a d d e r s ) ; F o r m . V a l i d a t o r . a d d ( " I s E m p t y " , { e r r o r M s g : f a l s e , t e s t : f u n c t i o n ( a ) { i f ( a . t y p e = = " s e l e c t - o n e " | | a . t y p e = = " s e l e c t " ) { r e t u r n   ! ( a . s e l e c t e d I n d e x > = 0 & & a . o p t i o n s [ a . s e l e c t e d I n d e x ] . v a l u e ! = " " ) ; 
 } e l s e { r e t u r n ( ( a . g e t ( " v a l u e " ) = = n u l l ) | | ( a . g e t ( " v a l u e " ) . l e n g t h = = 0 ) ) ; } } } ) ; F o r m . V a l i d a t o r . a d d A l l T h e s e ( [ [ " r e q u i r e d " , { e r r o r M s g : f u n c t i o n ( ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " r e q u i r e d " ) ; 
 } , t e s t : f u n c t i o n ( a ) { r e t u r n   ! F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) ; } } ] , [ " m i n L e n g t h " , { e r r o r M s g : f u n c t i o n ( a , b ) { i f ( $ t y p e ( b . m i n L e n g t h ) ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " m i n L e n g t h " ) . s u b s t i t u t e ( { m i n L e n g t h : b . m i n L e n g t h , l e n g t h : a . g e t ( " v a l u e " ) . l e n g t h } ) ; 
 } e l s e { r e t u r n " " ; } } , t e s t : f u n c t i o n ( a , b ) { i f ( $ t y p e ( b . m i n L e n g t h ) ) { r e t u r n ( a . g e t ( " v a l u e " ) . l e n g t h > = $ p i c k ( b . m i n L e n g t h , 0 ) ) ; } e l s e { r e t u r n   t r u e ; } } } ] , [ " m a x L e n g t h " , { e r r o r M s g : f u n c t i o n ( a , b ) { i f ( $ t y p e ( b . m a x L e n g t h ) ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " m a x L e n g t h " ) . s u b s t i t u t e ( { m a x L e n g t h : b . m a x L e n g t h , l e n g t h : a . g e t ( " v a l u e " ) . l e n g t h } ) ; 
 } e l s e { r e t u r n " " ; } } , t e s t : f u n c t i o n ( a , b ) { r e t u r n ( a . g e t ( " v a l u e " ) . l e n g t h < = $ p i c k ( b . m a x L e n g t h , 1 0 0 0 0 ) ) ; } } ] , [ " v a l i d a t e - i n t e g e r " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " i n t e g e r " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ ( - ? [ 1 - 9 ] \ d * | 0 ) $ / ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - n u m e r i c " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " n u m e r i c " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ - ? ( ? : 0 $ 0 ( ? = \ d * \ . ) | [ 1 - 9 ] | 0 ) \ d * ( \ . \ d + ) ? $ / ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - d i g i t s " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " d i g i t s " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ [ \ d ( )   . : \ - \ + # ] + $ / . t e s t ( a . g e t ( " v a l u e " ) ) ) ; 
 } } ] , [ " v a l i d a t e - a l p h a " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " a l p h a " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ [ a - z A - Z ] + $ / ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - a l p h a n u m " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " a l p h a n u m " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ! ( / \ W / ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - d a t e " , { e r r o r M s g : f u n c t i o n ( a , b ) { i f ( D a t e . p a r s e ) { v a r   c = b . d a t e F o r m a t | | " % x " ; r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " d a t e S u c h A s " ) . s u b s t i t u t e ( { d a t e : n e w   D a t e ( ) . f o r m a t ( c ) } ) ; 
 } e l s e { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " d a t e I n F o r m a t M D Y " ) ; } } , t e s t : f u n c t i o n ( a , b ) { i f ( F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) ) { r e t u r n   t r u e ; } v a r   g ; i f ( D a t e . p a r s e ) { v a r   f = b . d a t e F o r m a t | | " % x " ; 
 g = D a t e . p a r s e ( a . g e t ( " v a l u e " ) ) ; v a r   e = g . f o r m a t ( f ) ; i f ( e ! = " i n v a l i d   d a t e " ) { a . s e t ( " v a l u e " , e ) ; } r e t u r n   ! i s N a N ( g ) ; } e l s e { v a r   c = / ^ ( \ d { 2 } ) \ / ( \ d { 2 } ) \ / ( \ d { 4 } ) $ / ; i f ( ! c . t e s t ( a . g e t ( " v a l u e " ) ) ) { r e t u r n   f a l s e ; 
 } g = n e w   D a t e ( a . g e t ( " v a l u e " ) . r e p l a c e ( c , " $ 1 / $ 2 / $ 3 " ) ) ; r e t u r n ( p a r s e I n t ( R e g E x p . $ 1 , 1 0 ) = = ( 1 + g . g e t M o n t h ( ) ) ) & & ( p a r s e I n t ( R e g E x p . $ 2 , 1 0 ) = = g . g e t D a t e ( ) ) & & ( p a r s e I n t ( R e g E x p . $ 3 , 1 0 ) = = g . g e t F u l l Y e a r ( ) ) ; 
 } } } ] , [ " v a l i d a t e - e m a i l " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " e m a i l " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ [ A - Z 0 - 9 . _ % + - ] + @ [ A - Z 0 - 9 . - ] + \ . [ A - Z ] { 2 , 4 } $ / i ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - u r l " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " u r l " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ ( h t t p s ? | f t p | r m t p | m m s ) : \ / \ / ( ( [ A - Z 0 - 9 ] [ A - Z 0 - 9 _ - ] * ) ( \ . [ A - Z 0 - 9 ] [ A - Z 0 - 9 _ - ] * ) + ) ( : ( \ d + ) ) ? \ / ? / i ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - c u r r e n c y - d o l l a r " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " c u r r e n c y D o l l a r " ) , t e s t : f u n c t i o n ( a ) { r e t u r n   F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( a ) | | ( / ^ \ $ ? \ - ? ( [ 1 - 9 ] { 1 } [ 0 - 9 ] { 0 , 2 } ( \ , [ 0 - 9 ] { 3 } ) * ( \ . [ 0 - 9 ] { 0 , 2 } ) ? | [ 1 - 9 ] { 1 } \ d * ( \ . [ 0 - 9 ] { 0 , 2 } ) ? | 0 ( \ . [ 0 - 9 ] { 0 , 2 } ) ? | ( \ . [ 0 - 9 ] { 1 , 2 } ) ? ) $ / ) . t e s t ( a . g e t ( " v a l u e " ) ) ; 
 } } ] , [ " v a l i d a t e - o n e - r e q u i r e d " , { e r r o r M s g : F o r m . V a l i d a t o r . g e t M s g . p a s s ( " o n e R e q u i r e d " ) , t e s t : f u n c t i o n ( a , b ) { v a r   c = d o c u m e n t . i d ( b [ " v a l i d a t e - o n e - r e q u i r e d " ] ) | | a . g e t P a r e n t ( ) ; 
 r e t u r n   c . g e t E l e m e n t s ( " i n p u t " ) . s o m e ( f u n c t i o n ( d ) { i f ( [ " c h e c k b o x " , " r a d i o " ] . c o n t a i n s ( d . g e t ( " t y p e " ) ) ) { r e t u r n   d . g e t ( " c h e c k e d " ) ; } r e t u r n   d . g e t ( " v a l u e " ) ; } ) ; } } ] ] ) ; 
 E l e m e n t . P r o p e r t i e s . v a l i d a t o r = { s e t : f u n c t i o n ( a ) { v a r   b = t h i s . r e t r i e v e ( " v a l i d a t o r " ) ; i f ( b ) { b . s e t O p t i o n s ( a ) ; } r e t u r n   t h i s . s t o r e ( " v a l i d a t o r : o p t i o n s " ) ; } , g e t : f u n c t i o n ( a ) { i f ( a | | ! t h i s . r e t r i e v e ( " v a l i d a t o r " ) ) { i f ( a | | ! t h i s . r e t r i e v e ( " v a l i d a t o r : o p t i o n s " ) ) { t h i s . s e t ( " v a l i d a t o r " , a ) ; 
 } t h i s . s t o r e ( " v a l i d a t o r " , n e w   F o r m . V a l i d a t o r ( t h i s , t h i s . r e t r i e v e ( " v a l i d a t o r : o p t i o n s " ) ) ) ; } r e t u r n   t h i s . r e t r i e v e ( " v a l i d a t o r " ) ; } } ; E l e m e n t . i m p l e m e n t ( { v a l i d a t e : f u n c t i o n ( a ) { t h i s . s e t ( " v a l i d a t o r " , a ) ; 
 r e t u r n   t h i s . g e t ( " v a l i d a t o r " , a ) . v a l i d a t e ( ) ; } } ) ; v a r   F o r m V a l i d a t o r = F o r m . V a l i d a t o r ; F o r m . V a l i d a t o r . I n l i n e = n e w   C l a s s ( { E x t e n d s : F o r m . V a l i d a t o r , o p t i o n s : { s c r o l l T o E r r o r s O n S u b m i t : t r u e , s c r o l l F x O p t i o n s : { t r a n s i t i o n : " q u a d : o u t " , o f f s e t : { y : - 2 0 } } } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . p a r e n t ( b , a ) ; 
 t h i s . a d d E v e n t ( " o n E l e m e n t V a l i d a t e " , f u n c t i o n ( g , f , e , h ) { v a r   d = t h i s . g e t V a l i d a t o r ( e ) ; i f ( ! g & & d . g e t E r r o r ( f ) ) { i f ( h ) { f . a d d C l a s s ( " w a r n i n g " ) ; } v a r   c = t h i s . m a k e A d v i c e ( e , f , d . g e t E r r o r ( f ) , h ) ; 
 t h i s . i n s e r t A d v i c e ( c , f ) ; t h i s . s h o w A d v i c e ( e , f ) ; } e l s e { t h i s . h i d e A d v i c e ( e , f ) ; } } ) ; } , m a k e A d v i c e : f u n c t i o n ( d , f , c , g ) { v a r   e = ( g ) ? t h i s . w a r n i n g P r e f i x : t h i s . e r r o r P r e f i x ; 
 e + = ( t h i s . o p t i o n s . u s e T i t l e s ) ? f . t i t l e | | c : c ; v a r   a = ( g ) ? " w a r n i n g - a d v i c e " : " v a l i d a t i o n - a d v i c e " ; v a r   b = t h i s . g e t A d v i c e ( d , f ) ; i f ( b ) { b = b . s e t ( " h t m l " , e ) ; } e l s e { b = n e w   E l e m e n t ( " d i v " , { h t m l : e , s t y l e s : { d i s p l a y : " n o n e " } , i d : " a d v i c e - " + d + " - " + t h i s . g e t F i e l d I d ( f ) } ) . a d d C l a s s ( a ) ; 
 } f . s t o r e ( " a d v i c e - " + d , b ) ; r e t u r n   b ; } , g e t F i e l d I d : f u n c t i o n ( a ) { r e t u r n   a . i d ? a . i d : a . i d = " i n p u t _ " + a . n a m e ; } , s h o w A d v i c e : f u n c t i o n ( b , c ) { v a r   a = t h i s . g e t A d v i c e ( b , c ) ; i f ( a & & ! c . r e t r i e v e ( t h i s . g e t P r o p N a m e ( b ) ) & & ( a . g e t S t y l e ( " d i s p l a y " ) = = " n o n e " | | a . g e t S t y l e ( " v i s i b l i t y " ) = = " h i d d e n " | | a . g e t S t y l e ( " o p a c i t y " ) = = 0 ) ) { c . s t o r e ( t h i s . g e t P r o p N a m e ( b ) , t r u e ) ; 
 i f ( a . r e v e a l ) { a . r e v e a l ( ) ; } e l s e { a . s e t S t y l e ( " d i s p l a y " , " b l o c k " ) ; } } } , h i d e A d v i c e : f u n c t i o n ( b , c ) { v a r   a = t h i s . g e t A d v i c e ( b , c ) ; i f ( a & & c . r e t r i e v e ( t h i s . g e t P r o p N a m e ( b ) ) ) { c . s t o r e ( t h i s . g e t P r o p N a m e ( b ) , f a l s e ) ; 
 i f ( a . d i s s o l v e ) { a . d i s s o l v e ( ) ; } e l s e { a . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; } } } , g e t P r o p N a m e : f u n c t i o n ( a ) { r e t u r n " a d v i c e " + a ; } , r e s e t F i e l d : f u n c t i o n ( a ) { a = d o c u m e n t . i d ( a ) ; i f ( ! a ) { r e t u r n   t h i s ; 
 } t h i s . p a r e n t ( a ) ; a . c l a s s N a m e . s p l i t ( "   " ) . e a c h ( f u n c t i o n ( b ) { t h i s . h i d e A d v i c e ( b , a ) ; } , t h i s ) ; r e t u r n   t h i s ; } , g e t A l l A d v i c e M e s s a g e s : f u n c t i o n ( d , c ) { v a r   b = [ ] ; i f ( d . h a s C l a s s ( " i g n o r e V a l i d a t i o n " ) & & ! c ) { r e t u r n   b ; 
 } v a r   a = d . c l a s s N a m e . s p l i t ( "   " ) . s o m e ( f u n c t i o n ( g ) { v a r   e = g . t e s t ( " ^ w a r n - " ) | | d . h a s C l a s s ( " w a r n O n l y " ) ; i f ( e ) { g = g . r e p l a c e ( / ^ w a r n - / , " " ) ; } v a r   f = t h i s . g e t V a l i d a t o r ( g ) ; 
 i f ( ! f ) { r e t u r n ; } b . p u s h ( { m e s s a g e : f . g e t E r r o r ( d ) , w a r n O n l y : e , p a s s e d : f . t e s t ( ) , v a l i d a t o r : f } ) ; } , t h i s ) ; r e t u r n   b ; } , g e t A d v i c e : f u n c t i o n ( a , b ) { r e t u r n   b . r e t r i e v e ( " a d v i c e - " + a ) ; 
 } , i n s e r t A d v i c e : f u n c t i o n ( a , c ) { v a r   b = c . g e t ( " v a l i d a t o r P r o p s " ) ; i f ( ! b . m s g P o s | | ! d o c u m e n t . i d ( b . m s g P o s ) ) { i f ( c . t y p e . t o L o w e r C a s e ( ) = = " r a d i o " ) { c . g e t P a r e n t ( ) . a d o p t ( a ) ; 
 } e l s e { a . i n j e c t ( d o c u m e n t . i d ( c ) , " a f t e r " ) ; } } e l s e { d o c u m e n t . i d ( b . m s g P o s ) . g r a b ( a ) ; } } , v a l i d a t e F i e l d : f u n c t i o n ( f , e ) { v a r   a = t h i s . p a r e n t ( f , e ) ; i f ( t h i s . o p t i o n s . s c r o l l T o E r r o r s O n S u b m i t & & ! a ) { v a r   b = d o c u m e n t . i d ( t h i s ) . g e t E l e m e n t ( " . v a l i d a t i o n - f a i l e d " ) ; 
 v a r   c = d o c u m e n t . i d ( t h i s ) . g e t P a r e n t ( ) ; w h i l e ( c ! = d o c u m e n t . b o d y & & c . g e t S c r o l l S i z e ( ) . y = = c . g e t S i z e ( ) . y ) { c = c . g e t P a r e n t ( ) ; } v a r   d = c . r e t r i e v e ( " f v S c r o l l e r " ) ; i f ( ! d & & w i n d o w . F x & & F x . S c r o l l ) { d = n e w   F x . S c r o l l ( c , t h i s . o p t i o n s . s c r o l l F x O p t i o n s ) ; 
 c . s t o r e ( " f v S c r o l l e r " , d ) ; } i f ( b ) { i f ( d ) { d . t o E l e m e n t ( b ) ; } e l s e { c . s c r o l l T o ( c . g e t S c r o l l ( ) . x , b . g e t P o s i t i o n ( c ) . y - 2 0 ) ; } } } r e t u r n   a ; } } ) ; F o r m . V a l i d a t o r . a d d A l l T h e s e ( [ [ " v a l i d a t e - e n f o r c e - o n c h e c k " , { t e s t : f u n c t i o n ( a , b ) { i f ( a . c h e c k e d ) { v a r   c = a . g e t P a r e n t ( " f o r m " ) . r e t r i e v e ( " v a l i d a t o r " ) ; 
 i f ( ! c ) { r e t u r n   t r u e ; } ( b . t o E n f o r c e | | d o c u m e n t . i d ( b . e n f o r c e C h i l d r e n O f ) . g e t E l e m e n t s ( " i n p u t ,   s e l e c t ,   t e x t a r e a " ) ) . m a p ( f u n c t i o n ( d ) { c . e n f o r c e F i e l d ( d ) ; } ) ; } r e t u r n   t r u e ; 
 } } ] , [ " v a l i d a t e - i g n o r e - o n c h e c k " , { t e s t : f u n c t i o n ( a , b ) { i f ( a . c h e c k e d ) { v a r   c = a . g e t P a r e n t ( " f o r m " ) . r e t r i e v e ( " v a l i d a t o r " ) ; i f ( ! c ) { r e t u r n   t r u e ; } ( b . t o I g n o r e | | d o c u m e n t . i d ( b . i g n o r e C h i l d r e n O f ) . g e t E l e m e n t s ( " i n p u t ,   s e l e c t ,   t e x t a r e a " ) ) . e a c h ( f u n c t i o n ( d ) { c . i g n o r e F i e l d ( d ) ; 
 c . r e s e t F i e l d ( d ) ; } ) ; } r e t u r n   t r u e ; } } ] , [ " v a l i d a t e - n o s p a c e " , { e r r o r M s g : f u n c t i o n ( ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " n o S p a c e " ) ; } , t e s t : f u n c t i o n ( a , b ) { r e t u r n   ! a . g e t ( " v a l u e " ) . t e s t ( / \ s / ) ; 
 } } ] , [ " v a l i d a t e - t o g g l e - o n c h e c k " , { t e s t : f u n c t i o n ( b , c ) { v a r   d = b . g e t P a r e n t ( " f o r m " ) . r e t r i e v e ( " v a l i d a t o r " ) ; i f ( ! d ) { r e t u r n   t r u e ; } v a r   a = c . t o T o g g l e | | d o c u m e n t . i d ( c . t o T o g g l e C h i l d r e n O f ) . g e t E l e m e n t s ( " i n p u t ,   s e l e c t ,   t e x t a r e a " ) ; 
 i f ( ! b . c h e c k e d ) { a . e a c h ( f u n c t i o n ( e ) { d . i g n o r e F i e l d ( e ) ; d . r e s e t F i e l d ( e ) ; } ) ; } e l s e { a . e a c h ( f u n c t i o n ( e ) { d . e n f o r c e F i e l d ( e ) ; } ) ; } r e t u r n   t r u e ; } } ] , [ " v a l i d a t e - r e q c h k - b y n o d e " , { e r r o r M s g : f u n c t i o n ( ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " r e q C h k B y N o d e " ) ; 
 } , t e s t : f u n c t i o n ( a , b ) { r e t u r n ( d o c u m e n t . i d ( b . n o d e I d ) . g e t E l e m e n t s ( b . s e l e c t o r | | " i n p u t [ t y p e = c h e c k b o x ] ,   i n p u t [ t y p e = r a d i o ] " ) ) . s o m e ( f u n c t i o n ( c ) { r e t u r n   c . c h e c k e d ; 
 } ) ; } } ] , [ " v a l i d a t e - r e q u i r e d - c h e c k " , { e r r o r M s g : f u n c t i o n ( a , b ) { r e t u r n   b . u s e T i t l e ? a . g e t ( " t i t l e " ) : F o r m . V a l i d a t o r . g e t M s g ( " r e q u i r e d C h k " ) ; } , t e s t : f u n c t i o n ( a , b ) { r e t u r n   ! ! a . c h e c k e d ; 
 } } ] , [ " v a l i d a t e - r e q c h k - b y n a m e " , { e r r o r M s g : f u n c t i o n ( a , b ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " r e q C h k B y N a m e " ) . s u b s t i t u t e ( { l a b e l : b . l a b e l | | a . g e t ( " t y p e " ) } ) ; } , t e s t : f u n c t i o n ( b , d ) { v a r   c = d . g r o u p N a m e | | b . g e t ( " n a m e " ) ; 
 v a r   a = $ $ ( d o c u m e n t . g e t E l e m e n t s B y N a m e ( c ) ) . s o m e ( f u n c t i o n ( g , f ) { r e t u r n   g . c h e c k e d ; } ) ; v a r   e = b . g e t P a r e n t ( " f o r m " ) . r e t r i e v e ( " v a l i d a t o r " ) ; i f ( a & & e ) { e . r e s e t F i e l d ( b ) ; 
 } r e t u r n   a ; } } ] , [ " v a l i d a t e - m a t c h " , { e r r o r M s g : f u n c t i o n ( a , b ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " m a t c h " ) . s u b s t i t u t e ( { m a t c h N a m e : b . m a t c h N a m e | | d o c u m e n t . i d ( b . m a t c h I n p u t ) . g e t ( " n a m e " ) } ) ; 
 } , t e s t : f u n c t i o n ( b , c ) { v a r   d = b . g e t ( " v a l u e " ) ; v a r   a = d o c u m e n t . i d ( c . m a t c h I n p u t ) & & d o c u m e n t . i d ( c . m a t c h I n p u t ) . g e t ( " v a l u e " ) ; r e t u r n   d & & a ? d = = a : t r u e ; } } ] , [ " v a l i d a t e - a f t e r - d a t e " , { e r r o r M s g : f u n c t i o n ( a , b ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " a f t e r D a t e " ) . s u b s t i t u t e ( { l a b e l : b . a f t e r L a b e l | | ( b . a f t e r E l e m e n t ? F o r m . V a l i d a t o r . g e t M s g ( " s t a r t D a t e " ) : F o r m . V a l i d a t o r . g e t M s g ( " c u r r e n t D a t e " ) ) } ) ; 
 } , t e s t : f u n c t i o n ( b , c ) { v a r   d = d o c u m e n t . i d ( c . a f t e r E l e m e n t ) ? D a t e . p a r s e ( d o c u m e n t . i d ( c . a f t e r E l e m e n t ) . g e t ( " v a l u e " ) ) : n e w   D a t e ( ) ; v a r   a = D a t e . p a r s e ( b . g e t ( " v a l u e " ) ) ; 
 r e t u r n   a & & d ? a > = d : t r u e ; } } ] , [ " v a l i d a t e - b e f o r e - d a t e " , { e r r o r M s g : f u n c t i o n ( a , b ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " b e f o r e D a t e " ) . s u b s t i t u t e ( { l a b e l : b . b e f o r e L a b e l | | ( b . b e f o r e E l e m e n t ? F o r m . V a l i d a t o r . g e t M s g ( " e n d D a t e " ) : F o r m . V a l i d a t o r . g e t M s g ( " c u r r e n t D a t e " ) ) } ) ; 
 } , t e s t : f u n c t i o n ( b , c ) { v a r   d = D a t e . p a r s e ( b . g e t ( " v a l u e " ) ) ; v a r   a = d o c u m e n t . i d ( c . b e f o r e E l e m e n t ) ? D a t e . p a r s e ( d o c u m e n t . i d ( c . b e f o r e E l e m e n t ) . g e t ( " v a l u e " ) ) : n e w   D a t e ( ) ; 
 r e t u r n   a & & d ? a > = d : t r u e ; } } ] , [ " v a l i d a t e - c u s t o m - r e q u i r e d " , { e r r o r M s g : f u n c t i o n ( ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " r e q u i r e d " ) ; } , t e s t : f u n c t i o n ( a , b ) { r e t u r n   a . g e t ( " v a l u e " ) ! = b . e m p t y V a l u e ; 
 } } ] , [ " v a l i d a t e - s a m e - m o n t h " , { e r r o r M s g : f u n c t i o n ( a , b ) { v a r   c = d o c u m e n t . i d ( b . s a m e M o n t h A s ) & & d o c u m e n t . i d ( b . s a m e M o n t h A s ) . g e t ( " v a l u e " ) ; v a r   d = a . g e t ( " v a l u e " ) ; i f ( d ! = " " ) { r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( c ? " s a m e M o n t h " : " s t a r t M o n t h " ) ; 
 } } , t e s t : f u n c t i o n ( a , b ) { v a r   d = D a t e . p a r s e ( a . g e t ( " v a l u e " ) ) ; v a r   c = D a t e . p a r s e ( d o c u m e n t . i d ( b . s a m e M o n t h A s ) & & d o c u m e n t . i d ( b . s a m e M o n t h A s ) . g e t ( " v a l u e " ) ) ; r e t u r n   d & & c ? d . f o r m a t ( " % B " ) = = c . f o r m a t ( " % B " ) : t r u e ; 
 } } ] , [ " v a l i d a t e - c c - n u m " , { e r r o r M s g : f u n c t i o n ( a ) { v a r   b = a . g e t ( " v a l u e " ) . r e p l a c e ( / [ ^ 0 - 9 ] / g , " " ) ; r e t u r n   F o r m . V a l i d a t o r . g e t M s g ( " c r e d i t c a r d " ) . s u b s t i t u t e ( { l e n g t h : b . l e n g t h } ) ; 
 } , t e s t : f u n c t i o n ( c ) { i f ( F o r m . V a l i d a t o r . g e t V a l i d a t o r ( " I s E m p t y " ) . t e s t ( c ) ) { r e t u r n   t r u e ; } v a r   g = c . g e t ( " v a l u e " ) ; g = g . r e p l a c e ( / [ ^ 0 - 9 ] / g , " " ) ; v a r   a = f a l s e ; i f ( g . t e s t ( / ^ 4 [ 0 - 9 ] { 1 2 } ( [ 0 - 9 ] { 3 } ) ? $ / ) ) { a = " V i s a " ; 
 } e l s e { i f ( g . t e s t ( / ^ 5 [ 1 - 5 ] ( [ 0 - 9 ] { 1 4 } ) $ / ) ) { a = " M a s t e r   C a r d " ; } e l s e { i f ( g . t e s t ( / ^ 3 [ 4 7 ] [ 0 - 9 ] { 1 3 } $ / ) ) { a = " A m e r i c a n   E x p r e s s " ; } e l s e { i f ( g . t e s t ( / ^ 6 0 1 1 [ 0 - 9 ] { 1 2 } $ / ) ) { a = " D i s c o v e r " ; 
 } } } } i f ( a ) { v a r   d = 0 ; v a r   e = 0 ; f o r ( v a r   b = g . l e n g t h - 1 ; b > = 0 ; - - b ) { e = g . c h a r A t ( b ) . t o I n t ( ) ; i f ( e = = 0 ) { c o n t i n u e ; } i f ( ( g . l e n g t h - b ) % 2 = = 0 ) { e + = e ; } i f ( e > 9 ) { e = e . t o S t r i n g ( ) . c h a r A t ( 0 ) . t o I n t ( ) + e . t o S t r i n g ( ) . c h a r A t ( 1 ) . t o I n t ( ) ; 
 } d + = e ; } i f ( ( d % 1 0 ) = = 0 ) { r e t u r n   t r u e ; } } v a r   f = " " ; w h i l e ( g ! = " " ) { f + = "   " + g . s u b s t r ( 0 , 4 ) ; g = g . s u b s t r ( 4 ) ; } c . g e t P a r e n t ( " f o r m " ) . r e t r i e v e ( " v a l i d a t o r " ) . i g n o r e F i e l d ( c ) ; c . s e t ( " v a l u e " , f . c l e a n ( ) ) ; 
 c . g e t P a r e n t ( " f o r m " ) . r e t r i e v e ( " v a l i d a t o r " ) . e n f o r c e F i e l d ( c ) ; r e t u r n   f a l s e ; } } ] ] ) ; v a r   O v e r T e x t = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s , E v e n t s , C l a s s . O c c l u d e ] , B i n d s : [ " r e p o s i t i o n " , " a s s e r t " , " f o c u s " , " h i d e " ] , o p t i o n s : { e l e m e n t : " l a b e l " , p o s i t i o n O p t i o n s : { p o s i t i o n : " u p p e r L e f t " , e d g e : " u p p e r L e f t " , o f f s e t : { x : 4 , y : 2 } } , p o l l : f a l s e , p o l l I n t e r v a l : 2 5 0 , w r a p : f a l s e } , p r o p e r t y : " O v e r T e x t " , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . e l e m e n t = d o c u m e n t . i d ( b ) ; 
 i f ( t h i s . o c c l u d e ( ) ) { r e t u r n   t h i s . o c c l u d e d ; } t h i s . s e t O p t i o n s ( a ) ; t h i s . a t t a c h ( t h i s . e l e m e n t ) ; O v e r T e x t . i n s t a n c e s . p u s h ( t h i s ) ; i f ( t h i s . o p t i o n s . p o l l ) { t h i s . p o l l ( ) ; } r e t u r n   t h i s ; 
 } , t o E l e m e n t : f u n c t i o n ( ) { r e t u r n   t h i s . e l e m e n t ; } , a t t a c h : f u n c t i o n ( ) { v a r   a = t h i s . o p t i o n s . t e x t O v e r r i d e | | t h i s . e l e m e n t . g e t ( " a l t " ) | | t h i s . e l e m e n t . g e t ( " t i t l e " ) ; i f ( ! a ) { r e t u r n ; 
 } t h i s . t e x t = n e w   E l e m e n t ( t h i s . o p t i o n s . e l e m e n t , { " c l a s s " : " o v e r T x t L a b e l " , s t y l e s : { l i n e H e i g h t : " n o r m a l " , p o s i t i o n : " a b s o l u t e " , c u r s o r : " t e x t " } , h t m l : a , e v e n t s : { c l i c k : t h i s . h i d e . p a s s ( t h i s . o p t i o n s . e l e m e n t = = " l a b e l " , t h i s ) } } ) . i n j e c t ( t h i s . e l e m e n t , " a f t e r " ) ; 
 i f ( t h i s . o p t i o n s . e l e m e n t = = " l a b e l " ) { i f ( ! t h i s . e l e m e n t . g e t ( " i d " ) ) { t h i s . e l e m e n t . s e t ( " i d " , " i n p u t _ " + n e w   D a t e ( ) . g e t T i m e ( ) ) ; } t h i s . t e x t . s e t ( " f o r " , t h i s . e l e m e n t . g e t ( " i d " ) ) ; 
 } i f ( t h i s . o p t i o n s . w r a p ) { t h i s . t e x t H o l d e r = n e w   E l e m e n t ( " d i v " , { s t y l e s : { l i n e H e i g h t : " n o r m a l " , p o s i t i o n : " r e l a t i v e " } , " c l a s s " : " o v e r T x t W r a p p e r " } ) . a d o p t ( t h i s . t e x t ) . i n j e c t ( t h i s . e l e m e n t , " b e f o r e " ) ; 
 } t h i s . e l e m e n t . a d d E v e n t s ( { f o c u s : t h i s . f o c u s , b l u r : t h i s . a s s e r t , c h a n g e : t h i s . a s s e r t } ) . s t o r e ( " O v e r T e x t D i v " , t h i s . t e x t ) ; w i n d o w . a d d E v e n t ( " r e s i z e " , t h i s . r e p o s i t i o n . b i n d ( t h i s ) ) ; 
 t h i s . a s s e r t ( t r u e ) ; t h i s . r e p o s i t i o n ( ) ; } , w r a p : f u n c t i o n ( ) { i f ( t h i s . o p t i o n s . e l e m e n t = = " l a b e l " ) { i f ( ! t h i s . e l e m e n t . g e t ( " i d " ) ) { t h i s . e l e m e n t . s e t ( " i d " , " i n p u t _ " + n e w   D a t e ( ) . g e t T i m e ( ) ) ; 
 } t h i s . t e x t . s e t ( " f o r " , t h i s . e l e m e n t . g e t ( " i d " ) ) ; } } , s t a r t P o l l i n g : f u n c t i o n ( ) { t h i s . p o l l i n g P a u s e d = f a l s e ; r e t u r n   t h i s . p o l l ( ) ; } , p o l l : f u n c t i o n ( a ) { i f ( t h i s . p o l l e r & & ! a ) { r e t u r n   t h i s ; 
 } v a r   b = f u n c t i o n ( ) { i f ( ! t h i s . p o l l i n g P a u s e d ) { t h i s . a s s e r t ( t r u e ) ; } } . b i n d ( t h i s ) ; i f ( a ) { $ c l e a r ( t h i s . p o l l e r ) ; } e l s e { t h i s . p o l l e r = b . p e r i o d i c a l ( t h i s . o p t i o n s . p o l l I n t e r v a l , t h i s ) ; 
 } r e t u r n   t h i s ; } , s t o p P o l l i n g : f u n c t i o n ( ) { t h i s . p o l l i n g P a u s e d = t r u e ; r e t u r n   t h i s . p o l l ( t r u e ) ; } , f o c u s : f u n c t i o n ( ) { i f ( t h i s . t e x t & & ( ! t h i s . t e x t . i s D i s p l a y e d ( ) | | t h i s . e l e m e n t . g e t ( " d i s a b l e d " ) ) ) { r e t u r n ; 
 } t h i s . h i d e ( ) ; } , h i d e : f u n c t i o n ( c , a ) { i f ( t h i s . t e x t & & ( t h i s . t e x t . i s D i s p l a y e d ( ) & & ( ! t h i s . e l e m e n t . g e t ( " d i s a b l e d " ) | | a ) ) ) { t h i s . t e x t . h i d e ( ) ; t h i s . f i r e E v e n t ( " t e x t H i d e " , [ t h i s . t e x t , t h i s . e l e m e n t ] ) ; 
 t h i s . p o l l i n g P a u s e d = t r u e ; i f ( ! c ) { t r y { t h i s . e l e m e n t . f i r e E v e n t ( " f o c u s " ) ; t h i s . e l e m e n t . f o c u s ( ) ; } c a t c h ( b ) { } } } r e t u r n   t h i s ; } , s h o w : f u n c t i o n ( ) { i f ( t h i s . t e x t & & ! t h i s . t e x t . i s D i s p l a y e d ( ) ) { t h i s . t e x t . s h o w ( ) ; 
 t h i s . r e p o s i t i o n ( ) ; t h i s . f i r e E v e n t ( " t e x t S h o w " , [ t h i s . t e x t , t h i s . e l e m e n t ] ) ; t h i s . p o l l i n g P a u s e d = f a l s e ; } r e t u r n   t h i s ; } , a s s e r t : f u n c t i o n ( a ) { t h i s [ t h i s . t e s t ( ) ? " s h o w " : " h i d e " ] ( a ) ; 
 } , t e s t : f u n c t i o n ( ) { v a r   a = t h i s . e l e m e n t . g e t ( " v a l u e " ) ; r e t u r n   ! a ; } , r e p o s i t i o n : f u n c t i o n ( ) { t h i s . a s s e r t ( t r u e ) ; i f ( ! t h i s . e l e m e n t . i s V i s i b l e ( ) ) { r e t u r n   t h i s . s t o p P o l l i n g ( ) . h i d e ( ) ; 
 } i f ( t h i s . t e x t & & t h i s . t e s t ( ) ) { t h i s . t e x t . p o s i t i o n ( $ m e r g e ( t h i s . o p t i o n s . p o s i t i o n O p t i o n s , { r e l a t i v e T o : t h i s . e l e m e n t } ) ) ; } r e t u r n   t h i s ; } } ) ; O v e r T e x t . i n s t a n c e s = [ ] ; $ e x t e n d ( O v e r T e x t , { e a c h : f u n c t i o n ( a ) { r e t u r n   O v e r T e x t . i n s t a n c e s . m a p ( f u n c t i o n ( c , b ) { i f ( c . e l e m e n t & & c . t e x t ) { r e t u r n   a . a p p l y ( O v e r T e x t , [ c , b ] ) ; 
 } r e t u r n   n u l l ; } ) ; } , u p d a t e : f u n c t i o n ( ) { r e t u r n   O v e r T e x t . e a c h ( f u n c t i o n ( a ) { r e t u r n   a . r e p o s i t i o n ( ) ; } ) ; } , h i d e A l l : f u n c t i o n ( ) { r e t u r n   O v e r T e x t . e a c h ( f u n c t i o n ( a ) { r e t u r n   a . h i d e ( t r u e , t r u e ) ; 
 } ) ; } , s h o w A l l : f u n c t i o n ( ) { r e t u r n   O v e r T e x t . e a c h ( f u n c t i o n ( a ) { r e t u r n   a . s h o w ( ) ; } ) ; } } ) ; i f ( w i n d o w . F x & & F x . R e v e a l ) { F x . R e v e a l . i m p l e m e n t ( { h i d e I n p u t s : B r o w s e r . E n g i n e . t r i d e n t ? " s e l e c t ,   i n p u t ,   t e x t a r e a ,   o b j e c t ,   e m b e d ,   . o v e r T x t L a b e l " : f a l s e } ) ; 
 } F x . E l e m e n t s = n e w   C l a s s ( { E x t e n d s : F x . C S S , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . e l e m e n t s = t h i s . s u b j e c t = $ $ ( b ) ; t h i s . p a r e n t ( a ) ; } , c o m p u t e : f u n c t i o n ( g , h , j ) { v a r   c = { } ; f o r ( v a r   d   i n   g ) { v a r   a = g [ d ] , e = h [ d ] , f = c [ d ] = { } ; 
 f o r ( v a r   b   i n   a ) { f [ b ] = t h i s . p a r e n t ( a [ b ] , e [ b ] , j ) ; } } r e t u r n   c ; } , s e t : f u n c t i o n ( b ) { f o r ( v a r   c   i n   b ) { v a r   a = b [ c ] ; f o r ( v a r   d   i n   a ) { t h i s . r e n d e r ( t h i s . e l e m e n t s [ c ] , d , a [ d ] , t h i s . o p t i o n s . u n i t ) ; 
 } } r e t u r n   t h i s ; } , s t a r t : f u n c t i o n ( c ) { i f ( ! t h i s . c h e c k ( c ) ) { r e t u r n   t h i s ; } v a r   h = { } , j = { } ; f o r ( v a r   d   i n   c ) { v a r   f = c [ d ] , a = h [ d ] = { } , g = j [ d ] = { } ; f o r ( v a r   b   i n   f ) { v a r   e = t h i s . p r e p a r e ( t h i s . e l e m e n t s [ d ] , b , f [ b ] ) ; 
 a [ b ] = e . f r o m ; g [ b ] = e . t o ; } } r e t u r n   t h i s . p a r e n t ( h , j ) ; } } ) ; F x . A c c o r d i o n = n e w   C l a s s ( { E x t e n d s : F x . E l e m e n t s , o p t i o n s : { d i s p l a y : 0 , s h o w : f a l s e , h e i g h t : t r u e , w i d t h : f a l s e , o p a c i t y : t r u e , a l w a y s H i d e : f a l s e , t r i g g e r : " c l i c k " , i n i t i a l D i s p l a y F x : t r u e , r e t u r n H e i g h t T o A u t o : t r u e } , i n i t i a l i z e : f u n c t i o n ( ) { v a r   c = A r r a y . l i n k ( a r g u m e n t s , { c o n t a i n e r : E l e m e n t . t y p e , o p t i o n s : O b j e c t . t y p e , t o g g l e r s : $ d e f i n e d , e l e m e n t s : $ d e f i n e d } ) ; 
 t h i s . p a r e n t ( c . e l e m e n t s , c . o p t i o n s ) ; t h i s . t o g g l e r s = $ $ ( c . t o g g l e r s ) ; t h i s . p r e v i o u s = - 1 ; t h i s . i n t e r n a l C h a i n = n e w   C h a i n ( ) ; i f ( t h i s . o p t i o n s . a l w a y s H i d e ) { t h i s . o p t i o n s . w a i t = t r u e ; 
 } i f ( $ c h k ( t h i s . o p t i o n s . s h o w ) ) { t h i s . o p t i o n s . d i s p l a y = f a l s e ; t h i s . p r e v i o u s = t h i s . o p t i o n s . s h o w ; } i f ( t h i s . o p t i o n s . s t a r t ) { t h i s . o p t i o n s . d i s p l a y = f a l s e ; t h i s . o p t i o n s . s h o w = f a l s e ; 
 } t h i s . e f f e c t s = { } ; i f ( t h i s . o p t i o n s . o p a c i t y ) { t h i s . e f f e c t s . o p a c i t y = " f u l l O p a c i t y " ; } i f ( t h i s . o p t i o n s . w i d t h ) { t h i s . e f f e c t s . w i d t h = t h i s . o p t i o n s . f i x e d W i d t h ? " f u l l W i d t h " : " o f f s e t W i d t h " ; 
 } i f ( t h i s . o p t i o n s . h e i g h t ) { t h i s . e f f e c t s . h e i g h t = t h i s . o p t i o n s . f i x e d H e i g h t ? " f u l l H e i g h t " : " s c r o l l H e i g h t " ; } f o r ( v a r   b = 0 , a = t h i s . t o g g l e r s . l e n g t h ; b < a ; b + + ) { t h i s . a d d S e c t i o n ( t h i s . t o g g l e r s [ b ] , t h i s . e l e m e n t s [ b ] ) ; 
 } t h i s . e l e m e n t s . e a c h ( f u n c t i o n ( e , d ) { i f ( t h i s . o p t i o n s . s h o w = = = d ) { t h i s . f i r e E v e n t ( " a c t i v e " , [ t h i s . t o g g l e r s [ d ] , e ] ) ; } e l s e { f o r ( v a r   f   i n   t h i s . e f f e c t s ) { e . s e t S t y l e ( f , 0 ) ; 
 } } } , t h i s ) ; i f ( $ c h k ( t h i s . o p t i o n s . d i s p l a y ) | | t h i s . o p t i o n s . i n i t i a l D i s p l a y F x = = = f a l s e ) { t h i s . d i s p l a y ( t h i s . o p t i o n s . d i s p l a y , t h i s . o p t i o n s . i n i t i a l D i s p l a y F x ) ; } i f ( t h i s . o p t i o n s . f i x e d H e i g h t ! = = f a l s e ) { t h i s . o p t i o n s . r e t u r n H e i g h t T o A u t o = f a l s e ; 
 } t h i s . a d d E v e n t ( " c o m p l e t e " , t h i s . i n t e r n a l C h a i n . c a l l C h a i n . b i n d ( t h i s . i n t e r n a l C h a i n ) ) ; } , a d d S e c t i o n : f u n c t i o n ( e , c ) { e = d o c u m e n t . i d ( e ) ; c = d o c u m e n t . i d ( c ) ; v a r   f = t h i s . t o g g l e r s . c o n t a i n s ( e ) ; 
 t h i s . t o g g l e r s . i n c l u d e ( e ) ; t h i s . e l e m e n t s . i n c l u d e ( c ) ; v a r   a = t h i s . t o g g l e r s . i n d e x O f ( e ) ; v a r   b = t h i s . d i s p l a y . b i n d ( t h i s , a ) ; e . s t o r e ( " a c c o r d i o n : d i s p l a y " , b ) ; e . a d d E v e n t ( t h i s . o p t i o n s . t r i g g e r , b ) ; 
 i f ( t h i s . o p t i o n s . h e i g h t ) { c . s e t S t y l e s ( { " p a d d i n g - t o p " : 0 , " b o r d e r - t o p " : " n o n e " , " p a d d i n g - b o t t o m " : 0 , " b o r d e r - b o t t o m " : " n o n e " } ) ; } i f ( t h i s . o p t i o n s . w i d t h ) { c . s e t S t y l e s ( { " p a d d i n g - l e f t " : 0 , " b o r d e r - l e f t " : " n o n e " , " p a d d i n g - r i g h t " : 0 , " b o r d e r - r i g h t " : " n o n e " } ) ; 
 } c . f u l l O p a c i t y = 1 ; i f ( t h i s . o p t i o n s . f i x e d W i d t h ) { c . f u l l W i d t h = t h i s . o p t i o n s . f i x e d W i d t h ; } i f ( t h i s . o p t i o n s . f i x e d H e i g h t ) { c . f u l l H e i g h t = t h i s . o p t i o n s . f i x e d H e i g h t ; } c . s e t S t y l e ( " o v e r f l o w " , " h i d d e n " ) ; 
 i f ( ! f ) { f o r ( v a r   d   i n   t h i s . e f f e c t s ) { c . s e t S t y l e ( d , 0 ) ; } } r e t u r n   t h i s ; } , d e t a c h : f u n c t i o n ( ) { t h i s . t o g g l e r s . e a c h ( f u n c t i o n ( a ) { a . r e m o v e E v e n t ( t h i s . o p t i o n s . t r i g g e r , a . r e t r i e v e ( " a c c o r d i o n : d i s p l a y " ) ) ; 
 } , t h i s ) ; } , d i s p l a y : f u n c t i o n ( a , b ) { i f ( ! t h i s . c h e c k ( a , b ) ) { r e t u r n   t h i s ; } b = $ p i c k ( b , t r u e ) ; i f ( t h i s . o p t i o n s . r e t u r n H e i g h t T o A u t o ) { v a r   d = t h i s . e l e m e n t s [ t h i s . p r e v i o u s ] ; 
 i f ( d & & ! t h i s . s e l f H i d d e n ) { f o r ( v a r   c   i n   t h i s . e f f e c t s ) { d . s e t S t y l e ( c , d [ t h i s . e f f e c t s [ c ] ] ) ; } } } a = ( $ t y p e ( a ) = = " e l e m e n t " ) ? t h i s . e l e m e n t s . i n d e x O f ( a ) : a ; i f ( ( t h i s . t i m e r & & t h i s . o p t i o n s . w a i t ) | | ( a = = = t h i s . p r e v i o u s & & ! t h i s . o p t i o n s . a l w a y s H i d e ) ) { r e t u r n   t h i s ; 
 } t h i s . p r e v i o u s = a ; v a r   e = { } ; t h i s . e l e m e n t s . e a c h ( f u n c t i o n ( h , g ) { e [ g ] = { } ; v a r   f ; i f ( g ! = a ) { f = t r u e ; } e l s e { i f ( t h i s . o p t i o n s . a l w a y s H i d e & & ( ( h . o f f s e t H e i g h t > 0 & & t h i s . o p t i o n s . h e i g h t ) | | h . o f f s e t W i d t h > 0 & & t h i s . o p t i o n s . w i d t h ) ) { f = t r u e ; 
 t h i s . s e l f H i d d e n = t r u e ; } } t h i s . f i r e E v e n t ( f ? " b a c k g r o u n d " : " a c t i v e " , [ t h i s . t o g g l e r s [ g ] , h ] ) ; f o r ( v a r   j   i n   t h i s . e f f e c t s ) { e [ g ] [ j ] = f ? 0 : h [ t h i s . e f f e c t s [ j ] ] ; } } , t h i s ) ; 
 t h i s . i n t e r n a l C h a i n . c h a i n ( f u n c t i o n ( ) { i f ( t h i s . o p t i o n s . r e t u r n H e i g h t T o A u t o & & ! t h i s . s e l f H i d d e n ) { v a r   f = t h i s . e l e m e n t s [ a ] ; i f ( f ) { f . s e t S t y l e ( " h e i g h t " , " a u t o " ) ; } } } . b i n d ( t h i s ) ) ; 
 r e t u r n   b ? t h i s . s t a r t ( e ) : t h i s . s e t ( e ) ; } } ) ; v a r   A c c o r d i o n = n e w   C l a s s ( { E x t e n d s : F x . A c c o r d i o n , i n i t i a l i z e : f u n c t i o n ( ) { t h i s . p a r e n t . a p p l y ( t h i s , a r g u m e n t s ) ; v a r   a = A r r a y . l i n k ( a r g u m e n t s , { c o n t a i n e r : E l e m e n t . t y p e } ) ; 
 t h i s . c o n t a i n e r = a . c o n t a i n e r ; } , a d d S e c t i o n : f u n c t i o n ( c , b , e ) { c = d o c u m e n t . i d ( c ) ; b = d o c u m e n t . i d ( b ) ; v a r   d = t h i s . t o g g l e r s . c o n t a i n s ( c ) ; v a r   a = t h i s . t o g g l e r s . l e n g t h ; i f ( a & & ( ! d | | e ) ) { e = $ p i c k ( e , a - 1 ) ; 
 c . i n j e c t ( t h i s . t o g g l e r s [ e ] , " b e f o r e " ) ; b . i n j e c t ( c , " a f t e r " ) ; } e l s e { i f ( t h i s . c o n t a i n e r & & ! d ) { c . i n j e c t ( t h i s . c o n t a i n e r ) ; b . i n j e c t ( t h i s . c o n t a i n e r ) ; } } r e t u r n   t h i s . p a r e n t . a p p l y ( t h i s , a r g u m e n t s ) ; 
 } } ) ; F x . M o v e = n e w   C l a s s ( { E x t e n d s : F x . M o r p h , o p t i o n s : { r e l a t i v e T o : d o c u m e n t . b o d y , p o s i t i o n : " c e n t e r " , e d g e : f a l s e , o f f s e t : { x : 0 , y : 0 } } , s t a r t : f u n c t i o n ( a ) { r e t u r n   t h i s . p a r e n t ( t h i s . e l e m e n t . p o s i t i o n ( $ m e r g e ( t h i s . o p t i o n s , a , { r e t u r n P o s : t r u e } ) ) ) ; 
 } } ) ; E l e m e n t . P r o p e r t i e s . m o v e = { s e t : f u n c t i o n ( a ) { v a r   b = t h i s . r e t r i e v e ( " m o v e " ) ; i f ( b ) { b . c a n c e l ( ) ; } r e t u r n   t h i s . e l i m i n a t e ( " m o v e " ) . s t o r e ( " m o v e : o p t i o n s " , $ e x t e n d ( { l i n k : " c a n c e l " } , a ) ) ; 
 } , g e t : f u n c t i o n ( a ) { i f ( a | | ! t h i s . r e t r i e v e ( " m o v e " ) ) { i f ( a | | ! t h i s . r e t r i e v e ( " m o v e : o p t i o n s " ) ) { t h i s . s e t ( " m o v e " , a ) ; } t h i s . s t o r e ( " m o v e " , n e w   F x . M o v e ( t h i s , t h i s . r e t r i e v e ( " m o v e : o p t i o n s " ) ) ) ; 
 } r e t u r n   t h i s . r e t r i e v e ( " m o v e " ) ; } } ; E l e m e n t . i m p l e m e n t ( { m o v e : f u n c t i o n ( a ) { t h i s . g e t ( " m o v e " ) . s t a r t ( a ) ; r e t u r n   t h i s ; } } ) ; F x . R e v e a l = n e w   C l a s s ( { E x t e n d s : F x . M o r p h , o p t i o n s : { l i n k : " c a n c e l " , s t y l e s : [ " p a d d i n g " , " b o r d e r " , " m a r g i n " ] , t r a n s i t i o n O p a c i t y : ! B r o w s e r . E n g i n e . t r i d e n t 4 , m o d e : " v e r t i c a l " , d i s p l a y : " b l o c k " , h i d e I n p u t s : B r o w s e r . E n g i n e . t r i d e n t ? " s e l e c t ,   i n p u t ,   t e x t a r e a ,   o b j e c t ,   e m b e d " : f a l s e } , d i s s o l v e : f u n c t i o n ( ) { t r y { i f ( ! t h i s . h i d i n g & & ! t h i s . s h o w i n g ) { i f ( t h i s . e l e m e n t . g e t S t y l e ( " d i s p l a y " ) ! = " n o n e " ) { t h i s . h i d i n g = t r u e ; 
 t h i s . s h o w i n g = f a l s e ; t h i s . h i d d e n = t r u e ; t h i s . c s s T e x t = t h i s . e l e m e n t . s t y l e . c s s T e x t ; v a r   d = t h i s . e l e m e n t . g e t C o m p u t e d S i z e ( { s t y l e s : t h i s . o p t i o n s . s t y l e s , m o d e : t h i s . o p t i o n s . m o d e } ) ; 
 t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , t h i s . o p t i o n s . d i s p l a y ) ; i f ( t h i s . o p t i o n s . t r a n s i t i o n O p a c i t y ) { d . o p a c i t y = 1 ; } v a r   b = { } ; $ e a c h ( d , f u n c t i o n ( f , e ) { b [ e ] = [ f , 0 ] ; } , t h i s ) ; 
 t h i s . e l e m e n t . s e t S t y l e ( " o v e r f l o w " , " h i d d e n " ) ; v a r   a = t h i s . o p t i o n s . h i d e I n p u t s ? t h i s . e l e m e n t . g e t E l e m e n t s ( t h i s . o p t i o n s . h i d e I n p u t s ) : n u l l ; t h i s . $ c h a i n . u n s h i f t ( f u n c t i o n ( ) { i f ( t h i s . h i d d e n ) { t h i s . h i d i n g = f a l s e ; 
 $ e a c h ( d , f u n c t i o n ( f , e ) { d [ e ] = f ; } , t h i s ) ; t h i s . e l e m e n t . s t y l e . c s s T e x t = t h i s . c s s T e x t ; t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; i f ( a ) { a . s e t S t y l e ( " v i s i b i l i t y " , " v i s i b l e " ) ; 
 } } t h i s . f i r e E v e n t ( " h i d e " , t h i s . e l e m e n t ) ; t h i s . c a l l C h a i n ( ) ; } . b i n d ( t h i s ) ) ; i f ( a ) { a . s e t S t y l e ( " v i s i b i l i t y " , " h i d d e n " ) ; } t h i s . s t a r t ( b ) ; } e l s e { t h i s . c a l l C h a i n . d e l a y ( 1 0 , t h i s ) ; 
 t h i s . f i r e E v e n t ( " c o m p l e t e " , t h i s . e l e m e n t ) ; t h i s . f i r e E v e n t ( " h i d e " , t h i s . e l e m e n t ) ; } } e l s e { i f ( t h i s . o p t i o n s . l i n k = = " c h a i n " ) { t h i s . c h a i n ( t h i s . d i s s o l v e . b i n d ( t h i s ) ) ; 
 } e l s e { i f ( t h i s . o p t i o n s . l i n k = = " c a n c e l " & & ! t h i s . h i d i n g ) { t h i s . c a n c e l ( ) ; t h i s . d i s s o l v e ( ) ; } } } } c a t c h ( c ) { t h i s . h i d i n g = f a l s e ; t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; 
 t h i s . c a l l C h a i n . d e l a y ( 1 0 , t h i s ) ; t h i s . f i r e E v e n t ( " c o m p l e t e " , t h i s . e l e m e n t ) ; t h i s . f i r e E v e n t ( " h i d e " , t h i s . e l e m e n t ) ; } r e t u r n   t h i s ; } , r e v e a l : f u n c t i o n ( ) { t r y { i f ( ! t h i s . s h o w i n g & & ! t h i s . h i d i n g ) { i f ( t h i s . e l e m e n t . g e t S t y l e ( " d i s p l a y " ) = = " n o n e " | | t h i s . e l e m e n t . g e t S t y l e ( " v i s i b l i t y " ) = = " h i d d e n " | | t h i s . e l e m e n t . g e t S t y l e ( " o p a c i t y " ) = = 0 ) { t h i s . s h o w i n g = t r u e ; 
 t h i s . h i d i n g = t h i s . h i d d e n = f a l s e ; v a r   d ; t h i s . c s s T e x t = t h i s . e l e m e n t . s t y l e . c s s T e x t ; t h i s . e l e m e n t . m e a s u r e ( f u n c t i o n ( ) { d = t h i s . e l e m e n t . g e t C o m p u t e d S i z e ( { s t y l e s : t h i s . o p t i o n s . s t y l e s , m o d e : t h i s . o p t i o n s . m o d e } ) ; 
 } . b i n d ( t h i s ) ) ; $ e a c h ( d , f u n c t i o n ( f , e ) { d [ e ] = f ; } ) ; i f ( $ c h k ( t h i s . o p t i o n s . h e i g h t O v e r r i d e ) ) { d . h e i g h t = t h i s . o p t i o n s . h e i g h t O v e r r i d e . t o I n t ( ) ; } i f ( $ c h k ( t h i s . o p t i o n s . w i d t h O v e r r i d e ) ) { d . w i d t h = t h i s . o p t i o n s . w i d t h O v e r r i d e . t o I n t ( ) ; 
 } i f ( t h i s . o p t i o n s . t r a n s i t i o n O p a c i t y ) { t h i s . e l e m e n t . s e t S t y l e ( " o p a c i t y " , 0 ) ; d . o p a c i t y = 1 ; } v a r   b = { h e i g h t : 0 , d i s p l a y : t h i s . o p t i o n s . d i s p l a y } ; $ e a c h ( d , f u n c t i o n ( f , e ) { b [ e ] = 0 ; 
 } ) ; t h i s . e l e m e n t . s e t S t y l e s ( $ m e r g e ( b , { o v e r f l o w : " h i d d e n " } ) ) ; v a r   a = t h i s . o p t i o n s . h i d e I n p u t s ? t h i s . e l e m e n t . g e t E l e m e n t s ( t h i s . o p t i o n s . h i d e I n p u t s ) : n u l l ; i f ( a ) { a . s e t S t y l e ( " v i s i b i l i t y " , " h i d d e n " ) ; 
 } t h i s . s t a r t ( d ) ; t h i s . $ c h a i n . u n s h i f t ( f u n c t i o n ( ) { t h i s . e l e m e n t . s t y l e . c s s T e x t = t h i s . c s s T e x t ; t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , t h i s . o p t i o n s . d i s p l a y ) ; i f ( ! t h i s . h i d d e n ) { t h i s . s h o w i n g = f a l s e ; 
 } i f ( a ) { a . s e t S t y l e ( " v i s i b i l i t y " , " v i s i b l e " ) ; } t h i s . c a l l C h a i n ( ) ; t h i s . f i r e E v e n t ( " s h o w " , t h i s . e l e m e n t ) ; } . b i n d ( t h i s ) ) ; } e l s e { t h i s . c a l l C h a i n ( ) ; t h i s . f i r e E v e n t ( " c o m p l e t e " , t h i s . e l e m e n t ) ; 
 t h i s . f i r e E v e n t ( " s h o w " , t h i s . e l e m e n t ) ; } } e l s e { i f ( t h i s . o p t i o n s . l i n k = = " c h a i n " ) { t h i s . c h a i n ( t h i s . r e v e a l . b i n d ( t h i s ) ) ; } e l s e { i f ( t h i s . o p t i o n s . l i n k = = " c a n c e l " & & ! t h i s . s h o w i n g ) { t h i s . c a n c e l ( ) ; 
 t h i s . r e v e a l ( ) ; } } } } c a t c h ( c ) { t h i s . e l e m e n t . s e t S t y l e s ( { d i s p l a y : t h i s . o p t i o n s . d i s p l a y , v i s i b l i t y : " v i s i b l e " , o p a c i t y : 1 } ) ; t h i s . s h o w i n g = f a l s e ; t h i s . c a l l C h a i n . d e l a y ( 1 0 , t h i s ) ; 
 t h i s . f i r e E v e n t ( " c o m p l e t e " , t h i s . e l e m e n t ) ; t h i s . f i r e E v e n t ( " s h o w " , t h i s . e l e m e n t ) ; } r e t u r n   t h i s ; } , t o g g l e : f u n c t i o n ( ) { i f ( t h i s . e l e m e n t . g e t S t y l e ( " d i s p l a y " ) = = " n o n e " | | t h i s . e l e m e n t . g e t S t y l e ( " v i s i b l i t y " ) = = " h i d d e n " | | t h i s . e l e m e n t . g e t S t y l e ( " o p a c i t y " ) = = 0 ) { t h i s . r e v e a l ( ) ; 
 } e l s e { t h i s . d i s s o l v e ( ) ; } r e t u r n   t h i s ; } , c a n c e l : f u n c t i o n ( ) { t h i s . p a r e n t . a p p l y ( t h i s , a r g u m e n t s ) ; t h i s . e l e m e n t . s t y l e . c s s T e x t = t h i s . c s s T e x t ; t h i s . h i d d i n g = f a l s e ; t h i s . s h o w i n g = f a l s e ; 
 } } ) ; E l e m e n t . P r o p e r t i e s . r e v e a l = { s e t : f u n c t i o n ( a ) { v a r   b = t h i s . r e t r i e v e ( " r e v e a l " ) ; i f ( b ) { b . c a n c e l ( ) ; } r e t u r n   t h i s . e l i m i n a t e ( " r e v e a l " ) . s t o r e ( " r e v e a l : o p t i o n s " , a ) ; 
 } , g e t : f u n c t i o n ( a ) { i f ( a | | ! t h i s . r e t r i e v e ( " r e v e a l " ) ) { i f ( a | | ! t h i s . r e t r i e v e ( " r e v e a l : o p t i o n s " ) ) { t h i s . s e t ( " r e v e a l " , a ) ; } t h i s . s t o r e ( " r e v e a l " , n e w   F x . R e v e a l ( t h i s , t h i s . r e t r i e v e ( " r e v e a l : o p t i o n s " ) ) ) ; 
 } r e t u r n   t h i s . r e t r i e v e ( " r e v e a l " ) ; } } ; E l e m e n t . P r o p e r t i e s . d i s s o l v e = E l e m e n t . P r o p e r t i e s . r e v e a l ; E l e m e n t . i m p l e m e n t ( { r e v e a l : f u n c t i o n ( a ) { t h i s . g e t ( " r e v e a l " , a ) . r e v e a l ( ) ; 
 r e t u r n   t h i s ; } , d i s s o l v e : f u n c t i o n ( a ) { t h i s . g e t ( " r e v e a l " , a ) . d i s s o l v e ( ) ; r e t u r n   t h i s ; } , n i x : f u n c t i o n ( ) { v a r   a = A r r a y . l i n k ( a r g u m e n t s , { d e s t r o y : B o o l e a n . t y p e , o p t i o n s : O b j e c t . t y p e } ) ; 
 t h i s . g e t ( " r e v e a l " , a . o p t i o n s ) . d i s s o l v e ( ) . c h a i n ( f u n c t i o n ( ) { t h i s [ a . d e s t r o y ? " d e s t r o y " : " d i s p o s e " ] ( ) ; } . b i n d ( t h i s ) ) ; r e t u r n   t h i s ; } , w i n k : f u n c t i o n ( ) { v a r   b = A r r a y . l i n k ( a r g u m e n t s , { d u r a t i o n : N u m b e r . t y p e , o p t i o n s : O b j e c t . t y p e } ) ; 
 v a r   a = t h i s . g e t ( " r e v e a l " , b . o p t i o n s ) ; a . r e v e a l ( ) . c h a i n ( f u n c t i o n ( ) { ( f u n c t i o n ( ) { a . d i s s o l v e ( ) ; } ) . d e l a y ( b . d u r a t i o n | | 2 0 0 0 ) ; } ) ; } } ) ; F x . S c r o l l = n e w   C l a s s ( { E x t e n d s : F x , o p t i o n s : { o f f s e t : { x : 0 , y : 0 } , w h e e l S t o p s : t r u e } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . e l e m e n t = t h i s . s u b j e c t = d o c u m e n t . i d ( b ) ; 
 t h i s . p a r e n t ( a ) ; v a r   d = t h i s . c a n c e l . b i n d ( t h i s , f a l s e ) ; i f ( $ t y p e ( t h i s . e l e m e n t ) ! = " e l e m e n t " ) { t h i s . e l e m e n t = d o c u m e n t . i d ( t h i s . e l e m e n t . g e t D o c u m e n t ( ) . b o d y ) ; } v a r   c = t h i s . e l e m e n t ; 
 i f ( t h i s . o p t i o n s . w h e e l S t o p s ) { t h i s . a d d E v e n t ( " s t a r t " , f u n c t i o n ( ) { c . a d d E v e n t ( " m o u s e w h e e l " , d ) ; } , t r u e ) ; t h i s . a d d E v e n t ( " c o m p l e t e " , f u n c t i o n ( ) { c . r e m o v e E v e n t ( " m o u s e w h e e l " , d ) ; 
 } , t r u e ) ; } } , s e t : f u n c t i o n ( ) { v a r   a = A r r a y . f l a t t e n ( a r g u m e n t s ) ; i f ( B r o w s e r . E n g i n e . g e c k o ) { a = [ M a t h . r o u n d ( a [ 0 ] ) , M a t h . r o u n d ( a [ 1 ] ) ] ; } t h i s . e l e m e n t . s c r o l l T o ( a [ 0 ] , a [ 1 ] ) ; 
 } , c o m p u t e : f u n c t i o n ( c , b , a ) { r e t u r n [ 0 , 1 ] . m a p ( f u n c t i o n ( d ) { r e t u r n   F x . c o m p u t e ( c [ d ] , b [ d ] , a ) ; } ) ; } , s t a r t : f u n c t i o n ( c , g ) { i f ( ! t h i s . c h e c k ( c , g ) ) { r e t u r n   t h i s ; } v a r   e = t h i s . e l e m e n t . g e t S c r o l l S i z e ( ) , b = t h i s . e l e m e n t . g e t S c r o l l ( ) , d = { x : c , y : g } ; 
 f o r ( v a r   f   i n   d ) { v a r   a = e [ f ] ; i f ( $ c h k ( d [ f ] ) ) { d [ f ] = ( $ t y p e ( d [ f ] ) = = " n u m b e r " ) ? d [ f ] : a ; } e l s e { d [ f ] = b [ f ] ; } d [ f ] + = t h i s . o p t i o n s . o f f s e t [ f ] ; } r e t u r n   t h i s . p a r e n t ( [ b . x , b . y ] , [ d . x , d . y ] ) ; 
 } , t o T o p : f u n c t i o n ( ) { r e t u r n   t h i s . s t a r t ( f a l s e , 0 ) ; } , t o L e f t : f u n c t i o n ( ) { r e t u r n   t h i s . s t a r t ( 0 , f a l s e ) ; } , t o R i g h t : f u n c t i o n ( ) { r e t u r n   t h i s . s t a r t ( " r i g h t " , f a l s e ) ; } , t o B o t t o m : f u n c t i o n ( ) { r e t u r n   t h i s . s t a r t ( f a l s e , " b o t t o m " ) ; 
 } , t o E l e m e n t : f u n c t i o n ( b ) { v a r   a = d o c u m e n t . i d ( b ) . g e t P o s i t i o n ( t h i s . e l e m e n t ) ; r e t u r n   t h i s . s t a r t ( a . x , a . y ) ; } , s c r o l l I n t o V i e w : f u n c t i o n ( c , e , d ) { e = e ? $ s p l a t ( e ) : [ " x " , " y " ] ; 
 v a r   h = { } ; c = d o c u m e n t . i d ( c ) ; v a r   f = c . g e t P o s i t i o n ( t h i s . e l e m e n t ) ; v a r   i = c . g e t S i z e ( ) ; v a r   g = t h i s . e l e m e n t . g e t S c r o l l ( ) ; v a r   a = t h i s . e l e m e n t . g e t S i z e ( ) ; v a r   b = { x : f . x + i . x , y : f . y + i . y } ; 
 [ " x " , " y " ] . e a c h ( f u n c t i o n ( j ) { i f ( e . c o n t a i n s ( j ) ) { i f ( b [ j ] > g [ j ] + a [ j ] ) { h [ j ] = b [ j ] - a [ j ] ; } i f ( f [ j ] < g [ j ] ) { h [ j ] = f [ j ] ; } } i f ( h [ j ] = = n u l l ) { h [ j ] = g [ j ] ; } i f ( d & & d [ j ] ) { h [ j ] = h [ j ] + d [ j ] ; 
 } } , t h i s ) ; i f ( h . x ! = g . x | | h . y ! = g . y ) { t h i s . s t a r t ( h . x , h . y ) ; } r e t u r n   t h i s ; } , s c r o l l T o C e n t e r : f u n c t i o n ( c , e , d ) { e = e ? $ s p l a t ( e ) : [ " x " , " y " ] ; c = $ ( c ) ; v a r   h = { } , f = c . g e t P o s i t i o n ( t h i s . e l e m e n t ) , i = c . g e t S i z e ( ) , g = t h i s . e l e m e n t . g e t S c r o l l ( ) , a = t h i s . e l e m e n t . g e t S i z e ( ) , b = { x : f . x + i . x , y : f . y + i . y } ; 
 [ " x " , " y " ] . e a c h ( f u n c t i o n ( j ) { i f ( e . c o n t a i n s ( j ) ) { h [ j ] = f [ j ] - ( a [ j ] - i [ j ] ) / 2 ; } i f ( h [ j ] = = n u l l ) { h [ j ] = g [ j ] ; } i f ( d & & d [ j ] ) { h [ j ] = h [ j ] + d [ j ] ; } } , t h i s ) ; i f ( h . x ! = g . x | | h . y ! = g . y ) { t h i s . s t a r t ( h . x , h . y ) ; 
 } r e t u r n   t h i s ; } } ) ; F x . S l i d e = n e w   C l a s s ( { E x t e n d s : F x , o p t i o n s : { m o d e : " v e r t i c a l " , w r a p p e r : f a l s e , h i d e O v e r f l o w : t r u e } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . a d d E v e n t ( " c o m p l e t e " , f u n c t i o n ( ) { t h i s . o p e n = ( t h i s . w r a p p e r [ " o f f s e t " + t h i s . l a y o u t . c a p i t a l i z e ( ) ] ! = 0 ) ; 
 i f ( t h i s . o p e n ) { t h i s . w r a p p e r . s e t S t y l e ( " h e i g h t " , " " ) ; } i f ( t h i s . o p e n & & B r o w s e r . E n g i n e . w e b k i t 4 1 9 ) { t h i s . e l e m e n t . d i s p o s e ( ) . i n j e c t ( t h i s . w r a p p e r ) ; } } , t r u e ) ; t h i s . e l e m e n t = t h i s . s u b j e c t = d o c u m e n t . i d ( b ) ; 
 t h i s . p a r e n t ( a ) ; v a r   d = t h i s . e l e m e n t . r e t r i e v e ( " w r a p p e r " ) ; v a r   c = t h i s . e l e m e n t . g e t S t y l e s ( " m a r g i n " , " p o s i t i o n " , " o v e r f l o w " ) ; i f ( t h i s . o p t i o n s . h i d e O v e r f l o w ) { c = $ e x t e n d ( c , { o v e r f l o w : " h i d d e n " } ) ; 
 } i f ( t h i s . o p t i o n s . w r a p p e r ) { d = d o c u m e n t . i d ( t h i s . o p t i o n s . w r a p p e r ) . s e t S t y l e s ( c ) ; } t h i s . w r a p p e r = d | | n e w   E l e m e n t ( " d i v " , { s t y l e s : c } ) . w r a p s ( t h i s . e l e m e n t ) ; t h i s . e l e m e n t . s t o r e ( " w r a p p e r " , t h i s . w r a p p e r ) . s e t S t y l e ( " m a r g i n " , 0 ) ; 
 t h i s . n o w = [ ] ; t h i s . o p e n = t r u e ; } , v e r t i c a l : f u n c t i o n ( ) { t h i s . m a r g i n = " m a r g i n - t o p " ; t h i s . l a y o u t = " h e i g h t " ; t h i s . o f f s e t = t h i s . e l e m e n t . o f f s e t H e i g h t ; } , h o r i z o n t a l : f u n c t i o n ( ) { t h i s . m a r g i n = " m a r g i n - l e f t " ; 
 t h i s . l a y o u t = " w i d t h " ; t h i s . o f f s e t = t h i s . e l e m e n t . o f f s e t W i d t h ; } , s e t : f u n c t i o n ( a ) { t h i s . e l e m e n t . s e t S t y l e ( t h i s . m a r g i n , a [ 0 ] ) ; t h i s . w r a p p e r . s e t S t y l e ( t h i s . l a y o u t , a [ 1 ] ) ; 
 r e t u r n   t h i s ; } , c o m p u t e : f u n c t i o n ( c , b , a ) { r e t u r n [ 0 , 1 ] . m a p ( f u n c t i o n ( d ) { r e t u r n   F x . c o m p u t e ( c [ d ] , b [ d ] , a ) ; } ) ; } , s t a r t : f u n c t i o n ( b , e ) { i f ( ! t h i s . c h e c k ( b , e ) ) { r e t u r n   t h i s ; 
 } t h i s [ e | | t h i s . o p t i o n s . m o d e ] ( ) ; v a r   d = t h i s . e l e m e n t . g e t S t y l e ( t h i s . m a r g i n ) . t o I n t ( ) ; v a r   c = t h i s . w r a p p e r . g e t S t y l e ( t h i s . l a y o u t ) . t o I n t ( ) ; v a r   a = [ [ d , c ] , [ 0 , t h i s . o f f s e t ] ] ; 
 v a r   g = [ [ d , c ] , [ - t h i s . o f f s e t , 0 ] ] ; v a r   f ; s w i t c h ( b ) { c a s e " i n " : f = a ; b r e a k ; c a s e " o u t " : f = g ; b r e a k ; c a s e " t o g g l e " : f = ( c = = 0 ) ? a : g ; } r e t u r n   t h i s . p a r e n t ( f [ 0 ] , f [ 1 ] ) ; } , s l i d e I n : f u n c t i o n ( a ) { r e t u r n   t h i s . s t a r t ( " i n " , a ) ; 
 } , s l i d e O u t : f u n c t i o n ( a ) { r e t u r n   t h i s . s t a r t ( " o u t " , a ) ; } , h i d e : f u n c t i o n ( a ) { t h i s [ a | | t h i s . o p t i o n s . m o d e ] ( ) ; t h i s . o p e n = f a l s e ; r e t u r n   t h i s . s e t ( [ - t h i s . o f f s e t , 0 ] ) ; } , s h o w : f u n c t i o n ( a ) { t h i s [ a | | t h i s . o p t i o n s . m o d e ] ( ) ; 
 t h i s . o p e n = t r u e ; r e t u r n   t h i s . s e t ( [ 0 , t h i s . o f f s e t ] ) ; } , t o g g l e : f u n c t i o n ( a ) { r e t u r n   t h i s . s t a r t ( " t o g g l e " , a ) ; } } ) ; E l e m e n t . P r o p e r t i e s . s l i d e = { s e t : f u n c t i o n ( b ) { v a r   a = t h i s . r e t r i e v e ( " s l i d e " ) ; 
 i f ( a ) { a . c a n c e l ( ) ; } r e t u r n   t h i s . e l i m i n a t e ( " s l i d e " ) . s t o r e ( " s l i d e : o p t i o n s " , $ e x t e n d ( { l i n k : " c a n c e l " } , b ) ) ; } , g e t : f u n c t i o n ( a ) { i f ( a | | ! t h i s . r e t r i e v e ( " s l i d e " ) ) { i f ( a | | ! t h i s . r e t r i e v e ( " s l i d e : o p t i o n s " ) ) { t h i s . s e t ( " s l i d e " , a ) ; 
 } t h i s . s t o r e ( " s l i d e " , n e w   F x . S l i d e ( t h i s , t h i s . r e t r i e v e ( " s l i d e : o p t i o n s " ) ) ) ; } r e t u r n   t h i s . r e t r i e v e ( " s l i d e " ) ; } } ; E l e m e n t . i m p l e m e n t ( { s l i d e : f u n c t i o n ( d , e ) { d = d | | " t o g g l e " ; 
 v a r   b = t h i s . g e t ( " s l i d e " ) , a ; s w i t c h ( d ) { c a s e " h i d e " : b . h i d e ( e ) ; b r e a k ; c a s e " s h o w " : b . s h o w ( e ) ; b r e a k ; c a s e " t o g g l e " : v a r   c = t h i s . r e t r i e v e ( " s l i d e : f l a g " , b . o p e n ) ; b [ c ? " s l i d e O u t " : " s l i d e I n " ] ( e ) ; 
 t h i s . s t o r e ( " s l i d e : f l a g " , ! c ) ; a = t r u e ; b r e a k ; d e f a u l t : b . s t a r t ( d , e ) ; } i f ( ! a ) { t h i s . e l i m i n a t e ( " s l i d e : f l a g " ) ; } r e t u r n   t h i s ; } } ) ; v a r   S m o o t h S c r o l l = F x . S m o o t h S c r o l l = n e w   C l a s s ( { E x t e n d s : F x . S c r o l l , i n i t i a l i z e : f u n c t i o n ( b , c ) { c = c | | d o c u m e n t ; 
 t h i s . d o c = c . g e t D o c u m e n t ( ) ; v a r   d = c . g e t W i n d o w ( ) ; t h i s . p a r e n t ( t h i s . d o c , b ) ; t h i s . l i n k s = $ $ ( t h i s . o p t i o n s . l i n k s | | t h i s . d o c . l i n k s ) ; v a r   a = d . l o c a t i o n . h r e f . m a t c h ( / ^ [ ^ # ] * / ) [ 0 ] + " # " ; 
 t h i s . l i n k s . e a c h ( f u n c t i o n ( f ) { i f ( f . h r e f . i n d e x O f ( a ) ! = 0 ) { r e t u r n ; } v a r   e = f . h r e f . s u b s t r ( a . l e n g t h ) ; i f ( e ) { t h i s . u s e L i n k ( f , e ) ; } } , t h i s ) ; i f ( ! B r o w s e r . E n g i n e . w e b k i t 4 1 9 ) { t h i s . a d d E v e n t ( " c o m p l e t e " , f u n c t i o n ( ) { d . l o c a t i o n . h a s h = t h i s . a n c h o r ; 
 } , t r u e ) ; } } , u s e L i n k : f u n c t i o n ( c , a ) { v a r   b ; c . a d d E v e n t ( " c l i c k " , f u n c t i o n ( d ) { i f ( b ! = = f a l s e & & ! b ) { b = d o c u m e n t . i d ( a ) | | t h i s . d o c . g e t E l e m e n t ( " a [ n a m e = " + a + " ] " ) ; } i f ( b ) { d . p r e v e n t D e f a u l t ( ) ; 
 t h i s . a n c h o r = a ; t h i s . t o E l e m e n t ( b ) . c h a i n ( f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " s c r o l l e d T o " , [ c , b ] ) ; } . b i n d ( t h i s ) ) ; c . b l u r ( ) ; } } . b i n d ( t h i s ) ) ; } } ) ; F x . S o r t = n e w   C l a s s ( { E x t e n d s : F x . E l e m e n t s , o p t i o n s : { m o d e : " v e r t i c a l " } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . p a r e n t ( b , a ) ; 
 t h i s . e l e m e n t s . e a c h ( f u n c t i o n ( c ) { i f ( c . g e t S t y l e ( " p o s i t i o n " ) = = " s t a t i c " ) { c . s e t S t y l e ( " p o s i t i o n " , " r e l a t i v e " ) ; } } ) ; t h i s . s e t D e f a u l t O r d e r ( ) ; } , s e t D e f a u l t O r d e r : f u n c t i o n ( ) { t h i s . c u r r e n t O r d e r = t h i s . e l e m e n t s . m a p ( f u n c t i o n ( b , a ) { r e t u r n   a ; 
 } ) ; } , s o r t : f u n c t i o n ( e ) { i f ( $ t y p e ( e ) ! = " a r r a y " ) { r e t u r n   f a l s e ; } v a r   i = 0 , a = 0 , c = { } , h = { } , d = t h i s . o p t i o n s . m o d e = = " v e r t i c a l " ; v a r   f = t h i s . e l e m e n t s . m a p ( f u n c t i o n ( m , j ) { v a r   l = m . g e t C o m p u t e d S i z e ( { s t y l e s : [ " b o r d e r " , " p a d d i n g " , " m a r g i n " ] } ) ; 
 v a r   n ; i f ( d ) { n = { t o p : i , m a r g i n : l [ " m a r g i n - t o p " ] , h e i g h t : l . t o t a l H e i g h t } ; i + = n . h e i g h t - l [ " m a r g i n - t o p " ] ; } e l s e { n = { l e f t : a , m a r g i n : l [ " m a r g i n - l e f t " ] , w i d t h : l . t o t a l W i d t h } ; 
 a + = n . w i d t h ; } v a r   k = d ? " t o p " : " l e f t " ; h [ j ] = { } ; v a r   o = m . g e t S t y l e ( k ) . t o I n t ( ) ; h [ j ] [ k ] = o | | 0 ; r e t u r n   n ; } , t h i s ) ; t h i s . s e t ( h ) ; e = e . m a p ( f u n c t i o n ( j ) { r e t u r n   j . t o I n t ( ) ; } ) ; 
 i f ( e . l e n g t h ! = t h i s . e l e m e n t s . l e n g t h ) { t h i s . c u r r e n t O r d e r . e a c h ( f u n c t i o n ( j ) { i f ( ! e . c o n t a i n s ( j ) ) { e . p u s h ( j ) ; } } ) ; i f ( e . l e n g t h > t h i s . e l e m e n t s . l e n g t h ) { e . s p l i c e ( t h i s . e l e m e n t s . l e n g t h - 1 , e . l e n g t h - t h i s . e l e m e n t s . l e n g t h ) ; 
 } } v a r   b = i = a = 0 ; e . e a c h ( f u n c t i o n ( l , j ) { v a r   k = { } ; i f ( d ) { k . t o p = i - f [ l ] . t o p - b ; i + = f [ l ] . h e i g h t ; } e l s e { k . l e f t = a - f [ l ] . l e f t ; a + = f [ l ] . w i d t h ; } b = b + f [ l ] . m a r g i n ; c [ l ] = k ; } , t h i s ) ; 
 v a r   g = { } ; $ A ( e ) . s o r t ( ) . e a c h ( f u n c t i o n ( j ) { g [ j ] = c [ j ] ; } ) ; t h i s . s t a r t ( g ) ; t h i s . c u r r e n t O r d e r = e ; r e t u r n   t h i s ; } , r e a r r a n g e D O M : f u n c t i o n ( a ) { a = a | | t h i s . c u r r e n t O r d e r ; v a r   b = t h i s . e l e m e n t s [ 0 ] . g e t P a r e n t ( ) ; 
 v a r   c = [ ] ; t h i s . e l e m e n t s . s e t S t y l e ( " o p a c i t y " , 0 ) ; a . e a c h ( f u n c t i o n ( d ) { c . p u s h ( t h i s . e l e m e n t s [ d ] . i n j e c t ( b ) . s e t S t y l e s ( { t o p : 0 , l e f t : 0 } ) ) ; } , t h i s ) ; t h i s . e l e m e n t s . s e t S t y l e ( " o p a c i t y " , 1 ) ; 
 t h i s . e l e m e n t s = $ $ ( c ) ; t h i s . s e t D e f a u l t O r d e r ( ) ; r e t u r n   t h i s ; } , g e t D e f a u l t O r d e r : f u n c t i o n ( ) { r e t u r n   t h i s . e l e m e n t s . m a p ( f u n c t i o n ( b , a ) { r e t u r n   a ; } ) ; } , f o r w a r d : f u n c t i o n ( ) { r e t u r n   t h i s . s o r t ( t h i s . g e t D e f a u l t O r d e r ( ) ) ; 
 } , b a c k w a r d : f u n c t i o n ( ) { r e t u r n   t h i s . s o r t ( t h i s . g e t D e f a u l t O r d e r ( ) . r e v e r s e ( ) ) ; } , r e v e r s e : f u n c t i o n ( ) { r e t u r n   t h i s . s o r t ( t h i s . c u r r e n t O r d e r . r e v e r s e ( ) ) ; } , s o r t B y E l e m e n t s : f u n c t i o n ( a ) { r e t u r n   t h i s . s o r t ( a . m a p ( f u n c t i o n ( b ) { r e t u r n   t h i s . e l e m e n t s . i n d e x O f ( b ) ; 
 } , t h i s ) ) ; } , s w a p : f u n c t i o n ( c , b ) { i f ( $ t y p e ( c ) = = " e l e m e n t " ) { c = t h i s . e l e m e n t s . i n d e x O f ( c ) ; } i f ( $ t y p e ( b ) = = " e l e m e n t " ) { b = t h i s . e l e m e n t s . i n d e x O f ( b ) ; } v a r   a = $ A ( t h i s . c u r r e n t O r d e r ) ; 
 a [ t h i s . c u r r e n t O r d e r . i n d e x O f ( c ) ] = b ; a [ t h i s . c u r r e n t O r d e r . i n d e x O f ( b ) ] = c ; r e t u r n   t h i s . s o r t ( a ) ; } } ) ; v a r   D r a g = n e w   C l a s s ( { I m p l e m e n t s : [ E v e n t s , O p t i o n s ] , o p t i o n s : { s n a p : 6 , u n i t : " p x " , g r i d : f a l s e , s t y l e : t r u e , l i m i t : f a l s e , h a n d l e : f a l s e , i n v e r t : f a l s e , p r e v e n t D e f a u l t : f a l s e , s t o p P r o p a g a t i o n : f a l s e , m o d i f i e r s : { x : " l e f t " , y : " t o p " } } , i n i t i a l i z e : f u n c t i o n ( ) { v a r   b = A r r a y . l i n k ( a r g u m e n t s , { o p t i o n s : O b j e c t . t y p e , e l e m e n t : $ d e f i n e d } ) ; 
 t h i s . e l e m e n t = d o c u m e n t . i d ( b . e l e m e n t ) ; t h i s . d o c u m e n t = t h i s . e l e m e n t . g e t D o c u m e n t ( ) ; t h i s . s e t O p t i o n s ( b . o p t i o n s | | { } ) ; v a r   a = $ t y p e ( t h i s . o p t i o n s . h a n d l e ) ; t h i s . h a n d l e s = ( ( a = = " a r r a y " | | a = = " c o l l e c t i o n " ) ? $ $ ( t h i s . o p t i o n s . h a n d l e ) : d o c u m e n t . i d ( t h i s . o p t i o n s . h a n d l e ) ) | | t h i s . e l e m e n t ; 
 t h i s . m o u s e = { n o w : { } , p o s : { } } ; t h i s . v a l u e = { s t a r t : { } , n o w : { } } ; t h i s . s e l e c t i o n = ( B r o w s e r . E n g i n e . t r i d e n t ) ? " s e l e c t s t a r t " : " m o u s e d o w n " ; t h i s . b o u n d = { s t a r t : t h i s . s t a r t . b i n d ( t h i s ) , c h e c k : t h i s . c h e c k . b i n d ( t h i s ) , d r a g : t h i s . d r a g . b i n d ( t h i s ) , s t o p : t h i s . s t o p . b i n d ( t h i s ) , c a n c e l : t h i s . c a n c e l . b i n d ( t h i s ) , e v e n t S t o p : $ l a m b d a ( f a l s e ) } ; 
 t h i s . a t t a c h ( ) ; } , a t t a c h : f u n c t i o n ( ) { t h i s . h a n d l e s . a d d E v e n t ( " m o u s e d o w n " , t h i s . b o u n d . s t a r t ) ; r e t u r n   t h i s ; } , d e t a c h : f u n c t i o n ( ) { t h i s . h a n d l e s . r e m o v e E v e n t ( " m o u s e d o w n " , t h i s . b o u n d . s t a r t ) ; 
 r e t u r n   t h i s ; } , s t a r t : f u n c t i o n ( c ) { i f ( c . r i g h t C l i c k ) { r e t u r n ; } i f ( t h i s . o p t i o n s . p r e v e n t D e f a u l t ) { c . p r e v e n t D e f a u l t ( ) ; } i f ( t h i s . o p t i o n s . s t o p P r o p a g a t i o n ) { c . s t o p P r o p a g a t i o n ( ) ; 
 } t h i s . m o u s e . s t a r t = c . p a g e ; t h i s . f i r e E v e n t ( " b e f o r e S t a r t " , t h i s . e l e m e n t ) ; v a r   a = t h i s . o p t i o n s . l i m i t ; t h i s . l i m i t = { x : [ ] , y : [ ] } ; f o r ( v a r   d   i n   t h i s . o p t i o n s . m o d i f i e r s ) { i f ( ! t h i s . o p t i o n s . m o d i f i e r s [ d ] ) { c o n t i n u e ; 
 } i f ( t h i s . o p t i o n s . s t y l e ) { t h i s . v a l u e . n o w [ d ] = t h i s . e l e m e n t . g e t S t y l e ( t h i s . o p t i o n s . m o d i f i e r s [ d ] ) . t o I n t ( ) ; } e l s e { t h i s . v a l u e . n o w [ d ] = t h i s . e l e m e n t [ t h i s . o p t i o n s . m o d i f i e r s [ d ] ] ; 
 } i f ( t h i s . o p t i o n s . i n v e r t ) { t h i s . v a l u e . n o w [ d ] * = - 1 ; } t h i s . m o u s e . p o s [ d ] = c . p a g e [ d ] - t h i s . v a l u e . n o w [ d ] ; i f ( a & & a [ d ] ) { f o r ( v a r   b = 2 ; b - - ; b ) { i f ( $ c h k ( a [ d ] [ b ] ) ) { t h i s . l i m i t [ d ] [ b ] = $ l a m b d a ( a [ d ] [ b ] ) ( ) ; 
 } } } } i f ( $ t y p e ( t h i s . o p t i o n s . g r i d ) = = " n u m b e r " ) { t h i s . o p t i o n s . g r i d = { x : t h i s . o p t i o n s . g r i d , y : t h i s . o p t i o n s . g r i d } ; } t h i s . d o c u m e n t . a d d E v e n t s ( { m o u s e m o v e : t h i s . b o u n d . c h e c k , m o u s e u p : t h i s . b o u n d . c a n c e l } ) ; 
 t h i s . d o c u m e n t . a d d E v e n t ( t h i s . s e l e c t i o n , t h i s . b o u n d . e v e n t S t o p ) ; } , c h e c k : f u n c t i o n ( a ) { i f ( t h i s . o p t i o n s . p r e v e n t D e f a u l t ) { a . p r e v e n t D e f a u l t ( ) ; } v a r   b = M a t h . r o u n d ( M a t h . s q r t ( M a t h . p o w ( a . p a g e . x - t h i s . m o u s e . s t a r t . x , 2 ) + M a t h . p o w ( a . p a g e . y - t h i s . m o u s e . s t a r t . y , 2 ) ) ) ; 
 i f ( b > t h i s . o p t i o n s . s n a p ) { t h i s . c a n c e l ( ) ; t h i s . d o c u m e n t . a d d E v e n t s ( { m o u s e m o v e : t h i s . b o u n d . d r a g , m o u s e u p : t h i s . b o u n d . s t o p } ) ; t h i s . f i r e E v e n t ( " s t a r t " , [ t h i s . e l e m e n t , a ] ) . f i r e E v e n t ( " s n a p " , t h i s . e l e m e n t ) ; 
 } } , d r a g : f u n c t i o n ( a ) { i f ( t h i s . o p t i o n s . p r e v e n t D e f a u l t ) { a . p r e v e n t D e f a u l t ( ) ; } t h i s . m o u s e . n o w = a . p a g e ; f o r ( v a r   b   i n   t h i s . o p t i o n s . m o d i f i e r s ) { i f ( ! t h i s . o p t i o n s . m o d i f i e r s [ b ] ) { c o n t i n u e ; 
 } t h i s . v a l u e . n o w [ b ] = t h i s . m o u s e . n o w [ b ] - t h i s . m o u s e . p o s [ b ] ; i f ( t h i s . o p t i o n s . i n v e r t ) { t h i s . v a l u e . n o w [ b ] * = - 1 ; } i f ( t h i s . o p t i o n s . l i m i t & & t h i s . l i m i t [ b ] ) { i f ( $ c h k ( t h i s . l i m i t [ b ] [ 1 ] ) & & ( t h i s . v a l u e . n o w [ b ] > t h i s . l i m i t [ b ] [ 1 ] ) ) { t h i s . v a l u e . n o w [ b ] = t h i s . l i m i t [ b ] [ 1 ] ; 
 } e l s e { i f ( $ c h k ( t h i s . l i m i t [ b ] [ 0 ] ) & & ( t h i s . v a l u e . n o w [ b ] < t h i s . l i m i t [ b ] [ 0 ] ) ) { t h i s . v a l u e . n o w [ b ] = t h i s . l i m i t [ b ] [ 0 ] ; } } } i f ( t h i s . o p t i o n s . g r i d [ b ] ) { t h i s . v a l u e . n o w [ b ] - = ( ( t h i s . v a l u e . n o w [ b ] - ( t h i s . l i m i t [ b ] [ 0 ] | | 0 ) ) % t h i s . o p t i o n s . g r i d [ b ] ) ; 
 } i f ( t h i s . o p t i o n s . s t y l e ) { t h i s . e l e m e n t . s e t S t y l e ( t h i s . o p t i o n s . m o d i f i e r s [ b ] , t h i s . v a l u e . n o w [ b ] + t h i s . o p t i o n s . u n i t ) ; } e l s e { t h i s . e l e m e n t [ t h i s . o p t i o n s . m o d i f i e r s [ b ] ] = t h i s . v a l u e . n o w [ b ] ; 
 } } t h i s . f i r e E v e n t ( " d r a g " , [ t h i s . e l e m e n t , a ] ) ; } , c a n c e l : f u n c t i o n ( a ) { t h i s . d o c u m e n t . r e m o v e E v e n t ( " m o u s e m o v e " , t h i s . b o u n d . c h e c k ) ; t h i s . d o c u m e n t . r e m o v e E v e n t ( " m o u s e u p " , t h i s . b o u n d . c a n c e l ) ; 
 i f ( a ) { t h i s . d o c u m e n t . r e m o v e E v e n t ( t h i s . s e l e c t i o n , t h i s . b o u n d . e v e n t S t o p ) ; t h i s . f i r e E v e n t ( " c a n c e l " , t h i s . e l e m e n t ) ; } } , s t o p : f u n c t i o n ( a ) { t h i s . d o c u m e n t . r e m o v e E v e n t ( t h i s . s e l e c t i o n , t h i s . b o u n d . e v e n t S t o p ) ; 
 t h i s . d o c u m e n t . r e m o v e E v e n t ( " m o u s e m o v e " , t h i s . b o u n d . d r a g ) ; t h i s . d o c u m e n t . r e m o v e E v e n t ( " m o u s e u p " , t h i s . b o u n d . s t o p ) ; i f ( a ) { t h i s . f i r e E v e n t ( " c o m p l e t e " , [ t h i s . e l e m e n t , a ] ) ; 
 } } } ) ; E l e m e n t . i m p l e m e n t ( { m a k e R e s i z a b l e : f u n c t i o n ( a ) { v a r   b = n e w   D r a g ( t h i s , $ m e r g e ( { m o d i f i e r s : { x : " w i d t h " , y : " h e i g h t " } } , a ) ) ; t h i s . s t o r e ( " r e s i z e r " , b ) ; r e t u r n   b . a d d E v e n t ( " d r a g " , f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " r e s i z e " , b ) ; 
 } . b i n d ( t h i s ) ) ; } } ) ; D r a g . M o v e = n e w   C l a s s ( { E x t e n d s : D r a g , o p t i o n s : { d r o p p a b l e s : [ ] , c o n t a i n e r : f a l s e , p r e c a l c u l a t e : f a l s e , i n c l u d e M a r g i n s : t r u e , c h e c k D r o p p a b l e s : t r u e } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . p a r e n t ( b , a ) ; 
 b = t h i s . e l e m e n t ; t h i s . d r o p p a b l e s = $ $ ( t h i s . o p t i o n s . d r o p p a b l e s ) ; t h i s . c o n t a i n e r = d o c u m e n t . i d ( t h i s . o p t i o n s . c o n t a i n e r ) ; i f ( t h i s . c o n t a i n e r & & $ t y p e ( t h i s . c o n t a i n e r ) ! = " e l e m e n t " ) { t h i s . c o n t a i n e r = d o c u m e n t . i d ( t h i s . c o n t a i n e r . g e t D o c u m e n t ( ) . b o d y ) ; 
 } v a r   c = b . g e t S t y l e s ( " l e f t " , " t o p " , " p o s i t i o n " ) ; i f ( c . l e f t = = " a u t o " | | c . t o p = = " a u t o " ) { b . s e t P o s i t i o n ( b . g e t P o s i t i o n ( b . g e t O f f s e t P a r e n t ( ) ) ) ; } i f ( c . p o s i t i o n = = " s t a t i c " ) { b . s e t S t y l e ( " p o s i t i o n " , " a b s o l u t e " ) ; 
 } t h i s . a d d E v e n t ( " s t a r t " , t h i s . c h e c k D r o p p a b l e s , t r u e ) ; t h i s . o v e r e d = n u l l ; } , s t a r t : f u n c t i o n ( a ) { i f ( t h i s . c o n t a i n e r ) { t h i s . o p t i o n s . l i m i t = t h i s . c a l c u l a t e L i m i t ( ) ; } i f ( t h i s . o p t i o n s . p r e c a l c u l a t e ) { t h i s . p o s i t i o n s = t h i s . d r o p p a b l e s . m a p ( f u n c t i o n ( b ) { r e t u r n   b . g e t C o o r d i n a t e s ( ) ; 
 } ) ; } t h i s . p a r e n t ( a ) ; } , c a l c u l a t e L i m i t : f u n c t i o n ( ) { v a r   d = t h i s . e l e m e n t . g e t O f f s e t P a r e n t ( ) , g = t h i s . c o n t a i n e r . g e t C o o r d i n a t e s ( d ) , f = { } , c = { } , b = { } , i = { } , k = { } ; [ " t o p " , " r i g h t " , " b o t t o m " , " l e f t " ] . e a c h ( f u n c t i o n ( o ) { f [ o ] = t h i s . c o n t a i n e r . g e t S t y l e ( " b o r d e r - " + o ) . t o I n t ( ) ; 
 b [ o ] = t h i s . e l e m e n t . g e t S t y l e ( " b o r d e r - " + o ) . t o I n t ( ) ; c [ o ] = t h i s . e l e m e n t . g e t S t y l e ( " m a r g i n - " + o ) . t o I n t ( ) ; i [ o ] = t h i s . c o n t a i n e r . g e t S t y l e ( " m a r g i n - " + o ) . t o I n t ( ) ; k [ o ] = d . g e t S t y l e ( " p a d d i n g - " + o ) . t o I n t ( ) ; 
 } , t h i s ) ; v a r   e = t h i s . e l e m e n t . o f f s e t W i d t h + c . l e f t + c . r i g h t , n = t h i s . e l e m e n t . o f f s e t H e i g h t + c . t o p + c . b o t t o m , h = 0 , j = 0 , m = g . r i g h t - f . r i g h t - e , a = g . b o t t o m - f . b o t t o m - n ; i f ( t h i s . o p t i o n s . i n c l u d e M a r g i n s ) { h + = c . l e f t ; 
 j + = c . t o p ; } e l s e { m + = c . r i g h t ; a + = c . b o t t o m ; } i f ( t h i s . e l e m e n t . g e t S t y l e ( " p o s i t i o n " ) = = " r e l a t i v e " ) { v a r   l = t h i s . e l e m e n t . g e t C o o r d i n a t e s ( d ) ; l . l e f t - = t h i s . e l e m e n t . g e t S t y l e ( " l e f t " ) . t o I n t ( ) ; 
 l . t o p - = t h i s . e l e m e n t . g e t S t y l e ( " t o p " ) . t o I n t ( ) ; h + = f . l e f t - l . l e f t ; j + = f . t o p - l . t o p ; m + = c . l e f t - l . l e f t ; a + = c . t o p - l . t o p ; i f ( t h i s . c o n t a i n e r ! = d ) { h + = i . l e f t + k . l e f t ; j + = ( B r o w s e r . E n g i n e . t r i d e n t 4 ? 0 : i . t o p ) + k . t o p ; 
 } } e l s e { h - = c . l e f t ; j - = c . t o p ; i f ( t h i s . c o n t a i n e r = = d ) { m - = f . l e f t ; a - = f . t o p ; } e l s e { h + = g . l e f t + f . l e f t ; j + = g . t o p + f . t o p ; } } r e t u r n { x : [ h , m ] , y : [ j , a ] } ; } , c h e c k A g a i n s t : f u n c t i o n ( c , b ) { c = ( t h i s . p o s i t i o n s ) ? t h i s . p o s i t i o n s [ b ] : c . g e t C o o r d i n a t e s ( ) ; 
 v a r   a = t h i s . m o u s e . n o w ; r e t u r n ( a . x > c . l e f t & & a . x < c . r i g h t & & a . y < c . b o t t o m & & a . y > c . t o p ) ; } , c h e c k D r o p p a b l e s : f u n c t i o n ( ) { v a r   a = t h i s . d r o p p a b l e s . f i l t e r ( t h i s . c h e c k A g a i n s t , t h i s ) . g e t L a s t ( ) ; 
 i f ( t h i s . o v e r e d ! = a ) { i f ( t h i s . o v e r e d ) { t h i s . f i r e E v e n t ( " l e a v e " , [ t h i s . e l e m e n t , t h i s . o v e r e d ] ) ; } i f ( a ) { t h i s . f i r e E v e n t ( " e n t e r " , [ t h i s . e l e m e n t , a ] ) ; } t h i s . o v e r e d = a ; } } , d r a g : f u n c t i o n ( a ) { t h i s . p a r e n t ( a ) ; 
 i f ( t h i s . o p t i o n s . c h e c k D r o p p a b l e s & & t h i s . d r o p p a b l e s . l e n g t h ) { t h i s . c h e c k D r o p p a b l e s ( ) ; } } , s t o p : f u n c t i o n ( a ) { t h i s . c h e c k D r o p p a b l e s ( ) ; t h i s . f i r e E v e n t ( " d r o p " , [ t h i s . e l e m e n t , t h i s . o v e r e d , a ] ) ; 
 t h i s . o v e r e d = n u l l ; r e t u r n   t h i s . p a r e n t ( a ) ; } } ) ; E l e m e n t . i m p l e m e n t ( { m a k e D r a g g a b l e : f u n c t i o n ( a ) { v a r   b = n e w   D r a g . M o v e ( t h i s , a ) ; t h i s . s t o r e ( " d r a g g e r " , b ) ; r e t u r n   b ; } } ) ; 
 v a r   S l i d e r = n e w   C l a s s ( { I m p l e m e n t s : [ E v e n t s , O p t i o n s ] , B i n d s : [ " c l i c k e d E l e m e n t " , " d r a g g e d K n o b " , " s c r o l l e d E l e m e n t " ] , o p t i o n s : { o n T i c k : f u n c t i o n ( a ) { i f ( t h i s . o p t i o n s . s n a p ) { a = t h i s . t o P o s i t i o n ( t h i s . s t e p ) ; 
 } t h i s . k n o b . s e t S t y l e ( t h i s . p r o p e r t y , a ) ; } , i n i t i a l S t e p : 0 , s n a p : f a l s e , o f f s e t : 0 , r a n g e : f a l s e , w h e e l : f a l s e , s t e p s : 1 0 0 , m o d e : " h o r i z o n t a l " } , i n i t i a l i z e : f u n c t i o n ( f , a , e ) { t h i s . s e t O p t i o n s ( e ) ; 
 t h i s . e l e m e n t = d o c u m e n t . i d ( f ) ; t h i s . k n o b = d o c u m e n t . i d ( a ) ; t h i s . p r e v i o u s C h a n g e = t h i s . p r e v i o u s E n d = t h i s . s t e p = - 1 ; v a r   g , b = { } , d = { x : f a l s e , y : f a l s e } ; s w i t c h ( t h i s . o p t i o n s . m o d e ) { c a s e " v e r t i c a l " : t h i s . a x i s = " y " ; 
 t h i s . p r o p e r t y = " t o p " ; g = " o f f s e t H e i g h t " ; b r e a k ; c a s e " h o r i z o n t a l " : t h i s . a x i s = " x " ; t h i s . p r o p e r t y = " l e f t " ; g = " o f f s e t W i d t h " ; } t h i s . f u l l = t h i s . e l e m e n t . m e a s u r e ( f u n c t i o n ( ) { t h i s . h a l f = t h i s . k n o b [ g ] / 2 ; 
 r e t u r n   t h i s . e l e m e n t [ g ] - t h i s . k n o b [ g ] + ( t h i s . o p t i o n s . o f f s e t * 2 ) ; } . b i n d ( t h i s ) ) ; t h i s . m i n = $ c h k ( t h i s . o p t i o n s . r a n g e [ 0 ] ) ? t h i s . o p t i o n s . r a n g e [ 0 ] : 0 ; t h i s . m a x = $ c h k ( t h i s . o p t i o n s . r a n g e [ 1 ] ) ? t h i s . o p t i o n s . r a n g e [ 1 ] : t h i s . o p t i o n s . s t e p s ; 
 t h i s . r a n g e = t h i s . m a x - t h i s . m i n ; t h i s . s t e p s = t h i s . o p t i o n s . s t e p s | | t h i s . f u l l ; t h i s . s t e p S i z e = M a t h . a b s ( t h i s . r a n g e ) / t h i s . s t e p s ; t h i s . s t e p W i d t h = t h i s . s t e p S i z e * t h i s . f u l l / M a t h . a b s ( t h i s . r a n g e ) ; 
 t h i s . k n o b . s e t S t y l e ( " p o s i t i o n " , " r e l a t i v e " ) . s e t S t y l e ( t h i s . p r o p e r t y , t h i s . o p t i o n s . i n i t i a l S t e p ? t h i s . t o P o s i t i o n ( t h i s . o p t i o n s . i n i t i a l S t e p ) : - t h i s . o p t i o n s . o f f s e t ) ; 
 d [ t h i s . a x i s ] = t h i s . p r o p e r t y ; b [ t h i s . a x i s ] = [ - t h i s . o p t i o n s . o f f s e t , t h i s . f u l l - t h i s . o p t i o n s . o f f s e t ] ; v a r   c = { s n a p : 0 , l i m i t : b , m o d i f i e r s : d , o n D r a g : t h i s . d r a g g e d K n o b , o n S t a r t : t h i s . d r a g g e d K n o b , o n B e f o r e S t a r t : ( f u n c t i o n ( ) { t h i s . i s D r a g g i n g = t r u e ; 
 } ) . b i n d ( t h i s ) , o n C a n c e l : f u n c t i o n ( ) { t h i s . i s D r a g g i n g = f a l s e ; } . b i n d ( t h i s ) , o n C o m p l e t e : f u n c t i o n ( ) { t h i s . i s D r a g g i n g = f a l s e ; t h i s . d r a g g e d K n o b ( ) ; t h i s . e n d ( ) ; } . b i n d ( t h i s ) } ; 
 i f ( t h i s . o p t i o n s . s n a p ) { c . g r i d = M a t h . c e i l ( t h i s . s t e p W i d t h ) ; c . l i m i t [ t h i s . a x i s ] [ 1 ] = t h i s . f u l l ; } t h i s . d r a g = n e w   D r a g ( t h i s . k n o b , c ) ; t h i s . a t t a c h ( ) ; } , a t t a c h : f u n c t i o n ( ) { t h i s . e l e m e n t . a d d E v e n t ( " m o u s e d o w n " , t h i s . c l i c k e d E l e m e n t ) ; 
 i f ( t h i s . o p t i o n s . w h e e l ) { t h i s . e l e m e n t . a d d E v e n t ( " m o u s e w h e e l " , t h i s . s c r o l l e d E l e m e n t ) ; } t h i s . d r a g . a t t a c h ( ) ; r e t u r n   t h i s ; } , d e t a c h : f u n c t i o n ( ) { t h i s . e l e m e n t . r e m o v e E v e n t ( " m o u s e d o w n " , t h i s . c l i c k e d E l e m e n t ) ; 
 t h i s . e l e m e n t . r e m o v e E v e n t ( " m o u s e w h e e l " , t h i s . s c r o l l e d E l e m e n t ) ; t h i s . d r a g . d e t a c h ( ) ; r e t u r n   t h i s ; } , s e t : f u n c t i o n ( a ) { i f ( ! ( ( t h i s . r a n g e > 0 ) ^ ( a < t h i s . m i n ) ) ) { a = t h i s . m i n ; 
 } i f ( ! ( ( t h i s . r a n g e > 0 ) ^ ( a > t h i s . m a x ) ) ) { a = t h i s . m a x ; } t h i s . s t e p = M a t h . r o u n d ( a ) ; t h i s . c h e c k S t e p ( ) ; t h i s . f i r e E v e n t ( " t i c k " , t h i s . t o P o s i t i o n ( t h i s . s t e p ) ) ; t h i s . e n d ( ) ; r e t u r n   t h i s ; 
 } , c l i c k e d E l e m e n t : f u n c t i o n ( c ) { i f ( t h i s . i s D r a g g i n g | | c . t a r g e t = = t h i s . k n o b ) { r e t u r n ; } v a r   b = t h i s . r a n g e < 0 ? - 1 : 1 ; v a r   a = c . p a g e [ t h i s . a x i s ] - t h i s . e l e m e n t . g e t P o s i t i o n ( ) [ t h i s . a x i s ] - t h i s . h a l f ; 
 a = a . l i m i t ( - t h i s . o p t i o n s . o f f s e t , t h i s . f u l l - t h i s . o p t i o n s . o f f s e t ) ; t h i s . s t e p = M a t h . r o u n d ( t h i s . m i n + b * t h i s . t o S t e p ( a ) ) ; t h i s . c h e c k S t e p ( ) ; t h i s . f i r e E v e n t ( " t i c k " , a ) ; 
 t h i s . e n d ( ) ; } , s c r o l l e d E l e m e n t : f u n c t i o n ( a ) { v a r   b = ( t h i s . o p t i o n s . m o d e = = " h o r i z o n t a l " ) ? ( a . w h e e l < 0 ) : ( a . w h e e l > 0 ) ; t h i s . s e t ( b ? t h i s . s t e p - t h i s . s t e p S i z e : t h i s . s t e p + t h i s . s t e p S i z e ) ; 
 a . s t o p ( ) ; } , d r a g g e d K n o b : f u n c t i o n ( ) { v a r   b = t h i s . r a n g e < 0 ? - 1 : 1 ; v a r   a = t h i s . d r a g . v a l u e . n o w [ t h i s . a x i s ] ; a = a . l i m i t ( - t h i s . o p t i o n s . o f f s e t , t h i s . f u l l - t h i s . o p t i o n s . o f f s e t ) ; 
 t h i s . s t e p = M a t h . r o u n d ( t h i s . m i n + b * t h i s . t o S t e p ( a ) ) ; t h i s . c h e c k S t e p ( ) ; } , c h e c k S t e p : f u n c t i o n ( ) { i f ( t h i s . p r e v i o u s C h a n g e ! = t h i s . s t e p ) { t h i s . p r e v i o u s C h a n g e = t h i s . s t e p ; 
 t h i s . f i r e E v e n t ( " c h a n g e " , t h i s . s t e p ) ; } } , e n d : f u n c t i o n ( ) { i f ( t h i s . p r e v i o u s E n d ! = = t h i s . s t e p ) { t h i s . p r e v i o u s E n d = t h i s . s t e p ; t h i s . f i r e E v e n t ( " c o m p l e t e " , t h i s . s t e p + " " ) ; 
 } } , t o S t e p : f u n c t i o n ( a ) { v a r   b = ( a + t h i s . o p t i o n s . o f f s e t ) * t h i s . s t e p S i z e / t h i s . f u l l * t h i s . s t e p s ; r e t u r n   t h i s . o p t i o n s . s t e p s ? M a t h . r o u n d ( b - = b % t h i s . s t e p S i z e ) : b ; } , t o P o s i t i o n : f u n c t i o n ( a ) { r e t u r n ( t h i s . f u l l * M a t h . a b s ( t h i s . m i n - a ) ) / ( t h i s . s t e p s * t h i s . s t e p S i z e ) - t h i s . o p t i o n s . o f f s e t ; 
 } } ) ; v a r   S o r t a b l e s = n e w   C l a s s ( { I m p l e m e n t s : [ E v e n t s , O p t i o n s ] , o p t i o n s : { s n a p : 4 , o p a c i t y : 1 , c l o n e : f a l s e , r e v e r t : f a l s e , h a n d l e : f a l s e , c o n s t r a i n : f a l s e } , i n i t i a l i z e : f u n c t i o n ( a , b ) { t h i s . s e t O p t i o n s ( b ) ; 
 t h i s . e l e m e n t s = [ ] ; t h i s . l i s t s = [ ] ; t h i s . i d l e = t r u e ; t h i s . a d d L i s t s ( $ $ ( d o c u m e n t . i d ( a ) | | a ) ) ; i f ( ! t h i s . o p t i o n s . c l o n e ) { t h i s . o p t i o n s . r e v e r t = f a l s e ; } i f ( t h i s . o p t i o n s . r e v e r t ) { t h i s . e f f e c t = n e w   F x . M o r p h ( n u l l , $ m e r g e ( { d u r a t i o n : 2 5 0 , l i n k : " c a n c e l " } , t h i s . o p t i o n s . r e v e r t ) ) ; 
 } } , a t t a c h : f u n c t i o n ( ) { t h i s . a d d L i s t s ( t h i s . l i s t s ) ; r e t u r n   t h i s ; } , d e t a c h : f u n c t i o n ( ) { t h i s . l i s t s = t h i s . r e m o v e L i s t s ( t h i s . l i s t s ) ; r e t u r n   t h i s ; } , a d d I t e m s : f u n c t i o n ( ) { A r r a y . f l a t t e n ( a r g u m e n t s ) . e a c h ( f u n c t i o n ( a ) { t h i s . e l e m e n t s . p u s h ( a ) ; 
 v a r   b = a . r e t r i e v e ( " s o r t a b l e s : s t a r t " , t h i s . s t a r t . b i n d W i t h E v e n t ( t h i s , a ) ) ; ( t h i s . o p t i o n s . h a n d l e ? a . g e t E l e m e n t ( t h i s . o p t i o n s . h a n d l e ) | | a : a ) . a d d E v e n t ( " m o u s e d o w n " , b ) ; 
 } , t h i s ) ; r e t u r n   t h i s ; } , a d d L i s t s : f u n c t i o n ( ) { A r r a y . f l a t t e n ( a r g u m e n t s ) . e a c h ( f u n c t i o n ( a ) { t h i s . l i s t s . p u s h ( a ) ; t h i s . a d d I t e m s ( a . g e t C h i l d r e n ( ) ) ; } , t h i s ) ; r e t u r n   t h i s ; 
 } , r e m o v e I t e m s : f u n c t i o n ( ) { r e t u r n   $ $ ( A r r a y . f l a t t e n ( a r g u m e n t s ) . m a p ( f u n c t i o n ( a ) { t h i s . e l e m e n t s . e r a s e ( a ) ; v a r   b = a . r e t r i e v e ( " s o r t a b l e s : s t a r t " ) ; ( t h i s . o p t i o n s . h a n d l e ? a . g e t E l e m e n t ( t h i s . o p t i o n s . h a n d l e ) | | a : a ) . r e m o v e E v e n t ( " m o u s e d o w n " , b ) ; 
 r e t u r n   a ; } , t h i s ) ) ; } , r e m o v e L i s t s : f u n c t i o n ( ) { r e t u r n   $ $ ( A r r a y . f l a t t e n ( a r g u m e n t s ) . m a p ( f u n c t i o n ( a ) { t h i s . l i s t s . e r a s e ( a ) ; t h i s . r e m o v e I t e m s ( a . g e t C h i l d r e n ( ) ) ; r e t u r n   a ; 
 } , t h i s ) ) ; } , g e t C l o n e : f u n c t i o n ( b , a ) { i f ( ! t h i s . o p t i o n s . c l o n e ) { r e t u r n   n e w   E l e m e n t ( " d i v " ) . i n j e c t ( d o c u m e n t . b o d y ) ; } i f ( $ t y p e ( t h i s . o p t i o n s . c l o n e ) = = " f u n c t i o n " ) { r e t u r n   t h i s . o p t i o n s . c l o n e . c a l l ( t h i s , b , a , t h i s . l i s t ) ; 
 } v a r   c = a . c l o n e ( t r u e ) . s e t S t y l e s ( { m a r g i n : " 0 p x " , p o s i t i o n : " a b s o l u t e " , v i s i b i l i t y : " h i d d e n " , w i d t h : a . g e t S t y l e ( " w i d t h " ) } ) ; i f ( c . g e t ( " h t m l " ) . t e s t ( " r a d i o " ) ) { c . g e t E l e m e n t s ( " i n p u t [ t y p e = r a d i o ] " ) . e a c h ( f u n c t i o n ( d , e ) { d . s e t ( " n a m e " , " c l o n e _ " + e ) ; 
 } ) ; } r e t u r n   c . i n j e c t ( t h i s . l i s t ) . s e t P o s i t i o n ( a . g e t P o s i t i o n ( a . g e t O f f s e t P a r e n t ( ) ) ) ; } , g e t D r o p p a b l e s : f u n c t i o n ( ) { v a r   a = t h i s . l i s t . g e t C h i l d r e n ( ) ; i f ( ! t h i s . o p t i o n s . c o n s t r a i n ) { a = t h i s . l i s t s . c o n c a t ( a ) . e r a s e ( t h i s . l i s t ) ; 
 } r e t u r n   a . e r a s e ( t h i s . c l o n e ) . e r a s e ( t h i s . e l e m e n t ) ; } , i n s e r t : f u n c t i o n ( c , b ) { v a r   a = " i n s i d e " ; i f ( t h i s . l i s t s . c o n t a i n s ( b ) ) { t h i s . l i s t = b ; t h i s . d r a g . d r o p p a b l e s = t h i s . g e t D r o p p a b l e s ( ) ; 
 } e l s e { a = t h i s . e l e m e n t . g e t A l l P r e v i o u s ( ) . c o n t a i n s ( b ) ? " b e f o r e " : " a f t e r " ; } t h i s . e l e m e n t . i n j e c t ( b , a ) ; t h i s . f i r e E v e n t ( " s o r t " , [ t h i s . e l e m e n t , t h i s . c l o n e ] ) ; } , s t a r t : f u n c t i o n ( b , a ) { i f ( ! t h i s . i d l e ) { r e t u r n ; 
 } t h i s . i d l e = f a l s e ; t h i s . e l e m e n t = a ; t h i s . o p a c i t y = a . g e t ( " o p a c i t y " ) ; t h i s . l i s t = a . g e t P a r e n t ( ) ; t h i s . c l o n e = t h i s . g e t C l o n e ( b , a ) ; t h i s . d r a g = n e w   D r a g . M o v e ( t h i s . c l o n e , { s n a p : t h i s . o p t i o n s . s n a p , c o n t a i n e r : t h i s . o p t i o n s . c o n s t r a i n & & t h i s . e l e m e n t . g e t P a r e n t ( ) , d r o p p a b l e s : t h i s . g e t D r o p p a b l e s ( ) , o n S n a p : f u n c t i o n ( ) { b . s t o p ( ) ; 
 t h i s . c l o n e . s e t S t y l e ( " v i s i b i l i t y " , " v i s i b l e " ) ; t h i s . e l e m e n t . s e t ( " o p a c i t y " , t h i s . o p t i o n s . o p a c i t y | | 0 ) ; t h i s . f i r e E v e n t ( " s t a r t " , [ t h i s . e l e m e n t , t h i s . c l o n e ] ) ; } . b i n d ( t h i s ) , o n E n t e r : t h i s . i n s e r t . b i n d ( t h i s ) , o n C a n c e l : t h i s . r e s e t . b i n d ( t h i s ) , o n C o m p l e t e : t h i s . e n d . b i n d ( t h i s ) } ) ; 
 t h i s . c l o n e . i n j e c t ( t h i s . e l e m e n t , " b e f o r e " ) ; t h i s . d r a g . s t a r t ( b ) ; } , e n d : f u n c t i o n ( ) { t h i s . d r a g . d e t a c h ( ) ; t h i s . e l e m e n t . s e t ( " o p a c i t y " , t h i s . o p a c i t y ) ; i f ( t h i s . e f f e c t ) { v a r   a = t h i s . e l e m e n t . g e t S t y l e s ( " w i d t h " , " h e i g h t " ) ; 
 v a r   b = t h i s . c l o n e . c o m p u t e P o s i t i o n ( t h i s . e l e m e n t . g e t P o s i t i o n ( t h i s . c l o n e . o f f s e t P a r e n t ) ) ; t h i s . e f f e c t . e l e m e n t = t h i s . c l o n e ; t h i s . e f f e c t . s t a r t ( { t o p : b . t o p , l e f t : b . l e f t , w i d t h : a . w i d t h , h e i g h t : a . h e i g h t , o p a c i t y : 0 . 2 5 } ) . c h a i n ( t h i s . r e s e t . b i n d ( t h i s ) ) ; 
 } e l s e { t h i s . r e s e t ( ) ; } } , r e s e t : f u n c t i o n ( ) { t h i s . i d l e = t r u e ; t h i s . c l o n e . d e s t r o y ( ) ; t h i s . f i r e E v e n t ( " c o m p l e t e " , t h i s . e l e m e n t ) ; } , s e r i a l i z e : f u n c t i o n ( ) { v a r   c = A r r a y . l i n k ( a r g u m e n t s , { m o d i f i e r : F u n c t i o n . t y p e , i n d e x : $ d e f i n e d } ) ; 
 v a r   b = t h i s . l i s t s . m a p ( f u n c t i o n ( d ) { r e t u r n   d . g e t C h i l d r e n ( ) . m a p ( c . m o d i f i e r | | f u n c t i o n ( e ) { r e t u r n   e . g e t ( " i d " ) ; } , t h i s ) ; } , t h i s ) ; v a r   a = c . i n d e x ; i f ( t h i s . l i s t s . l e n g t h = = 1 ) { a = 0 ; 
 } r e t u r n   $ c h k ( a ) & & a > = 0 & & a < t h i s . l i s t s . l e n g t h ? b [ a ] : b ; } } ) ; R e q u e s t . J S O N P = n e w   C l a s s ( { I m p l e m e n t s : [ C h a i n , E v e n t s , O p t i o n s , L o g ] , o p t i o n s : { u r l : " " , d a t a : { } , r e t r i e s : 0 , t i m e o u t : 0 , l i n k : " i g n o r e " , c a l l b a c k K e y : " c a l l b a c k " , i n j e c t S c r i p t : d o c u m e n t . h e a d } , i n i t i a l i z e : f u n c t i o n ( a ) { t h i s . s e t O p t i o n s ( a ) ; 
 i f ( t h i s . o p t i o n s . l o g ) { t h i s . e n a b l e L o g ( ) ; } t h i s . r u n n i n g = f a l s e ; t h i s . r e q u e s t s = 0 ; t h i s . t r i e s R e m a i n i n g = [ ] ; } , c h e c k : f u n c t i o n ( ) { i f ( ! t h i s . r u n n i n g ) { r e t u r n   t r u e ; } s w i t c h ( t h i s . o p t i o n s . l i n k ) { c a s e " c a n c e l " : t h i s . c a n c e l ( ) ; 
 r e t u r n   t r u e ; c a s e " c h a i n " : t h i s . c h a i n ( t h i s . c a l l e r . b i n d ( t h i s , a r g u m e n t s ) ) ; r e t u r n   f a l s e ; } r e t u r n   f a l s e ; } , s e n d : f u n c t i o n ( c ) { i f ( ! $ c h k ( a r g u m e n t s [ 1 ] ) & & ! t h i s . c h e c k ( c ) ) { r e t u r n   t h i s ; 
 } v a r   e = $ t y p e ( c ) , a = t h i s . o p t i o n s , b = $ c h k ( a r g u m e n t s [ 1 ] ) ? a r g u m e n t s [ 1 ] : t h i s . r e q u e s t s + + ; i f ( e = = " s t r i n g " | | e = = " e l e m e n t " ) { c = { d a t a : c } ; } c = $ e x t e n d ( { d a t a : a . d a t a , u r l : a . u r l } , c ) ; 
 i f ( ! $ c h k ( t h i s . t r i e s R e m a i n i n g [ b ] ) ) { t h i s . t r i e s R e m a i n i n g [ b ] = t h i s . o p t i o n s . r e t r i e s ; } v a r   d = t h i s . t r i e s R e m a i n i n g [ b ] ; ( f u n c t i o n ( ) { v a r   f = t h i s . g e t S c r i p t ( c ) ; t h i s . l o g ( " J S O N P   r e t r i e v i n g   s c r i p t   w i t h   u r l :   " + f . g e t ( " s r c " ) ) ; 
 t h i s . f i r e E v e n t ( " r e q u e s t " , f ) ; t h i s . r u n n i n g = t r u e ; ( f u n c t i o n ( ) { i f ( d ) { t h i s . t r i e s R e m a i n i n g [ b ] = d - 1 ; i f ( f ) { f . d e s t r o y ( ) ; t h i s . s e n d ( c , b ) . f i r e E v e n t ( " r e t r y " , t h i s . t r i e s R e m a i n i n g [ b ] ) ; 
 } } e l s e { i f ( f & & t h i s . o p t i o n s . t i m e o u t ) { f . d e s t r o y ( ) ; t h i s . c a n c e l ( ) . f i r e E v e n t ( " f a i l u r e " ) ; } } } ) . d e l a y ( t h i s . o p t i o n s . t i m e o u t , t h i s ) ; } ) . d e l a y ( B r o w s e r . E n g i n e . t r i d e n t ? 5 0 : 0 , t h i s ) ; 
 r e t u r n   t h i s ; } , c a n c e l : f u n c t i o n ( ) { i f ( ! t h i s . r u n n i n g ) { r e t u r n   t h i s ; } t h i s . r u n n i n g = f a l s e ; t h i s . f i r e E v e n t ( " c a n c e l " ) ; r e t u r n   t h i s ; } , g e t S c r i p t : f u n c t i o n ( c ) { v a r   b = R e q u e s t . J S O N P . c o u n t e r , d ; 
 R e q u e s t . J S O N P . c o u n t e r + + ; s w i t c h ( $ t y p e ( c . d a t a ) ) { c a s e " e l e m e n t " : d = d o c u m e n t . i d ( c . d a t a ) . t o Q u e r y S t r i n g ( ) ; b r e a k ; c a s e " o b j e c t " : c a s e " h a s h " : d = H a s h . t o Q u e r y S t r i n g ( c . d a t a ) ; 
 } v a r   e = c . u r l + ( c . u r l . t e s t ( " \ \ ? " ) ? " & " : " ? " ) + ( c . c a l l b a c k K e y | | t h i s . o p t i o n s . c a l l b a c k K e y ) + " = R e q u e s t . J S O N P . r e q u e s t _ m a p . r e q u e s t _ " + b + ( d ? " & " + d : " " ) ; i f ( e . l e n g t h > 2 0 8 3 ) { t h i s . l o g ( " J S O N P   " + e + "   w i l l   f a i l   i n   I n t e r n e t   E x p l o r e r ,   w h i c h   e n f o r c e s   a   2 0 8 3   b y t e s   l e n g t h   l i m i t   o n   U R I s " ) ; 
 } v a r   a = n e w   E l e m e n t ( " s c r i p t " , { t y p e : " t e x t / j a v a s c r i p t " , s r c : e } ) ; R e q u e s t . J S O N P . r e q u e s t _ m a p [ " r e q u e s t _ " + b ] = f u n c t i o n ( ) { t h i s . s u c c e s s ( a r g u m e n t s , a ) ; } . b i n d ( t h i s ) ; r e t u r n   a . i n j e c t ( t h i s . o p t i o n s . i n j e c t S c r i p t ) ; 
 } , s u c c e s s : f u n c t i o n ( b , a ) { i f ( a ) { a . d e s t r o y ( ) ; } t h i s . r u n n i n g = f a l s e ; t h i s . l o g ( " J S O N P   s u c c e s s f u l l y   r e t r i e v e d :   " , b ) ; t h i s . f i r e E v e n t ( " c o m p l e t e " , b ) . f i r e E v e n t ( " s u c c e s s " , b ) . c a l l C h a i n ( ) ; 
 } } ) ; R e q u e s t . J S O N P . c o u n t e r = 0 ; R e q u e s t . J S O N P . r e q u e s t _ m a p = { } ; R e q u e s t . Q u e u e = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s , E v e n t s ] , B i n d s : [ " a t t a c h " , " r e q u e s t " , " c o m p l e t e " , " c a n c e l " , " s u c c e s s " , " f a i l u r e " , " e x c e p t i o n " ] , o p t i o n s : { s t o p O n F a i l u r e : t r u e , a u t o A d v a n c e : t r u e , c o n c u r r e n t : 1 , r e q u e s t s : { } } , i n i t i a l i z e : f u n c t i o n ( a ) { i f ( a ) { v a r   b = a . r e q u e s t s ; 
 d e l e t e   a . r e q u e s t s ; } t h i s . s e t O p t i o n s ( a ) ; t h i s . r e q u e s t s = n e w   H a s h ; t h i s . q u e u e = [ ] ; t h i s . r e q B i n d e r s = { } ; i f ( b ) { t h i s . a d d R e q u e s t s ( b ) ; } } , a d d R e q u e s t : f u n c t i o n ( a , b ) { t h i s . r e q u e s t s . s e t ( a , b ) ; 
 t h i s . a t t a c h ( a , b ) ; r e t u r n   t h i s ; } , a d d R e q u e s t s : f u n c t i o n ( a ) { $ e a c h ( a , f u n c t i o n ( c , b ) { t h i s . a d d R e q u e s t ( b , c ) ; } , t h i s ) ; r e t u r n   t h i s ; } , g e t N a m e : f u n c t i o n ( a ) { r e t u r n   t h i s . r e q u e s t s . k e y O f ( a ) ; 
 } , a t t a c h : f u n c t i o n ( a , b ) { i f ( b . _ g r o u p S e n d ) { r e t u r n   t h i s ; } [ " r e q u e s t " , " c o m p l e t e " , " c a n c e l " , " s u c c e s s " , " f a i l u r e " , " e x c e p t i o n " ] . e a c h ( f u n c t i o n ( c ) { i f ( ! t h i s . r e q B i n d e r s [ a ] ) { t h i s . r e q B i n d e r s [ a ] = { } ; 
 } t h i s . r e q B i n d e r s [ a ] [ c ] = f u n c t i o n ( ) { t h i s [ " o n " + c . c a p i t a l i z e ( ) ] . a p p l y ( t h i s , [ a , b ] . e x t e n d ( a r g u m e n t s ) ) ; } . b i n d ( t h i s ) ; b . a d d E v e n t ( c , t h i s . r e q B i n d e r s [ a ] [ c ] ) ; } , t h i s ) ; 
 b . _ g r o u p S e n d = b . s e n d ; b . s e n d = f u n c t i o n ( c ) { t h i s . s e n d ( a , c ) ; r e t u r n   b ; } . b i n d ( t h i s ) ; r e t u r n   t h i s ; } , r e m o v e R e q u e s t : f u n c t i o n ( b ) { v a r   a = $ t y p e ( b ) = = " o b j e c t " ? t h i s . g e t N a m e ( b ) : b ; 
 i f ( ! a & & $ t y p e ( a ) ! = " s t r i n g " ) { r e t u r n   t h i s ; } b = t h i s . r e q u e s t s . g e t ( a ) ; i f ( ! b ) { r e t u r n   t h i s ; } [ " r e q u e s t " , " c o m p l e t e " , " c a n c e l " , " s u c c e s s " , " f a i l u r e " , " e x c e p t i o n " ] . e a c h ( f u n c t i o n ( c ) { b . r e m o v e E v e n t ( c , t h i s . r e q B i n d e r s [ a ] [ c ] ) ; 
 } , t h i s ) ; b . s e n d = b . _ g r o u p S e n d ; d e l e t e   b . _ g r o u p S e n d ; r e t u r n   t h i s ; } , g e t R u n n i n g : f u n c t i o n ( ) { r e t u r n   t h i s . r e q u e s t s . f i l t e r ( f u n c t i o n ( a ) { r e t u r n   a . r u n n i n g ; } ) ; } , i s R u n n i n g : f u n c t i o n ( ) { r e t u r n   ! ! ( t h i s . g e t R u n n i n g ( ) . g e t K e y s ( ) . l e n g t h ) ; 
 } , s e n d : f u n c t i o n ( b , a ) { v a r   c = f u n c t i o n ( ) { t h i s . r e q u e s t s . g e t ( b ) . _ g r o u p S e n d ( a ) ; t h i s . q u e u e . e r a s e ( c ) ; } . b i n d ( t h i s ) ; c . n a m e = b ; i f ( t h i s . g e t R u n n i n g ( ) . g e t K e y s ( ) . l e n g t h > = t h i s . o p t i o n s . c o n c u r r e n t | | ( t h i s . e r r o r & & t h i s . o p t i o n s . s t o p O n F a i l u r e ) ) { t h i s . q u e u e . p u s h ( c ) ; 
 } e l s e { c ( ) ; } r e t u r n   t h i s ; } , h a s N e x t : f u n c t i o n ( a ) { r e t u r n ( ! a ) ? ! ! t h i s . q u e u e . l e n g t h : ! ! t h i s . q u e u e . f i l t e r ( f u n c t i o n ( b ) { r e t u r n   b . n a m e = = a ; } ) . l e n g t h ; } , r e s u m e : f u n c t i o n ( ) { t h i s . e r r o r = f a l s e ; 
 ( t h i s . o p t i o n s . c o n c u r r e n t - t h i s . g e t R u n n i n g ( ) . g e t K e y s ( ) . l e n g t h ) . t i m e s ( t h i s . r u n N e x t , t h i s ) ; r e t u r n   t h i s ; } , r u n N e x t : f u n c t i o n ( a ) { i f ( ! t h i s . q u e u e . l e n g t h ) { r e t u r n   t h i s ; 
 } i f ( ! a ) { t h i s . q u e u e [ 0 ] ( ) ; } e l s e { v a r   b ; t h i s . q u e u e . e a c h ( f u n c t i o n ( c ) { i f ( ! b & & c . n a m e = = a ) { b = t r u e ; c ( ) ; } } ) ; } r e t u r n   t h i s ; } , r u n A l l : f u n c t i o n ( ) { t h i s . q u e u e . e a c h ( f u n c t i o n ( a ) { a ( ) ; 
 } ) ; r e t u r n   t h i s ; } , c l e a r : f u n c t i o n ( a ) { i f ( ! a ) { t h i s . q u e u e . e m p t y ( ) ; } e l s e { t h i s . q u e u e = t h i s . q u e u e . m a p ( f u n c t i o n ( b ) { i f ( b . n a m e ! = a ) { r e t u r n   b ; } e l s e { r e t u r n   f a l s e ; } } ) . f i l t e r ( f u n c t i o n ( b ) { r e t u r n   b ; 
 } ) ; } r e t u r n   t h i s ; } , c a n c e l : f u n c t i o n ( a ) { t h i s . r e q u e s t s . g e t ( a ) . c a n c e l ( ) ; r e t u r n   t h i s ; } , o n R e q u e s t : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " r e q u e s t " , a r g u m e n t s ) ; } , o n C o m p l e t e : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " c o m p l e t e " , a r g u m e n t s ) ; 
 i f ( ! t h i s . q u e u e . l e n g t h ) { t h i s . f i r e E v e n t ( " e n d " ) ; } } , o n C a n c e l : f u n c t i o n ( ) { i f ( t h i s . o p t i o n s . a u t o A d v a n c e & & ! t h i s . e r r o r ) { t h i s . r u n N e x t ( ) ; } t h i s . f i r e E v e n t ( " c a n c e l " , a r g u m e n t s ) ; 
 } , o n S u c c e s s : f u n c t i o n ( ) { i f ( t h i s . o p t i o n s . a u t o A d v a n c e & & ! t h i s . e r r o r ) { t h i s . r u n N e x t ( ) ; } t h i s . f i r e E v e n t ( " s u c c e s s " , a r g u m e n t s ) ; } , o n F a i l u r e : f u n c t i o n ( ) { t h i s . e r r o r = t r u e ; 
 i f ( ! t h i s . o p t i o n s . s t o p O n F a i l u r e & & t h i s . o p t i o n s . a u t o A d v a n c e ) { t h i s . r u n N e x t ( ) ; } t h i s . f i r e E v e n t ( " f a i l u r e " , a r g u m e n t s ) ; } , o n E x c e p t i o n : f u n c t i o n ( ) { t h i s . e r r o r = t r u e ; 
 i f ( ! t h i s . o p t i o n s . s t o p O n F a i l u r e & & t h i s . o p t i o n s . a u t o A d v a n c e ) { t h i s . r u n N e x t ( ) ; } t h i s . f i r e E v e n t ( " e x c e p t i o n " , a r g u m e n t s ) ; } } ) ; R e q u e s t . i m p l e m e n t ( { o p t i o n s : { i n i t i a l D e l a y : 5 0 0 0 , d e l a y : 5 0 0 0 , l i m i t : 6 0 0 0 0 } , s t a r t T i m e r : f u n c t i o n ( b ) { v a r   a = f u n c t i o n ( ) { i f ( ! t h i s . r u n n i n g ) { t h i s . s e n d ( { d a t a : b } ) ; 
 } } ; t h i s . t i m e r = a . d e l a y ( t h i s . o p t i o n s . i n i t i a l D e l a y , t h i s ) ; t h i s . l a s t D e l a y = t h i s . o p t i o n s . i n i t i a l D e l a y ; t h i s . c o m p l e t e C h e c k = f u n c t i o n ( c ) { $ c l e a r ( t h i s . t i m e r ) ; t h i s . l a s t D e l a y = ( c ) ? t h i s . o p t i o n s . d e l a y : ( t h i s . l a s t D e l a y + t h i s . o p t i o n s . d e l a y ) . m i n ( t h i s . o p t i o n s . l i m i t ) ; 
 t h i s . t i m e r = a . d e l a y ( t h i s . l a s t D e l a y , t h i s ) ; } ; r e t u r n   t h i s . a d d E v e n t ( " c o m p l e t e " , t h i s . c o m p l e t e C h e c k ) ; } , s t o p T i m e r : f u n c t i o n ( ) { $ c l e a r ( t h i s . t i m e r ) ; r e t u r n   t h i s . r e m o v e E v e n t ( " c o m p l e t e " , t h i s . c o m p l e t e C h e c k ) ; 
 } } ) ; v a r   A s s e t = { j a v a s c r i p t : f u n c t i o n ( f , d ) { d = $ e x t e n d ( { o n l o a d : $ e m p t y , d o c u m e n t : d o c u m e n t , c h e c k : $ l a m b d a ( t r u e ) } , d ) ; i f ( d . o n L o a d ) { d . o n l o a d = d . o n L o a d ; } v a r   b = n e w   E l e m e n t ( " s c r i p t " , { s r c : f , t y p e : " t e x t / j a v a s c r i p t " } ) ; 
 v a r   e = d . o n l o a d . b i n d ( b ) , a = d . c h e c k , g = d . d o c u m e n t ; d e l e t e   d . o n l o a d ; d e l e t e   d . c h e c k ; d e l e t e   d . d o c u m e n t ; b . a d d E v e n t s ( { l o a d : e , r e a d y s t a t e c h a n g e : f u n c t i o n ( ) { i f ( [ " l o a d e d " , " c o m p l e t e " ] . c o n t a i n s ( t h i s . r e a d y S t a t e ) ) { e ( ) ; 
 } } } ) . s e t ( d ) ; i f ( B r o w s e r . E n g i n e . w e b k i t 4 1 9 ) { v a r   c = ( f u n c t i o n ( ) { i f ( ! $ t r y ( a ) ) { r e t u r n ; } $ c l e a r ( c ) ; e ( ) ; } ) . p e r i o d i c a l ( 5 0 ) ; } r e t u r n   b . i n j e c t ( g . h e a d ) ; } , c s s : f u n c t i o n ( b , a ) { r e t u r n   n e w   E l e m e n t ( " l i n k " , $ m e r g e ( { r e l : " s t y l e s h e e t " , m e d i a : " s c r e e n " , t y p e : " t e x t / c s s " , h r e f : b } , a ) ) . i n j e c t ( d o c u m e n t . h e a d ) ; 
 } , i m a g e : f u n c t i o n ( c , b ) { b = $ m e r g e ( { o n l o a d : $ e m p t y , o n a b o r t : $ e m p t y , o n e r r o r : $ e m p t y } , b ) ; v a r   d = n e w   I m a g e ( ) ; v a r   a = d o c u m e n t . i d ( d ) | | n e w   E l e m e n t ( " i m g " ) ; [ " l o a d " , " a b o r t " , " e r r o r " ] . e a c h ( f u n c t i o n ( e ) { v a r   g = " o n " + e ; 
 v a r   f = e . c a p i t a l i z e ( ) ; i f ( b [ " o n " + f ] ) { b [ g ] = b [ " o n " + f ] ; } v a r   h = b [ g ] ; d e l e t e   b [ g ] ; d [ g ] = f u n c t i o n ( ) { i f ( ! d ) { r e t u r n ; } i f ( ! a . p a r e n t N o d e ) { a . w i d t h = d . w i d t h ; a . h e i g h t = d . h e i g h t ; 
 } d = d . o n l o a d = d . o n a b o r t = d . o n e r r o r = n u l l ; h . d e l a y ( 1 , a , a ) ; a . f i r e E v e n t ( e , a , 1 ) ; } ; } ) ; d . s r c = a . s r c = c ; i f ( d & & d . c o m p l e t e ) { d . o n l o a d . d e l a y ( 1 ) ; } r e t u r n   a . s e t ( b ) ; } , i m a g e s : f u n c t i o n ( d , c ) { c = $ m e r g e ( { o n C o m p l e t e : $ e m p t y , o n P r o g r e s s : $ e m p t y , o n E r r o r : $ e m p t y , p r o p e r t i e s : { } } , c ) ; 
 d = $ s p l a t ( d ) ; v a r   a = [ ] ; v a r   b = 0 ; r e t u r n   n e w   E l e m e n t s ( d . m a p ( f u n c t i o n ( e ) { r e t u r n   A s s e t . i m a g e ( e , $ e x t e n d ( c . p r o p e r t i e s , { o n l o a d : f u n c t i o n ( ) { c . o n P r o g r e s s . c a l l ( t h i s , b , d . i n d e x O f ( e ) ) ; 
 b + + ; i f ( b = = d . l e n g t h ) { c . o n C o m p l e t e ( ) ; } } , o n e r r o r : f u n c t i o n ( ) { c . o n E r r o r . c a l l ( t h i s , b , d . i n d e x O f ( e ) ) ; b + + ; i f ( b = = d . l e n g t h ) { c . o n C o m p l e t e ( ) ; } } } ) ) ; } ) ) ; } } ; v a r   C o l o r = n e w   N a t i v e ( { i n i t i a l i z e : f u n c t i o n ( b , c ) { i f ( a r g u m e n t s . l e n g t h > = 3 ) { c = " r g b " ; 
 b = A r r a y . s l i c e ( a r g u m e n t s , 0 , 3 ) ; } e l s e { i f ( t y p e o f   b = = " s t r i n g " ) { i f ( b . m a t c h ( / r g b / ) ) { b = b . r g b T o H e x ( ) . h e x T o R g b ( t r u e ) ; } e l s e { i f ( b . m a t c h ( / h s b / ) ) { b = b . h s b T o R g b ( ) ; } e l s e { b = b . h e x T o R g b ( t r u e ) ; 
 } } } } c = c | | " r g b " ; s w i t c h ( c ) { c a s e " h s b " : v a r   a = b ; b = b . h s b T o R g b ( ) ; b . h s b = a ; b r e a k ; c a s e " h e x " : b = b . h e x T o R g b ( t r u e ) ; b r e a k ; } b . r g b = b . s l i c e ( 0 , 3 ) ; b . h s b = b . h s b | | b . r g b T o H s b ( ) ; 
 b . h e x = b . r g b T o H e x ( ) ; r e t u r n   $ e x t e n d ( b , t h i s ) ; } } ) ; C o l o r . i m p l e m e n t ( { m i x : f u n c t i o n ( ) { v a r   a = A r r a y . s l i c e ( a r g u m e n t s ) ; v a r   c = ( $ t y p e ( a . g e t L a s t ( ) ) = = " n u m b e r " ) ? a . p o p ( ) : 5 0 ; 
 v a r   b = t h i s . s l i c e ( ) ; a . e a c h ( f u n c t i o n ( d ) { d = n e w   C o l o r ( d ) ; f o r ( v a r   e = 0 ; e < 3 ; e + + ) { b [ e ] = M a t h . r o u n d ( ( b [ e ] / 1 0 0 * ( 1 0 0 - c ) ) + ( d [ e ] / 1 0 0 * c ) ) ; } } ) ; r e t u r n   n e w   C o l o r ( b , " r g b " ) ; 
 } , i n v e r t : f u n c t i o n ( ) { r e t u r n   n e w   C o l o r ( t h i s . m a p ( f u n c t i o n ( a ) { r e t u r n   2 5 5 - a ; } ) ) ; } , s e t H u e : f u n c t i o n ( a ) { r e t u r n   n e w   C o l o r ( [ a , t h i s . h s b [ 1 ] , t h i s . h s b [ 2 ] ] , " h s b " ) ; } , s e t S a t u r a t i o n : f u n c t i o n ( a ) { r e t u r n   n e w   C o l o r ( [ t h i s . h s b [ 0 ] , a , t h i s . h s b [ 2 ] ] , " h s b " ) ; 
 } , s e t B r i g h t n e s s : f u n c t i o n ( a ) { r e t u r n   n e w   C o l o r ( [ t h i s . h s b [ 0 ] , t h i s . h s b [ 1 ] , a ] , " h s b " ) ; } } ) ; v a r   $ R G B = f u n c t i o n ( d , c , a ) { r e t u r n   n e w   C o l o r ( [ d , c , a ] , " r g b " ) ; } ; v a r   $ H S B = f u n c t i o n ( d , c , a ) { r e t u r n   n e w   C o l o r ( [ d , c , a ] , " h s b " ) ; 
 } ; v a r   $ H E X = f u n c t i o n ( a ) { r e t u r n   n e w   C o l o r ( a , " h e x " ) ; } ; A r r a y . i m p l e m e n t ( { r g b T o H s b : f u n c t i o n ( ) { v a r   b = t h i s [ 0 ] , c = t h i s [ 1 ] , j = t h i s [ 2 ] , g = 0 ; v a r   i = M a t h . m a x ( b , c , j ) , e = M a t h . m i n ( b , c , j ) ; 
 v a r   k = i - e ; v a r   h = i / 2 5 5 , f = ( i ! = 0 ) ? k / i : 0 ; i f ( f ! = 0 ) { v a r   d = ( i - b ) / k ; v a r   a = ( i - c ) / k ; v a r   l = ( i - j ) / k ; i f ( b = = i ) { g = l - a ; } e l s e { i f ( c = = i ) { g = 2 + d - l ; } e l s e { g = 4 + a - d ; } } g / = 6 ; i f ( g < 0 ) { g + + ; 
 } } r e t u r n [ M a t h . r o u n d ( g * 3 6 0 ) , M a t h . r o u n d ( f * 1 0 0 ) , M a t h . r o u n d ( h * 1 0 0 ) ] ; } , h s b T o R g b : f u n c t i o n ( ) { v a r   c = M a t h . r o u n d ( t h i s [ 2 ] / 1 0 0 * 2 5 5 ) ; i f ( t h i s [ 1 ] = = 0 ) { r e t u r n [ c , c , c ] ; } e l s e { v a r   a = t h i s [ 0 ] % 3 6 0 ; 
 v a r   e = a % 6 0 ; v a r   g = M a t h . r o u n d ( ( t h i s [ 2 ] * ( 1 0 0 - t h i s [ 1 ] ) ) / 1 0 0 0 0 * 2 5 5 ) ; v a r   d = M a t h . r o u n d ( ( t h i s [ 2 ] * ( 6 0 0 0 - t h i s [ 1 ] * e ) ) / 6 0 0 0 0 0 * 2 5 5 ) ; v a r   b = M a t h . r o u n d ( ( t h i s [ 2 ] * ( 6 0 0 0 - t h i s [ 1 ] * ( 6 0 - e ) ) ) / 6 0 0 0 0 0 * 2 5 5 ) ; 
 s w i t c h ( M a t h . f l o o r ( a / 6 0 ) ) { c a s e   0 : r e t u r n [ c , b , g ] ; c a s e   1 : r e t u r n [ d , c , g ] ; c a s e   2 : r e t u r n [ g , c , b ] ; c a s e   3 : r e t u r n [ g , d , c ] ; c a s e   4 : r e t u r n [ b , g , c ] ; c a s e   5 : r e t u r n [ c , g , d ] ; 
 } } r e t u r n   f a l s e ; } } ) ; S t r i n g . i m p l e m e n t ( { r g b T o H s b : f u n c t i o n ( ) { v a r   a = t h i s . m a t c h ( / \ d { 1 , 3 } / g ) ; r e t u r n ( a ) ? a . r g b T o H s b ( ) : n u l l ; } , h s b T o R g b : f u n c t i o n ( ) { v a r   a = t h i s . m a t c h ( / \ d { 1 , 3 } / g ) ; 
 r e t u r n ( a ) ? a . h s b T o R g b ( ) : n u l l ; } } ) ; v a r   G r o u p = n e w   C l a s s ( { i n i t i a l i z e : f u n c t i o n ( ) { t h i s . i n s t a n c e s = A r r a y . f l a t t e n ( a r g u m e n t s ) ; t h i s . e v e n t s = { } ; t h i s . c h e c k e r = { } ; } , a d d E v e n t : f u n c t i o n ( b , a ) { t h i s . c h e c k e r [ b ] = t h i s . c h e c k e r [ b ] | | { } ; 
 t h i s . e v e n t s [ b ] = t h i s . e v e n t s [ b ] | | [ ] ; i f ( t h i s . e v e n t s [ b ] . c o n t a i n s ( a ) ) { r e t u r n   f a l s e ; } e l s e { t h i s . e v e n t s [ b ] . p u s h ( a ) ; } t h i s . i n s t a n c e s . e a c h ( f u n c t i o n ( c , d ) { c . a d d E v e n t ( b , t h i s . c h e c k . b i n d ( t h i s , [ b , c , d ] ) ) ; 
 } , t h i s ) ; r e t u r n   t h i s ; } , c h e c k : f u n c t i o n ( c , a , b ) { t h i s . c h e c k e r [ c ] [ b ] = t r u e ; v a r   d = t h i s . i n s t a n c e s . e v e r y ( f u n c t i o n ( f , e ) { r e t u r n   t h i s . c h e c k e r [ c ] [ e ] | | f a l s e ; } , t h i s ) ; i f ( ! d ) { r e t u r n ; 
 } t h i s . c h e c k e r [ c ] = { } ; t h i s . e v e n t s [ c ] . e a c h ( f u n c t i o n ( e ) { e . c a l l ( t h i s , t h i s . i n s t a n c e s , a ) ; } , t h i s ) ; } } ) ; H a s h . C o o k i e = n e w   C l a s s ( { E x t e n d s : C o o k i e , o p t i o n s : { a u t o S a v e : t r u e } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . p a r e n t ( b , a ) ; 
 t h i s . l o a d ( ) ; } , s a v e : f u n c t i o n ( ) { v a r   a = J S O N . e n c o d e ( t h i s . h a s h ) ; i f ( ! a | | a . l e n g t h > 4 0 9 6 ) { r e t u r n   f a l s e ; } i f ( a = = " { } " ) { t h i s . d i s p o s e ( ) ; } e l s e { t h i s . w r i t e ( a ) ; } r e t u r n   t r u e ; 
 } , l o a d : f u n c t i o n ( ) { t h i s . h a s h = n e w   H a s h ( J S O N . d e c o d e ( t h i s . r e a d ( ) , t r u e ) ) ; r e t u r n   t h i s ; } } ) ; H a s h . e a c h ( H a s h . p r o t o t y p e , f u n c t i o n ( b , a ) { i f ( t y p e o f   b = = " f u n c t i o n " ) { H a s h . C o o k i e . i m p l e m e n t ( a , f u n c t i o n ( ) { v a r   c = b . a p p l y ( t h i s . h a s h , a r g u m e n t s ) ; 
 i f ( t h i s . o p t i o n s . a u t o S a v e ) { t h i s . s a v e ( ) ; } r e t u r n   c ; } ) ; } } ) ; v a r   I f r a m e S h i m = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s , E v e n t s , C l a s s . O c c l u d e ] , o p t i o n s : { c l a s s N a m e : " i f r a m e S h i m " , s r c : ' j a v a s c r i p t : f a l s e ; d o c u m e n t . w r i t e ( " " ) ; ' , d i s p l a y : f a l s e , z I n d e x : n u l l , m a r g i n : 0 , o f f s e t : { x : 0 , y : 0 } , b r o w s e r s : ( B r o w s e r . E n g i n e . t r i d e n t 4 | | ( B r o w s e r . E n g i n e . g e c k o & & ! B r o w s e r . E n g i n e . g e c k o 1 9 & & B r o w s e r . P l a t f o r m . m a c ) ) } , p r o p e r t y : " I f r a m e S h i m " , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . e l e m e n t = d o c u m e n t . i d ( b ) ; 
 i f ( t h i s . o c c l u d e ( ) ) { r e t u r n   t h i s . o c c l u d e d ; } t h i s . s e t O p t i o n s ( a ) ; t h i s . m a k e S h i m ( ) ; r e t u r n   t h i s ; } , m a k e S h i m : f u n c t i o n ( ) { i f ( t h i s . o p t i o n s . b r o w s e r s ) { v a r   c = t h i s . e l e m e n t . g e t S t y l e ( " z I n d e x " ) . t o I n t ( ) ; 
 i f ( ! c ) { c = 1 ; v a r   b = t h i s . e l e m e n t . g e t S t y l e ( " p o s i t i o n " ) ; i f ( b = = " s t a t i c " | | ! b ) { t h i s . e l e m e n t . s e t S t y l e ( " p o s i t i o n " , " r e l a t i v e " ) ; } t h i s . e l e m e n t . s e t S t y l e ( " z I n d e x " , c ) ; 
 } c = ( $ c h k ( t h i s . o p t i o n s . z I n d e x ) & & c > t h i s . o p t i o n s . z I n d e x ) ? t h i s . o p t i o n s . z I n d e x : c - 1 ; i f ( c < 0 ) { c = 1 ; } t h i s . s h i m = n e w   E l e m e n t ( " i f r a m e " , { s r c : t h i s . o p t i o n s . s r c , s c r o l l i n g : " n o " , f r a m e b o r d e r : 0 , s t y l e s : { z I n d e x : c , p o s i t i o n : " a b s o l u t e " , b o r d e r : " n o n e " , f i l t e r : " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ( s t y l e = 0 , o p a c i t y = 0 ) " } , " c l a s s " : t h i s . o p t i o n s . c l a s s N a m e } ) . s t o r e ( " I f r a m e S h i m " , t h i s ) ; 
 v a r   a = ( f u n c t i o n ( ) { t h i s . s h i m . i n j e c t ( t h i s . e l e m e n t , " a f t e r " ) ; t h i s [ t h i s . o p t i o n s . d i s p l a y ? " s h o w " : " h i d e " ] ( ) ; t h i s . f i r e E v e n t ( " i n j e c t " ) ; } ) . b i n d ( t h i s ) ; i f ( ! I f r a m e S h i m . r e a d y ) { w i n d o w . a d d E v e n t ( " l o a d " , a ) ; 
 } e l s e { a ( ) ; } } e l s e { t h i s . p o s i t i o n = t h i s . h i d e = t h i s . s h o w = t h i s . d i s p o s e = $ l a m b d a ( t h i s ) ; } } , p o s i t i o n : f u n c t i o n ( ) { i f ( ! I f r a m e S h i m . r e a d y | | ! t h i s . s h i m ) { r e t u r n   t h i s ; } v a r   a = t h i s . e l e m e n t . m e a s u r e ( f u n c t i o n ( ) { r e t u r n   t h i s . g e t S i z e ( ) ; 
 } ) ; i f ( t h i s . o p t i o n s . m a r g i n ! = u n d e f i n e d ) { a . x = a . x - ( t h i s . o p t i o n s . m a r g i n * 2 ) ; a . y = a . y - ( t h i s . o p t i o n s . m a r g i n * 2 ) ; t h i s . o p t i o n s . o f f s e t . x + = t h i s . o p t i o n s . m a r g i n ; t h i s . o p t i o n s . o f f s e t . y + = t h i s . o p t i o n s . m a r g i n ; 
 } t h i s . s h i m . s e t ( { w i d t h : a . x , h e i g h t : a . y } ) . p o s i t i o n ( { r e l a t i v e T o : t h i s . e l e m e n t , o f f s e t : t h i s . o p t i o n s . o f f s e t } ) ; r e t u r n   t h i s ; } , h i d e : f u n c t i o n ( ) { i f ( t h i s . s h i m ) { t h i s . s h i m . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; 
 } r e t u r n   t h i s ; } , s h o w : f u n c t i o n ( ) { i f ( t h i s . s h i m ) { t h i s . s h i m . s e t S t y l e ( " d i s p l a y " , " b l o c k " ) ; } r e t u r n   t h i s . p o s i t i o n ( ) ; } , d i s p o s e : f u n c t i o n ( ) { i f ( t h i s . s h i m ) { t h i s . s h i m . d i s p o s e ( ) ; 
 } r e t u r n   t h i s ; } , d e s t r o y : f u n c t i o n ( ) { i f ( t h i s . s h i m ) { t h i s . s h i m . d e s t r o y ( ) ; } r e t u r n   t h i s ; } } ) ; w i n d o w . a d d E v e n t ( " l o a d " , f u n c t i o n ( ) { I f r a m e S h i m . r e a d y = t r u e ; } ) ; v a r   H t m l T a b l e = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s , E v e n t s , C l a s s . O c c l u d e ] , o p t i o n s : { p r o p e r t i e s : { c e l l p a d d i n g : 0 , c e l l s p a c i n g : 0 , b o r d e r : 0 } , r o w s : [ ] , h e a d e r s : [ ] , f o o t e r s : [ ] } , p r o p e r t y : " H t m l T a b l e " , i n i t i a l i z e : f u n c t i o n ( ) { v a r   a = A r r a y . l i n k ( a r g u m e n t s , { o p t i o n s : O b j e c t . t y p e , t a b l e : E l e m e n t . t y p e } ) ; 
 t h i s . s e t O p t i o n s ( a . o p t i o n s ) ; t h i s . e l e m e n t = a . t a b l e | | n e w   E l e m e n t ( " t a b l e " , t h i s . o p t i o n s . p r o p e r t i e s ) ; i f ( t h i s . o c c l u d e ( ) ) { r e t u r n   t h i s . o c c l u d e d ; } t h i s . b u i l d ( ) ; } , b u i l d : f u n c t i o n ( ) { t h i s . e l e m e n t . s t o r e ( " H t m l T a b l e " , t h i s ) ; 
 t h i s . b o d y = d o c u m e n t . i d ( t h i s . e l e m e n t . t B o d i e s [ 0 ] ) | | n e w   E l e m e n t ( " t b o d y " ) . i n j e c t ( t h i s . e l e m e n t ) ; $ $ ( t h i s . b o d y . r o w s ) ; i f ( t h i s . o p t i o n s . h e a d e r s . l e n g t h ) { t h i s . s e t H e a d e r s ( t h i s . o p t i o n s . h e a d e r s ) ; 
 } e l s e { t h i s . t h e a d = d o c u m e n t . i d ( t h i s . e l e m e n t . t H e a d ) ; } i f ( t h i s . t h e a d ) { t h i s . h e a d = d o c u m e n t . i d ( t h i s . t h e a d . r o w s [ 0 ] ) ; } i f ( t h i s . o p t i o n s . f o o t e r s . l e n g t h ) { t h i s . s e t F o o t e r s ( t h i s . o p t i o n s . f o o t e r s ) ; 
 } t h i s . t f o o t = d o c u m e n t . i d ( t h i s . e l e m e n t . t F o o t ) ; i f ( t h i s . t f o o t ) { t h i s . f o o t = d o c u m e n t . i d ( t h i s . t h e a d . r o w s [ 0 ] ) ; } t h i s . o p t i o n s . r o w s . e a c h ( f u n c t i o n ( a ) { t h i s . p u s h ( a ) ; } , t h i s ) ; 
 [ " a d o p t " , " i n j e c t " , " w r a p s " , " g r a b " , " r e p l a c e s " , " d i s p o s e " ] . e a c h ( f u n c t i o n ( a ) { t h i s [ a ] = t h i s . e l e m e n t [ a ] . b i n d ( t h i s . e l e m e n t ) ; } , t h i s ) ; } , t o E l e m e n t : f u n c t i o n ( ) { r e t u r n   t h i s . e l e m e n t ; 
 } , e m p t y : f u n c t i o n ( ) { t h i s . b o d y . e m p t y ( ) ; r e t u r n   t h i s ; } , s e t : f u n c t i o n ( d , a ) { v a r   c = ( d = = " h e a d e r s " ) ? " t H e a d " : " t F o o t " ; t h i s [ c . t o L o w e r C a s e ( ) ] = ( d o c u m e n t . i d ( t h i s . e l e m e n t [ c ] ) | | n e w   E l e m e n t ( c . t o L o w e r C a s e ( ) ) . i n j e c t ( t h i s . e l e m e n t , " t o p " ) ) . e m p t y ( ) ; 
 v a r   b = t h i s . p u s h ( a , { } , t h i s [ c . t o L o w e r C a s e ( ) ] , d = = " h e a d e r s " ? " t h " : " t d " ) ; i f ( d = = " h e a d e r s " ) { t h i s . h e a d = d o c u m e n t . i d ( t h i s . t h e a d . r o w s [ 0 ] ) ; } e l s e { t h i s . f o o t = d o c u m e n t . i d ( t h i s . t h e a d . r o w s [ 0 ] ) ; 
 } r e t u r n   b ; } , s e t H e a d e r s : f u n c t i o n ( a ) { t h i s . s e t ( " h e a d e r s " , a ) ; r e t u r n   t h i s ; } , s e t F o o t e r s : f u n c t i o n ( a ) { t h i s . s e t ( " f o o t e r s " , a ) ; r e t u r n   t h i s ; } , p u s h : f u n c t i o n ( e , b , d , a ) { v a r   c = e . m a p ( f u n c t i o n ( h ) { v a r   i = n e w   E l e m e n t ( a | | " t d " , h . p r o p e r t i e s ) , g = h . c o n t e n t | | h | | " " , f = d o c u m e n t . i d ( g ) ; 
 i f ( $ t y p e ( g ) ! = " s t r i n g " & & f ) { i . a d o p t ( f ) ; } e l s e { i . s e t ( " h t m l " , g ) ; } r e t u r n   i ; } ) ; r e t u r n { t r : n e w   E l e m e n t ( " t r " , b ) . i n j e c t ( d | | t h i s . b o d y ) . a d o p t ( c ) , t d s : c } ; } } ) ; H t m l T a b l e = C l a s s . r e f a c t o r ( H t m l T a b l e , { o p t i o n s : { c l a s s Z e b r a : " t a b l e - t r - o d d " , z e b r a : t r u e } , i n i t i a l i z e : f u n c t i o n ( ) { t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; 
 i f ( t h i s . o c c l u d e d ) { r e t u r n   t h i s . o c c l u d e d ; } i f ( t h i s . o p t i o n s . z e b r a ) { t h i s . u p d a t e Z e b r a s ( ) ; } } , u p d a t e Z e b r a s : f u n c t i o n ( ) { A r r a y . e a c h ( t h i s . b o d y . r o w s , t h i s . z e b r a , t h i s ) ; 
 } , z e b r a : f u n c t i o n ( b , a ) { r e t u r n   b [ ( ( a % 2 ) ? " r e m o v e " : " a d d " ) + " C l a s s " ] ( t h i s . o p t i o n s . c l a s s Z e b r a ) ; } , p u s h : f u n c t i o n ( ) { v a r   a = t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; i f ( t h i s . o p t i o n s . z e b r a ) { t h i s . u p d a t e Z e b r a s ( ) ; 
 } r e t u r n   a ; } } ) ; H t m l T a b l e = C l a s s . r e f a c t o r ( H t m l T a b l e , { o p t i o n s : { s o r t I n d e x : 0 , s o r t R e v e r s e : f a l s e , p a r s e r s : [ ] , d e f a u l t P a r s e r : " s t r i n g " , c l a s s S o r t a b l e : " t a b l e - s o r t a b l e " , c l a s s H e a d S o r t : " t a b l e - t h - s o r t " , c l a s s H e a d S o r t R e v : " t a b l e - t h - s o r t - r e v " , c l a s s N o S o r t : " t a b l e - t h - n o s o r t " , c l a s s G r o u p H e a d : " t a b l e - t r - g r o u p - h e a d " , c l a s s G r o u p : " t a b l e - t r - g r o u p " , c l a s s C e l l S o r t : " t a b l e - t d - s o r t " , c l a s s S o r t S p a n : " t a b l e - t h - s o r t - s p a n " , s o r t a b l e : f a l s e } , i n i t i a l i z e : f u n c t i o n ( ) { t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; 
 i f ( t h i s . o c c l u d e d ) { r e t u r n   t h i s . o c c l u d e d ; } t h i s . s o r t e d = { i n d e x : n u l l , d i r : 1 } ; t h i s . b o u n d = { h e a d C l i c k : t h i s . h e a d C l i c k . b i n d ( t h i s ) } ; t h i s . s o r t S p a n s = n e w   E l e m e n t s ( ) ; i f ( t h i s . o p t i o n s . s o r t a b l e ) { t h i s . e n a b l e S o r t ( ) ; 
 i f ( t h i s . o p t i o n s . s o r t I n d e x ! = n u l l ) { t h i s . s o r t ( t h i s . o p t i o n s . s o r t I n d e x , t h i s . o p t i o n s . s o r t R e v e r s e ) ; } } } , a t t a c h S o r t s : f u n c t i o n ( a ) { t h i s . e l e m e n t . r e m o v e E v e n t s ( " c l i c k : r e l a y ( t h ) " ) ; 
 t h i s . e l e m e n t [ $ p i c k ( a , t r u e ) ? " a d d E v e n t " : " r e m o v e E v e n t " ] ( " c l i c k : r e l a y ( t h ) " , t h i s . b o u n d . h e a d C l i c k ) ; } , s e t H e a d e r s : f u n c t i o n ( ) { t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; 
 i f ( t h i s . s o r t E n a b l e d ) { t h i s . d e t e c t P a r s e r s ( ) ; } } , d e t e c t P a r s e r s : f u n c t i o n ( c ) { i f ( ! t h i s . h e a d ) { r e t u r n ; } v a r   a = t h i s . o p t i o n s . p a r s e r s , b = t h i s . b o d y . r o w s ; t h i s . p a r s e r s = $ $ ( t h i s . h e a d . c e l l s ) . m a p ( f u n c t i o n ( d , e ) { i f ( ! c & & ( d . h a s C l a s s ( t h i s . o p t i o n s . c l a s s N o S o r t ) | | d . r e t r i e v e ( " h t m l t a b l e - p a r s e r " ) ) ) { r e t u r n   d . r e t r i e v e ( " h t m l t a b l e - p a r s e r " ) ; 
 } v a r   f = n e w   E l e m e n t ( " d i v " ) ; $ e a c h ( d . c h i l d N o d e s , f u n c t i o n ( j ) { f . a d o p t ( j ) ; } ) ; f . i n j e c t ( d ) ; v a r   h = n e w   E l e m e n t ( " s p a n " , { h t m l : " & # 1 6 0 ; " , " c l a s s " : t h i s . o p t i o n s . c l a s s S o r t S p a n } ) . i n j e c t ( f , " t o p " ) ; 
 t h i s . s o r t S p a n s . p u s h ( h ) ; v a r   i = a [ e ] , g ; s w i t c h ( $ t y p e ( i ) ) { c a s e " f u n c t i o n " : i = { c o n v e r t : i } ; g = t r u e ; b r e a k ; c a s e " s t r i n g " : i = i ; g = t r u e ; b r e a k ; } i f ( ! g ) { H t m l T a b l e . P a r s e r s . s o m e ( f u n c t i o n ( n ) { v a r   l = n . m a t c h ; 
 i f ( ! l ) { r e t u r n   f a l s e ; } f o r ( v a r   m = 0 , k = b . l e n g t h ; m < k ; m + + ) { v a r   o = $ ( b [ m ] . c e l l s [ e ] ) . g e t ( " h t m l " ) . c l e a n ( ) ; i f ( o & & l . t e s t ( o ) ) { i = n ; r e t u r n   t r u e ; } } } ) ; } i f ( ! i ) { i = t h i s . o p t i o n s . d e f a u l t P a r s e r ; 
 } d . s t o r e ( " h t m l t a b l e - p a r s e r " , i ) ; r e t u r n   i ; } , t h i s ) ; } , h e a d C l i c k : f u n c t i o n ( c , b ) { i f ( ! t h i s . h e a d | | b . h a s C l a s s ( t h i s . o p t i o n s . c l a s s N o S o r t ) ) { r e t u r n ; } v a r   a = A r r a y . i n d e x O f ( t h i s . h e a d . c e l l s , b ) ; 
 t h i s . s o r t ( a ) ; r e t u r n   f a l s e ; } , s o r t : f u n c t i o n ( f , h , m ) { i f ( ! t h i s . h e a d ) { r e t u r n ; } m = ! ! ( m ) ; v a r   l = t h i s . o p t i o n s . c l a s s C e l l S o r t ; v a r   o = t h i s . o p t i o n s . c l a s s G r o u p , t = t h i s . o p t i o n s . c l a s s G r o u p H e a d ; 
 i f ( ! m ) { i f ( f ! = n u l l ) { i f ( t h i s . s o r t e d . i n d e x = = f ) { t h i s . s o r t e d . r e v e r s e = ! ( t h i s . s o r t e d . r e v e r s e ) ; } e l s e { i f ( t h i s . s o r t e d . i n d e x ! = n u l l ) { t h i s . s o r t e d . r e v e r s e = f a l s e ; t h i s . h e a d . c e l l s [ t h i s . s o r t e d . i n d e x ] . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s H e a d S o r t ) . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s H e a d S o r t R e v ) ; 
 } e l s e { t h i s . s o r t e d . r e v e r s e = t r u e ; } t h i s . s o r t e d . i n d e x = f ; } } e l s e { f = t h i s . s o r t e d . i n d e x ; } i f ( h ! = n u l l ) { t h i s . s o r t e d . r e v e r s e = h ; } v a r   d = d o c u m e n t . i d ( t h i s . h e a d . c e l l s [ f ] ) ; 
 i f ( d ) { d . a d d C l a s s ( t h i s . o p t i o n s . c l a s s H e a d S o r t ) ; i f ( t h i s . s o r t e d . r e v e r s e ) { d . a d d C l a s s ( t h i s . o p t i o n s . c l a s s H e a d S o r t R e v ) ; } e l s e { d . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s H e a d S o r t R e v ) ; 
 } } t h i s . b o d y . g e t E l e m e n t s ( " t d " ) . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s C e l l S o r t ) ; } v a r   c = t h i s . p a r s e r s [ f ] ; i f ( $ t y p e ( c ) = = " s t r i n g " ) { c = H t m l T a b l e . P a r s e r s . g e t ( c ) ; } i f ( ! c ) { r e t u r n ; 
 } i f ( ! B r o w s e r . E n g i n e . t r i d e n t ) { v a r   b = t h i s . b o d y . g e t P a r e n t ( ) ; t h i s . b o d y . d i s p o s e ( ) ; } v a r   s = A r r a y . m a p ( t h i s . b o d y . r o w s , f u n c t i o n ( v , j ) { v a r   u = c . c o n v e r t . c a l l ( d o c u m e n t . i d ( v . c e l l s [ f ] ) ) ; 
 r e t u r n { p o s i t i o n : j , v a l u e : u , t o S t r i n g : f u n c t i o n ( ) { r e t u r n   u . t o S t r i n g ( ) ; } } ; } , t h i s ) ; s . r e v e r s e ( t r u e ) ; s . s o r t ( f u n c t i o n ( j , i ) { i f ( j . v a l u e = = = i . v a l u e ) { r e t u r n   0 ; } r e t u r n   j . v a l u e > i . v a l u e ? 1 : - 1 ; 
 } ) ; i f ( ! t h i s . s o r t e d . r e v e r s e ) { s . r e v e r s e ( t r u e ) ; } v a r   p = s . l e n g t h , k = t h i s . b o d y ; v a r   n , r , a , g ; w h i l e ( p ) { v a r   q = s [ - - p ] ; r = q . p o s i t i o n ; v a r   e = k . r o w s [ r ] ; i f ( e . d i s a b l e d ) { c o n t i n u e ; 
 } i f ( ! m ) { i f ( g = = = q . v a l u e ) { e . r e m o v e C l a s s ( t ) . a d d C l a s s ( o ) ; } e l s e { g = q . v a l u e ; e . r e m o v e C l a s s ( o ) . a d d C l a s s ( t ) ; } i f ( t h i s . z e b r a ) { t h i s . z e b r a ( e , p ) ; } e . c e l l s [ f ] . a d d C l a s s ( l ) ; 
 } k . a p p e n d C h i l d ( e ) ; f o r ( n = 0 ; n < p ; n + + ) { i f ( s [ n ] . p o s i t i o n > r ) { s [ n ] . p o s i t i o n - - ; } } } s = n u l l ; i f ( b ) { b . g r a b ( k ) ; } r e t u r n   t h i s . f i r e E v e n t ( " s o r t " , [ k , f ] ) ; } , r e S o r t : f u n c t i o n ( ) { i f ( t h i s . s o r t E n a b l e d ) { t h i s . s o r t . c a l l ( t h i s , t h i s . s o r t e d . i n d e x , t h i s . s o r t e d . r e v e r s e ) ; 
 } r e t u r n   t h i s ; } , e n a b l e S o r t : f u n c t i o n ( ) { t h i s . e l e m e n t . a d d C l a s s ( t h i s . o p t i o n s . c l a s s S o r t a b l e ) ; t h i s . a t t a c h S o r t s ( t r u e ) ; t h i s . d e t e c t P a r s e r s ( ) ; t h i s . s o r t E n a b l e d = t r u e ; 
 r e t u r n   t h i s ; } , d i s a b l e S o r t : f u n c t i o n ( ) { t h i s . e l e m e n t . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s S o r t a b l e ) ; t h i s . a t t a c h S o r t s ( f a l s e ) ; t h i s . s o r t S p a n s . e a c h ( f u n c t i o n ( a ) { a . d e s t r o y ( ) ; 
 } ) ; t h i s . s o r t S p a n s . e m p t y ( ) ; t h i s . s o r t E n a b l e d = f a l s e ; r e t u r n   t h i s ; } } ) ; H t m l T a b l e . P a r s e r s = n e w   H a s h ( { d a t e : { m a t c h : / ^ \ d { 2 } [ - \ /   ] \ d { 2 } [ - \ /   ] \ d { 2 , 4 } $ / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   D a t e . p a r s e ( t h i s . g e t ( " t e x t " ) ) . f o r m a t ( " d b " ) ; 
 } , t y p e : " d a t e " } , " i n p u t - c h e c k e d " : { m a t c h : /   t y p e = " ( r a d i o | c h e c k b o x ) "   / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t E l e m e n t ( " i n p u t " ) . c h e c k e d ; } } , " i n p u t - v a l u e " : { m a t c h : / < i n p u t / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t E l e m e n t ( " i n p u t " ) . v a l u e ; 
 } } , n u m b e r : { m a t c h : / ^ \ d + [ ^ \ d . , ] * $ / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t ( " t e x t " ) . t o I n t ( ) ; } , n u m b e r : t r u e } , n u m b e r L a x : { m a t c h : / ^ [ ^ \ d ] + \ d + $ / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t ( " t e x t " ) . r e p l a c e ( / [ ^ - ? ^ 0 - 9 ] / , " " ) . t o I n t ( ) ; 
 } , n u m b e r : t r u e } , " f l o a t " : { m a t c h : / ^ [ \ d ] + \ . [ \ d ] + / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t ( " t e x t " ) . r e p l a c e ( / [ ^ - ? ^ \ d . ] / , " " ) . t o F l o a t ( ) ; } , n u m b e r : t r u e } , f l o a t L a x : { m a t c h : / ^ [ ^ \ d ] + [ \ d ] + \ . [ \ d ] + $ / , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t ( " t e x t " ) . r e p l a c e ( / [ ^ - ? ^ \ d . ] / , " " ) ; 
 } , n u m b e r : t r u e } , s t r i n g : { m a t c h : n u l l , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . g e t ( " t e x t " ) ; } } , t i t l e : { m a t c h : n u l l , c o n v e r t : f u n c t i o n ( ) { r e t u r n   t h i s . t i t l e ; } } } ) ; H t m l T a b l e = C l a s s . r e f a c t o r ( H t m l T a b l e , { o p t i o n s : { u s e K e y b o a r d : t r u e , c l a s s R o w S e l e c t e d : " t a b l e - t r - s e l e c t e d " , c l a s s R o w H o v e r e d : " t a b l e - t r - h o v e r e d " , c l a s s S e l e c t a b l e : " t a b l e - s e l e c t a b l e " , a l l o w M u l t i S e l e c t : t r u e , s e l e c t a b l e : f a l s e } , i n i t i a l i z e : f u n c t i o n ( ) { t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; 
 i f ( t h i s . o c c l u d e d ) { r e t u r n   t h i s . o c c l u d e d ; } t h i s . s e l e c t e d R o w s = n e w   E l e m e n t s ( ) ; t h i s . b o u n d = { m o u s e l e a v e : t h i s . m o u s e l e a v e . b i n d ( t h i s ) , f o c u s R o w : t h i s . f o c u s R o w . b i n d ( t h i s ) } ; 
 i f ( t h i s . o p t i o n s . s e l e c t a b l e ) { t h i s . e n a b l e S e l e c t ( ) ; } } , e n a b l e S e l e c t : f u n c t i o n ( ) { t h i s . s e l e c t E n a b l e d = t r u e ; t h i s . a t t a c h S e l e c t s ( ) ; t h i s . e l e m e n t . a d d C l a s s ( t h i s . o p t i o n s . c l a s s S e l e c t a b l e ) ; 
 } , d i s a b l e S e l e c t : f u n c t i o n ( ) { t h i s . s e l e c t E n a b l e d = f a l s e ; t h i s . a t t a c h ( f a l s e ) ; t h i s . e l e m e n t . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s S e l e c t a b l e ) ; } , a t t a c h S e l e c t s : f u n c t i o n ( a ) { a = $ p i c k ( a , t r u e ) ; 
 v a r   b = a ? " a d d E v e n t s " : " r e m o v e E v e n t s " ; t h i s . e l e m e n t [ b ] ( { m o u s e l e a v e : t h i s . b o u n d . m o u s e l e a v e } ) ; t h i s . b o d y [ b ] ( { " c l i c k : r e l a y ( t r ) " : t h i s . b o u n d . f o c u s R o w } ) ; i f ( t h i s . o p t i o n s . u s e K e y b o a r d | | t h i s . k e y b o a r d ) { i f ( ! t h i s . k e y b o a r d ) { t h i s . k e y b o a r d = n e w   K e y b o a r d ( { e v e n t s : { d o w n : f u n c t i o n ( c ) { c . p r e v e n t D e f a u l t ( ) ; 
 t h i s . s h i f t F o c u s ( 1 ) ; } . b i n d ( t h i s ) , u p : f u n c t i o n ( c ) { c . p r e v e n t D e f a u l t ( ) ; t h i s . s h i f t F o c u s ( - 1 ) ; } . b i n d ( t h i s ) , e n t e r : f u n c t i o n ( c ) { c . p r e v e n t D e f a u l t ( ) ; i f ( t h i s . h o v e r ) { t h i s . f o c u s R o w ( t h i s . h o v e r ) ; 
 } } . b i n d ( t h i s ) } , a c t i v e : t r u e } ) ; } t h i s . k e y b o a r d [ a ? " a c t i v a t e " : " d e a c t i v a t e " ] ( ) ; } t h i s . u p d a t e S e l e c t s ( ) ; } , m o u s e l e a v e : f u n c t i o n ( ) { i f ( t h i s . h o v e r ) { t h i s . l e a v e R o w ( t h i s . h o v e r ) ; 
 } } , f o c u s : f u n c t i o n ( ) { i f ( t h i s . k e y b o a r d ) { t h i s . k e y b o a r d . a c t i v a t e ( ) ; } } , b l u r : f u n c t i o n ( ) { i f ( t h i s . k e y b o a r d ) { t h i s . k e y b o a r d . d e a c t i v a t e ( ) ; } } , p u s h : f u n c t i o n ( ) { v a r   a = t h i s . p r e v i o u s . a p p l y ( t h i s , a r g u m e n t s ) ; 
 t h i s . u p d a t e S e l e c t s ( ) ; r e t u r n   a ; } , u p d a t e S e l e c t s : f u n c t i o n ( ) { A r r a y . e a c h ( t h i s . b o d y . r o w s , f u n c t i o n ( a ) { v a r   b = a . r e t r i e v e ( " b i n d e r s " ) ; i f ( ( b & & t h i s . s e l e c t E n a b l e d ) | | ( ! b & & ! t h i s . s e l e c t E n a b l e d ) ) { r e t u r n ; 
 } i f ( ! b ) { b = { m o u s e e n t e r : t h i s . e n t e r R o w . b i n d ( t h i s , [ a ] ) , m o u s e l e a v e : t h i s . l e a v e R o w . b i n d ( t h i s , [ a ] ) } ; a . s t o r e ( " b i n d e r s " , b ) . a d d E v e n t s ( b ) ; } e l s e { a . r e m o v e E v e n t s ( b ) ; } } , t h i s ) ; 
 } , e n t e r R o w : f u n c t i o n ( a ) { i f ( t h i s . h o v e r ) { t h i s . h o v e r = t h i s . l e a v e R o w ( t h i s . h o v e r ) ; } t h i s . h o v e r = a . a d d C l a s s ( t h i s . o p t i o n s . c l a s s R o w H o v e r e d ) ; } , s h i f t F o c u s : f u n c t i o n ( a ) { i f ( ! t h i s . h o v e r ) { r e t u r n   t h i s . e n t e r R o w ( t h i s . b o d y . r o w s [ 0 ] ) ; 
 } v a r   b = A r r a y . i n d e x O f ( t h i s . b o d y . r o w s , t h i s . h o v e r ) + a ; i f ( b < 0 ) { b = 0 ; } i f ( b > = t h i s . b o d y . r o w s . l e n g t h ) { b = t h i s . b o d y . r o w s . l e n g t h - 1 ; } i f ( t h i s . h o v e r = = t h i s . b o d y . r o w s [ b ] ) { r e t u r n   t h i s ; 
 } t h i s . e n t e r R o w ( t h i s . b o d y . r o w s [ b ] ) ; } , l e a v e R o w : f u n c t i o n ( a ) { a . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s R o w H o v e r e d ) ; } , f o c u s R o w : f u n c t i o n ( ) { v a r   b = a r g u m e n t s [ 1 ] | | a r g u m e n t s [ 0 ] ; 
 i f ( ! t h i s . b o d y . g e t C h i l d r e n ( ) . c o n t a i n s ( b ) ) { r e t u r n ; } v a r   a = f u n c t i o n ( c ) { t h i s . s e l e c t e d R o w s . e r a s e ( c ) ; c . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s R o w S e l e c t e d ) ; t h i s . f i r e E v e n t ( " r o w U n f o c u s " , [ c , t h i s . s e l e c t e d R o w s ] ) ; 
 } . b i n d ( t h i s ) ; i f ( ! t h i s . o p t i o n s . a l l o w M u l t i S e l e c t ) { t h i s . s e l e c t e d R o w s . e a c h ( a ) ; } i f ( ! t h i s . s e l e c t e d R o w s . c o n t a i n s ( b ) ) { t h i s . s e l e c t e d R o w s . p u s h ( b ) ; b . a d d C l a s s ( t h i s . o p t i o n s . c l a s s R o w S e l e c t e d ) ; 
 t h i s . f i r e E v e n t ( " r o w F o c u s " , [ b , t h i s . s e l e c t e d R o w s ] ) ; } e l s e { a ( b ) ; } r e t u r n   f a l s e ; } , s e l e c t A l l : f u n c t i o n ( a ) { a = $ p i c k ( a , t r u e ) ; i f ( ! t h i s . o p t i o n s . a l l o w M u l t i S e l e c t & & a ) { r e t u r n ; 
 } i f ( ! a ) { t h i s . s e l e c t e d R o w s . r e m o v e C l a s s ( t h i s . o p t i o n s . c l a s s R o w S e l e c t e d ) . e m p t y ( ) ; } e l s e { t h i s . s e l e c t e d R o w s . c o m b i n e ( t h i s . b o d y . r o w s ) . a d d C l a s s ( t h i s . o p t i o n s . c l a s s R o w S e l e c t e d ) ; 
 } r e t u r n   t h i s ; } , s e l e c t N o n e : f u n c t i o n ( ) { r e t u r n   t h i s . s e l e c t A l l ( f a l s e ) ; } } ) ; ( f u n c t i o n ( ) { v a r   a = t h i s . K e y b o a r d = n e w   C l a s s ( { E x t e n d s : E v e n t s , I m p l e m e n t s : [ O p t i o n s , L o g ] , o p t i o n s : { d e f a u l t E v e n t T y p e : " k e y d o w n " , a c t i v e : f a l s e , e v e n t s : { } , n o n P a r s e d E v e n t s : [ " a c t i v a t e " , " d e a c t i v a t e " , " o n a c t i v a t e " , " o n d e a c t i v a t e " , " c h a n g e d " , " o n c h a n g e d " ] } , i n i t i a l i z e : f u n c t i o n ( f ) { t h i s . s e t O p t i o n s ( f ) ; 
 t h i s . s e t u p ( ) ; } , s e t u p : f u n c t i o n ( ) { t h i s . a d d E v e n t s ( t h i s . o p t i o n s . e v e n t s ) ; i f ( a . m a n a g e r & & ! t h i s . m a n a g e r ) { a . m a n a g e r . m a n a g e ( t h i s ) ; } i f ( t h i s . o p t i o n s . a c t i v e ) { t h i s . a c t i v a t e ( ) ; 
 } } , h a n d l e : f u n c t i o n ( h , g ) { i f ( h . p r e v e n t K e y b o a r d P r o p a g a t i o n ) { r e t u r n ; } v a r   f = ! ! t h i s . m a n a g e r ; i f ( f & & t h i s . a c t i v e K B ) { t h i s . a c t i v e K B . h a n d l e ( h , g ) ; i f ( h . p r e v e n t K e y b o a r d P r o p a g a t i o n ) { r e t u r n ; 
 } } t h i s . f i r e E v e n t ( g , h ) ; i f ( ! f & & t h i s . a c t i v e K B ) { t h i s . a c t i v e K B . h a n d l e ( h , g ) ; } } , a d d E v e n t : f u n c t i o n ( h , g , f ) { r e t u r n   t h i s . p a r e n t ( a . p a r s e ( h , t h i s . o p t i o n s . d e f a u l t E v e n t T y p e , t h i s . o p t i o n s . n o n P a r s e d E v e n t s ) , g , f ) ; 
 } , r e m o v e E v e n t : f u n c t i o n ( g , f ) { r e t u r n   t h i s . p a r e n t ( a . p a r s e ( g , t h i s . o p t i o n s . d e f a u l t E v e n t T y p e , t h i s . o p t i o n s . n o n P a r s e d E v e n t s ) , f ) ; } , t o g g l e A c t i v e : f u n c t i o n ( ) { r e t u r n   t h i s [ t h i s . a c t i v e ? " d e a c t i v a t e " : " a c t i v a t e " ] ( ) ; 
 } , a c t i v a t e : f u n c t i o n ( f ) { i f ( f ) { i f ( f ! = t h i s . a c t i v e K B ) { t h i s . p r e v i o u s = t h i s . a c t i v e K B ; } t h i s . a c t i v e K B = f . f i r e E v e n t ( " a c t i v a t e " ) ; a . m a n a g e r . f i r e E v e n t ( " c h a n g e d " ) ; } e l s e { i f ( t h i s . m a n a g e r ) { t h i s . m a n a g e r . a c t i v a t e ( t h i s ) ; 
 } } r e t u r n   t h i s ; } , d e a c t i v a t e : f u n c t i o n ( f ) { i f ( f ) { i f ( f = = = t h i s . a c t i v e K B ) { t h i s . a c t i v e K B = n u l l ; f . f i r e E v e n t ( " d e a c t i v a t e " ) ; a . m a n a g e r . f i r e E v e n t ( " c h a n g e d " ) ; } } e l s e { i f ( t h i s . m a n a g e r ) { t h i s . m a n a g e r . d e a c t i v a t e ( t h i s ) ; 
 } } r e t u r n   t h i s ; } , r e l e n q u i s h : f u n c t i o n ( ) { i f ( t h i s . p r e v i o u s ) { t h i s . a c t i v a t e ( t h i s . p r e v i o u s ) ; } } , m a n a g e : f u n c t i o n ( f ) { i f ( f . m a n a g e r ) { f . m a n a g e r . d r o p ( f ) ; } t h i s . i n s t a n c e s . p u s h ( f ) ; 
 f . m a n a g e r = t h i s ; i f ( ! t h i s . a c t i v e K B ) { t h i s . a c t i v a t e ( f ) ; } e l s e { t h i s . _ d i s a b l e ( f ) ; } } , _ d i s a b l e : f u n c t i o n ( f ) { i f ( t h i s . a c t i v e K B = = f ) { t h i s . a c t i v e K B = n u l l ; } } , d r o p : f u n c t i o n ( f ) { t h i s . _ d i s a b l e ( f ) ; 
 t h i s . i n s t a n c e s . e r a s e ( f ) ; } , i n s t a n c e s : [ ] , t r a c e : f u n c t i o n ( ) { a . t r a c e ( t h i s ) ; } , e a c h : f u n c t i o n ( f ) { a . e a c h ( t h i s , f ) ; } } ) ; v a r   b = { } ; v a r   c = [ " s h i f t " , " c o n t r o l " , " a l t " , " m e t a " ] ; 
 v a r   e = / ^ ( ? : s h i f t | c o n t r o l | c t r l | a l t | m e t a ) $ / ; a . p a r s e = f u n c t i o n ( h , g , k ) { i f ( k & & k . c o n t a i n s ( h . t o L o w e r C a s e ( ) ) ) { r e t u r n   h ; } h = h . t o L o w e r C a s e ( ) . r e p l a c e ( / ^ ( k e y u p | k e y d o w n ) : / , f u n c t i o n ( m , l ) { g = l ; 
 r e t u r n " " ; } ) ; i f ( ! b [ h ] ) { v a r   f , j = { } ; h . s p l i t ( " + " ) . e a c h ( f u n c t i o n ( l ) { i f ( e . t e s t ( l ) ) { j [ l ] = t r u e ; } e l s e { f = l ; } } ) ; j . c o n t r o l = j . c o n t r o l | | j . c t r l ; v a r   i = [ ] ; c . e a c h ( f u n c t i o n ( l ) { i f ( j [ l ] ) { i . p u s h ( l ) ; 
 } } ) ; i f ( f ) { i . p u s h ( f ) ; } b [ h ] = i . j o i n ( " + " ) ; } r e t u r n   g + " : " + b [ h ] ; } ; a . e a c h = f u n c t i o n ( f , g ) { v a r   h = f | | a . m a n a g e r ; w h i l e ( h ) { g . r u n ( h ) ; h = h . a c t i v e K B ; } } ; a . s t o p = f u n c t i o n ( f ) { f . p r e v e n t K e y b o a r d P r o p a g a t i o n = t r u e ; 
 } ; a . m a n a g e r = n e w   a ( { a c t i v e : t r u e } ) ; a . t r a c e = f u n c t i o n ( f ) { f = f | | a . m a n a g e r ; f . e n a b l e L o g ( ) ; f . l o g ( " t h e   f o l l o w i n g   i t e m s   h a v e   f o c u s :   " ) ; a . e a c h ( f , f u n c t i o n ( g ) { f . l o g ( d o c u m e n t . i d ( g . w i d g e t ) | | g . w i g e t | | g ) ; 
 } ) ; } ; v a r   d = f u n c t i o n ( g ) { v a r   f = [ ] ; c . e a c h ( f u n c t i o n ( h ) { i f ( g [ h ] ) { f . p u s h ( h ) ; } } ) ; i f ( ! e . t e s t ( g . k e y ) ) { f . p u s h ( g . k e y ) ; } a . m a n a g e r . h a n d l e ( g , g . t y p e + " : " + f . j o i n ( " + " ) ) ; 
 } ; d o c u m e n t . a d d E v e n t s ( { k e y u p : d , k e y d o w n : d } ) ; E v e n t . K e y s . e x t e n d ( { s h i f t : 1 6 , c o n t r o l : 1 7 , a l t : 1 8 , c a p s l o c k : 2 0 , p a g e u p : 3 3 , p a g e d o w n : 3 4 , e n d : 3 5 , h o m e : 3 6 , n u m l o c k : 1 4 4 , s c r o l l l o c k : 1 4 5 , " ; " : 1 8 6 , " = " : 1 8 7 , " , " : 1 8 8 , " - " : B r o w s e r . E n g i n e . G e c k o ? 1 0 9 : 1 8 9 , " . " : 1 9 0 , " / " : 1 9 1 , " ` " : 1 9 2 , " [ " : 2 1 9 , " \ \ " : 2 2 0 , " ] " : 2 2 1 , " ' " : 2 2 2 } ) ; 
 } ) ( ) ; K e y b o a r d . p r o t o t y p e . o p t i o n s . n o n P a r s e d E v e n t s . c o m b i n e ( [ " r e b o u n d " , " o n r e b o u n d " ] ) ; K e y b o a r d . i m p l e m e n t ( { a d d S h o r t c u t : f u n c t i o n ( b , a ) { t h i s . s h o r t c u t s = t h i s . s h o r t c u t s | | [ ] ; 
 t h i s . s h o r t c u t I n d e x = t h i s . s h o r t c u t I n d e x | | { } ; a . g e t K e y b o a r d = $ l a m b d a ( t h i s ) ; a . n a m e = b ; t h i s . s h o r t c u t I n d e x [ b ] = a ; t h i s . s h o r t c u t s . p u s h ( a ) ; i f ( a . k e y s ) { t h i s . a d d E v e n t ( a . k e y s , a . h a n d l e r ) ; 
 } r e t u r n   t h i s ; } , a d d S h o r t c u t s : f u n c t i o n ( b ) { f o r ( v a r   a   i n   b ) { t h i s . a d d S h o r t c u t ( a , b [ a ] ) ; } r e t u r n   t h i s ; } , g e t S h o r t c u t s : f u n c t i o n ( ) { r e t u r n   t h i s . s h o r t c u t s | | [ ] ; } , g e t S h o r t c u t : f u n c t i o n ( a ) { r e t u r n ( t h i s . s h o r t c u t I n d e x | | { } ) [ a ] ; 
 } } ) ; K e y b o a r d . r e b i n d = f u n c t i o n ( b , a ) { $ s p l a t ( a ) . e a c h ( f u n c t i o n ( c ) { c . g e t K e y b o a r d ( ) . r e m o v e E v e n t ( c . k e y s , c . h a n d l e r ) ; c . g e t K e y b o a r d ( ) . a d d E v e n t ( b , c . h a n d l e r ) ; c . k e y s = b ; 
 c . g e t K e y b o a r d ( ) . f i r e E v e n t ( " r e b o u n d " ) ; } ) ; } ; K e y b o a r d . g e t A c t i v e S h o r t c u t s = f u n c t i o n ( b ) { v a r   a = [ ] , c = [ ] ; K e y b o a r d . e a c h ( b , [ ] . p u s h . b i n d ( a ) ) ; a . e a c h ( f u n c t i o n ( d ) { c . e x t e n d ( d . g e t S h o r t c u t s ( ) ) ; 
 } ) ; r e t u r n   c ; } ; K e y b o a r d . g e t S h o r t c u t = f u n c t i o n ( c , b , d ) { d = d | | { } ; v a r   a = d . m a n y ? [ ] : n u l l , e = d . m a n y ? f u n c t i o n ( g ) { v a r   f = g . g e t S h o r t c u t ( c ) ; i f ( f ) { a . p u s h ( f ) ; } } : f u n c t i o n ( f ) { i f ( ! a ) { a = f . g e t S h o r t c u t ( c ) ; 
 } } ; K e y b o a r d . e a c h ( b , e ) ; r e t u r n   a ; } ; K e y b o a r d . g e t S h o r t c u t s = f u n c t i o n ( b , a ) { r e t u r n   K e y b o a r d . g e t S h o r t c u t ( b , a , { m a n y : t r u e } ) ; } ; v a r   M a s k = n e w   C l a s s ( { I m p l e m e n t s : [ O p t i o n s , E v e n t s ] , B i n d s : [ " p o s i t i o n " ] , o p t i o n s : { s t y l e : { } , " c l a s s " : " m a s k " , m a s k M a r g i n s : f a l s e , u s e I f r a m e S h i m : t r u e , i f r a m e S h i m O p t i o n s : { } } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . t a r g e t = d o c u m e n t . i d ( b ) | | d o c u m e n t . i d ( d o c u m e n t . b o d y ) ; 
 t h i s . t a r g e t . s t o r e ( " M a s k " , t h i s ) ; t h i s . s e t O p t i o n s ( a ) ; t h i s . r e n d e r ( ) ; t h i s . i n j e c t ( ) ; } , r e n d e r : f u n c t i o n ( ) { t h i s . e l e m e n t = n e w   E l e m e n t ( " d i v " , { " c l a s s " : t h i s . o p t i o n s [ " c l a s s " ] , i d : t h i s . o p t i o n s . i d | | " m a s k - " + $ t i m e ( ) , s t y l e s : $ m e r g e ( t h i s . o p t i o n s . s t y l e , { d i s p l a y : " n o n e " } ) , e v e n t s : { c l i c k : f u n c t i o n ( ) { t h i s . f i r e E v e n t ( " c l i c k " ) ; 
 i f ( t h i s . o p t i o n s . h i d e O n C l i c k ) { t h i s . h i d e ( ) ; } } . b i n d ( t h i s ) } } ) ; t h i s . h i d d e n = t r u e ; } , t o E l e m e n t : f u n c t i o n ( ) { r e t u r n   t h i s . e l e m e n t ; } , i n j e c t : f u n c t i o n ( b , a ) { a = a | | t h i s . o p t i o n s . i n j e c t ? t h i s . o p t i o n s . i n j e c t . w h e r e : " " | | t h i s . t a r g e t = = d o c u m e n t . b o d y ? " i n s i d e " : " a f t e r " ; 
 b = b | | t h i s . o p t i o n s . i n j e c t ? t h i s . o p t i o n s . i n j e c t . t a r g e t : " " | | t h i s . t a r g e t ; t h i s . e l e m e n t . i n j e c t ( b , a ) ; i f ( t h i s . o p t i o n s . u s e I f r a m e S h i m ) { t h i s . s h i m = n e w   I f r a m e S h i m ( t h i s . e l e m e n t , t h i s . o p t i o n s . i f r a m e S h i m O p t i o n s ) ; 
 t h i s . a d d E v e n t s ( { s h o w : t h i s . s h i m . s h o w . b i n d ( t h i s . s h i m ) , h i d e : t h i s . s h i m . h i d e . b i n d ( t h i s . s h i m ) , d e s t r o y : t h i s . s h i m . d e s t r o y . b i n d ( t h i s . s h i m ) } ) ; } } , p o s i t i o n : f u n c t i o n ( ) { t h i s . r e s i z e ( t h i s . o p t i o n s . w i d t h , t h i s . o p t i o n s . h e i g h t ) ; 
 t h i s . e l e m e n t . p o s i t i o n ( { r e l a t i v e T o : t h i s . t a r g e t , p o s i t i o n : " t o p L e f t " , i g n o r e M a r g i n s : ! t h i s . o p t i o n s . m a s k M a r g i n s , i g n o r e S c r o l l : t h i s . t a r g e t = = d o c u m e n t . b o d y } ) ; r e t u r n   t h i s ; 
 } , r e s i z e : f u n c t i o n ( a , e ) { v a r   b = { s t y l e s : [ " p a d d i n g " , " b o r d e r " ] } ; i f ( t h i s . o p t i o n s . m a s k M a r g i n s ) { b . s t y l e s . p u s h ( " m a r g i n " ) ; } v a r   d = t h i s . t a r g e t . g e t C o m p u t e d S i z e ( b ) ; i f ( t h i s . t a r g e t = = d o c u m e n t . b o d y ) { v a r   c = w i n d o w . g e t S i z e ( ) ; 
 i f ( d . t o t a l H e i g h t < c . y ) { d . t o t a l H e i g h t = c . y ; } i f ( d . t o t a l W i d t h < c . x ) { d . t o t a l W i d t h = c . x ; } } t h i s . e l e m e n t . s e t S t y l e s ( { w i d t h : $ p i c k ( a , d . t o t a l W i d t h , d . x ) , h e i g h t : $ p i c k ( e , d . t o t a l H e i g h t , d . y ) } ) ; 
 r e t u r n   t h i s ; } , s h o w : f u n c t i o n ( ) { i f ( ! t h i s . h i d d e n ) { r e t u r n   t h i s ; } w i n d o w . a d d E v e n t ( " r e s i z e " , t h i s . p o s i t i o n ) ; t h i s . p o s i t i o n ( ) ; t h i s . s h o w M a s k . a p p l y ( t h i s , a r g u m e n t s ) ; 
 r e t u r n   t h i s ; } , s h o w M a s k : f u n c t i o n ( ) { t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , " b l o c k " ) ; t h i s . h i d d e n = f a l s e ; t h i s . f i r e E v e n t ( " s h o w " ) ; } , h i d e : f u n c t i o n ( ) { i f ( t h i s . h i d d e n ) { r e t u r n   t h i s ; 
 } w i n d o w . r e m o v e E v e n t ( " r e s i z e " , t h i s . p o s i t i o n ) ; t h i s . h i d e M a s k . a p p l y ( t h i s , a r g u m e n t s ) ; i f ( t h i s . o p t i o n s . d e s t r o y O n H i d e ) { r e t u r n   t h i s . d e s t r o y ( ) ; } r e t u r n   t h i s ; } , h i d e M a s k : f u n c t i o n ( ) { t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; 
 t h i s . h i d d e n = t r u e ; t h i s . f i r e E v e n t ( " h i d e " ) ; } , t o g g l e : f u n c t i o n ( ) { t h i s [ t h i s . h i d d e n ? " s h o w " : " h i d e " ] ( ) ; } , d e s t r o y : f u n c t i o n ( ) { t h i s . h i d e ( ) ; t h i s . e l e m e n t . d e s t r o y ( ) ; t h i s . f i r e E v e n t ( " d e s t r o y " ) ; 
 t h i s . t a r g e t . e l i m i n a t e ( " m a s k " ) ; } } ) ; E l e m e n t . P r o p e r t i e s . m a s k = { s e t : f u n c t i o n ( b ) { v a r   a = t h i s . r e t r i e v e ( " m a s k " ) ; r e t u r n   t h i s . e l i m i n a t e ( " m a s k " ) . s t o r e ( " m a s k : o p t i o n s " , b ) ; 
 } , g e t : f u n c t i o n ( a ) { i f ( a | | ! t h i s . r e t r i e v e ( " m a s k " ) ) { i f ( t h i s . r e t r i e v e ( " m a s k " ) ) { t h i s . r e t r i e v e ( " m a s k " ) . d e s t r o y ( ) ; } i f ( a | | ! t h i s . r e t r i e v e ( " m a s k : o p t i o n s " ) ) { t h i s . s e t ( " m a s k " , a ) ; 
 } t h i s . s t o r e ( " m a s k " , n e w   M a s k ( t h i s , t h i s . r e t r i e v e ( " m a s k : o p t i o n s " ) ) ) ; } r e t u r n   t h i s . r e t r i e v e ( " m a s k " ) ; } } ; E l e m e n t . i m p l e m e n t ( { m a s k : f u n c t i o n ( a ) { t h i s . g e t ( " m a s k " , a ) . s h o w ( ) ; 
 r e t u r n   t h i s ; } , u n m a s k : f u n c t i o n ( ) { t h i s . g e t ( " m a s k " ) . h i d e ( ) ; r e t u r n   t h i s ; } } ) ; v a r   S c r o l l e r = n e w   C l a s s ( { I m p l e m e n t s : [ E v e n t s , O p t i o n s ] , o p t i o n s : { a r e a : 2 0 , v e l o c i t y : 1 , o n C h a n g e : f u n c t i o n ( a , b ) { t h i s . e l e m e n t . s c r o l l T o ( a , b ) ; 
 } , f p s : 5 0 } , i n i t i a l i z e : f u n c t i o n ( b , a ) { t h i s . s e t O p t i o n s ( a ) ; t h i s . e l e m e n t = d o c u m e n t . i d ( b ) ; t h i s . d o c B o d y = d o c u m e n t . i d ( t h i s . e l e m e n t . g e t D o c u m e n t ( ) . b o d y ) ; t h i s . l i s t e n e r = ( $ t y p e ( t h i s . e l e m e n t ) ! = " e l e m e n t " ) ? t h i s . d o c B o d y : t h i s . e l e m e n t ; 
 t h i s . t i m e r = n u l l ; t h i s . b o u n d = { a t t a c h : t h i s . a t t a c h . b i n d ( t h i s ) , d e t a c h : t h i s . d e t a c h . b i n d ( t h i s ) , g e t C o o r d s : t h i s . g e t C o o r d s . b i n d ( t h i s ) } ; } , s t a r t : f u n c t i o n ( ) { t h i s . l i s t e n e r . a d d E v e n t s ( { m o u s e o v e r : t h i s . b o u n d . a t t a c h , m o u s e o u t : t h i s . b o u n d . d e t a c h } ) ; 
 } , s t o p : f u n c t i o n ( ) { t h i s . l i s t e n e r . r e m o v e E v e n t s ( { m o u s e o v e r : t h i s . b o u n d . a t t a c h , m o u s e o u t : t h i s . b o u n d . d e t a c h } ) ; t h i s . d e t a c h ( ) ; t h i s . t i m e r = $ c l e a r ( t h i s . t i m e r ) ; } , a t t a c h : f u n c t i o n ( ) { t h i s . l i s t e n e r . a d d E v e n t ( " m o u s e m o v e " , t h i s . b o u n d . g e t C o o r d s ) ; 
 } , d e t a c h : f u n c t i o n ( ) { t h i s . l i s t e n e r . r e m o v e E v e n t ( " m o u s e m o v e " , t h i s . b o u n d . g e t C o o r d s ) ; t h i s . t i m e r = $ c l e a r ( t h i s . t i m e r ) ; } , g e t C o o r d s : f u n c t i o n ( a ) { t h i s . p a g e = ( t h i s . l i s t e n e r . g e t ( " t a g " ) = = " b o d y " ) ? a . c l i e n t : a . p a g e ; 
 i f ( ! t h i s . t i m e r ) { t h i s . t i m e r = t h i s . s c r o l l . p e r i o d i c a l ( M a t h . r o u n d ( 1 0 0 0 / t h i s . o p t i o n s . f p s ) , t h i s ) ; } } , s c r o l l : f u n c t i o n ( ) { v a r   b = t h i s . e l e m e n t . g e t S i z e ( ) , a = t h i s . e l e m e n t . g e t S c r o l l ( ) , f = t h i s . e l e m e n t ! = t h i s . d o c B o d y ? t h i s . e l e m e n t . g e t O f f s e t s ( ) : { x : 0 , y : 0 } , c = t h i s . e l e m e n t . g e t S c r o l l S i z e ( ) , e = { x : 0 , y : 0 } ; 
 f o r ( v a r   d   i n   t h i s . p a g e ) { i f ( t h i s . p a g e [ d ] < ( t h i s . o p t i o n s . a r e a + f [ d ] ) & & a [ d ] ! = 0 ) { e [ d ] = ( t h i s . p a g e [ d ] - t h i s . o p t i o n s . a r e a - f [ d ] ) * t h i s . o p t i o n s . v e l o c i t y ; } e l s e { i f ( t h i s . p a g e [ d ] + t h i s . o p t i o n s . a r e a > ( b [ d ] + f [ d ] ) & & a [ d ] + b [ d ] ! = c [ d ] ) { e [ d ] = ( t h i s . p a g e [ d ] - b [ d ] + t h i s . o p t i o n s . a r e a - f [ d ] ) * t h i s . o p t i o n s . v e l o c i t y ; 
 } } } i f ( e . y | | e . x ) { t h i s . f i r e E v e n t ( " c h a n g e " , [ a . x + e . x , a . y + e . y ] ) ; } } } ) ; ( f u n c t i o n ( ) { v a r   a = f u n c t i o n ( c , b ) { r e t u r n ( c ) ? ( $ t y p e ( c ) = = " f u n c t i o n " ? c ( b ) : b . g e t ( c ) ) : " " ; } ; t h i s . T i p s = n e w   C l a s s ( { I m p l e m e n t s : [ E v e n t s , O p t i o n s ] , o p t i o n s : { o n S h o w : f u n c t i o n ( ) { t h i s . t i p . s e t S t y l e ( " d i s p l a y " , " b l o c k " ) ; 
 } , o n H i d e : f u n c t i o n ( ) { t h i s . t i p . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; } , t i t l e : " t i t l e " , t e x t : f u n c t i o n ( b ) { r e t u r n   b . g e t ( " r e l " ) | | b . g e t ( " h r e f " ) ; } , s h o w D e l a y : 1 0 0 , h i d e D e l a y : 1 0 0 , c l a s s N a m e : " t i p - w r a p " , o f f s e t : { x : 1 6 , y : 1 6 } , w i n d o w P a d d i n g : { x : 0 , y : 0 } , f i x e d : f a l s e } , i n i t i a l i z e : f u n c t i o n ( ) { v a r   b = A r r a y . l i n k ( a r g u m e n t s , { o p t i o n s : O b j e c t . t y p e , e l e m e n t s : $ d e f i n e d } ) ; 
 t h i s . s e t O p t i o n s ( b . o p t i o n s ) ; i f ( b . e l e m e n t s ) { t h i s . a t t a c h ( b . e l e m e n t s ) ; } t h i s . c o n t a i n e r = n e w   E l e m e n t ( " d i v " , { " c l a s s " : " t i p " } ) ; } , t o E l e m e n t : f u n c t i o n ( ) { i f ( t h i s . t i p ) { r e t u r n   t h i s . t i p ; 
 } r e t u r n   t h i s . t i p = n e w   E l e m e n t ( " d i v " , { " c l a s s " : t h i s . o p t i o n s . c l a s s N a m e , s t y l e s : { p o s i t i o n : " a b s o l u t e " , t o p : 0 , l e f t : 0 } } ) . a d o p t ( n e w   E l e m e n t ( " d i v " , { " c l a s s " : " t i p - t o p " } ) , t h i s . c o n t a i n e r , n e w   E l e m e n t ( " d i v " , { " c l a s s " : " t i p - b o t t o m " } ) ) . i n j e c t ( d o c u m e n t . b o d y ) ; 
 } , a t t a c h : f u n c t i o n ( b ) { $ $ ( b ) . e a c h ( f u n c t i o n ( d ) { v a r   f = a ( t h i s . o p t i o n s . t i t l e , d ) , e = a ( t h i s . o p t i o n s . t e x t , d ) ; d . e r a s e ( " t i t l e " ) . s t o r e ( " t i p : n a t i v e " , f ) . r e t r i e v e ( " t i p : t i t l e " , f ) ; 
 d . r e t r i e v e ( " t i p : t e x t " , e ) ; t h i s . f i r e E v e n t ( " a t t a c h " , [ d ] ) ; v a r   c = [ " e n t e r " , " l e a v e " ] ; i f ( ! t h i s . o p t i o n s . f i x e d ) { c . p u s h ( " m o v e " ) ; } c . e a c h ( f u n c t i o n ( h ) { v a r   g = d . r e t r i e v e ( " t i p : " + h ) ; 
 i f ( ! g ) { g = t h i s [ " e l e m e n t " + h . c a p i t a l i z e ( ) ] . b i n d W i t h E v e n t ( t h i s , d ) ; } d . s t o r e ( " t i p : " + h , g ) . a d d E v e n t ( " m o u s e " + h , g ) ; } , t h i s ) ; } , t h i s ) ; r e t u r n   t h i s ; } , d e t a c h : f u n c t i o n ( b ) { $ $ ( b ) . e a c h ( f u n c t i o n ( d ) { [ " e n t e r " , " l e a v e " , " m o v e " ] . e a c h ( f u n c t i o n ( e ) { d . r e m o v e E v e n t ( " m o u s e " + e , d . r e t r i e v e ( " t i p : " + e ) ) . e l i m i n a t e ( " t i p : " + e ) ; 
 } ) ; t h i s . f i r e E v e n t ( " d e t a c h " , [ d ] ) ; i f ( t h i s . o p t i o n s . t i t l e = = " t i t l e " ) { v a r   c = d . r e t r i e v e ( " t i p : n a t i v e " ) ; i f ( c ) { d . s e t ( " t i t l e " , c ) ; } } } , t h i s ) ; r e t u r n   t h i s ; } , e l e m e n t E n t e r : f u n c t i o n ( c , b ) { t h i s . c o n t a i n e r . e m p t y ( ) ; 
 [ " t i t l e " , " t e x t " ] . e a c h ( f u n c t i o n ( e ) { v a r   d = b . r e t r i e v e ( " t i p : " + e ) ; i f ( d ) { t h i s . f i l l ( n e w   E l e m e n t ( " d i v " , { " c l a s s " : " t i p - " + e } ) . i n j e c t ( t h i s . c o n t a i n e r ) , d ) ; } } , t h i s ) ; $ c l e a r ( t h i s . t i m e r ) ; 
 t h i s . t i m e r = ( f u n c t i o n ( ) { t h i s . s h o w ( t h i s , b ) ; t h i s . p o s i t i o n ( ( t h i s . o p t i o n s . f i x e d ) ? { p a g e : b . g e t P o s i t i o n ( ) } : c ) ; } ) . d e l a y ( t h i s . o p t i o n s . s h o w D e l a y , t h i s ) ; } , e l e m e n t L e a v e : f u n c t i o n ( c , b ) { $ c l e a r ( t h i s . t i m e r ) ; 
 t h i s . t i m e r = t h i s . h i d e . d e l a y ( t h i s . o p t i o n s . h i d e D e l a y , t h i s , b ) ; t h i s . f i r e F o r P a r e n t ( c , b ) ; } , f i r e F o r P a r e n t : f u n c t i o n ( c , b ) { b = b . g e t P a r e n t ( ) ; i f ( ! b | | b = = d o c u m e n t . b o d y ) { r e t u r n ; 
 } i f ( b . r e t r i e v e ( " t i p : e n t e r " ) ) { b . f i r e E v e n t ( " m o u s e e n t e r " , c ) ; } e l s e { t h i s . f i r e F o r P a r e n t ( c , b ) ; } } , e l e m e n t M o v e : f u n c t i o n ( c , b ) { t h i s . p o s i t i o n ( c ) ; } , p o s i t i o n : f u n c t i o n ( e ) { i f ( ! t h i s . t i p ) { d o c u m e n t . i d ( t h i s ) ; 
 } v a r   c = w i n d o w . g e t S i z e ( ) , b = w i n d o w . g e t S c r o l l ( ) , f = { x : t h i s . t i p . o f f s e t W i d t h , y : t h i s . t i p . o f f s e t H e i g h t } , d = { x : " l e f t " , y : " t o p " } , g = { } ; f o r ( v a r   h   i n   d ) { g [ d [ h ] ] = e . p a g e [ h ] + t h i s . o p t i o n s . o f f s e t [ h ] ; 
 i f ( ( g [ d [ h ] ] + f [ h ] - b [ h ] ) > c [ h ] - t h i s . o p t i o n s . w i n d o w P a d d i n g [ h ] ) { g [ d [ h ] ] = e . p a g e [ h ] - t h i s . o p t i o n s . o f f s e t [ h ] - f [ h ] ; } } t h i s . t i p . s e t S t y l e s ( g ) ; } , f i l l : f u n c t i o n ( b , c ) { i f ( t y p e o f   c = = " s t r i n g " ) { b . s e t ( " h t m l " , c ) ; 
 } e l s e { b . a d o p t ( c ) ; } } , s h o w : f u n c t i o n ( b ) { i f ( ! t h i s . t i p ) { d o c u m e n t . i d ( t h i s ) ; } t h i s . f i r e E v e n t ( " s h o w " , [ t h i s . t i p , b ] ) ; } , h i d e : f u n c t i o n ( b ) { i f ( ! t h i s . t i p ) { d o c u m e n t . i d ( t h i s ) ; 
 } t h i s . f i r e E v e n t ( " h i d e " , [ t h i s . t i p , b ] ) ; } } ) ; } ) ( ) ; v a r   S p i n n e r = n e w   C l a s s ( { E x t e n d s : M a s k , o p t i o n s : { " c l a s s " : " s p i n n e r " , c o n t a i n e r P o s i t i o n : { } , c o n t e n t : { " c l a s s " : " s p i n n e r - c o n t e n t " } , m e s s a g e C o n t a i n e r : { " c l a s s " : " s p i n n e r - m s g " } , i m g : { " c l a s s " : " s p i n n e r - i m g " } , f x O p t i o n s : { l i n k : " c h a i n " } } , i n i t i a l i z e : f u n c t i o n ( ) { t h i s . p a r e n t . a p p l y ( t h i s , a r g u m e n t s ) ; 
 t h i s . t a r g e t . s t o r e ( " s p i n n e r " , t h i s ) ; v a r   a = f u n c t i o n ( ) { t h i s . a c t i v e = f a l s e ; } . b i n d ( t h i s ) ; t h i s . a d d E v e n t s ( { h i d e : a , s h o w : a } ) ; } , r e n d e r : f u n c t i o n ( ) { t h i s . p a r e n t ( ) ; t h i s . e l e m e n t . s e t ( " i d " , t h i s . o p t i o n s . i d | | " s p i n n e r - " + $ t i m e ( ) ) ; 
 t h i s . c o n t e n t = d o c u m e n t . i d ( t h i s . o p t i o n s . c o n t e n t ) | | n e w   E l e m e n t ( " d i v " , t h i s . o p t i o n s . c o n t e n t ) ; t h i s . c o n t e n t . i n j e c t ( t h i s . e l e m e n t ) ; i f ( t h i s . o p t i o n s . m e s s a g e ) { t h i s . m s g = d o c u m e n t . i d ( t h i s . o p t i o n s . m e s s a g e ) | | n e w   E l e m e n t ( " p " , t h i s . o p t i o n s . m e s s a g e C o n t a i n e r ) . a p p e n d T e x t ( t h i s . o p t i o n s . m e s s a g e ) ; 
 t h i s . m s g . i n j e c t ( t h i s . c o n t e n t ) ; } i f ( t h i s . o p t i o n s . i m g ) { t h i s . i m g = d o c u m e n t . i d ( t h i s . o p t i o n s . i m g ) | | n e w   E l e m e n t ( " d i v " , t h i s . o p t i o n s . i m g ) ; t h i s . i m g . i n j e c t ( t h i s . c o n t e n t ) ; 
 } t h i s . e l e m e n t . s e t ( " t w e e n " , t h i s . o p t i o n s . f x O p t i o n s ) ; } , s h o w : f u n c t i o n ( a ) { i f ( t h i s . a c t i v e ) { r e t u r n   t h i s . c h a i n ( t h i s . s h o w . b i n d ( t h i s ) ) ; } i f ( ! t h i s . h i d d e n ) { t h i s . c a l l C h a i n . d e l a y ( 2 0 , t h i s ) ; 
 r e t u r n   t h i s ; } t h i s . a c t i v e = t r u e ; r e t u r n   t h i s . p a r e n t ( a ) ; } , s h o w M a s k : f u n c t i o n ( a ) { v a r   b = f u n c t i o n ( ) { t h i s . c o n t e n t . p o s i t i o n ( $ m e r g e ( { r e l a t i v e T o : t h i s . e l e m e n t } , t h i s . o p t i o n s . c o n t a i n e r P o s i t i o n ) ) ; 
 } . b i n d ( t h i s ) ; i f ( a ) { t h i s . p a r e n t ( ) ; b ( ) ; } e l s e { t h i s . e l e m e n t . s e t S t y l e s ( { d i s p l a y : " b l o c k " , o p a c i t y : 0 } ) . t w e e n ( " o p a c i t y " , t h i s . o p t i o n s . s t y l e . o p a c i t y | | 0 . 9 ) ; b ( ) ; t h i s . h i d d e n = f a l s e ; 
 t h i s . f i r e E v e n t ( " s h o w " ) ; t h i s . c a l l C h a i n ( ) ; } } , h i d e : f u n c t i o n ( a ) { i f ( t h i s . a c t i v e ) { r e t u r n   t h i s . c h a i n ( t h i s . h i d e . b i n d ( t h i s ) ) ; } i f ( t h i s . h i d d e n ) { t h i s . c a l l C h a i n . d e l a y ( 2 0 , t h i s ) ; 
 r e t u r n   t h i s ; } t h i s . a c t i v e = t r u e ; r e t u r n   t h i s . p a r e n t ( a ) ; } , h i d e M a s k : f u n c t i o n ( a ) { i f ( a ) { r e t u r n   t h i s . p a r e n t ( ) ; } t h i s . e l e m e n t . t w e e n ( " o p a c i t y " , 0 ) . g e t ( " t w e e n " ) . c h a i n ( f u n c t i o n ( ) { t h i s . e l e m e n t . s e t S t y l e ( " d i s p l a y " , " n o n e " ) ; 
 t h i s . h i d d e n = t r u e ; t h i s . f i r e E v e n t ( " h i d e " ) ; t h i s . c a l l C h a i n ( ) ; } . b i n d ( t h i s ) ) ; } , d e s t r o y : f u n c t i o n ( ) { t h i s . c o n t e n t . d e s t r o y ( ) ; t h i s . p a r e n t ( ) ; t h i s . t a r g e t . e l i m i n a t e ( " s p i n n e r " ) ; 
 } } ) ; S p i n n e r . i m p l e m e n t ( n e w   C h a i n ) ; i f ( w i n d o w . R e q u e s t ) { R e q u e s t = C l a s s . r e f a c t o r ( R e q u e s t , { o p t i o n s : { u s e S p i n n e r : f a l s e , s p i n n e r O p t i o n s : { } , s p i n n e r T a r g e t : f a l s e } , i n i t i a l i z e : f u n c t i o n ( a ) { t h i s . _ s e n d = t h i s . s e n d ; 
 t h i s . s e n d = f u n c t i o n ( c ) { i f ( t h i s . s p i n n e r ) { t h i s . s p i n n e r . c h a i n ( t h i s . _ s e n d . b i n d ( t h i s , c ) ) . s h o w ( ) ; } e l s e { t h i s . _ s e n d ( c ) ; } r e t u r n   t h i s ; } ; t h i s . p r e v i o u s ( a ) ; v a r   b = d o c u m e n t . i d ( t h i s . o p t i o n s . s p i n n e r T a r g e t ) | | d o c u m e n t . i d ( t h i s . o p t i o n s . u p d a t e ) ; 
 i f ( t h i s . o p t i o n s . u s e S p i n n e r & & b ) { t h i s . s p i n n e r = b . g e t ( " s p i n n e r " , t h i s . o p t i o n s . s p i n n e r O p t i o n s ) ; [ " o n C o m p l e t e " , " o n E x c e p t i o n " , " o n C a n c e l " ] . e a c h ( f u n c t i o n ( c ) { t h i s . a d d E v e n t ( c , t h i s . s p i n n e r . h i d e . b i n d ( t h i s . s p i n n e r ) ) ; 
 } , t h i s ) ; } } , g e t S p i n n e r : f u n c t i o n ( ) { r e t u r n   t h i s . s p i n n e r ; } } ) ; } E l e m e n t . P r o p e r t i e s . s p i n n e r = { s e t : f u n c t i o n ( a ) { v a r   b = t h i s . r e t r i e v e ( " s p i n n e r " ) ; r e t u r n   t h i s . e l i m i n a t e ( " s p i n n e r " ) . s t o r e ( " s p i n n e r : o p t i o n s " , a ) ; 
 } , g e t : f u n c t i o n ( a ) { i f ( a | | ! t h i s . r e t r i e v e ( " s p i n n e r " ) ) { i f ( t h i s . r e t r i e v e ( " s p i n n e r " ) ) { t h i s . r e t r i e v e ( " s p i n n e r " ) . d e s t r o y ( ) ; } i f ( a | | ! t h i s . r e t r i e v e ( " s p i n n e r : o p t i o n s " ) ) { t h i s . s e t ( " s p i n n e r " , a ) ; 
 } n e w   S p i n n e r ( t h i s , t h i s . r e t r i e v e ( " s p i n n e r : o p t i o n s " ) ) ; } r e t u r n   t h i s . r e t r i e v e ( " s p i n n e r " ) ; } } ; E l e m e n t . i m p l e m e n t ( { s p i n : f u n c t i o n ( a ) { t h i s . g e t ( " s p i n n e r " , a ) . s h o w ( ) ; 
 r e t u r n   t h i s ; } , u n s p i n : f u n c t i o n ( ) { v a r   a = A r r a y . l i n k ( a r g u m e n t s , { o p t i o n s : O b j e c t . t y p e , c a l l b a c k : F u n c t i o n . t y p e } ) ; t h i s . g e t ( " s p i n n e r " , a . o p t i o n s ) . h i d e ( a . c a l l b a c k ) ; 
 r e t u r n   t h i s ; } } ) ; M o o T o o l s . l a n g . s e t ( " e n - U S " , " D a t e " , { m o n t h s : [ " J a n u a r y " , " F e b r u a r y " , " M a r c h " , " A p r i l " , " M a y " , " J u n e " , " J u l y " , " A u g u s t " , " S e p t e m b e r " , " O c t o b e r " , " N o v e m b e r " , " D e c e m b e r " ] , d a y s : [ " S u n d a y " , " M o n d a y " , " T u e s d a y " , " W e d n e s d a y " , " T h u r s d a y " , " F r i d a y " , " S a t u r d a y " ] , d a t e O r d e r : [ " m o n t h " , " d a t e " , " y e a r " ] , s h o r t D a t e : " % m / % d / % Y " , s h o r t T i m e : " % I : % M % p " , A M : " A M " , P M : " P M " , o r d i n a l : f u n c t i o n ( a ) { r e t u r n ( a > 3 & & a < 2 1 ) ? " t h " : [ " t h " , " s t " , " n d " , " r d " , " t h " ] [ M a t h . m i n ( a % 1 0 , 4 ) ] ; 
 } , l e s s T h a n M i n u t e A g o : " l e s s   t h a n   a   m i n u t e   a g o " , m i n u t e A g o : " a b o u t   a   m i n u t e   a g o " , m i n u t e s A g o : " { d e l t a }   m i n u t e s   a g o " , h o u r A g o : " a b o u t   a n   h o u r   a g o " , h o u r s A g o : " a b o u t   { d e l t a }   h o u r s   a g o " , d a y A g o : " 1   d a y   a g o " , d a y s A g o : " { d e l t a }   d a y s   a g o " , w e e k A g o : " 1   w e e k   a g o " , w e e k s A g o : " { d e l t a }   w e e k s   a g o " , m o n t h A g o : " 1   m o n t h   a g o " , m o n t h s A g o : " { d e l t a }   m o n t h s   a g o " , y e a r A g o : " 1   y e a r   a g o " , y e a r s A g o : " { d e l t a }   y e a r s   a g o " , l e s s T h a n M i n u t e U n t i l : " l e s s   t h a n   a   m i n u t e   f r o m   n o w " , m i n u t e U n t i l : " a b o u t   a   m i n u t e   f r o m   n o w " , m i n u t e s U n t i l : " { d e l t a }   m i n u t e s   f r o m   n o w " , h o u r U n t i l : " a b o u t   a n   h o u r   f r o m   n o w " , h o u r s U n t i l : " a b o u t   { d e l t a }   h o u r s   f r o m   n o w " , d a y U n t i l : " 1   d a y   f r o m   n o w " , d a y s U n t i l : " { d e l t a }   d a y s   f r o m   n o w " , w e e k U n t i l : " 1   w e e k   f r o m   n o w " , w e e k s U n t i l : " { d e l t a }   w e e k s   f r o m   n o w " , m o n t h U n t i l : " 1   m o n t h   f r o m   n o w " , m o n t h s U n t i l : " { d e l t a }   m o n t h s   f r o m   n o w " , y e a r U n t i l : " 1   y e a r   f r o m   n o w " , y e a r s U n t i l : " { d e l t a }   y e a r s   f r o m   n o w " } ) ; 
 M o o T o o l s . l a n g . s e t ( " e n - U S " , " F o r m . V a l i d a t o r " , { r e q u i r e d : " T h i s   f i e l d   i s   r e q u i r e d . " , m i n L e n g t h : " P l e a s e   e n t e r   a t   l e a s t   { m i n L e n g t h }   c h a r a c t e r s   ( y o u   e n t e r e d   { l e n g t h }   c h a r a c t e r s ) . " , m a x L e n g t h : " P l e a s e   e n t e r   n o   m o r e   t h a n   { m a x L e n g t h }   c h a r a c t e r s   ( y o u   e n t e r e d   { l e n g t h }   c h a r a c t e r s ) . " , i n t e g e r : " P l e a s e   e n t e r   a n   i n t e g e r   i n   t h i s   f i e l d .   N u m b e r s   w i t h   d e c i m a l s   ( e . g .   1 . 2 5 )   a r e   n o t   p e r m i t t e d . " , n u m e r i c : ' P l e a s e   e n t e r   o n l y   n u m e r i c   v a l u e s   i n   t h i s   f i e l d   ( i . e .   " 1 "   o r   " 1 . 1 "   o r   " - 1 "   o r   " - 1 . 1 " ) . ' , d i g i t s : " P l e a s e   u s e   n u m b e r s   a n d   p u n c t u a t i o n   o n l y   i n   t h i s   f i e l d   ( f o r   e x a m p l e ,   a   p h o n e   n u m b e r   w i t h   d a s h e s   o r   d o t s   i s   p e r m i t t e d ) . " , a l p h a : " P l e a s e   u s e   l e t t e r s   o n l y   ( a - z )   w i t h   i n   t h i s   f i e l d .   N o   s p a c e s   o r   o t h e r   c h a r a c t e r s   a r e   a l l o w e d . " , a l p h a n u m : " P l e a s e   u s e   o n l y   l e t t e r s   ( a - z )   o r   n u m b e r s   ( 0 - 9 )   o n l y   i n   t h i s   f i e l d .   N o   s p a c e s   o r   o t h e r   c h a r a c t e r s   a r e   a l l o w e d . " , d a t e S u c h A s : " P l e a s e   e n t e r   a   v a l i d   d a t e   s u c h   a s   { d a t e } " , d a t e I n F o r m a t M D Y : ' P l e a s e   e n t e r   a   v a l i d   d a t e   s u c h   a s   M M / D D / Y Y Y Y   ( i . e .   " 1 2 / 3 1 / 1 9 9 9 " ) ' , e m a i l : ' P l e a s e   e n t e r   a   v a l i d   e m a i l   a d d r e s s .   F o r   e x a m p l e   " f r e d @ d o m a i n . c o m " . ' , u r l : " P l e a s e   e n t e r   a   v a l i d   U R L   s u c h   a s   h t t p : / / w w w . g o o g l e . c o m . " , c u r r e n c y D o l l a r : " P l e a s e   e n t e r   a   v a l i d   $   a m o u n t .   F o r   e x a m p l e   $ 1 0 0 . 0 0   . " , o n e R e q u i r e d : " P l e a s e   e n t e r   s o m e t h i n g   f o r   a t   l e a s t   o n e   o f   t h e s e   i n p u t s . " , e r r o r P r e f i x : " E r r o r :   " , w a r n i n g P r e f i x : " W a r n i n g :   " , n o S p a c e : " T h e r e   c a n   b e   n o   s p a c e s   i n   t h i s   i n p u t . " , r e q C h k B y N o d e : " N o   i t e m s   a r e   s e l e c t e d . " , r e q u i r e d C h k : " T h i s   f i e l d   i s   r e q u i r e d . " , r e q C h k B y N a m e : " P l e a s e   s e l e c t   a   { l a b e l } . " , m a t c h : " T h i s   f i e l d   n e e d s   t o   m a t c h   t h e   { m a t c h N a m e }   f i e l d " , s t a r t D a t e : " t h e   s t a r t   d a t e " , e n d D a t e : " t h e   e n d   d a t e " , c u r r e n d D a t e : " t h e   c u r r e n t   d a t e " , a f t e r D a t e : " T h e   d a t e   s h o u l d   b e   t h e   s a m e   o r   a f t e r   { l a b e l } . " , b e f o r e D a t e : " T h e   d a t e   s h o u l d   b e   t h e   s a m e   o r   b e f o r e   { l a b e l } . " , s t a r t M o n t h : " P l e a s e   s e l e c t   a   s t a r t   m o n t h " , s a m e M o n t h : " T h e s e   t w o   d a t e s   m u s t   b e   i n   t h e   s a m e   m o n t h   -   y o u   m u s t   c h a n g e   o n e   o r   t h e   o t h e r . " , c r e d i t c a r d : " T h e   c r e d i t   c a r d   n u m b e r   e n t e r e d   i s   i n v a l i d .   P l e a s e   c h e c k   t h e   n u m b e r   a n d   t r y   a g a i n .   { l e n g t h }   d i g i t s   e n t e r e d . " } ) ; 
 
