2020-07-18 11:25:50 +00:00
function e ( e ) { const { changedTouches : t } = e , n = t [ 0 ] ; let i = "" ; switch ( e . type ) { case "touchstart" : i = "mousedown" ; break ; case "touchmove" : i = "mousemove" ; break ; case "touchend" : i = "mouseup" ; break ; default : return } const { screenX : s , screenY : o , clientX : r , clientY : a } = n , l = new MouseEvent ( i , { bubbles : ! 0 , cancelable : ! 0 , view : window , detail : 1 , screenX : s , screenY : o , clientX : r , clientY : a , ctrlKey : ! 1 , altKey : ! 1 , shiftKey : ! 1 , metaKey : ! 1 , button : 0 , relatedTarget : null } ) ; t . length < 2 && ( n . target . dispatchEvent ( l ) , e . preventDefault ( ) ) } document . addEventListener ( "touchstart" , e , ! 0 ) , document . addEventListener ( "touchmove" , e , ! 0 ) , document . addEventListener ( "touchend" , e , ! 0 ) , document . addEventListener ( "touchcancel" , e , ! 0 ) ;
2019-12-17 13:16:47 +00:00
/ * *
2019-12-31 07:27:16 +00:00
* Namespaces or tools therefor .
2019-12-17 13:16:47 +00:00
* @ module namespaces
* @ license MIT
* /
2020-07-18 11:25:50 +00:00
const t = { HTML : "http://www.w3.org/1999/xhtml" , MATH : "http://www.w3.org/1998/Math/MathML" , SE : "http://svg-edit.googlecode.com" , SVG : "http://www.w3.org/2000/svg" , XLINK : "http://www.w3.org/1999/xlink" , XML : "http://www.w3.org/XML/1998/namespace" , XMLNS : "http://www.w3.org/2000/xmlns/" } , n = function ( ) { const e = { } ; return Object . entries ( t ) . forEach ( ( [ t , n ] ) => { e [ n ] = t . toLowerCase ( ) } ) , e } ; ( ( ) => { if ( ! ( "SVGPathSeg" in window ) ) { class e { constructor ( e , t , n ) { this . pathSegType = e , this . pathSegTypeAsLetter = t , this . _owningPathSegList = n } _segmentChanged ( ) { this . _owningPathSegList && this . _owningPathSegList . segmentChanged ( this ) } } e . prototype . classname = "SVGPathSeg" , e . PATHSEG _UNKNOWN = 0 , e . PATHSEG _CLOSEPATH = 1 , e . PATHSEG _MOVETO _ABS = 2 , e . PATHSEG _MOVETO _REL = 3 , e . PATHSEG _LINETO _ABS = 4 , e . PATHSEG _LINETO _REL = 5 , e . PATHSEG _CURVETO _CUBIC _ABS = 6 , e . PATHSEG _CURVETO _CUBIC _REL = 7 , e . PATHSEG _CURVETO _QUADRATIC _ABS = 8 , e . PATHSEG _CURVETO _QUADRATIC _REL = 9 , e . PATHSEG _ARC _ABS = 10 , e . PATHSEG _ARC _REL = 11 , e . PATHSEG _LINETO _HORIZONTAL _ABS = 12 , e . PATHSEG _LINETO _HORIZONTAL _REL = 13 , e . PATHSEG _LINETO _VERTICAL _ABS = 14 , e . PATHSEG _LINETO _VERTICAL _REL = 15 , e . PATHSEG _CURVETO _CUBIC _SMOOTH _ABS = 16 , e . PATHSEG _CURVETO _CUBIC _SMOOTH _REL = 17 , e . PATHSEG _CURVETO _QUADRATIC _SMOOTH _ABS = 18 , e . PATHSEG _CURVETO _QUADRATIC _SMOOTH _REL = 19 ; class t extends e { constructor ( t ) { super ( e . PATHSEG _CLOSEPATH , "z" , t ) } toString ( ) { return "[object SVGPathSegClosePath]" } _asPathString ( ) { return this . pathSegTypeAsLetter } clone ( ) { return new t ( void 0 ) } } class n extends e { constructor ( t , n , i ) { super ( e . PATHSEG _MOVETO _ABS , "M" , t ) , this . _x = n , this . _y = i } toString ( ) { return "[object SVGPathSegMovetoAbs]" } _asPathString ( ) { return this . pathSegTypeAsLetter + " " + this . _x + " " + this . _y } clone ( ) { return new n ( void 0 , this . _x , this . _y ) } } Object . defineProperties ( n . prototype , { x : { get ( ) { return this . _x } , set ( e ) { this . _x = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , y : { get ( ) { return this . _y } , set ( e ) { this . _y = e , this . _segmentChanged ( ) } , enumerable : ! 0 } } ) ; class i extends e { constructor ( t , n , i ) { super ( e . PATHSEG _MOVETO _REL , "m" , t ) , this . _x = n , this . _y = i } toString ( ) { return "[object SVGPathSegMovetoRel]" } _asPathString ( ) { return this . pathSegTypeAsLetter + " " + this . _x + " " + this . _y } clone ( ) { return new i ( void 0 , this . _x , this . _y ) } } Object . defineProperties ( i . prototype , { x : { get ( ) { return this . _x } , set ( e ) { this . _x = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , y : { get ( ) { return this . _y } , set ( e ) { this . _y = e , this . _segmentChanged ( ) } , enumerable : ! 0 } } ) ; class s extends e { constructor ( t , n , i ) { super ( e . PATHSEG _LINETO _ABS , "L" , t ) , this . _x = n , this . _y = i } toString ( ) { return "[object SVGPathSegLinetoAbs]" } _asPathString ( ) { return this . pathSegTypeAsLetter + " " + this . _x + " " + this . _y } clone ( ) { return new s ( void 0 , this . _x , this . _y ) } } Object . defineProperties ( s . prototype , { x : { get ( ) { return this . _x } , set ( e ) { this . _x = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , y : { get ( ) { return this . _y } , set ( e ) { this . _y = e , this . _segmentChanged ( ) } , enumerable : ! 0 } } ) ; class o extends e { constructor ( t , n , i ) { super ( e . PATHSEG _LINETO _REL , "l" , t ) , this . _x = n , this . _y = i } toString ( ) { return "[object SVGPathSegLinetoRel]" } _asPathString ( ) { return this . pathSegTypeAsLetter + " " + this . _x + " " + this . _y } clone ( ) { return new o ( void 0 , this . _x , this . _y ) } } Object . defineProperties ( o . prototype , { x : { get ( ) { return this . _x } , set ( e ) { this . _x = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , y : { get ( ) { return this . _y } , set ( e ) { this . _y = e , this . _segmentChanged ( ) } , enumerable : ! 0 } } ) ; class r extends e { constructor ( t , n , i , s , o , r , a ) { super ( e . PATHSEG _CURVETO _CUBIC _ABS , "C" , t ) , this . _x = n , this . _y = i , this . _x1 = s , this . _y1 = o , this . _x2 = r , this . _y2 = a } toString ( ) { return "[object SVGPathSegCurvetoCubicAbs]" } _asPathString ( ) { return this . pathSegTypeAsLetter + " " + this . _x1 + " " + this . _y1 + " " + this . _x2 + " " + this . _y2 + " " + this . _x + " " + this . _y } clone ( ) { return new r ( void 0 , this . _x , this . _y , this . _x1 , this . _y1 , this . _x2 , this . _y2 ) } } Object . defineProperties ( r . prototype , { x : { get ( ) { return this . _x } , set ( e ) { this . _x = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , y : { get ( ) { return this . _y } , set ( e ) { this . _y = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , x1 : { get ( ) { return this . _x1 } , set ( e ) { this . _x1 = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , y1 : { get ( ) { return this . _y1 } , set ( e ) { this . _y1 = e , this . _segmentChanged ( ) } , enumerable : ! 0 } , x2 : { get ( ) { return this . _x2 } , set ( e ) { this . _x2 = e , this . _segmentChanged ( ) }
2019-12-17 13:16:47 +00:00
/ * *
2019-12-31 07:27:16 +00:00
* A jQuery module to work with SVG attributes .
2019-12-17 13:16:47 +00:00
* @ module jQueryAttr
* @ license MIT
* /
2020-07-18 11:25:50 +00:00
function P ( e ) { const t = e . fn . attr ; return e . fn . attr = function ( e , n ) { const i = this . length ; if ( ! i ) return t . call ( this , e , n ) ; for ( let s = 0 ; s < i ; ++ s ) { const i = this [ s ] ; if ( "http://www.w3.org/2000/svg" !== i . namespaceURI ) return t . call ( this , e , n ) ; if ( void 0 !== n ) i . setAttribute ( e , n ) ; else if ( Array . isArray ( e ) ) { const t = { } ; let n = e . length ; for ( ; n -- ; ) { const s = e [ n ] ; let o = i . getAttribute ( s ) ; ( o || "0" === o ) && ( o = isNaN ( o ) ? o : o - 0 ) , t [ s ] = o } return t } if ( "object" != typeof e ) { let t = i . getAttribute ( e ) ; return ( t || "0" === t ) && ( t = isNaN ( t ) ? t : t - 0 ) , t } for ( const [ t , n ] of Object . entries ( e ) ) i . setAttribute ( t , n ) } return this } , e }
/ * *
* Partial polyfill of ` SVGTransformList `
* @ module SVGTransformList
*
* @ license MIT
*
* @ copyright 2010 Alexis Deveria , 2010 Jeff Schiller
* /const N=document.createElementNS(t.SVG,"svg");function I(e){const t=e.matrix;let n="";switch(e.type){case 1:n="matrix("+[t.a,t.b,t.c,t.d,t.e,t.f].join(",")+")";break;case 2:n="translate("+t.e+","+t.f+")";break;case 3:n=t.a===t.d?"scale("+t.a+")":"scale("+t.a+","+t.d+")";break;case 4:{let i=0,s=0;if(0!==e.angle){const e=1-t.a;s=(e*t.f+t.b*t.e)/ ( e * e + t . b * t . b ) , i = ( t . e - t . b * s ) / e } n = "rotate(" + e . angle + " " + i + "," + s + ")" ; break } } return n } let T = { } ; class L { constructor ( e ) { this . _elem = e || null , this . _xforms = [ ] , this . _update = function ( ) { let e = "" ; for ( let t = 0 ; t < this . numberOfItems ; ++ t ) { e += I ( this . _list . getItem ( t ) ) + " " } this . _elem . setAttribute ( "transform" , e ) } , this . _list = this , this . _init = function ( ) { let e = this . _elem . getAttribute ( "transform" ) ; if ( ! e ) return ; const t = /\s*((scale|matrix|rotate|translate)\s*\(.*?\))\s*,?\s*/ ; let n = ! 0 ; for ( ; n ; ) if ( n = e . match ( t ) , e = e . replace ( t , "" ) , n && n [ 1 ] ) { const e = n [ 1 ] . split ( /\s*\(/ ) , t = e [ 0 ] , i = e [ 1 ] . match ( /\s*(.*?)\s*\)/ ) ; i [ 1 ] = i [ 1 ] . replace ( /(\d)-/g , "$1 -" ) ; const s = i [ 1 ] . split ( /[, ]+/ ) , o = "abcdef" . split ( "" ) , r = N . createSVGMatrix ( ) ; Object . values ( s ) . forEach ( ( function ( e , n ) { s [ n ] = Number . parseFloat ( e ) , "matrix" === t && ( r [ o [ n ] ] = s [ n ] ) } ) ) ; const a = N . createSVGTransform ( ) , l = "set" + t . charAt ( 0 ) . toUpperCase ( ) + t . slice ( 1 ) , c = "matrix" === t ? [ r ] : s ; "scale" === t && 1 === c . length ? c . push ( c [ 0 ] ) : "translate" === t && 1 === c . length ? c . push ( 0 ) : "rotate" === t && 1 === c . length && c . push ( 0 , 0 ) , a [ l ] ( ... c ) , this . _list . appendItem ( a ) } } , this . _removeFromOtherLists = function ( e ) { e && Object . values ( T ) . some ( t => { for ( let n = 0 , i = t . _xforms . length ; n < i ; ++ n ) if ( t . _xforms [ n ] === e ) return t . removeItem ( n ) , ! 0 ; return ! 1 } ) } , this . numberOfItems = 0 } clear ( ) { this . numberOfItems = 0 , this . _xforms = [ ] } initialize ( e ) { this . numberOfItems = 1 , this . _removeFromOtherLists ( e ) , this . _xforms = [ e ] } getItem ( e ) { if ( e < this . numberOfItems && e >= 0 ) return this . _xforms [ e ] ; const t = new Error ( "DOMException with code=INDEX_SIZE_ERR" ) ; throw t . code = 1 , t } insertItemBefore ( e , t ) { let n = null ; if ( t >= 0 ) if ( t < this . numberOfItems ) { this . _removeFromOtherLists ( e ) ; const i = new Array ( this . numberOfItems + 1 ) ; let s ; for ( s = 0 ; s < t ; ++ s ) i [ s ] = this . _xforms [ s ] ; i [ s ] = e ; for ( let e = s + 1 ; s < this . numberOfItems ; ++ e , ++ s ) i [ e ] = this . _xforms [ s ] ; this . numberOfItems ++ , this . _xforms = i , n = e , this . _list . _update ( ) } else n = this . _list . appendItem ( e ) ; return n } replaceItem ( e , t ) { let n = null ; return t < this . numberOfItems && t >= 0 && ( this . _removeFromOtherLists ( e ) , this . _xforms [ t ] = e , n = e , this . _list . _update ( ) ) , n } removeItem ( e ) { if ( e < this . numberOfItems && e >= 0 ) { const t = this . _xforms [ e ] , n = new Array ( this . numberOfItems - 1 ) ; let i ; for ( i = 0 ; i < e ; ++ i ) n [ i ] = this . _xforms [ i ] ; for ( let e = i ; e < this . numberOfItems - 1 ; ++ e , ++ i ) n [ e ] = this . _xforms [ i + 1 ] ; return this . numberOfItems -- , this . _xforms = n , this . _list . _update ( ) , t } const t = new Error ( "DOMException with code=INDEX_SIZE_ERR" ) ; throw t . code = 1 , t } appendItem ( e ) { return this . _removeFromOtherLists ( e ) , this . _xforms . push ( e ) , this . numberOfItems ++ , this . _list . _update ( ) , e } } let M = function ( e ) { e . id && T [ e . id ] && delete T [ e . id ] } ; const O = function ( e ) { if ( ! x ) { const t = e . id || "temp" ; let n = T [ t ] ; return n && "temp" !== t || ( T [ t ] = new L ( e ) , T [ t ] . _init ( ) , n = T [ t ] ) , n } return e . transform ? e . transform . baseVal : e . gradientTransform ? e . gradientTransform . baseVal : e . patternTransform ? e . patternTransform . baseVal : null } , j = [ "x" , "x1" , "cx" , "rx" , "width" ] , V = [ "y" , "y1" , "cy" , "ry" , "height" ] , R = [ "r" , "radius" , ... j , ... V ] ;
/ * *
* Tools for working with units .
* @ module units
* @ license MIT
*
* @ copyright 2010 Alexis Deveria , 2010 Jeff Schiller
* / l e t B , U = { } ; c o n s t D = f u n c t i o n ( ) { r e t u r n U } , F = f u n c t i o n ( e ) { c o n s t t = B . g e t R o u n d D i g i t s ( ) ; r e t u r n i s N a N ( e ) ? A r r a y . i s A r r a y ( e ) ? F ( e [ 0 ] ) + " , " + F ( e [ 1 ] ) : N u m b e r . p a r s e F l o a t ( e ) . t o F i x e d ( t ) - 0 : N u m b e r ( N u m b e r ( e ) . t o F i x e d ( t ) ) } , z = f u n c t i o n ( e , t ) { r e t u r n t = t | | B . g e t B a s e U n i t ( ) , F ( e / U [ t ] ) } , H = f u n c t i o n ( e , t , n ) { e . s e t A t t r i b u t e ( t , n ) } , q = f u n c t i o n ( e , t ) { i f ( ! i s N a N ( t ) ) r e t u r n t - 0 ; i f ( " % " = = = t . s u b s t r ( - 1 ) ) { c o n s t n = t . s u b s t r ( 0 , t . l e n g t h - 1 ) / 1 0 0 , i = B . g e t W i d t h ( ) , s = B . g e t H e i g h t ( ) ; r e t u r n j . i n c l u d e s ( e ) ? n * i : V . i n c l u d e s ( e ) ? n * s : n * M a t h . s q r t ( i * i + s * s ) / M a t h . s q r t ( 2 ) } c o n s t n = t . s u b s t r ( - 2 ) ; r e t u r n t . s u b s t r ( 0 , t . l e n g t h - 2 ) * U [ n ] } , X = f u n c t i o n ( e , t , n ) { i f ( R . i n c l u d e s ( e ) ) r e t u r n ! i s N a N ( t ) | | ( t = t . t o L o w e r C a s e ( ) , O b j e c t . k e y s ( U ) . s o m e ( e = > n e w R e g E x p ( " ^ - ? [ \ \ d \ \ . ] + " + e + " $ " ) . t e s t ( t ) ) ) ; i f ( " i d " = = = e ) { l e t e = ! 1 ; t r y { c o n s t i = B . g e t E l e m e n t ( t ) ; e = Q e ( i ) | | i = = = n } c a t c h ( e ) { } r e t u r n e } r e t u r n ! 0 } , W = d o c u m e n t . c r e a t e E l e m e n t N S ( t . S V G , " s v g " ) , $ = f u n c t i o n ( e , t , n ) { r e t u r n { x : n . a * e + n . c * t + n . e , y : n . b * e + n . d * t + n . f } } , Y = f u n c t i o n ( e ) { r e t u r n 1 = = = e . a & & 0 = = = e . b & & 0 = = = e . c & & 1 = = = e . d & & 0 = = = e . e & & 0 = = = e . f } , Q = f u n c t i o n ( . . . e ) { c o n s t t = e . r e d u c e R i g h t ( ( e , t ) = > t . m u l t i p l y ( e ) ) ; r e t u r n M a t h . a b s ( t . a ) < 1 e - 1 4 & & ( t . a = 0 ) , M a t h . a b s ( t . b ) < 1 e - 1 4 & & ( t . b = 0 ) , M a t h . a b s ( t . c ) < 1 e - 1 4 & & ( t . c = 0 ) , M a t h . a b s ( t . d ) < 1 e - 1 4 & & ( t . d = 0 ) , M a t h . a b s ( t . e ) < 1 e - 1 4 & & ( t . e = 0 ) , M a t h . a b s ( t . f ) < 1 e - 1 4 & & ( t . f = 0 ) , t } , K = f u n c t i o n ( e ) { i f ( ! e ) r e t u r n ! 1 ; l e t t = e . n u m b e r O f I t e m s ; f o r ( ; t - - ; ) { c o n s t n = e . g e t I t e m ( t ) ; i f ( 1 = = = n . t y p e & & ! Y ( n . m a t r i x ) ) r e t u r n ! 0 } r e t u r n ! 1 } , Z = f u n c t i o n ( e , t , n , i , s ) { c o n s t o = $ ( e , t , s ) , r = $ ( e + n , t , s ) , a = $ ( e , t + i , s ) , l = $ ( e + n , t + i , s ) , c = M a t h . m i n ( o . x , r . x , a . x , l . x ) , u = M a t h . m a x ( o . x , r . x , a . x , l . x ) , d = M a t h . m i n ( o . y , r . y , a . y , l . y ) ; r e t u r n { t l : o , t r : r , b l : a , b r : l , a a b o x : { x : c , y : d , w i d t h : u - c , h e i g h t : M a t h . m a x ( o . y , r . y , a . y , l . y ) - d } } } , J = f u n c t i o n ( e , t , n ) { i f ( Q e ( e ) ) r e t u r n W . c r e a t e S V G T r a n s f o r m F r o m M a t r i x ( W . c r e a t e S V G M a t r i x ( ) ) ; i f ( t = t | | 0 , n = n | | e . n u m b e r O f I t e m s - 1 , ( t = N u m b e r . p a r s e I n t ( t ) ) > ( n = N u m b e r . p a r s e I n t ( n ) ) ) { c o n s t e = n ; n = t , t = e } l e t i = W . c r e a t e S V G M a t r i x ( ) ; f o r ( l e t s = t ; s < = n ; + + s ) { c o n s t t = s > = 0 & & s < e . n u m b e r O f I t e m s ? e . g e t I t e m ( s ) . m a t r i x : W . c r e a t e S V G M a t r i x ( ) ; i = Q ( i , t ) } r e t u r n W . c r e a t e S V G T r a n s f o r m F r o m M a t r i x ( i ) } , e e = f u n c t i o n ( e ) { c o n s t t = O ( e ) ; r e t u r n J ( t ) . m a t r i x } , t e = f u n c t i o n ( e , t , n , i ) { c o n s t s = M a t h . P I / 4 , o = n - e , r = i - t , a = M a t h . a t a n 2 ( r , o ) , l = M a t h . s q r t ( o * o + r * r ) , c = M a t h . r o u n d ( a / s ) * s ; r e t u r n { x : e + l * M a t h . c o s ( c ) , y : t + l * M a t h . s i n ( c ) , a : c } } , n e = f u n c t i o n ( e , t ) { r e t u r n t . x < e . x + e . w i d t h & & t . x + t . w i d t h > e . x & & t . y < e . y + e . h e i g h t & & t . y + t . h e i g h t > e . y } , i e = P ( j Q u e r y ) , s e = " A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + / = " , o e = " a , c i r c l e , e l l i p s e , f o r e i g n O b j e c t , g , i m a g e , l i n e , p a t h , p o l y g o n , p o l y l i n e , r e c t , s v g , t e x t , t s p a n , u s e , c l i p P a t h " . s p l i t ( " , " ) ; l e t r e = n u l l , a e = n u l l , l e = n u l l , c e = n u l l ; c o n s t u e = f u n c t i o n ( e ) { r e = e , a e = e . g e t D O M D o c u m e n t ( ) , l e = e . g e t D O M C o n t a i n e r ( ) , c e = e . g e t S V G R o o t ( ) } , d e = e = > e . r e p l a c e ( / ( < ! D O C T Y P E \ s + \ w * \ s * \ [ ) . * ( \ ? ] > ) / , " $ 1 $ 2 " ) , h e = f u n c t i o n ( e ) { r e t u r n e . r e p l a c e ( / & / g , " & a m p ; " ) . r e p l a c e ( / < / g , " & l t ; " ) . r e p l a c e ( / > / g , " & g t ; " ) . r e p l a c e ( / " / g , " & q u o t ; " ) . r e p l a c e ( / ' / g , " & # x 2 7 ; " ) } ; f u n c t i o n p e ( e ) { i f ( e = m e ( e ) , w i n d o w . b t o a ) r e t u r n w i n d o w . b t o a ( e ) ; c o n s t t = n e w A r r a y ( 4 * M a t h . f l o o r ( ( e . l e n g t h + 2 ) / 3 ) ) ; l e t n = 0 , i = 0 ; d o { c o n s t s = e . c h a r C o d e A t ( n + + ) , o = e . c h a r C o d e A t ( n + + ) , r = e . c h a r C o d e A t ( n + + ) , a = s > > 2 , l = ( 3 & s ) < < 4 | o > > 4 ; l e t c = ( 1 5 & o ) < < 2 | r > > 6 , u = 6 3 & r ; N u m b e r . i s N a N ( o ) ? ( c = 6 4 , u = 6 4 ) : N u m b e r . i s N a N ( r ) & & ( u = 6 4 ) , t [ i + + ] = s e . c h a r A t ( a ) , t [ i + + ] = s e . c h a r A t ( l ) , t [ i + + ] = s e . c h a r A t ( c ) , t [ i + + ] = s e . c h a r A t ( u ) } w h i l e ( n < e . l e n g t h ) ; r e t u r n t . j o i n ( " " ) } f u n c t i o n g e ( e ) { i f ( w i n d o w . a t o b ) r e t u r n f e ( w i n d o w . a t o b ( e ) ) ; e = e . r e p l a c e ( / [ ^ A - Z a - z \ d + / = ] / g , " " ) ; l e t t = " " , n = 0 ; d o { c o n s t i = s e . i n d e x O f ( e . c h a r A t ( n + + ) ) , s = s e . i n d e x O f ( e . c h a r A t ( n + + ) ) , o = s e . i n d e x O f ( e . c h a r A t ( n + + ) ) , r = s e . i n d e x O f ( e . c h a r A t ( n + + ) ) , a = i < < 2 | s > > 4 , l = ( 1 5 & s ) < < 4 | o > > 2 , c = ( 3 & o ) < < 6 | r ; t + = S t r i n g . f r o m C h a r C o d e ( a ) , 6 4 ! = = o & & ( t + = S t r i n g . f r o m C h a r C o d e ( l ) ) , 6 4 ! = = r & & ( t + = S t r i n g . f r o m C h a r C o d e ( c ) ) } w h i l e ( n < e . l e n g t h ) ; r e t u r n f e ( t ) } f u n c t i o n f e ( e ) { r e t u r n d e c o d e U R I C o m p o n e n t ( e s c a p e ( e ) ) } c o n s t m e = f u n c t i o n ( e ) { r e t u r n u n e s c a p e ( e n c o d e U R I C o m p o n e n t ( e ) ) } , _ e = f u n c t i o n ( e ) { i f ( " u n d e f i n e d " = = t y p e o f U i n t 8 A r r a y | | " u n d e f i n e d " = = t y p e o f B l o b | | " u n d e f i n e d " = = t y p e o f U R L | | ! U R L . c r e a t e O b j e c t U R L ) r e t u r n " " ; c o n s t t = e . s p l i t ( " , " ) , n = t [ 0 ] . m a t c h ( / : ( . * ? ) ; / ) [ 1 ] , i = a t o b ( t [ 1 ] ) ; l e t s = i . l e n g t h ; c o n s t o = n e w U i n t 8 A r r a y ( s ) ; f o r ( ; s - - ; ) o [ s ] = i . c h a r C o d e A t ( s ) ; c o n s t r = n e w B l o b ( [ o ] , { t y p e : n } ) ; r e t u r n U R L . c r e a t e O b j e c t U R L ( r ) } , y e = f u n c t i o n ( e ) { r e t u r n e & & " u n d e f i n e d " ! = t y p e o f U R L & & U R L . c r e a t e O b j e c t U R L ? U R L . c r e a t e O b j e
/ * *
* Adds context menu functionality .
* @ module contextmenu
* @ license Apache - 2.0
* @ author Adam Bender
* / c o n s t Z e = j Q u e r y ; l e t J e = { } ; c o n s t e t = f u n c t i o n ( ) { O b j e c t . v a l u e s ( J e ) . f o r E a c h ( e = > { ! f u n c t i o n ( e ) { O b j e c t . k e y s ( J e ) . l e n g t h | | Z e ( " # c m e n u _ c a n v a s " ) . a p p e n d ( " < l i c l a s s = ' s e p a r a t o r ' > " ) ; c o n s t t = e . s h o r t c u t | | " " ; Z e ( " # c m e n u _ c a n v a s " ) . a p p e n d ( " < l i c l a s s = ' d i s a b l e d ' > < a h r e f = ' # " + e . i d + " ' > " + e . l a b e l + " < s p a n c l a s s = ' s h o r t c u t ' > " + t + " < / s p a n > < / a > < / l i > " ) } ( e ) } ) } ; f u n c t i o n t t ( ) { r e t u r n ( t t = O b j e c t . a s s i g n | | f u n c t i o n ( e ) { f o r ( v a r t = 1 ; t < a r g u m e n t s . l e n g t h ; t + + ) { v a r n = a r g u m e n t s [ t ] ; f o r ( v a r i i n n ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( n , i ) & & ( e [ i ] = n [ i ] ) } 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 ) }
2019-12-31 08:31:28 +00:00
/ * *
* Adapted from { @ link https : //github.com/uupaa/dynamic-import-polyfill/blob/master/importModule.js}.
* @ module importModule
* @ license MIT
2020-07-18 11:25:50 +00:00
* /function nt(e,t){["id","class","type"].forEach(n=>{n in t&&(e[n]=t[n])})}function it(e,t){return st(e,tt({},t,{returnDefault:!0}))}async function st(e,{global:t,returnDefault:n}){return"svgEditor"in window&&window.svgEditor&&!1===window.svgEditor.modules?(await ot(e),window[t]):function e(t,n={},{returnDefault:i=!1}={}){if(Array.isArray(t))return Promise.all(t.map(t=>e(t,n)));return new Promise((e,s)=>{const o="$importModule$"+Math.random().toString(32).slice(2),r=document.createElement("script");function a(){s(new Error("Failed to import: "+t)),c()}function l(){e(window[o]),c()}const c=()=>{delete window[o],r.removeEventListener("error",a),r.removeEventListener("load",l),r.remove(),URL.revokeObjectURL(r.src),r.src=""};nt(r,n),r.defer="defer",r.type="module",r.addEventListener("error",a),r.addEventListener("load",l);const u=`import * as m from '${function(e){const t=document.createElement("a");return t.setAttribute("href",e),t.cloneNode(!1).href}(t).replace(/ '/g,"\\' ")}'; window.${o} = ${i?" m . default || ":" "}m;`,d=new Blob([u],{type:" text / javascript "});r.src=URL.createObjectURL(d),document.head.append(r)})}(e,void 0,{returnDefault:n})}function ot(e,t={}){return Array.isArray(e)?Promise.all(e.map(e=>ot(e,t))):new Promise((n,i)=>{const s=document.createElement(" script ");function o(){i(new Error(" Failed to import : "+e)),a()}function r(){n(),a()}const a=()=>{s.removeEventListener(" error ",o),s.removeEventListener(" load ",r),s.remove(),s.src=" "};s.defer=" defer ",nt(s,t),s.addEventListener(" error ",o),s.addEventListener(" load ",r),s.src=e,document.head.append(s)})}const rt={true:!0,false:!1,null:null};function at(e,t={ok:" Ok ",cancel:" Cancel "}){e(" # dialog _container ").draggable({cancel:" # dialog _content , # dialog _buttons * ",containment:" window "}).css(" position "," absolute ");const n=e(" # dialog _box "),i=e(" # dialog _buttons "),s=e(" # dialog _content ");function o(o,r,a,l,c,u){s.html(" < p > "+r.replace(/\n/g," < / p > < p > " ) + " < / p > " ) . t o g g l e C l a s s ( " p r o m p t " , " p r o m p t " = = = o ) , i . e m p t y ( ) ; c o n s t d = e ( ' < i n p u t t y p e = " b u t t o n " d a t a - o k = " " v a l u e = " ' + t . o k + ' " > ' ) . a p p e n d T o ( i ) ; r e t u r n n e w P r o m i s e ( ( h , p ) = > { l e t g , f ; i f ( " a l e r t " ! = = o & & e ( ' < i n p u t t y p e = " b u t t o n " v a l u e = " ' + t . c a n c e l + ' " > ' ) . a p p e n d T o ( i ) . c l i c k ( ( f u n c t i o n ( ) { n . h i d e ( ) , h ( ! 1 ) } ) ) , " p r o m p t " = = = o ) g = e ( ' < i n p u t t y p e = " t e x t " > ' ) . p r e p e n d T o ( i ) , g . v a l ( a | | " " ) , g . b i n d ( " k e y d o w n " , " r e t u r n " , ( f u n c t i o n ( ) { d . c l i c k ( ) } ) ) ; e l s e i f ( " s e l e c t " = = = o ) { c o n s t t = e ( ' < d i v s t y l e = " t e x t - a l i g n : c e n t e r ; " > ' ) ; i f ( g = e ( ` < s e l e c t a r i a - l a b e l = " $ { r } " > ` ) . a p p e n d T o ( t ) , u ) { c o n s t n = e ( " < l a b e l > " ) . t e x t ( u . l a b e l ) ; f = e ( ' < i n p u t t y p e = " c h e c k b o x " > ' ) . a p p e n d T o ( n ) , f . v a l ( u . v a l u e ) , u . t o o l t i p & & n . a t t r ( " t i t l e " , u . t o o l t i p ) , f . p r o p ( " c h e c k e d " , B o o l e a n ( u . c h e c k e d ) ) , t . a p p e n d ( e ( " < d i v > " ) . a p p e n d ( n ) ) } e . e a c h ( l | | [ ] , ( f u n c t i o n ( t , n ) { " o b j e c t " = = t y p e o f n ? g . a p p e n d ( e ( " < o p t i o n > " ) . v a l ( n . v a l u e ) . h t m l ( n . t e x t ) ) : g . a p p e n d ( e ( " < o p t i o n > " ) . h t m l ( n ) ) } ) ) , s . a p p e n d ( t ) , a & & g . v a l ( a ) , c & & g . b i n d ( " c h a n g e " , " r e t u r n " , c ) , g . b i n d ( " k e y d o w n " , " r e t u r n " , ( f u n c t i o n ( ) { d . c l i c k ( ) } ) ) } e l s e " p r o c e s s " = = = o & & d . h i d e ( ) ; n . s h o w ( ) , d . c l i c k ( ( f u n c t i o n ( ) { n . h i d e ( ) ; c o n s t e = " p r o m p t " ! = = o & & " s e l e c t " ! = = o | | g . v a l ( ) ; h ( f ? { r e s p o n s e : e , c h e c k e d : f . p r o p ( " c h e c k e d " ) } : e ) } ) ) . f o c u s ( ) , " p r o m p t " ! = = o & & " s e l e c t " ! = = o | | g . f o c u s ( ) } ) } r e t u r n e . a l e r t = f u n c t i o n ( e ) { r e t u r n o ( " a l e r t " , e ) } , e . c o n f i r m = f u n c t i o n ( e ) { r e t u r n o ( " c o n f i r m " , e ) } , e . p r o c e s s _ c a n c e l = f u n c t i o n ( e ) { r e t u r n o ( " p r o c e s s " , e ) } , e . p r o m p t = f u n c t i o n ( e , t = " " ) { r e t u r n o ( " p r o m p t " , e , t ) } , e . s e l e c t = f u n c t i o n ( e , t , n , i , s ) { r e t u r n o ( " s e l e c t " , e , i , t , n , s ) } , e } c o n s t l t = { B E F O R E _ A P P L Y : " b e f o r e _ a p p l y " , A F T E R _ A P P L Y : " a f t e r _ a p p l y " , B E F O R E _ U N A P P L Y : " b e f o r e _ u n a p p l y " , A F T E R _ U N A P P L Y : " a f t e r _ u n a p p l y " } ; c l a s s c t { g e t T e x t ( ) { r e t u r n t h i s . t e x t } a p p l y ( e , t ) { e & & e . h a n d l e H i s t o r y E v e n t ( l t . B E F O R E _ A P P L Y , t h i s ) , t ( e ) , e & & e . h a n d l e H i s t o r y E v e n t ( l t . A F T E R _ A P P L Y , t h i s ) } u n a p p l y ( e , t ) { e & & e . h a n d l e H i s t o r y E v e n t ( l t . B E F O R E _ U N A P P L Y , t h i s ) , t ( ) , e & & e . h a n d l e H i s t o r y E v e n t ( l t . A F T E R _ U N A P P L Y , t h i s ) } e l e m e n t s ( ) { r e t u r n [ t h i s . e l e m ] } t y p e ( ) { r e t u r n t h i s . c o n s t r u c t o r . n a m e } } c l a s s u t e x t e n d s c t { c o n s t r u c t o r ( e , t , n , i ) { s u p e r ( ) , t h i s . e l e m = e , t h i s . t e x t = i ? " M o v e " + e . t a g N a m e + " t o " + i : " M o v e " + e . t a g N a m e , t h i s . o l d N e x t S i b l i n g = t , t h i s . o l d P a r e n t = n , t h i s . n e w N e x t S i b l i n g = e . n e x t S i b l i n g , t h i s . n e w P a r e n t = e . p a r e n t N o d e } a p p l y ( e ) { s u p e r . a p p l y ( e , ( ) = > { t h i s . e l e m = t h i s . n e w P a r e n t . i n s e r t B e f o r e ( t h i s . e l e m , t h i s . n e w N e x t S i
/ * *
* HistoryRecordingService component of history .
* @ module history
* @ license MIT
* @ copyright 2016 Flint O ' Brien
* / ( t h i s . g r o u p _ ) , w e ( t h i s . g r o u p _ , ( f u n c t i o n ( e ) { e . s e t A t t r i b u t e ( " s t y l e " , " p o i n t e r - e v e n t s : i n h e r i t " ) } ) ) , t h i s . g r o u p _ . s e t A t t r i b u t e ( " s t y l e " , i ? " p o i n t e r - e v e n t s : a l l " : " p o i n t e r - e v e n t s : n o n e " ) } g e t N a m e ( ) { r e t u r n t h i s . n a m e _ } g e t G r o u p ( ) { r e t u r n t h i s . g r o u p _ } a c t i v a t e ( ) { t h i s . g r o u p _ . s e t A t t r i b u t e ( " s t y l e " , " p o i n t e r - e v e n t s : a l l " ) } d e a c t i v a t e ( ) { t h i s . g r o u p _ . s e t A t t r i b u t e ( " s t y l e " , " p o i n t e r - e v e n t s : n o n e " ) } s e t V i s i b l e ( e ) { c o n s t t = v o i d 0 = = = e | | e ? " i n l i n e " : " n o n e " ; t h i s . g r o u p _ . g e t A t t r i b u t e ( " d i s p l a y " ) ! = = t & & t h i s . g r o u p _ . s e t A t t r i b u t e ( " d i s p l a y " , t ) } i s V i s i b l e ( ) { r e t u r n " n o n e " ! = = t h i s . g r o u p _ . g e t A t t r i b u t e ( " d i s p l a y " ) } g e t O p a c i t y ( ) { c o n s t e = t h i s . g r o u p _ . g e t A t t r i b u t e ( " o p a c i t y " ) ; r e t u r n Q e ( e ) ? 1 : N u m b e r . p a r s e F l o a t ( e ) } s e t O p a c i t y ( e ) { " n u m b e r " = = t y p e o f e & & e > = 0 & & e < = 1 & & t h i s . g r o u p _ . s e t A t t r i b u t e ( " o p a c i t y " , e ) } a p p e n d C h i l d r e n ( e ) { f o r ( c o n s t t o f e ) t h i s . g r o u p _ . a p p e n d ( t ) } g e t T i t l e E l e m e n t ( ) { c o n s t e = t h i s . g r o u p _ . c h i l d N o d e s . l e n g t h ; f o r ( l e t t = 0 ; t < e ; + + t ) { c o n s t e = t h i s . g r o u p _ . c h i l d N o d e s . i t e m ( t ) ; i f ( e & & " t i t l e " = = = e . t a g N a m e ) r e t u r n e } r e t u r n n u l l } s e t N a m e ( e , t ) { c o n s t n = t h i s . n a m e _ ; e = h e ( e ) ; c o n s t i = t h i s . g e t T i t l e E l e m e n t ( ) ; r e t u r n i ? ( o n ( i ) . e m p t y ( ) , i . t e x t C o n t e n t = e , t h i s . n a m e _ = e , t & & t . c h a n g e E l e m e n t ( i , { " # t e x t " : n } ) , t h i s . n a m e _ ) : n u l l } r e m o v e G r o u p ( ) { c o n s t e = t h i s . g r o u p _ ; r e t u r n t h i s . g r o u p _ . r e m o v e ( ) , t h i s . g r o u p _ = v o i d 0 , e } } r n . C L A S S _ N A M E = " l a y e r " , r n . C L A S S _ R E G E X = n e w R e g E x p ( " ( \ \ s | ^ ) " + r n . C L A S S _ N A M E + " ( \ \ s | $ ) " ) ; c l a s s a n { c o n s t r u c t o r ( e ) { t h i s . u n d o M a n a g e r _ = e , t h i s . c u r r e n t B a t c h C o m m a n d _ = n u l l , t h i s . b a t c h C o m m a n d S t a c k _ = [ ] } s t a r t B a t c h C o m m a n d ( e ) { r e t u r n t h i s . u n d o M a n a g e r _ ? ( t h i s . c u r r e n t B a t c h C o m m a n d _ = n e w g t ( e ) , t h i s . b a t c h C o m m a n d S t a c k _ . p u s h ( t h i s . c u r r e n t B a t c h C o m m a n d _ ) , t h i s ) : t h i s } e n d B a t c h C o m m a n d ( ) { i f ( ! t h i s . u n d o M a n a g e r _ ) r e t u r n t h i s ; i f ( t h i s . c u r r e n t B a t c h C o m m a n d _ ) { c o n s t e = t h i s . c u r r e n t B a t c h C o m m a n d _ ; t h i s . b a t c h C o m m a n d S t a c k _ . p o p ( ) ; c o n s t { l e n g t h : t } = t h i s . b a t c h C o m m a n d S t a c k _ ; t h i s . c u r r e n t B a t c h C o m m a n d _ = t ? t h i s . b a t c h C o m m a n d S t a c k _ [ t - 1 ] : n u l l , t h i s . a d d C o m m a n d _ ( e ) } r e t u r n t h i s } m o v e E l e m e n t ( e , t , n , i ) { r e t u r n t h i s . u n d o M a n a g e r _ ? ( t h i s . a d d C o m m a n d _ ( n e w u t ( e , t , n , i ) ) , t h i s ) : t h i s } i n s e r t E l e m e n t ( e , t ) { r e t u r n t h i s . u n d o M a n a g e r _ ? ( t h i s . a d d C o m m a n d _ ( n e w d t ( e , t ) ) , t h i s ) : t h i s } r e m o v e E l e m e n t ( e , t , n , i ) { r e t u r n t h i s . u n d o M a n a g e r _ ? ( t h i s . a d d C o m m a n d _ ( n e w h t ( e , t , n , i ) ) , t h i s ) : t h i s } c h a n g e E l e m e n t ( e , t , n ) { r e t u r n t h i s . u n d o M a n a g e r _ ? ( t h i s . a d d C o m m a n d _ ( n e w p t ( e , t , n ) ) , t h i s ) : t h i s } a d d C o m m a n d _ ( e ) { i f ( ! t h i s . u n d o M a n a g e r _ ) r e t u r n t h i s ; t h i s . c u r r e n t B a t c h C o m m a n d _ ? t h i s . c u r r e n t B a t c h C o m m a n d _ . a d d S u b C o m m a n d ( e ) : t h i s . u n d o M a n a g e r _ . a d d C o m m a n d T o H i s t o r y ( e ) } } a n . N O _ H I S T O R Y = n e w a n ; c o n s t l n = P ( j Q u e r y ) , c n = f u n c t i o n ( e , t ) { c o n s t n = d o c u m e n t . c r e a t e E l e m e n t N S ( e . n a m e s p a c e U R I , e . n o d e N a m e ) ; i f ( l n . e a c h ( e . a t t r i b u t e s , ( f u n c t i o n ( e , t ) { " - m o z - m a t h - f o n t - s t y l e " ! = = t . l o c a l N a m e & & n . s e t A t t r i b u t e N S ( t . n a m e s p a c e U R I , t . n o d e N a m e , t . v a l u e ) } ) ) , n . r e m o v e A t t r i b u t e ( " i d " ) , n . i d = t ( ) , w ( ) & & " p a t h " = = = e . n o d e N a m e ) { c o n s t t = e n ( e ) ; n . s e t A t t r i b u t e ( " d " , t ) } i f ( l n . e a c h ( e . c h i l d N o d e s , ( f u n c t i o n ( e , i ) { s w i t c h ( i . n o d e T y p e ) { c a s e 1 : n . a p p e n d ( c n ( i , t ) ) ; b r e a k ; c a s e 3 : n . t e x t C o n t e n t = i . n o d e V a l u e } } ) ) , l n ( e ) . d a t a ( " g s v g " ) ) l n ( n ) . d a t a ( " g s v g " , n . f i r s t C h i l d ) ; e l s e i f ( l n ( e ) . d a t a ( " s y m b o l " ) ) { c o n s t t = l n ( e ) . d a t a ( " s y m b o l " ) ; l n ( n ) . d a t a ( " r e f " , t ) . d a t a ( " s y m b o l " , t ) } e l s e " i m a g e " = = = n . t a g N a m e & & Y e ( n ) ; r e t u r n n } , u n = j Q u e r y , d n = " a , c i r c l e , e l l i p s e , f o r e i g n O b j e c t , g , i m a g e , l i n e , p a t h , p o l y g o n , p o l y l i n e , r e c t , s v g , t e x t , t s p a n , u s e " . s p l i t ( " , " ) , h n = 1 , p n = 2 ; l e t g n = 0 , f n = [ ] ; f u n c t i o n m n ( e ) { r e t u r n e | | n e w a n ( x n . u n d o M g r ) } f u n c t i o n _ n ( e ) { r e t u r n u n ( " t i t l e " , e ) . t e x t ( ) | | ( r & & e . q u e r y S e l e c t o r A l l ? u n ( e . q u e r y S e l e c t o r A l l ( " t i t l e " ) ) . t e x t ( ) : " " ) } f u n c t i o n y n ( e ) { l e t t = 1 ; f o r ( ; e . i n c l u d e s ( " L a y e r " + t ) ; ) t + + ; r e t u r n " L a y e r " + t } c l a s s b n { c o n s t r u c t o r ( e , n ) { i f ( ! e | | ! e . t a g N a m e | | ! e . n a m e s p a c e U R I | | " s v g " ! = = e . t a g N a m e | | e . n a m e s p a c e U R I ! = = t . S V G ) t h r o w n e w E r r o r ( " E r r o r : s v g e d i t . d r a w . D r a w i n g i n s t a n c e i n i t i a l i z e d w i t h o u t a < s v g > e l e m e n t " ) ; t h i s . s v g E l e m _ = e , t h i s . o b j _ n u m = 0 , t h i s . i d P r e f i x = n | | " s v g _ " , t h i s . r e l e a s e d N u m s = [ ] , t h i s . a l l _ l a y e r s = [ ] , t h i s . l a y e r _ m a p = { } , t h i s . c u r r e n t _ l a y e r = n u l l , t h i s . n o n c e _ = " " ; c o n s t i = t h i s . s v g E l e m _ . g e t A t t r i b u t e N S ( t . S E , " n o n c e " ) ; i & & g n ! = = p n ? t h i s . n o n c e _ = i : g n = = = h n & & t h i s . s e t N o n c e ( M a t h . f l o o r ( 1 0 0 0 0 1 * M a t h . r a n d o m ( ) ) ) } g e t E l e m _ ( e ) { r e t u r n t h i s . s v g E l e m _ . q u e r y S e l e c t o r ? t h i s . s v g E l e m _ . q u e r y S e l e c t o r ( " # " + e ) : u n ( t h i s . s v g E l e m _ ) . f i n d ( " [ i d = " + e + " ] " ) [ 0 ] } g e t S v g E l e m ( ) { r e t u r n t h i s . s v g E l e m _ } g e t N o n c e ( ) { r e t u r n t h i s . n o n c e _ } s e t N o n c e ( e ) { t h i s . s v g E l e m _ . s e t A t t r i b u t e N S ( t . X M L
2019-12-17 13:16:47 +00:00
/ * *
2019-12-31 07:27:16 +00:00
* @ file SVG Icon Loader 2.0
2019-12-17 13:16:47 +00:00
*
* jQuery Plugin for loading SVG icons from a single file
*
* Adds { @ link external : jQuery . svgIcons } , { @ link external : jQuery . getSvgIcon } , { @ link external : jQuery . resizeSvgIcons }
*
* How to use :
1. Create the SVG master file that includes all icons :
The master SVG icon - containing file is an SVG file that contains
` <g> ` elements . Each ` <g> ` element should contain the markup of an SVG
icon . The ` <g> ` element has an ID that should
correspond with the ID of the HTML element used on the page that should contain
or optionally be replaced by the icon . Additionally , one empty element should be
added at the end with id "svg_eof" .
2. Optionally create fallback raster images for each SVG icon .
3. Include the jQuery and the SVG Icon Loader scripts on your page .
4. Run ` $ .svgIcons() ` when the document is ready . See its signature
5. To access an icon at a later point without using the callback , use this :
` $ .getSvgIcon(id (string), uniqueClone (boolean)) ` ;
This will return the icon ( as jQuery object ) with a given ID .
6. To resize icons at a later point without using the callback , use this :
` $ .resizeSvgIcons(resizeOptions) ` ( use the same way as the "resize" parameter )
*
* @ module jQuerySVGIcons
* @ license MIT
* @ copyright ( c ) 2009 Alexis Deveria
* { @ link http : //a.deveria.com}
* @ example
$ ( function ( ) {
$ . svgIcons ( 'my_icon_set.svg' ) ; // The SVG file that contains all icons
// No options have been set, so all icons will automatically be inserted
// into HTML elements that match the same IDs.
} ) ;
* @ example
$ ( function ( ) {
// The SVG file that contains all icons
$ . svgIcons ( 'my_icon_set.svg' , {
callback ( icons ) { // Custom callback function that sets click
// events for each icon
$ . each ( icons , function ( id , icon ) {
icon . click ( function ( ) {
alert ( 'You clicked on the icon with id ' + id ) ;
} ) ;
} ) ;
}
} ) ;
} ) ;
* @ example
$ ( function ( ) {
// The SVGZ file that contains all icons
$ . svgIcons ( 'my_icon_set.svgz' , {
w : 32 , // All icons will be 32px wide
h : 32 , // All icons will be 32px high
fallback _path : 'icons/' , // All fallback files can be found here
fallback : {
'#open_icon' : 'open.png' , // The "open.png" will be appended to the
// HTML element with ID "open_icon"
'#close_icon' : 'close.png' ,
'#save_icon' : 'save.png'
} ,
placement : { '.open_icon' : 'open' } , // The "open" icon will be added
// to all elements with class "open_icon"
resize : {
'#save_icon .svg_icon' : 64 // The "save" icon will be resized to 64 x 64px
} ,
callback ( icons ) { // Sets background color for "close" icon
icons . close . css ( 'background' , 'red' ) ;
} ,
svgz : true // Indicates that an SVGZ file is being used
} ) ;
} ) ;
* /
2020-07-18 11:25:50 +00:00
const ci = Boolean ( window . opera ) , ui = function ( e , t , n ) { const i = e . find ( "defs" ) ; if ( ! i . length ) return e ; let s ; s = ci ? i . find ( "*" ) . filter ( ( function ( ) { return Boolean ( this . id ) } ) ) : i . find ( "[id]" ) ; const o = e [ 0 ] . getElementsByTagName ( "*" ) , r = o . length ; return s . each ( ( function ( e ) { const { id : n } = this , i = "x" + n + t + e ; this . id = i ; const s = "url(#" + n + ")" , a = "url(#" + i + ")" ; for ( e = 0 ; e < r ; e ++ ) { const t = o [ e ] ; t . getAttribute ( "fill" ) === s && t . setAttribute ( "fill" , a ) , t . getAttribute ( "stroke" ) === s && t . setAttribute ( "stroke" , a ) , t . getAttribute ( "filter" ) === s && t . setAttribute ( "filter" , a ) } } ) ) , e } ;
2019-12-17 13:16:47 +00:00
/ * *
2019-12-31 07:27:16 +00:00
* @ file jGraduate 0.4
2019-12-17 13:16:47 +00:00
*
* jQuery Plugin for a gradient picker
*
* @ module jGraduate
* @ copyright 2010 Jeff Schiller { @ link http : //blog.codedread.com/}, 2010 Alexis Deveria {@link http://a.deveria.com/}
*
* @ license Apache - 2.0
* @ example
* // The Paint object is described below.
* $ . jGraduate . Paint ( ) ; // constructs a 'none' color
* @ example $ . jGraduate . Paint ( { copy : o } ) ; // creates a copy of the paint o
* @ example $ . jGraduate . Paint ( { hex : '#rrggbb' } ) ; // creates a solid color paint with hex = "#rrggbb"
* @ example $ . jGraduate . Paint ( { linearGradient : o , a : 50 } ) ; // creates a linear gradient paint with opacity=0.5
* @ example $ . jGraduate . Paint ( { radialGradient : o , a : 7 } ) ; // creates a radial gradient paint with opacity=0.07
* @ example $ . jGraduate . Paint ( { hex : '#rrggbb' , linearGradient : o } ) ; // throws an exception?
* /
2020-07-18 11:25:50 +00:00
const di = "http://www.w3.org/2000/svg" , hi = "http://www.w3.org/1999/xlink" ;
2019-12-17 13:16:47 +00:00
/ * *
2019-12-31 07:27:16 +00:00
* @ file jPicker ( Adapted from version 1.1 . 6 )
2019-12-17 13:16:47 +00:00
*
* jQuery Plugin for Photoshop style color picker
*
* @ module jPicker
* @ copyright ( c ) 2010 Christopher T . Tillman
* Digital Magic Productions , Inc . ( { @ link http : //www.digitalmagicpro.com/})
* FREE to use , alter , copy , sell , and especially ENHANCE
* @ license MIT
*
* Painstakingly ported from John Dyers ' excellent work on his own color picker based on the Prototype framework .
*
* John Dyers ' website : { @ link http : //johndyer.name}
* Color Picker page : { @ link http : //johndyer.name/photoshop-like-javascript-color-picker/}
* /
2020-07-18 11:25:50 +00:00
function pi ( e , t ) { return void 0 === t && ( t = 0 ) , Math . round ( e * 10 * * t ) / 10 * * t } window . console || ( window . console = { log ( e ) { } , dir ( e ) { } } ) ; const gi = e => null == e , fi = jQuery ; let mi ; const _i = function ( e , t , n ) { const i = fi ( "#svg_editor" ) . parent ( ) ; Object . entries ( t ) . forEach ( ( [ t , s ] ) => { if ( ! s ) return void console . log ( t ) ; n && ( t = "#" + t ) ; const o = i . find ( t ) ; if ( o . length ) { const t = o [ 0 ] ; switch ( e ) { case "aria-label" : t . setAttribute ( "aria-label" , s ) ; break ; case "content" : [ ... t . childNodes ] . some ( e => ! ( 3 !== e . nodeType || ! e . textContent . trim ( ) ) && ( e . textContent = s , ! 0 ) ) ; break ; case "title" : t . title = s } } else console . log ( "Missing element for localization: " + t ) } ) } ; let yi ; const bi = async function ( e ) { const t = await yi . addLangData ( mi ) ; if ( fi . each ( t , ( function ( t , n ) { n . data && ( e = fi . merge ( e , n . data ) ) } ) ) , ! e . tools ) return ; const { tools : n , properties : i , config : s , layers : o , common : r , ui : a } = e ; _i ( "content" , { curve _segments : i . curve _segments , fitToContent : n . fitToContent , fit _to _all : n . fit _to _all , fit _to _canvas : n . fit _to _canvas , fit _to _layer _content : n . fit _to _layer _content , fit _to _sel : n . fit _to _sel , icon _large : s . icon _large , icon _medium : s . icon _medium , icon _small : s . icon _small , icon _xlarge : s . icon _xlarge , image _opt _embed : s . image _opt _embed , image _opt _ref : s . image _opt _ref , includedImages : s . included _images , largest _object : n . largest _object , layersLabel : o . layers , page : n . page , relativeToLabel : n . relativeTo , selLayerLabel : o . move _elems _to , selectedPredefined : s . select _predefined , selected _objects : n . selected _objects , smallest _object : n . smallest _object , straight _segments : i . straight _segments , svginfo _bg _url : s . editor _img _url + ":" , svginfo _bg _note : s . editor _bg _note , svginfo _change _background : s . background , svginfo _dim : s . doc _dims , svginfo _editor _prefs : s . editor _prefs , svginfo _height : r . height , svginfo _icons : s . icon _size , svginfo _image _props : s . image _props , svginfo _lang : s . language , svginfo _title : s . doc _title , svginfo _width : r . width , tool _docprops _cancel : r . cancel , tool _docprops _save : r . ok , tool _source _cancel : r . cancel , tool _source _save : r . ok , tool _prefs _cancel : r . cancel , tool _prefs _save : r . ok , sidepanel _handle : o . layers . split ( "" ) . join ( " " ) , tool _clear : n . new _doc , tool _docprops : n . docprops , tool _export : n . export _img , tool _import : n . import _doc , tool _open : n . open _doc , tool _save : n . save _doc , tool _editor _prefs : s . editor _prefs , tool _editor _homepage : n . editor _homepage , svginfo _units _rulers : s . units _and _rulers , svginfo _rulers _onoff : s . show _rulers , svginfo _unit : s . base _unit , svginfo _grid _settings : s . grid , svginfo _snap _onoff : s . snapping _onoff , svginfo _snap _step : s . snapping _stepsize , svginfo _grid _color : s . grid _color } , ! 0 ) ; const l = { } ; [ "cut" , "copy" , "paste" , "paste_in_place" , "delete" , "group" , "ungroup" , "move_front" , "move_up" , "move_down" , "move_back" ] . forEach ( e => { l [ '#cmenu_canvas a[href="#' + e + '"]' ] = n [ e ] } ) , [ "dupe" , "merge_down" , "merge_all" ] . forEach ( e => { l [ '#cmenu_layers a[href="#' + e + '"]' ] = o [ e ] } ) , l [ '#cmenu_layers a[href="#delete"]' ] = o . del , _i ( "content" , l ) ; const c = { } ; return Object . entries ( { tool _blur : i . blur , tool _position : n . align _to _page , tool _font _family : i . font _family , zoom _panel : a . zoom _level , stroke _linejoin : i . linejoin _miter , stroke _linecap : i . linecap _butt , tool _opacity : i . opacity } ) . forEach ( ( [ e , t ] ) => { c [ "#" + e + " button" ] = t } ) , Object . entries ( { group _opacity : i . opacity , zoom : a . zoom _level } ) . forEach ( ( [ e , t ] ) => { c [ "#" + e ] = t } ) , _i ( "aria-label" , c ) , _i ( "title" , { align _relative _to : n . align _relative _to , circle _cx : i . circle _cx , circle _cy : i . circle _cy , circle _r : i . circle _r , cornerRadiusLabel : i . corner _radius , ellipse _cx : i . ellipse _cx , ellipse _cy : i . ellipse _cy , ellipse _rx : i . ellipse _rx , ellipse _ry : i . ellipse _ry , fill _color : i . fill _color , font _family : i . font _family , idLabel : i . id , image _height : i . image _height , image _url : i . image _url , image _width : i . image _width , layer _delete : o . del , layer _down : o . move _down , layer _new : o . new , layer _rename : o . rename , layer _moreopts : r . more _opts , layer _up : o . move _up , line _x1 : i . line _x1 , line _x2 : i . line _x2 , line _y1 : i . line _y1 , line _y2 : i . line _y2 , linecap _butt : i . linecap _butt , linecap _round : i . linecap _round , linecap _square : i . linecap _square , linejoin _bevel : i . linejoin _bevel , linejoin _miter : i . linejoin _miter , linejoin _round : i . linejoin _round , main _icon : n . main _menu , palette : a . palette _info , zoom _panel : a . zoom _level , path _node _x : i . node _x , path _node _y : i . node _y , rect _height _tool : i . rect _height , rect _width _tool : i . rect _width , seg _type : i .
/ * *
* @ file jQuery Context Menu Plugin
* Cory S . N . LaViska
* A Beautiful Site ( { @ link https : //abeautifulsite.net/})
* Modified by Alexis Deveria
*
* More info : { @ link https : //abeautifulsite.net/2008/09/jquery-context-menu-plugin/}
*
* @ module jQueryContextMenu
* @ todo Update to latest version and adapt ( and needs jQuery update as well ) : { @ link https : //github.com/swisnl/jQuery-contextMenu}
* @ version 1.0 . 1
*
* @ license ( MIT OR GPL - 2.0 - or - later )
*
* This plugin is dual - licensed under the GNU General Public License
* and the MIT License and is copyright A Beautiful Site , LLC .
*
* / , P , f u n c t i o n ( e ) { c o n s t t = e ( w i n d o w ) , n = e ( d o c u m e n t ) ; r e t u r n e . e x t e n d ( e . f n , { c o n t e x t M e n u ( i , s ) { r e t u r n v o i d 0 ! = = i . m e n u & & ( v o i d 0 = = = i . i n S p e e d & & ( i . i n S p e e d = 1 5 0 ) , v o i d 0 = = = i . o u t S p e e d & & ( i . o u t S p e e d = 7 5 ) , 0 = = = i . i n S p e e d & & ( i . i n S p e e d = - 1 ) , 0 = = = i . o u t S p e e d & & ( i . o u t S p e e d = - 1 ) , e ( t h i s ) . e a c h ( ( f u n c t i o n ( ) { c o n s t o = e ( t h i s ) , r = e ( o ) . o f f s e t ( ) , a = e ( " # " + i . m e n u ) ; a . a d d C l a s s ( " c o n t e x t M e n u " ) , e ( t h i s ) . b i n d ( " m o u s e d o w n " , ( f u n c t i o n ( l ) { e ( t h i s ) . m o u s e u p ( ( f u n c t i o n ( c ) { c o n s t u = e ( t h i s ) ; i f ( u . u n b i n d ( " m o u s e u p " ) , ! ( 2 = = = l . b u t t o n | | i . a l l o w L e f t | | l . c t r l K e y & & A ( ) ) ) r e t u r n ; i f ( c . s t o p P r o p a g a t i o n ( ) , e ( " . c o n t e x t M e n u " ) . h i d e ( ) , o . h a s C l a s s ( " d i s a b l e d " ) ) r e t u r n ! 1 ; l e t d = c . p a g e X , h = c . p a g e Y ; c o n s t p = t . w i d t h ( ) - a . w i d t h ( ) , g = t . h e i g h t ( ) - a . h e i g h t ( ) ; d > p - 1 5 & & ( d = p - 1 5 ) , h > g - 3 0 & & ( h = g - 3 0 ) , n . u n b i n d ( " c l i c k " ) , a . c s s ( { t o p : h , l e f t : d } ) . f a d e I n ( i . i n S p e e d ) , a . f i n d ( " A " ) . m o u s e o v e r ( ( f u n c t i o n ( ) { a . f i n d ( " L I . h o v e r " ) . r e m o v e C l a s s ( " h o v e r " ) , e ( t h i s ) . p a r e n t ( ) . a d d C l a s s ( " h o v e r " ) } ) ) . m o u s e o u t ( ( f u n c t i o n ( ) { a . f i n d ( " L I . h o v e r " ) . r e m o v e C l a s s ( " h o v e r " ) } ) ) , n . k e y p r e s s ( ( f u n c t i o n ( e ) { s w i t c h ( e . k e y C o d e ) { c a s e 3 8 : a . f i n d ( " L I . h o v e r " ) . l e n g t h ? ( a . f i n d ( " L I . h o v e r " ) . r e m o v e C l a s s ( " h o v e r " ) . p r e v A l l ( " L I : n o t ( . d i s a b l e d ) " ) . e q ( 0 ) . a d d C l a s s ( " h o v e r " ) , a . f i n d ( " L I . h o v e r " ) . l e n g t h | | a . f i n d ( " L I : l a s t " ) . a d d C l a s s ( " h o v e r " ) ) : a . f i n d ( " L I : l a s t " ) . a d d C l a s s ( " h o v e r " ) ; b r e a k ; c a s e 4 0 : a . f i n d ( " L I . h o v e r " ) . l e n g t h ? ( a . f i n d ( " L I . h o v e r " ) . r e m o v e C l a s s ( " h o v e r " ) . n e x t A l l ( " L I : n o t ( . d i s a b l e d ) " ) . e q ( 0 ) . a d d C l a s s ( " h o v e r " ) , a . f i n d ( " L I . h o v e r " ) . l e n g t h | | a . f i n d ( " L I : f i r s t " ) . a d d C l a s s ( " h o v e r " ) ) : a . f i n d ( " L I : f i r s t " ) . a d d C l a s s ( " h o v e r " ) ; b r e a k ; c a s e 1 3 : a . f i n d ( " L I . h o v e r A " ) . t r i g g e r ( " c l i c k " ) ; b r e a k ; c a s e 2 7 : n . t r i g g e r ( " c l i c k " ) } } ) ) , a . f i n d ( " A " ) . u n b i n d ( " m o u s e u p " ) , a . f i n d ( " L I : n o t ( . d i s a b l e d ) A " ) . m o u s e u p ( ( f u n c t i o n ( ) { r e t u r n n . u n b i n d ( " c l i c k " ) . u n b i n d ( " k e y p r e s s " ) , e ( " . c o n t e x t M e n u " ) . h i d e ( ) , s & & s ( e ( t h i s ) . a t t r ( " h r e f " ) . s u b s t r ( 1 ) , e ( u ) , { x : d - r . l e f t , y : h - r . t o p , d o c X : d , d o c Y : h } ) , ! 1 } ) ) , s e t T i m e o u t ( ( f u n c t i o n ( ) { n . c l i c k ( ( f u n c t i o n ( ) { r e t u r n n . u n b i n d ( " c l i c k " ) . u n b i n d ( " k e y p r e s s " ) , a . f a d e O u t ( i . o u t S p e e d ) , ! 1 } ) ) } ) , 0 ) } ) ) } ) ) , e . b r o w s e r . m o z i l l a ? e ( " # " + i . m e n u ) . e a c h ( ( f u n c t i o n ( ) { e ( t h i s ) . c s s ( { M o z U s e r S e l e c t : " n o n e " } ) } ) ) : e . b r o w s e r . m s i e ? e ( " # " + i . m e n u ) . e a c h ( ( f u n c t i o n ( ) { e ( t h i s ) . b i n d ( " s e l e c t s t a r t . d i s a b l e T e x t S e l e c t " , ( f u n c t i o n ( ) { r e t u r n ! 1 } ) ) } ) ) : e ( " # " + i . m e n u ) . e a c h ( ( f u n c t i o n ( ) { e ( t h i s ) . b i n d ( " m o u s e d o w n . d i s a b l e T e x t S e l e c t " , ( f u n c t i o n ( ) { r e t u r n ! 1 } ) ) } ) ) , e ( o ) . a d d ( e ( " U L . c o n t e x t M e n u " ) ) . b i n d ( " c o n t e x t m e n u " , ( f u n c t i o n ( ) { r e t u r n ! 1 } ) ) } ) ) , e ( t h i s ) ) } , d i s a b l e C o n t e x t M e n u I t e m s ( t ) { r e t u r n v o i d 0 = = = t ? ( e ( t h i s ) . f i n d ( " L I " ) . a d d C l a s s ( " d i s a b l e d " ) , e ( t h i s ) ) : ( e ( t h i s ) . e a c h ( ( f u n c t i o n ( ) { i f ( v o i d 0 ! = = t ) { c o n s t n = t . s p l i t ( " , " ) ; f o r ( c o n s t t o f n ) e ( t h i s ) . f i n d ( ' A [ h r e f = " ' + t + ' " ] ' ) . p a r e n t ( ) . a d d C l a s s ( " d i s a b l e d " ) } } ) ) , e ( t h i s ) ) } , e n a b l e C o n t e x t M e n u I t e m s ( t ) { r e t u r n v o i d 0 = = = t ? ( e ( t h i s ) . f i n d ( " L I . d i s a b l e d " ) . r e m o v e C l a s s ( " d i s a b l e d " ) , e ( t h i s ) ) : ( e ( t h i s ) . e a c h ( ( f u n c t i o n ( ) { i f ( v o i d 0 ! = = t ) { c o n s t n = t . s p l i t ( " , " ) ; f o r ( c o n s t t o f n ) e ( t h i s ) . f i n d ( ' A [ h r e f = " ' + t + ' " ] ' ) . p a r e n t ( ) . r e m o v e C l a s s ( " d i s a b l e d " ) } } ) ) , e ( t h i s ) ) } , d i s a b l e C o n t e x t M e n u ( ) { r e t u r n e ( t h i s ) . e a c h ( ( f u n c t i o n ( ) { e ( t h i s ) . a d d C l a s s ( " d i s a b l e d " ) } ) ) , e ( t h i s ) } , e n a b l e C o n t e x t M e n u ( ) { r e t u r n e ( t h i s ) . e a c h ( ( f u n c t i o n ( ) { e ( t h i s ) . r e m o v e C l a s s ( " d i s a b l e d " ) } ) ) , e ( t h i s ) } , d e s t r o y C o n t e x t M e n u ( ) { r e t u r n e ( t h i s ) . e a c h ( ( f u n c t i o n ( ) { e ( t h i s ) . u n b i n d ( " m o u s e d o w n " ) . u n b i n d ( " m o u s e u p " ) } ) ) , e ( t h i s ) } } ) , e } , f u n c t i o n ( e ) { e . l o a d i n g S t y l e s h e e t s | | ( e . l o a d i n g S t y l e s h e e t s = [ ] ) ; e . l o a d i n g S t y l e s h e e t s . i n c l u d e s ( " j g r a d u a t e / c s s / j P i c k e r . c s s " ) | | e . l o a d i n g S t y l e s h e e t s . p u s h ( " j g r a d u a t e / c s s / j P i c k e r . c s s " ) ; c l a s s t { c o n s t r u c t o r ( t , n ) { c o n s t i = t h i s ; f u n c t i o n s ( e ) { w . f o r E a c h ( t = > { t . c a l l ( i , i , e ) } ) } f u n c t i o n o ( n ) { c o n s t s = t . o f f s e t ( ) ; d = { l : 0 | s . l e f t , t : 0 | s . t o p } , c l e a r T i m e o u t ( h ) , h = s e t T i m e o u t ( ( f u n c t i o n ( ) { l . c a l l ( i , n ) } ) , 0 ) , e ( d o c u m e n t ) . b i n d ( " m o u s e m o v e " , r ) . b i n d ( " m o u s e u p " , a ) , n . p r e v e n t D e f a u l t ( ) } f u n c t i o n r ( e ) { r e t u r n c l e a r T i m e o u t ( h ) , h = s e t T i m e o u t ( ( f u n c t i o n ( ) { l . c a l l ( i , e ) } ) , 0 ) , e . s t o p P r o p a g a t i o n ( ) , e . p r e v e n t D e f a u l t ( ) , ! 1 } f u n c t i o n a ( t ) { r e t u r n e ( d o c u m e n t ) . u n b i n d ( " m o u s e u p " , a ) . u n b i n d ( " m o u s e m o v e " , r ) , t . s t o p P r o p a g a t i o n ( ) , t . p r e v e n t D e f a u l t ( ) , ! 1 } f u n c t i o n l ( e ) { c o n s t n = t . w , s = t . h ; l e t o = e . p a g e X - d . l , r = e . p a g e Y - d . t ; o < 0 ? o = 0 : o > n & & ( o = n ) , r < 0 ? r = 0 : r > s & & ( r = s ) , c . c a l l ( i , " x y " , { x : o / n * _ + f , y : r / s * v + y } ) } f u n c t i o n c ( e , t , n ) { i f ( ! ( v o i d 0 ! = = t ) ) s w i t c h ( g i ( e ) & & ( e = " x y " ) , e . t o L o w e r C a s e ( ) ) { c a s e " x " : r e t u r n p ; c a s e " y " : r e t u r n g ; c a s e " x y " : d e f a u l t : r e t u r n { x : p , y : g } } i f ( ! g i ( n ) & & n = = = i ) r e t u r n ; l e t o , r , a = ! 1 ;
- Breaking change: Rename config file to `svgedit-config-iife.js` (or for the module version, `svgedit-config-es.js`);
also expect one directory higher; incorporates #207 (@iuyiuy)
- Breaking change: Separate `extIconsPath` from `extPath` (not copying over icons)
- Breaking change: Don't reference `custom.css` in HTML; can instead be referenced in JavaScript through
the config file (provided in `svgedit-config-sample-iife.js`/`svgedit-config-sample-es.js` as `svgedit-custom.css` for
better namespacing); incorporates #207 (@iuyiuy)
- Breaking change: Remove minified jgraduate/spinbtn files (minified within Rollup routine)
- Fix: Zoom when scrolled; incorporates #169 (@AndrolGenhald), adapting for conventions; also allow avoidance when shift key pressed
- Fix: Update Atom feed reference in HTML
- Fixes related to recent commits: Some path and method name fixes needed, function order, missing methods, variable scope declaration, no need for DOMContentLoaded listeners in modules, switch back to non-default export, avoid trimming nullish, deal with mock tests, fix `math.matrixMultiply`, use jquery-svg where needed for array/SVG attributes; add babel-polyfill and defer script to imagelib; other misc. fixes
- Enhancement: Move config-sample.js out of `editor` directory
- Enhancement: For `callback`-style extensions, also provide config object; add following
to that object: buildCanvgCallback, canvg, decode64, encode64, executeAfterLoads, getTypeMap, isChrome, ieIE, NS, text2xml
- Enhancement: Complete ES6 modules work (extensions, locales, tests), along with Babel;
make Node build routine for converting modular source to non-modular,
use `loadStylesheets` for modular stylehsheet defining (but parallel loading);
- Enhancement: Add `stylesheets` config for modular but parallel stylesheet loading with `@default` option for simple inclusion/exclusion of defaults (if not going with default).
- Refactoring: Clean up `svg-editor.html`: consistent indents; avoid extra lbs, avoid long lines
- Refactoring: Avoid embedded API adding inline JavaScript listener
- Refactoring: Move layers and context code to `draw.js`
- Refactoring: Move `pathActions` from `svgcanvas.js` (though preserve aliases to these methods on `canvas`) and `convertPath` from `svgutils.js` to `path.js`
- Refactoring: Move `getStrokedBBox` from `svgcanvas.js` (while keeping an alias) to `svgutils.js` (as `getStrokedBBoxDefaultVisible` to avoid conflict with existing)
- Docs: Remove "dependencies" comments in code except where summarizing role of jQuery or a non-obvious dependency
- Refactoring/Linting: Enfore `no-extra-semi` and `quote-props` rules
- Refactoring: Further avoidance of quotes on properties (as possible)
- Refactoring: Use `class` in place of functions where intended as classes
- Refactoring: Consistency and granularity in extensions imports
- Testing: Update QUnit to 2.6.1 (node_modules) and Sinon to 5.0.8 (and add sinon-test at 2.1.3) and enforce eslint-plugin-qunit linting rules; update custom extensions
- Testing: Add node-static for automating (and accessing out-of-directory contents)
- Testing: Avoid HTML attributes for styling
- Testing: Add npm `test` script
- Testing: Comment out unused jQuery SVG test
- Testing: Add test1 and svgutils_performance_test to all tests page
- Testing: Due apparently to Path having not been a formal class, the test was calling it without `new`; refactored now with sufficient mock data to take into account it is a class
- npm: Update devDeps
- npm: Add html modules and config build to test script
2018-05-22 10:03:16 +00:00
//# sourceMappingURL=index-es.min.js.map