diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 00b1ef8..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - "extends": "airbnb-base" -}; diff --git a/dist/focus-min.js b/dist/focus-min.js index af5467c..aaf19ff 100644 --- a/dist/focus-min.js +++ b/dist/focus-min.js @@ -1 +1 @@ -"use strict";var Focus=function(t,e){var s=e||{};if(this.settings=Object.assign({visibleClass:"visible",bodyClass:"active-popup",triggerClass:null,detach:null,innerSelector:".popup-inner",autoFocusSelector:"[data-auto-focus]",slide:null,slideSpeed:200,visible:!1,showCallback:null,hideCallback:null,error:null},s),this.visible=this.settings.visible,this.element=document.querySelector(t),this.innerElement=document.querySelector(t+" "+this.settings.innerSelector),this.closeElement=document.querySelector(t+" [data-close]"),this.target=t,this.settings.slide){var i=this.element.style.display;this.element.style.display="block",this.maxHeight=this.element.offsetHeight,this.element.style.display=i,this.height=this.element.offsetHeight,this.counter=this.height}this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.toggle=this.toggle.bind(this),this.detach=this.detach.bind(this),this.slideDown=this.slideDown.bind(this),this.slideUp=this.slideUp.bind(this),this.settings.detach&&document.addEventListener("DOMContentLoaded",this.detach),Focus.elements[t]=this};Focus.elements={},Focus.getTarget=function(t){var e=t.target;return"A"===e.tagName&&t.preventDefault(),e.dataset.target||null},Focus.eventHandler=function(t,e,s){t.preventDefault();var i=Focus.elements[e];return i||(i=new Focus(e)),"hide"===s?i.hide():i.toggle()},Focus.closeEvent=function(t){t.preventDefault();var e=Focus.getTarget(t);e?Focus.eventHandler(t,e,"hide"):this.hide()},Focus.escEvent=function(t){27===t.keyCode&&(this.element.removeEventListener("keyup",Focus.escEvent),this.hide())},Focus.buildEventListeners=function(){for(var t=document.querySelectorAll("[data-trigger]"),e=function(e){var s=t[e].dataset.target;t[e].addEventListener("click",function(t){Focus.eventHandler(t,s)})},s=0;s0?e.style.maxHeight=t.counter+"px":(e.style.maxHeight=null,e.style.display="none",e.style.overflow=null,clearInterval(t.interval))},this.settings.slideSpeed/100)},Focus.prototype.show=function(){if(this.visible&&this.element.classList.contains(this.settings.visibleClass))this.settings.error&&"function"==typeof this.settings.error&&this.settings.error("Focus: Error this element is already visible",this);else{if(this.settings.triggerClass){var t=document.querySelector('[data-target="'+this.target+'"]');Focus.addClass(t,this.settings.triggerClass)}this.settings.slide&&this.slideDown(this.settings.slideDuration),Focus.addClass(this.element,this.settings.visibleClass),Focus.addClass(document.body,this.settings.bodyClass),this.visible=!0;var e=document.querySelector(this.target+" "+this.settings.autoFocusSelector);e&&setTimeout(function(){e.focus()},300),this.closeElement&&this.closeElement.addEventListener("click",Focus.closeEvent.bind(this)),this.innerElement&&this.innerElement.addEventListener("click",Focus.closeEvent.bind(this)),this.element.addEventListener("keyup",Focus.escEvent.bind(this)),this.settings.showCallback&&"function"==typeof this.settings.showCallback&&this.settings.showCallback(this)}return this},Focus.prototype.hide=function(){if(this.visible||this.element.classList.contains(this.settings.visibleClass)){if(Focus.removeClass(this.element,this.settings.visibleClass),this.settings.triggerClass){var t=document.querySelector('[data-target="'+this.target+'"]');Focus.removeClass(t,this.settings.triggerClass)}this.settings.slide&&this.slideUp(this.settings.slideDuration),Focus.removeClass(document.body,this.settings.bodyClass),this.closeElement&&this.closeElement.removeEventListener("click",Focus.closeEvent),this.innerElement&&this.innerElement.removeEventListener("click",Focus.closeEvent),this.visible=!1,this.settings.hideCallback&&"function"==typeof this.settings.hideCallback&&this.settings.hideCallback(this)}else this.settings.error&&"function"==typeof this.settings.error&&this.settings.error("Focus: Error this element is already hidden",this);return this},Focus.prototype.toggle=function(){return this.visible?this.hide():this.show(),this},Focus.prototype.detach=function(){return document.body.appendChild(this.element),this},document.addEventListener("DOMContentLoaded",Focus.buildEventListeners),module.exports=Focus; \ No newline at end of file +"use strict";var Focus=function(e,t){var s=t||{};if(this.settings=Object.assign({visibleClass:"visible",bodyClass:"active-popup",triggerClass:null,detach:null,innerSelector:".popup-inner",autoFocusSelector:"[data-auto-focus]",slide:null,slideSpeed:200,visible:!1,showCallback:null,hideCallback:null,error:null},s),this.visible=this.settings.visible,this.element=document.querySelector(e),this.innerElement=document.querySelector(e+" "+this.settings.innerSelector),this.closeElement=document.querySelector(e+" [data-close]"),this.target=e,this.settings.slide){var i=this.element.style.display;this.element.style.display="block",this.maxHeight=this.element.offsetHeight,this.element.style.display=i,this.height=this.element.offsetHeight,this.counter=this.height}this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.toggle=this.toggle.bind(this),this.detach=this.detach.bind(this),this.slideDown=this.slideDown.bind(this),this.slideUp=this.slideUp.bind(this),this.boundCloseEvent=Focus.closeEvent.bind(this),this.boundEscListener=Focus.escEvent.bind(this),this.settings.detach&&document.addEventListener("DOMContentLoaded",this.detach),Focus.elements[e]=this};Focus.elements={},Focus.getTarget=function(e){var t=e.target;return"A"===t.tagName&&e.preventDefault(),t.dataset.target||null},Focus.eventHandler=function(e,t,s){e.preventDefault();var i=Focus.elements[t];return i||(i=new Focus(t)),"hide"===s?i.hide():i.toggle()},Focus.closeEvent=function(e){if(e.currentTarget===e.target){e.preventDefault();var t=Focus.getTarget(e);t?Focus.eventHandler(e,t,"hide"):this.hide()}},Focus.escEvent=function(e){27===e.keyCode&&(this.element.removeEventListener("keyup",Focus.escEvent),this.hide())},Focus.buildEventListeners=function(){for(var e=document.querySelectorAll("[data-trigger]"),t=function(t){var s=e[t].dataset.target;e[t].addEventListener("click",function(e){Focus.eventHandler(e,s)})},s=0;s0?t.style.maxHeight=e.counter+"px":(t.style.maxHeight=null,t.style.display="none",t.style.overflow=null,clearInterval(e.interval))},this.settings.slideSpeed/100)},Focus.prototype.show=function(){if(this.visible&&this.element.classList.contains(this.settings.visibleClass))this.settings.error&&"function"==typeof this.settings.error&&this.settings.error("Focus: Error this element is already visible",this);else{if(this.settings.triggerClass){var e=document.querySelector('[data-target="'+this.target+'"]');Focus.addClass(e,this.settings.triggerClass)}this.settings.slide&&this.slideDown(this.settings.slideDuration),Focus.addClass(this.element,this.settings.visibleClass),Focus.addClass(document.body,this.settings.bodyClass),this.visible=!0;var t=document.querySelector(this.target+" "+this.settings.autoFocusSelector);t&&setTimeout(function(){t.focus()},300),this.closeElement&&(this.closeElement.removeEventListener("click",this.boundCloseEvent),this.closeElement.addEventListener("click",this.boundCloseEvent)),this.innerElement&&(this.innerElement.removeEventListener("click",this.boundCloseEvent),this.innerElement.addEventListener("click",this.boundCloseEvent)),this.element.removeEventListener("keyup",this.boundEscListener),this.element.addEventListener("keyup",this.boundEscListener),this.settings.showCallback&&"function"==typeof this.settings.showCallback&&this.settings.showCallback(this)}return this},Focus.prototype.hide=function(){if(this.visible||this.element.classList.contains(this.settings.visibleClass)){if(Focus.removeClass(this.element,this.settings.visibleClass),this.settings.triggerClass){var e=document.querySelector('[data-target="'+this.target+'"]');Focus.removeClass(e,this.settings.triggerClass)}this.settings.slide&&this.slideUp(this.settings.slideDuration),Focus.removeClass(document.body,this.settings.bodyClass),this.closeElement&&this.closeElement.removeEventListener("click",Focus.closeEvent),this.innerElement&&this.innerElement.removeEventListener("click",Focus.closeEvent),this.visible=!1,this.settings.hideCallback&&"function"==typeof this.settings.hideCallback&&this.settings.hideCallback(this)}else this.settings.error&&"function"==typeof this.settings.error&&this.settings.error("Focus: Error this element is already hidden",this);return this},Focus.prototype.toggle=function(){return this.visible?this.hide():this.show(),this},Focus.prototype.detach=function(){return document.body.appendChild(this.element),this},document.addEventListener("DOMContentLoaded",Focus.buildEventListeners); \ No newline at end of file diff --git a/dist/focus.js b/dist/focus.js index f677969..5b7344a 100644 --- a/dist/focus.js +++ b/dist/focus.js @@ -23,73 +23,75 @@ MIT License Manages visibility for popups, drawers, modals, notifications, tabs, accordions and anything else. */ var Focus = function focusVisibilityManager(target, config) { - var settings = config || {}; - - // The default configuration - /* - visibleClass: The class that will be applied to the target element. - bodyClass: The class that will be applied to the body. - triggerClass: The class that will be applied to the trigger that is clicked on. - detach: if the body should be appended to the body. - innerSelector: The outer area of the element, acts like a close button when clicked. - autoFocusSelector: An input field that you would like to be focused with the element opens. - slide: Whether the opening should be animated with javascript, useful for accordions. - slideDuration: Speed of the animation, can be defined in ms. - visible: Whether the element was loaded visible or not. - success: Callback for when an element is success fully made visible. - error: Callback fro when an element could not be made visible. - */ - var defaultSettings = { - visibleClass: 'visible', - bodyClass: 'active-popup', - triggerClass: null, - detach: null, - innerSelector: '.popup-inner', - autoFocusSelector: '[data-auto-focus]', - slide: null, - slideSpeed: 200, - visible: false, - showCallback: null, - hideCallback: null, - error: null - }; - - // Merge configs - this.settings = Object.assign(defaultSettings, settings); - - // Update current popup config - this.visible = this.settings.visible; - - // The Dom element of the popup - this.element = document.querySelector(target); - this.innerElement = document.querySelector(target + ' ' + this.settings.innerSelector); - this.closeElement = document.querySelector(target + ' [data-close]'); - this.target = target; - - if (this.settings.slide) { - var defaultDisplay = this.element.style.display; - this.element.style.display = 'block'; - this.maxHeight = this.element.offsetHeight; - this.element.style.display = defaultDisplay; - this.height = this.element.offsetHeight; - this.counter = this.height; - } - - // Bind this into all of our prototype functions - this.show = this.show.bind(this); - this.hide = this.hide.bind(this); - this.toggle = this.toggle.bind(this); - this.detach = this.detach.bind(this); - this.slideDown = this.slideDown.bind(this); - this.slideUp = this.slideUp.bind(this); - - // If detach is set to true move the popup to the end of the popup - if (this.settings.detach) { - document.addEventListener('DOMContentLoaded', this.detach); - } - - // Create a list of all of the currently active elements so that we can access them globally - Focus.elements[target] = this; + var settings = config || {}; + + // The default configuration + /* + visibleClass: The class that will be applied to the target element. + bodyClass: The class that will be applied to the body. + triggerClass: The class that will be applied to the trigger that is clicked on. + detach: if the body should be appended to the body. + innerSelector: The outer area of the element, acts like a close button when clicked. + autoFocusSelector: An input field that you would like to be focused with the element opens. + slide: Whether the opening should be animated with javascript, useful for accordions. + slideDuration: Speed of the animation, can be defined in ms. + visible: Whether the element was loaded visible or not. + success: Callback for when an element is success fully made visible. + error: Callback fro when an element could not be made visible. + */ + var defaultSettings = { + visibleClass: 'visible', + bodyClass: 'active-popup', + triggerClass: null, + detach: null, + innerSelector: '.popup-inner', + autoFocusSelector: '[data-auto-focus]', + slide: null, + slideSpeed: 200, + visible: false, + showCallback: null, + hideCallback: null, + error: null + }; + + // Merge configs + this.settings = Object.assign(defaultSettings, settings); + + // Update current popup config + this.visible = this.settings.visible; + + // The Dom element of the popup + this.element = document.querySelector(target); + this.innerElement = document.querySelector(target + ' ' + this.settings.innerSelector); + this.closeElement = document.querySelector(target + ' [data-close]'); + this.target = target; + + if (this.settings.slide) { + var defaultDisplay = this.element.style.display; + this.element.style.display = 'block'; + this.maxHeight = this.element.offsetHeight; + this.element.style.display = defaultDisplay; + this.height = this.element.offsetHeight; + this.counter = this.height; + } + + // Bind this into all of our prototype functions + this.show = this.show.bind(this); + this.hide = this.hide.bind(this); + this.toggle = this.toggle.bind(this); + this.detach = this.detach.bind(this); + this.slideDown = this.slideDown.bind(this); + this.slideUp = this.slideUp.bind(this); + this.boundCloseEvent = Focus.closeEvent.bind(this); + this.boundEscListener = Focus.escEvent.bind(this); + + // If detach is set to true move the popup to the end of the popup + if (this.settings.detach) { + document.addEventListener('DOMContentLoaded', this.detach); + } + + // Create a list of all of the currently active elements so that we can access them globally + Focus.elements[target] = this; }; // Create an empty object to store all of the elements in. @@ -97,13 +99,13 @@ Focus.elements = {}; // Prevent default if the element is a link and return the selector of the popup element Focus.getTarget = function getTheFocusElementRelatedToTheTarget(event) { - var element = event.target; - if (element.tagName === 'A') { - event.preventDefault(); - } - var selector = element.dataset.target; - var target = selector || null; - return target; + var element = event.target; + if (element.tagName === 'A') { + event.preventDefault(); + } + var selector = element.dataset.target; + var target = selector || null; + return target; }; /* @@ -111,250 +113,256 @@ Focus.getTarget = function getTheFocusElementRelatedToTheTarget(event) { Therefore we create a new focus element. Then we toggle the elements visibility. */ Focus.eventHandler = function hideOrShowTheElement(event, target, method) { - event.preventDefault(); - var focus = Focus.elements[target]; + event.preventDefault(); + var focus = Focus.elements[target]; - if (!focus) { - focus = new Focus(target); - } + if (!focus) { + focus = new Focus(target); + } - if (method === 'hide') { - return focus.hide(); - } + if (method === 'hide') { + return focus.hide(); + } - return focus.toggle(); + return focus.toggle(); }; /* When clicking on a close button or out element */ Focus.closeEvent = function handleAnElementBeingClosed(event) { - event.preventDefault(); - var target = Focus.getTarget(event); - - if (target) { - Focus.eventHandler(event, target, 'hide'); - } else { - this.hide(); - } + if (event.currentTarget !== event.target) { + return; + } + event.preventDefault(); + var target = Focus.getTarget(event); + + if (target) { + Focus.eventHandler(event, target, 'hide'); + } else { + this.hide(); + } }; /* On key up event check if the user has pressed escape */ Focus.escEvent = function onKeyUpEscape(event) { - if (event.keyCode === 27) { - this.element.removeEventListener('keyup', Focus.escEvent); - this.hide(); - } + if (event.keyCode === 27) { + this.element.removeEventListener('keyup', Focus.escEvent); + this.hide(); + } }; /* Build the event listeners */ Focus.buildEventListeners = function bindFocusEventListeners() { - var allTriggers = document.querySelectorAll('[data-trigger]'); + var allTriggers = document.querySelectorAll('[data-trigger]'); - var _loop = function _loop(trigger) { - var target = allTriggers[trigger].dataset.target; + var _loop = function _loop(trigger) { + var target = allTriggers[trigger].dataset.target; - allTriggers[trigger].addEventListener('click', function (event) { - Focus.eventHandler(event, target); - }); - }; + allTriggers[trigger].addEventListener('click', function (event) { + Focus.eventHandler(event, target); + }); + }; - for (var trigger = 0; trigger < allTriggers.length; trigger += 1) { - _loop(trigger); - } + for (var trigger = 0; trigger < allTriggers.length; trigger += 1) { + _loop(trigger); + } }; /* Add a class to a given element */ Focus.addClass = function addAClassToAGivenElement(element, className) { - var el = element; - if (el.classList) { - el.classList.add(className); - } + var el = element; + if (el.classList) { + el.classList.add(className); + } }; /* Remove a class from a given element */ Focus.removeClass = function removeAClassFromAGivenElement(element, className) { - var el = element; - if (el.classList) { - el.classList.remove(className); - } + var el = element; + if (el.classList) { + el.classList.remove(className); + } }; Focus.prototype.slideDown = function slideDown() { - var _this = this; - - var el = this.element; - // Display none - var defaultDisplay = this.element.style.display; - - el.style.display = 'block'; - el.style.overflow = 'visible'; - el.style.maxHeight = '100%'; - // Declare the value of "height" variable - this.maxHeight = el.offsetHeight; - el.style.display = defaultDisplay; - this.height = el.offsetHeight; - // Declare the value of "counter" variable - this.counter = this.height; - el.style.maxHeight = this.height + 'px'; - el.style.overflow = 'hidden'; - el.style.display = 'block'; - - var adder = this.maxHeight / 100; - // Iteratively increase the height - this.interval = setInterval(function () { - _this.counter += adder; - if (_this.counter < _this.maxHeight) { - el.style.maxHeight = _this.counter + 'px'; - } else { - el.style.maxHeight = null; - el.style.overflow = null; - _this.height = _this.element.offsetHeight; - clearInterval(_this.interval); - } - }, this.settings.slideSpeed / 100); + var _this = this; + + var el = this.element; + // Display none + var defaultDisplay = this.element.style.display; + + el.style.display = 'block'; + el.style.overflow = 'visible'; + el.style.maxHeight = '100%'; + // Declare the value of "height" variable + this.maxHeight = el.offsetHeight; + el.style.display = defaultDisplay; + this.height = el.offsetHeight; + // Declare the value of "counter" variable + this.counter = this.height; + el.style.maxHeight = this.height + 'px'; + el.style.overflow = 'hidden'; + el.style.display = 'block'; + + var adder = this.maxHeight / 100; + // Iteratively increase the height + this.interval = setInterval(function () { + _this.counter += adder; + if (_this.counter < _this.maxHeight) { + el.style.maxHeight = _this.counter + 'px'; + } else { + el.style.maxHeight = null; + el.style.overflow = null; + _this.height = _this.element.offsetHeight; + clearInterval(_this.interval); + } + }, this.settings.slideSpeed / 100); }; Focus.prototype.slideUp = function slideUp() { - var _this2 = this; - - var el = this.element; - var subtractor = this.maxHeight / 100; - // To hide the content of the element - el.style.overflow = 'hidden'; - - // Decreasing the height - this.interval = setInterval(function () { - _this2.counter -= subtractor; - if (_this2.counter > 0) { - el.style.maxHeight = _this2.counter + 'px'; - } else { - el.style.maxHeight = null; - el.style.display = 'none'; - el.style.overflow = null; - - clearInterval(_this2.interval); - } - }, this.settings.slideSpeed / 100); + var _this2 = this; + + var el = this.element; + var subtractor = this.maxHeight / 100; + // To hide the content of the element + el.style.overflow = 'hidden'; + + // Decreasing the height + this.interval = setInterval(function () { + _this2.counter -= subtractor; + if (_this2.counter > 0) { + el.style.maxHeight = _this2.counter + 'px'; + } else { + el.style.maxHeight = null; + el.style.display = 'none'; + el.style.overflow = null; + + clearInterval(_this2.interval); + } + }, this.settings.slideSpeed / 100); }; /* Show the popup element */ Focus.prototype.show = function showTheElement() { - // Check if the element is visible or not. - if (!this.visible || !this.element.classList.contains(this.settings.visibleClass)) { - // Add the class to the trigger button if one is defined. - if (this.settings.triggerClass) { - var triggerElement = document.querySelector('[data-target="' + this.target + '"]'); - Focus.addClass(triggerElement, this.settings.triggerClass); - } - // If slide is set to true slide the element down. - if (this.settings.slide) { - this.slideDown(this.settings.slideDuration); + // Check if the element is visible or not. + if (!this.visible || !this.element.classList.contains(this.settings.visibleClass)) { + // Add the class to the trigger button if one is defined. + if (this.settings.triggerClass) { + var triggerElement = document.querySelector('[data-target="' + this.target + '"]'); + Focus.addClass(triggerElement, this.settings.triggerClass); + } + // If slide is set to true slide the element down. + if (this.settings.slide) { + this.slideDown(this.settings.slideDuration); + } + // Add the visible class to the popup + Focus.addClass(this.element, this.settings.visibleClass); + // Add the body class to the body + Focus.addClass(document.body, this.settings.bodyClass); + // Define that this element is visible + this.visible = true; + + // Focus on an input field once the modal has opened + var focusEl = document.querySelector(this.target + ' ' + this.settings.autoFocusSelector); + if (focusEl) { + setTimeout(function () { + focusEl.focus(); + }, 300); + } + + if (this.closeElement) { + // When someone clicks the [data-close] button then we should close the modal + this.closeElement.removeEventListener('click', this.boundCloseEvent); + this.closeElement.addEventListener('click', this.boundCloseEvent); + } + + if (this.innerElement) { + // When someone clicks on the inner class hide the popup + this.innerElement.removeEventListener('click', this.boundCloseEvent); + this.innerElement.addEventListener('click', this.boundCloseEvent); + } + + // When someone presses esc hide the popup and unbind the event listener + this.element.removeEventListener('keyup', this.boundEscListener); + this.element.addEventListener('keyup', this.boundEscListener); + + // Fire the success callback + if (this.settings.showCallback && typeof this.settings.showCallback === 'function') { + this.settings.showCallback(this); + } + } else if (this.settings.error && typeof this.settings.error === 'function') { + this.settings.error('Focus: Error this element is already visible', this); } - // Add the visible class to the popup - Focus.addClass(this.element, this.settings.visibleClass); - // Add the body class to the body - Focus.addClass(document.body, this.settings.bodyClass); - // Define that this element is visible - this.visible = true; - - // Focus on an input field once the modal has opened - var focusEl = document.querySelector(this.target + ' ' + this.settings.autoFocusSelector); - if (focusEl) { - setTimeout(function () { - focusEl.focus(); - }, 300); - } - - if (this.closeElement) { - // When someone clicks the [data-close] button then we should close the modal - this.closeElement.addEventListener('click', Focus.closeEvent.bind(this)); - } - - if (this.innerElement) { - // When someone clicks on the inner class hide the popup - this.innerElement.addEventListener('click', Focus.closeEvent.bind(this)); - } - - // When someone presses esc hide the popup and unbind the event listener - this.element.addEventListener('keyup', Focus.escEvent.bind(this)); - - // Fire the success callback - if (this.settings.showCallback && typeof this.settings.showCallback === 'function') { - this.settings.showCallback(this); - } - } else if (this.settings.error && typeof this.settings.error === 'function') { - this.settings.error('Focus: Error this element is already visible', this); - } - // Return this so that we can chain functions together - return this; + // Return this so that we can chain functions together + return this; }; Focus.prototype.hide = function hideTheElement() { - if (this.visible || this.element.classList.contains(this.settings.visibleClass)) { - Focus.removeClass(this.element, this.settings.visibleClass); - - if (this.settings.triggerClass) { - var triggerElement = document.querySelector('[data-target="' + this.target + '"]'); - Focus.removeClass(triggerElement, this.settings.triggerClass); - } - if (this.settings.slide) { - this.slideUp(this.settings.slideDuration); - } - Focus.removeClass(document.body, this.settings.bodyClass); - - // When someone clicks the [data-close] button then we should close the modal - if (this.closeElement) { - this.closeElement.removeEventListener('click', Focus.closeEvent); - } - // When someone clicks on the inner class hide the popup - if (this.innerElement) { - this.innerElement.removeEventListener('click', Focus.closeEvent); - } - - this.visible = false; - // Fire the success callback - if (this.settings.hideCallback && typeof this.settings.hideCallback === 'function') { - this.settings.hideCallback(this); + if (this.visible || this.element.classList.contains(this.settings.visibleClass)) { + Focus.removeClass(this.element, this.settings.visibleClass); + + if (this.settings.triggerClass) { + var triggerElement = document.querySelector('[data-target="' + this.target + '"]'); + Focus.removeClass(triggerElement, this.settings.triggerClass); + } + if (this.settings.slide) { + this.slideUp(this.settings.slideDuration); + } + Focus.removeClass(document.body, this.settings.bodyClass); + + // When someone clicks the [data-close] button then we should close the modal + if (this.closeElement) { + this.closeElement.removeEventListener('click', Focus.closeEvent); + } + // When someone clicks on the inner class hide the popup + if (this.innerElement) { + this.innerElement.removeEventListener('click', Focus.closeEvent); + } + + this.visible = false; + // Fire the success callback + if (this.settings.hideCallback && typeof this.settings.hideCallback === 'function') { + this.settings.hideCallback(this); + } + } else if (this.settings.error && typeof this.settings.error === 'function') { + this.settings.error('Focus: Error this element is already hidden', this); } - } else if (this.settings.error && typeof this.settings.error === 'function') { - this.settings.error('Focus: Error this element is already hidden', this); - } - return this; + return this; }; /* Show if hidden, hide if shown. */ Focus.prototype.toggle = function toggleFocusVisibility() { - if (this.visible) { - this.hide(); - } else { - this.show(); - } - return this; + if (this.visible) { + this.hide(); + } else { + this.show(); + } + return this; }; /* Move the element to the end of the body, sometime useful for popups. */ Focus.prototype.detach = function moveTheElementToTheEndOfTheBody() { - document.body.appendChild(this.element); - return this; + document.body.appendChild(this.element); + return this; }; // Create event listeners for all triggers and closes on DOMContentLoaded document.addEventListener('DOMContentLoaded', Focus.buildEventListeners); // NPM exports -module.exports = Focus; +module.exports = Focus; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a195ec4..cd1d775 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "Focus", - "version": "2.2.0", + "name": "@elkfox/focus", + "version": "2.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -429,6 +429,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -440,6 +441,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -518,6 +520,25 @@ "integrity": "sha1-1Vq5ciRMcaml4asIefML8RCAaVk=", "dev": true }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", @@ -539,12 +560,30 @@ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", @@ -575,12 +614,66 @@ "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", "dev": true }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dev": true, + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -620,10 +713,37 @@ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, + "async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dev": true, + "requires": { + "async-done": "^1.2.2" + } + }, "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, "babel-code-frame": { @@ -1568,6 +1688,23 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dev": true, + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1635,6 +1772,22 @@ "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", "dev": true }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1684,6 +1837,12 @@ "electron-to-chromium": "^1.3.47" } }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, "buffer-from": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", @@ -1831,6 +1990,55 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", @@ -1978,6 +2186,17 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dev": true, + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -2026,9 +2245,9 @@ } }, "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, "concat-map": { @@ -2438,6 +2657,16 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "copy-props": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "dev": true, + "requires": { + "each-props": "^1.3.0", + "is-plain-object": "^2.0.1" + } + }, "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", @@ -2482,6 +2711,16 @@ "array-find-index": "^1.0.1" } }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "dargs": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", @@ -2551,15 +2790,29 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", "dev": true, "requires": { - "clone": "^1.0.2" + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } } }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "dev": true + }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", @@ -2640,12 +2893,6 @@ } } }, - "deprecated": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", - "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", - "dev": true - }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -2694,6 +2941,60 @@ "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, "electron-to-chromium": { "version": "1.3.52", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.52.tgz", @@ -2701,12 +3002,23 @@ "dev": true }, "end-of-stream": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", - "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { - "once": "~1.3.0" + "once": "^1.4.0" + }, + "dependencies": { + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + } } }, "error-ex": { @@ -2742,6 +3054,50 @@ "is-symbol": "^1.0.1" } }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3231,10 +3587,27 @@ "homedir-polyfill": "^1.0.1" } }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", + "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==", + "dev": true + } + } + }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extend-shallow": { @@ -3390,6 +3763,13 @@ } } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -3419,12 +3799,6 @@ } } }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", - "dev": true - }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -3435,21 +3809,21 @@ } }, "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", "dev": true, "requires": { "detect-file": "^1.0.0", - "is-glob": "^3.1.0", + "is-glob": "^4.0.0", "micromatch": "^3.0.4", "resolve-dir": "^1.0.1" } }, "fined": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", - "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -3459,16 +3833,10 @@ "parse-filepath": "^1.0.1" } }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, "flagged-respawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.0.tgz", - "integrity": "sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true }, "flat-cache": { @@ -3491,16 +3859,58 @@ } } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "dev": true, "requires": { "for-in": "^1.0.1" @@ -3563,12 +3973,33 @@ } } }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3581,15 +4012,6 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "gaze": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", - "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", - "dev": true, - "requires": { - "globule": "~0.1.0" - } - }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -3875,15 +4297,17 @@ } }, "glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { + "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-base": { @@ -3940,59 +4364,95 @@ } }, "glob-stream": { - "version": "3.1.18", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", - "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", "dev": true, "requires": { - "glob": "^4.3.1", - "glob2base": "^0.0.12", - "minimatch": "^2.0.1", - "ordered-read-streams": "^0.1.0", - "through2": "^0.6.1", - "unique-stream": "^1.0.0" + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" }, "dependencies": { + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" + "safe-buffer": "~5.1.0" } } } }, "glob-watcher": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", - "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", - "dev": true, - "requires": { - "gaze": "^0.5.1" - } - }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", - "dev": true, - "requires": { - "find-index": "^0.1.1" + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } } }, "global-modules": { @@ -4076,52 +4536,6 @@ } } }, - "globule": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", - "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", - "dev": true, - "requires": { - "glob": "~3.1.21", - "lodash": "~1.0.1", - "minimatch": "~0.2.11" - }, - "dependencies": { - "glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", - "dev": true, - "requires": { - "graceful-fs": "~1.2.0", - "inherits": "1", - "minimatch": "~0.2.11" - } - }, - "graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", - "dev": true - }, - "inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", - "dev": true - }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, "glogg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", @@ -4157,33 +4571,138 @@ } }, "graceful-fs": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", - "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", - "dev": true, - "requires": { - "natives": "^1.1.0" - } + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true }, "gulp": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", - "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", "dev": true, "requires": { - "archy": "^1.0.0", - "chalk": "^1.0.0", - "deprecated": "^0.0.1", - "gulp-util": "^3.0.0", - "interpret": "^1.0.0", - "liftoff": "^2.1.0", - "minimist": "^1.1.0", - "orchestrator": "^0.3.0", - "pretty-hrtime": "^1.0.0", - "semver": "^4.1.0", - "tildify": "^1.0.0", - "v8flags": "^2.0.2", - "vinyl-fs": "^0.3.0" + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "dev": true + }, + "yargs": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz", + "integrity": "sha512-huO4Fr1f9PmiJJdll5kwoS2e4GqzGSsMT3PPMpOwoVkOK8ckqAewMTZyA6LXVQWflleb/Z8oPBEvNsMft0XE+g==", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "5.0.0-security.0" + } + }, + "yargs-parser": { + "version": "5.0.0-security.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz", + "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + } } }, "gulp-babel": { @@ -4978,9 +5497,9 @@ } }, "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, "requires": { "parse-passwd": "^1.0.0" @@ -5122,9 +5641,9 @@ } }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "into-stream": { @@ -5188,6 +5707,15 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -5297,14 +5825,20 @@ "dev": true }, "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { - "is-extglob": "^2.1.0" + "is-extglob": "^2.1.1" } }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -5337,23 +5871,6 @@ "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", "dev": true }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -5483,6 +6000,12 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -5581,6 +6104,12 @@ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, + "just-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", + "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", + "dev": true + }, "keyv": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", @@ -5596,6 +6125,16 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dev": true, + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", @@ -5603,37 +6142,87 @@ "dev": true, "optional": true }, - "lcid": { + "lazystream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "liftoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", - "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", "dev": true, "requires": { - "extend": "^3.0.0", - "findup-sync": "^2.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", + "readable-stream": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", "rechoir": "^0.6.2", "resolve": "^1.1.7" } @@ -5674,12 +6263,6 @@ "path-exists": "^3.0.0" } }, - "lodash": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", - "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", - "dev": true - }, "lodash._basecopy": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", @@ -5821,7 +6404,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -5848,12 +6432,6 @@ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, "make-iterator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", @@ -5884,6 +6462,41 @@ "object-visit": "^1.0.0" } }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dev": true, + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, "math-random": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", @@ -5973,12 +6586,12 @@ "dev": true }, "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.0.0" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -5998,9 +6611,9 @@ } }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -6056,16 +6669,29 @@ "duplexer2": "0.0.2" } }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true, + "optional": true + }, "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -6073,7 +6699,6 @@ "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", @@ -6082,18 +6707,18 @@ "to-regex": "^3.0.1" } }, - "natives": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.4.tgz", - "integrity": "sha512-Q29yeg9aFKwhLVdkTAejM/HvYG0Y1Am1+HUkFQGn5k2j8GS+v60TVmZh6nujpEAj/qql+wGUrlryO8bF+b1jEg==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, "nice-try": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", @@ -6132,6 +6757,15 @@ "sort-keys": "^2.0.0" } }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -6275,6 +6909,16 @@ "isobject": "^3.0.1" } }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "once": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", @@ -6333,23 +6977,47 @@ } } }, - "orchestrator": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", - "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", "dev": true, "requires": { - "end-of-stream": "~0.1.5", - "sequencify": "~0.0.7", - "stream-consume": "~0.1.0" + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, - "ordered-read-streams": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", - "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", - "dev": true - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -6492,6 +7160,12 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -6771,6 +7445,27 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -6937,6 +7632,49 @@ "string_decoder": "~0.10.x" } }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -7047,6 +7785,27 @@ } } }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -7080,6 +7839,17 @@ "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", "dev": true }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, "require-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.0.0.tgz", @@ -7133,6 +7903,15 @@ "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", "dev": true }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -7331,18 +8110,21 @@ "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", "dev": true }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dev": true, + "requires": { + "sver-compat": "^1.5.0" + } + }, "semver-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", "dev": true }, - "sequencify": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", - "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", - "dev": true - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -7350,9 +8132,9 @@ "dev": true }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -7387,12 +8169,6 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -7537,12 +8313,12 @@ "dev": true }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", @@ -7559,9 +8335,9 @@ } }, "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "dev": true }, "sparkles": { @@ -7635,6 +8411,12 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -7656,10 +8438,16 @@ } } }, - "stream-consume": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==", + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, "strict-uri-encode": { @@ -7723,16 +8511,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", - "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", - "dev": true, - "requires": { - "first-chunk-stream": "^1.0.0", - "is-utf8": "^0.2.0" - } - }, "strip-bom-buf": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", @@ -7817,6 +8595,16 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dev": true, + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, "symbol-observable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", @@ -7963,13 +8751,14 @@ } } }, - "tildify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", - "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", "dev": true, "requires": { - "os-homedir": "^1.0.0" + "through2": "~2.0.0", + "xtend": "~4.0.0" } }, "time-stamp": { @@ -7993,6 +8782,16 @@ "os-tmpdir": "~1.0.2" } }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", @@ -8041,6 +8840,15 @@ "repeat-string": "^1.6.1" } }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + } + }, "trim-newlines": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", @@ -8059,6 +8867,12 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -8114,46 +8928,59 @@ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, + "undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + }, + "dependencies": { + "fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=", + "dev": true + } + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "dev": true + }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", - "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", - "dev": true + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } }, "unset-value": { "version": "1.0.0", @@ -8201,6 +9028,12 @@ } } }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -8232,18 +9065,9 @@ "dev": true }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, "util-deprecate": { @@ -8253,12 +9077,12 @@ "dev": true }, "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", "dev": true, "requires": { - "user-home": "^1.1.1" + "homedir-polyfill": "^1.0.1" } }, "validate-npm-package-license": { @@ -8271,6 +9095,12 @@ "spdx-expression-parse": "^3.0.0" } }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, "vinyl": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", @@ -8283,57 +9113,139 @@ } }, "vinyl-fs": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", - "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", - "dev": true, - "requires": { - "defaults": "^1.0.0", - "glob-stream": "^3.1.5", - "glob-watcher": "^0.0.6", - "graceful-fs": "^3.0.0", - "mkdirp": "^0.5.0", - "strip-bom": "^1.0.0", - "through2": "^0.6.1", - "vinyl": "^0.4.0" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" }, "dependencies": { "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "readable-stream": ">=1.0.33-1 <1.1.0-0", - "xtend": ">=4.0.0 <4.1.0-0" + "safe-buffer": "~5.1.0" } }, "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", "dev": true, "requires": { - "clone": "^0.2.0", - "clone-stats": "^0.0.1" + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + } + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" } } } diff --git a/package.json b/package.json index 37cd61d..de8d83e 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint": "^4.19.1", "eslint-config-airbnb-base": "^13.0.0", "eslint-plugin-import": "^2.13.0", - "gulp": "^3.9.1", + "gulp": "^4.0.0", "gulp-babel": "^7.0.1", "gulp-babel-minify": "^0.4.3", "gulp-bump": "^3.1.1", diff --git a/src/focus.js b/src/focus.js index 5906ed4..7e2d751 100644 --- a/src/focus.js +++ b/src/focus.js @@ -21,73 +21,75 @@ MIT License Manages visibility for popups, drawers, modals, notifications, tabs, accordions and anything else. */ const Focus = function focusVisibilityManager(target, config) { - const settings = config || {}; - - // The default configuration - /* - visibleClass: The class that will be applied to the target element. - bodyClass: The class that will be applied to the body. - triggerClass: The class that will be applied to the trigger that is clicked on. - detach: if the body should be appended to the body. - innerSelector: The outer area of the element, acts like a close button when clicked. - autoFocusSelector: An input field that you would like to be focused with the element opens. - slide: Whether the opening should be animated with javascript, useful for accordions. - slideDuration: Speed of the animation, can be defined in ms. - visible: Whether the element was loaded visible or not. - success: Callback for when an element is success fully made visible. - error: Callback fro when an element could not be made visible. - */ - const defaultSettings = { - visibleClass: 'visible', - bodyClass: 'active-popup', - triggerClass: null, - detach: null, - innerSelector: '.popup-inner', - autoFocusSelector: '[data-auto-focus]', - slide: null, - slideSpeed: 200, - visible: false, - showCallback: null, - hideCallback: null, - error: null, - }; - - // Merge configs - this.settings = Object.assign(defaultSettings, settings); - - // Update current popup config - this.visible = this.settings.visible; - - // The Dom element of the popup - this.element = document.querySelector(target); - this.innerElement = document.querySelector(`${target} ${this.settings.innerSelector}`); - this.closeElement = document.querySelector(`${target} [data-close]`); - this.target = target; - - if (this.settings.slide) { - const defaultDisplay = this.element.style.display; - this.element.style.display = 'block'; - this.maxHeight = this.element.offsetHeight; - this.element.style.display = defaultDisplay; - this.height = this.element.offsetHeight; - this.counter = this.height; - } - - // Bind this into all of our prototype functions - this.show = this.show.bind(this); - this.hide = this.hide.bind(this); - this.toggle = this.toggle.bind(this); - this.detach = this.detach.bind(this); - this.slideDown = this.slideDown.bind(this); - this.slideUp = this.slideUp.bind(this); - - // If detach is set to true move the popup to the end of the popup - if (this.settings.detach) { - document.addEventListener('DOMContentLoaded', this.detach); - } - - // Create a list of all of the currently active elements so that we can access them globally - Focus.elements[target] = this; + const settings = config || {}; + + // The default configuration + /* + visibleClass: The class that will be applied to the target element. + bodyClass: The class that will be applied to the body. + triggerClass: The class that will be applied to the trigger that is clicked on. + detach: if the body should be appended to the body. + innerSelector: The outer area of the element, acts like a close button when clicked. + autoFocusSelector: An input field that you would like to be focused with the element opens. + slide: Whether the opening should be animated with javascript, useful for accordions. + slideDuration: Speed of the animation, can be defined in ms. + visible: Whether the element was loaded visible or not. + success: Callback for when an element is success fully made visible. + error: Callback fro when an element could not be made visible. + */ + const defaultSettings = { + visibleClass: 'visible', + bodyClass: 'active-popup', + triggerClass: null, + detach: null, + innerSelector: '.popup-inner', + autoFocusSelector: '[data-auto-focus]', + slide: null, + slideSpeed: 200, + visible: false, + showCallback: null, + hideCallback: null, + error: null, + }; + + // Merge configs + this.settings = Object.assign(defaultSettings, settings); + + // Update current popup config + this.visible = this.settings.visible; + + // The Dom element of the popup + this.element = document.querySelector(target); + this.innerElement = document.querySelector(`${target} ${this.settings.innerSelector}`); + this.closeElement = document.querySelector(`${target} [data-close]`); + this.target = target; + + if (this.settings.slide) { + const defaultDisplay = this.element.style.display; + this.element.style.display = 'block'; + this.maxHeight = this.element.offsetHeight; + this.element.style.display = defaultDisplay; + this.height = this.element.offsetHeight; + this.counter = this.height; + } + + // Bind this into all of our prototype functions + this.show = this.show.bind(this); + this.hide = this.hide.bind(this); + this.toggle = this.toggle.bind(this); + this.detach = this.detach.bind(this); + this.slideDown = this.slideDown.bind(this); + this.slideUp = this.slideUp.bind(this); + this.boundCloseEvent = Focus.closeEvent.bind(this); + this.boundEscListener = Focus.escEvent.bind(this); + + // If detach is set to true move the popup to the end of the popup + if (this.settings.detach) { + document.addEventListener('DOMContentLoaded', this.detach); + } + + // Create a list of all of the currently active elements so that we can access them globally + Focus.elements[target] = this; }; // Create an empty object to store all of the elements in. @@ -95,13 +97,13 @@ Focus.elements = {}; // Prevent default if the element is a link and return the selector of the popup element Focus.getTarget = function getTheFocusElementRelatedToTheTarget(event) { - const element = event.target; - if (element.tagName === 'A') { - event.preventDefault(); - } - const selector = element.dataset.target; - const target = selector || null; - return target; + const element = event.target; + if (element.tagName === 'A') { + event.preventDefault(); + } + const selector = element.dataset.target; + const target = selector || null; + return target; }; /* @@ -109,236 +111,242 @@ Focus.getTarget = function getTheFocusElementRelatedToTheTarget(event) { Therefore we create a new focus element. Then we toggle the elements visibility. */ Focus.eventHandler = function hideOrShowTheElement(event, target, method) { - event.preventDefault(); - let focus = Focus.elements[target]; + event.preventDefault(); + let focus = Focus.elements[target]; - if (!focus) { - focus = new Focus(target); - } + if (!focus) { + focus = new Focus(target); + } - if (method === 'hide') { - return focus.hide(); - } + if (method === 'hide') { + return focus.hide(); + } - return focus.toggle(); + return focus.toggle(); }; /* When clicking on a close button or out element */ Focus.closeEvent = function handleAnElementBeingClosed(event) { - event.preventDefault(); - const target = Focus.getTarget(event); - - if (target) { - Focus.eventHandler(event, target, 'hide'); - } else { - this.hide(); - } + if (event.currentTarget !== event.target) { + return; + } + event.preventDefault(); + const target = Focus.getTarget(event); + + if (target) { + Focus.eventHandler(event, target, 'hide'); + } else { + this.hide(); + } }; /* On key up event check if the user has pressed escape */ Focus.escEvent = function onKeyUpEscape(event) { - if (event.keyCode === 27) { - this.element.removeEventListener('keyup', Focus.escEvent); - this.hide(); - } + if (event.keyCode === 27) { + this.element.removeEventListener('keyup', Focus.escEvent); + this.hide(); + } }; /* Build the event listeners */ Focus.buildEventListeners = function bindFocusEventListeners() { - const allTriggers = document.querySelectorAll('[data-trigger]'); - for (let trigger = 0; trigger < allTriggers.length; trigger += 1) { - const { target } = allTriggers[trigger].dataset; - allTriggers[trigger].addEventListener('click', (event) => { - Focus.eventHandler(event, target); - }); - } + const allTriggers = document.querySelectorAll('[data-trigger]'); + for (let trigger = 0; trigger < allTriggers.length; trigger += 1) { + const {target} = allTriggers[trigger].dataset; + allTriggers[trigger].addEventListener('click', (event) => { + Focus.eventHandler(event, target); + }); + } }; /* Add a class to a given element */ Focus.addClass = function addAClassToAGivenElement(element, className) { - const el = element; - if (el.classList) { - el.classList.add(className); - } + const el = element; + if (el.classList) { + el.classList.add(className); + } }; /* Remove a class from a given element */ Focus.removeClass = function removeAClassFromAGivenElement(element, className) { - const el = element; - if (el.classList) { - el.classList.remove(className); - } + const el = element; + if (el.classList) { + el.classList.remove(className); + } }; Focus.prototype.slideDown = function slideDown() { - const el = this.element; - // Display none - const defaultDisplay = this.element.style.display; - - el.style.display = 'block'; - el.style.overflow = 'visible'; - el.style.maxHeight = '100%'; - // Declare the value of "height" variable - this.maxHeight = el.offsetHeight; - el.style.display = defaultDisplay; - this.height = el.offsetHeight; - // Declare the value of "counter" variable - this.counter = this.height; - el.style.maxHeight = `${this.height}px`; - el.style.overflow = 'hidden'; - el.style.display = 'block'; - - const adder = this.maxHeight / 100; - // Iteratively increase the height - this.interval = setInterval(() => { - this.counter += adder; - if (this.counter < this.maxHeight) { - el.style.maxHeight = `${this.counter}px`; - } else { - el.style.maxHeight = null; - el.style.overflow = null; - this.height = this.element.offsetHeight; - clearInterval(this.interval); - } - }, this.settings.slideSpeed / 100); + const el = this.element; + // Display none + const defaultDisplay = this.element.style.display; + + el.style.display = 'block'; + el.style.overflow = 'visible'; + el.style.maxHeight = '100%'; + // Declare the value of "height" variable + this.maxHeight = el.offsetHeight; + el.style.display = defaultDisplay; + this.height = el.offsetHeight; + // Declare the value of "counter" variable + this.counter = this.height; + el.style.maxHeight = `${this.height}px`; + el.style.overflow = 'hidden'; + el.style.display = 'block'; + + const adder = this.maxHeight / 100; + // Iteratively increase the height + this.interval = setInterval(() => { + this.counter += adder; + if (this.counter < this.maxHeight) { + el.style.maxHeight = `${this.counter}px`; + } else { + el.style.maxHeight = null; + el.style.overflow = null; + this.height = this.element.offsetHeight; + clearInterval(this.interval); + } + }, this.settings.slideSpeed / 100); }; Focus.prototype.slideUp = function slideUp() { - const el = this.element; - const subtractor = this.maxHeight / 100; - // To hide the content of the element - el.style.overflow = 'hidden'; - - // Decreasing the height - this.interval = setInterval(() => { - this.counter -= subtractor; - if (this.counter > 0) { - el.style.maxHeight = `${this.counter}px`; - } else { - el.style.maxHeight = null; - el.style.display = 'none'; - el.style.overflow = null; - - clearInterval(this.interval); - } - }, this.settings.slideSpeed / 100); + const el = this.element; + const subtractor = this.maxHeight / 100; + // To hide the content of the element + el.style.overflow = 'hidden'; + + // Decreasing the height + this.interval = setInterval(() => { + this.counter -= subtractor; + if (this.counter > 0) { + el.style.maxHeight = `${this.counter}px`; + } else { + el.style.maxHeight = null; + el.style.display = 'none'; + el.style.overflow = null; + + clearInterval(this.interval); + } + }, this.settings.slideSpeed / 100); }; /* Show the popup element */ Focus.prototype.show = function showTheElement() { - // Check if the element is visible or not. - if (!this.visible || !this.element.classList.contains(this.settings.visibleClass)) { - // Add the class to the trigger button if one is defined. - if (this.settings.triggerClass) { - const triggerElement = document.querySelector(`[data-target="${this.target}"]`); - Focus.addClass(triggerElement, this.settings.triggerClass); - } - // If slide is set to true slide the element down. - if (this.settings.slide) { - this.slideDown(this.settings.slideDuration); + // Check if the element is visible or not. + if (!this.visible || !this.element.classList.contains(this.settings.visibleClass)) { + // Add the class to the trigger button if one is defined. + if (this.settings.triggerClass) { + const triggerElement = document.querySelector(`[data-target="${this.target}"]`); + Focus.addClass(triggerElement, this.settings.triggerClass); + } + // If slide is set to true slide the element down. + if (this.settings.slide) { + this.slideDown(this.settings.slideDuration); + } + // Add the visible class to the popup + Focus.addClass(this.element, this.settings.visibleClass); + // Add the body class to the body + Focus.addClass(document.body, this.settings.bodyClass); + // Define that this element is visible + this.visible = true; + + // Focus on an input field once the modal has opened + const focusEl = document.querySelector(`${this.target} ${this.settings.autoFocusSelector}`); + if (focusEl) { + setTimeout(() => { + focusEl.focus(); + }, 300); + } + + if (this.closeElement) { + // When someone clicks the [data-close] button then we should close the modal + this.closeElement.removeEventListener('click', this.boundCloseEvent); + this.closeElement.addEventListener('click', this.boundCloseEvent); + } + + if (this.innerElement) { + // When someone clicks on the inner class hide the popup + this.innerElement.removeEventListener('click', this.boundCloseEvent); + this.innerElement.addEventListener('click', this.boundCloseEvent); + } + + // When someone presses esc hide the popup and unbind the event listener + this.element.removeEventListener('keyup', this.boundEscListener); + this.element.addEventListener('keyup', this.boundEscListener); + + // Fire the success callback + if (this.settings.showCallback && typeof this.settings.showCallback === 'function') { + this.settings.showCallback(this); + } + } else if (this.settings.error && typeof this.settings.error === 'function') { + this.settings.error('Focus: Error this element is already visible', this); } - // Add the visible class to the popup - Focus.addClass(this.element, this.settings.visibleClass); - // Add the body class to the body - Focus.addClass(document.body, this.settings.bodyClass); - // Define that this element is visible - this.visible = true; - - // Focus on an input field once the modal has opened - const focusEl = document.querySelector(`${this.target} ${this.settings.autoFocusSelector}`); - if (focusEl) { - setTimeout(() => { - focusEl.focus(); - }, 300); - } - - if (this.closeElement) { - // When someone clicks the [data-close] button then we should close the modal - this.closeElement.addEventListener('click', Focus.closeEvent.bind(this)); - } - - if (this.innerElement) { - // When someone clicks on the inner class hide the popup - this.innerElement.addEventListener('click', Focus.closeEvent.bind(this)); - } - - // When someone presses esc hide the popup and unbind the event listener - this.element.addEventListener('keyup', Focus.escEvent.bind(this)); - - // Fire the success callback - if (this.settings.showCallback && typeof this.settings.showCallback === 'function') { - this.settings.showCallback(this); - } - } else if (this.settings.error && typeof this.settings.error === 'function') { - this.settings.error('Focus: Error this element is already visible', this); - } - // Return this so that we can chain functions together - return this; + // Return this so that we can chain functions together + return this; }; Focus.prototype.hide = function hideTheElement() { - if (this.visible || this.element.classList.contains(this.settings.visibleClass)) { - Focus.removeClass(this.element, this.settings.visibleClass); - - if (this.settings.triggerClass) { - const triggerElement = document.querySelector(`[data-target="${this.target}"]`); - Focus.removeClass(triggerElement, this.settings.triggerClass); - } - if (this.settings.slide) { - this.slideUp(this.settings.slideDuration); - } - Focus.removeClass(document.body, this.settings.bodyClass); - - // When someone clicks the [data-close] button then we should close the modal - if (this.closeElement) { - this.closeElement.removeEventListener('click', Focus.closeEvent); - } - // When someone clicks on the inner class hide the popup - if (this.innerElement) { - this.innerElement.removeEventListener('click', Focus.closeEvent); - } - - this.visible = false; - // Fire the success callback - if (this.settings.hideCallback && typeof this.settings.hideCallback === 'function') { - this.settings.hideCallback(this); + if (this.visible || this.element.classList.contains(this.settings.visibleClass)) { + Focus.removeClass(this.element, this.settings.visibleClass); + + if (this.settings.triggerClass) { + const triggerElement = document.querySelector(`[data-target="${this.target}"]`); + Focus.removeClass(triggerElement, this.settings.triggerClass); + } + if (this.settings.slide) { + this.slideUp(this.settings.slideDuration); + } + Focus.removeClass(document.body, this.settings.bodyClass); + + // When someone clicks the [data-close] button then we should close the modal + if (this.closeElement) { + this.closeElement.removeEventListener('click', Focus.closeEvent); + } + // When someone clicks on the inner class hide the popup + if (this.innerElement) { + this.innerElement.removeEventListener('click', Focus.closeEvent); + } + + this.visible = false; + // Fire the success callback + if (this.settings.hideCallback && typeof this.settings.hideCallback === 'function') { + this.settings.hideCallback(this); + } + } else if (this.settings.error && typeof this.settings.error === 'function') { + this.settings.error('Focus: Error this element is already hidden', this); } - } else if (this.settings.error && typeof this.settings.error === 'function') { - this.settings.error('Focus: Error this element is already hidden', this); - } - return this; + return this; }; /* Show if hidden, hide if shown. */ Focus.prototype.toggle = function toggleFocusVisibility() { - if (this.visible) { - this.hide(); - } else { - this.show(); - } - return this; + if (this.visible) { + this.hide(); + } else { + this.show(); + } + return this; }; /* Move the element to the end of the body, sometime useful for popups. */ Focus.prototype.detach = function moveTheElementToTheEndOfTheBody() { - document.body.appendChild(this.element); - return this; + document.body.appendChild(this.element); + return this; }; // Create event listeners for all triggers and closes on DOMContentLoaded