@ -99,7 +99,7 @@ function cancel(e) { 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					function  zenmode ( )  {  
					 
					 
					 
					function  zenmode ( )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    document . querySelector ( '.pallete-wrapper' ) . classList . toggle ( 'hidden' ) ;  
					 
					 
					 
					    document . querySelector ( '.pallete-wrapper' ) . classList . toggle ( 'hidden' ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    document . querySelector ( '.sizer -wrapper' ) . classList . toggle ( 'hidden' ) ;  
					 
					 
					 
					    document . querySelector ( '.top -wrapper' ) . classList . toggle ( 'hidden' ) ;  
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					}  
					 
					 
					 
					}  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					async  function  paste ( e ,  state ,  context )  {  
					 
					 
					 
					async  function  paste ( e ,  state ,  context )  {  
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -228,6 +228,13 @@ function mousemove(e, state, context) { 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    if  ( state . moving )  {  
					 
					 
					 
					    if  ( state . moving )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        state . canvas . offset . x  +=  e . movementX ;  
					 
					 
					 
					        state . canvas . offset . x  +=  e . movementX ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        state . canvas . offset . y  +=  e . movementY ;  
					 
					 
					 
					        state . canvas . offset . y  +=  e . movementY ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					     
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        // If we are moving our canvas, we don't need to follow anymore
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        if  ( state . following _player  !==  null )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            toggle _follow _player ( state ,  state . following _player ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        fire _event ( state ,  movecanvas _event ( state ) ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        do _draw  =  true ;  
					 
					 
					 
					        do _draw  =  true ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }  
					 
					 
					 
					    }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -333,6 +340,13 @@ function wheel(e, state, context) { 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        return ;  
					 
					 
					 
					        return ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    }  
					 
					 
					 
					    }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					    // If we are moving our canvas, we don't need to follow anymore
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					    if  ( state . following _player  !==  null )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        toggle _follow _player ( state ,  state . following _player ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					    }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					     
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					    fire _event ( state ,  movecanvas _event ( state ) ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    const  zoom _offset _x  =  Math . round ( ( dz  *  old _zoom )  *  canvasp . x ) ;  
					 
					 
					 
					    const  zoom _offset _x  =  Math . round ( ( dz  *  old _zoom )  *  canvasp . x ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    const  zoom _offset _y  =  Math . round ( ( dz  *  old _zoom )  *  canvasp . y ) ;  
					 
					 
					 
					    const  zoom _offset _y  =  Math . round ( ( dz  *  old _zoom )  *  canvasp . y ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -420,6 +434,7 @@ function touchmove(e, state, context) { 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            state . touch . waiting _for _second _finger  =  false ;  
					 
					 
					 
					            state . touch . waiting _for _second _finger  =  false ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        }  
					 
					 
					 
					        }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        geometry _add _point ( state ,  context ,  state . me ,  canvasp ) ;  
					 
					 
					 
					        geometry _add _point ( state ,  context ,  state . me ,  canvasp ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        fire _event ( state ,  predraw _event ( canvasp . x ,  canvasp . y ) ) ;  
					 
					 
					 
					        fire _event ( state ,  predraw _event ( canvasp . x ,  canvasp . y ) ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -479,9 +494,16 @@ function touchmove(e, state, context) { 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            state . canvas . offset . y  -=  zoom _offset _y ;  
					 
					 
					 
					            state . canvas . offset . y  -=  zoom _offset _y ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        }  
					 
					 
					 
					        }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        // If we are moving our canvas, we don't need to follow anymore
  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        if  ( state . following _player  !==  null )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            toggle _follow _player ( state ,  state . following _player ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        }  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        state . touch . first _finger _position  =  first _finger _position ;  
					 
					 
					 
					        state . touch . first _finger _position  =  first _finger _position ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        state . touch . second _finger _position  =  second _finger _position ;  
					 
					 
					 
					        state . touch . second _finger _position  =  second _finger _position ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					        fire _event ( state ,  movecanvas _event ( state ) ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        schedule _draw ( state ,  context ) ;  
					 
					 
					 
					        schedule _draw ( state ,  context ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        return ;  
					 
					 
					 
					        return ;  
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -492,9 +514,6 @@ function touchend(e, state, context) { 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    for  ( const  touch  of  e . changedTouches )  {  
					 
					 
					 
					    for  ( const  touch  of  e . changedTouches )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  ( state . touch . drawing )  {  
					 
					 
					 
					        if  ( state . touch . drawing )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					            if  ( state . touch . ids [ 0 ]  ==  touch . identifier )  {  
					 
					 
					 
					            if  ( state . touch . ids [ 0 ]  ==  touch . identifier )  {  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                // const event = stroke_event();
  
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                // await queue_event(event);
  
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                const  stroke  =  geometry _prepare _stroke ( state ) ;  
					 
					 
					 
					                const  stroke  =  geometry _prepare _stroke ( state ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					                if  ( stroke )  {                      
					 
					 
					 
					                if  ( stroke )  {