code: function onDrag(target, innerTarget, dir, listener) { // eslint-disable-line max-params
  	const hasPointerEvent = undefined !== target.onpointerup;
  	const hasTouchEvent   = undefined !== target.ontouchstart;
  	const pointerDown = hasPointerEvent ? 'pointerdown' : hasTouchEvent ? 'touchstart' : 'mousedown';
  	const pointerMove = hasPointerEvent ? 'pointermove' : hasTouchEvent ? 'touchmove' : 'mousemove';
  	const pointerUp   = hasPointerEvent ? 'pointerup'   : hasTouchEvent ? 'touchend' : 'mouseup';
  
  	// ...
  	const dirIsInline = /^(ltr|rtl)$/i.test(dir);
  	const dirIsStart  = /^(ltr|ttb)$/i.test(dir);
  
  	// ...
  	const axisProp = dirIsInline ? 'clientX' : 'clientY';
  
  	let window, start, end;
  
  	// on pointer down
  	target.addEventListener(pointerDown, onpointerdown);
  
  	function onpointerdown(event) {
  		// window
  		window = target.ownerDocument.defaultView;
  
  		// client boundaries
  		const rect = innerTarget.getBoundingClientRect();
  
  		// the container start and end coordinates
  		start = dirIsInline ? rect.left : rect.top;
  		end   = dirIsInline ? rect.right : rect.bottom;
  
  		onpointermove(event);
  
  		window.addEventListener(pointerMove, onpointermove);
  		window.addEventListener(pointerUp, onpointerup);
  	}
  
  	function onpointermove(event) {
  		// prevent browser actions on this event
  		event.preventDefault();
  
  		// the pointer coordinate
  		const position = axisProp in event ? event[axisProp] : event.touches && event.touches[0] && event.touches[0][axisProp] || 0;
  
  		// the percentage of the pointer along the container
  		const percentage = (dirIsStart ? position - start : end - position) / (end - start);
  
  		// call the listener with percentage
  		listener(percentage);
  	}
  
  	function onpointerup() {
  		window.removeEventListener(pointerMove, onpointermove);
  		window.removeEventListener(pointerUp, onpointerup);
  	}
  }
docs: /* Handle Drag Ranges
  /* ==========================================================================