Comparing version 2.0.1 to 2.0.2
# Change Log | ||
## Dom7 v2.0.2 - Released on February 10, 2018 | ||
* Added `ssr-window` dependency to throw less errors in SSR environment | ||
## Dom7 v2.0.1 - Released on October 2, 2017 | ||
@@ -4,0 +7,0 @@ * Modular version `dom7.modular.js` is more modular now and exports every method separately. |
177
dist/dom7.js
/** | ||
* Dom7 2.0.1 | ||
* Dom7 2.0.2 | ||
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API | ||
* http://framework7.io/docs/dom.html | ||
* | ||
* Copyright 2017, Vladimir Kharlampidi | ||
* Copyright 2018, Vladimir Kharlampidi | ||
* The iDangero.us | ||
@@ -12,3 +12,3 @@ * http://www.idangero.us/ | ||
* | ||
* Released on: October 2, 2017 | ||
* Released on: February 10, 2018 | ||
*/ | ||
@@ -21,2 +21,91 @@ (function (global, factory) { | ||
/** | ||
* SSR Window 1.0.0 | ||
* Better handling for window object in SSR environment | ||
* https://github.com/nolimits4web/ssr-window | ||
* | ||
* Copyright 2018, Vladimir Kharlampidi | ||
* | ||
* Licensed under MIT | ||
* | ||
* Released on: February 10, 2018 | ||
*/ | ||
var d; | ||
if (typeof document === 'undefined') { | ||
d = { | ||
body: {}, | ||
addEventListener: function addEventListener() {}, | ||
removeEventListener: function removeEventListener() {}, | ||
activeElement: { | ||
blur: function blur() {}, | ||
nodeName: '', | ||
}, | ||
querySelector: function querySelector() { | ||
return null; | ||
}, | ||
querySelectorAll: function querySelectorAll() { | ||
return []; | ||
}, | ||
getElementById: function getElementById() { | ||
return null; | ||
}, | ||
createEvent: function createEvent() { | ||
return { | ||
initEvent: function initEvent() {}, | ||
}; | ||
}, | ||
createElement: function createElement() { | ||
return { | ||
children: [], | ||
childNodes: [], | ||
style: {}, | ||
setAttribute: function setAttribute() {}, | ||
getElementsByTagName: function getElementsByTagName() { | ||
return []; | ||
}, | ||
}; | ||
}, | ||
location: { hash: '' }, | ||
}; | ||
} else { | ||
// eslint-disable-next-line | ||
d = document; | ||
} | ||
var doc = d; | ||
var w; | ||
if (typeof window === 'undefined') { | ||
w = { | ||
document: doc, | ||
navigator: { | ||
userAgent: '', | ||
}, | ||
location: {}, | ||
history: {}, | ||
CustomEvent: function CustomEvent() { | ||
return this; | ||
}, | ||
addEventListener: function addEventListener() {}, | ||
removeEventListener: function removeEventListener() {}, | ||
getComputedStyle: function getComputedStyle() { | ||
return { | ||
getPropertyValue: function getPropertyValue() { | ||
return ''; | ||
}, | ||
}; | ||
}, | ||
Image: function Image() {}, | ||
Date: function Date() {}, | ||
screen: {}, | ||
setTimeout: function setTimeout() {}, | ||
clearTimeout: function clearTimeout() {}, | ||
}; | ||
} else { | ||
// eslint-disable-next-line | ||
w = window; | ||
} | ||
var win = w; | ||
var Dom7 = function Dom7(arr) { | ||
@@ -54,3 +143,3 @@ var self = this; | ||
if (html.indexOf('<option') === 0) { toCreate = 'select'; } | ||
tempParent = document.createElement(toCreate); | ||
tempParent = doc.createElement(toCreate); | ||
tempParent.innerHTML = html; | ||
@@ -63,6 +152,6 @@ for (i = 0; i < tempParent.childNodes.length; i += 1) { | ||
// Pure ID selector | ||
els = [document.getElementById(selector.trim().split('#')[1])]; | ||
els = [doc.getElementById(selector.trim().split('#')[1])]; | ||
} else { | ||
// Other selectors | ||
els = (context || document).querySelectorAll(selector.trim()); | ||
els = (context || doc).querySelectorAll(selector.trim()); | ||
} | ||
@@ -73,3 +162,3 @@ for (i = 0; i < els.length; i += 1) { | ||
} | ||
} else if (selector.nodeType || selector === window || selector === document) { | ||
} else if (selector.nodeType || selector === win || selector === doc) { | ||
// Node/element | ||
@@ -103,10 +192,10 @@ arr.push(selector); | ||
function requestAnimationFrame(callback) { | ||
if (window.requestAnimationFrame) { return window.requestAnimationFrame(callback); } | ||
else if (window.webkitRequestAnimationFrame) { return window.webkitRequestAnimationFrame(callback); } | ||
return window.setTimeout(callback, 1000 / 60); | ||
if (win.requestAnimationFrame) { return win.requestAnimationFrame(callback); } | ||
else if (win.webkitRequestAnimationFrame) { return win.webkitRequestAnimationFrame(callback); } | ||
return win.setTimeout(callback, 1000 / 60); | ||
} | ||
function cancelAnimationFrame(id) { | ||
if (window.cancelAnimationFrame) { return window.cancelAnimationFrame(id); } | ||
else if (window.webkitCancelAnimationFrame) { return window.webkitCancelAnimationFrame(id); } | ||
return window.clearTimeout(id); | ||
if (win.cancelAnimationFrame) { return win.cancelAnimationFrame(id); } | ||
else if (win.webkitCancelAnimationFrame) { return win.webkitCancelAnimationFrame(id); } | ||
return win.clearTimeout(id); | ||
} | ||
@@ -331,5 +420,6 @@ | ||
var this$1 = this; | ||
var assign; | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var eventType = args[0]; | ||
@@ -340,3 +430,2 @@ var targetSelector = args[1]; | ||
if (typeof args[1] === 'function') { | ||
var assign; | ||
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]); | ||
@@ -396,5 +485,6 @@ targetSelector = undefined; | ||
var this$1 = this; | ||
var assign; | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var eventType = args[0]; | ||
@@ -405,3 +495,2 @@ var targetSelector = args[1]; | ||
if (typeof args[1] === 'function') { | ||
var assign; | ||
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]); | ||
@@ -444,5 +533,6 @@ targetSelector = undefined; | ||
function once() { | ||
var assign; | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var dom = this; | ||
@@ -454,3 +544,2 @@ var eventName = args[0]; | ||
if (typeof args[1] === 'function') { | ||
var assign; | ||
(assign = args, eventName = assign[0], listener = assign[1], capture = assign[2]); | ||
@@ -477,3 +566,3 @@ targetSelector = undefined; | ||
try { | ||
evt = new window.CustomEvent(events[i], { | ||
evt = new win.CustomEvent(events[i], { | ||
detail: eventData, | ||
@@ -484,3 +573,3 @@ bubbles: true, | ||
} catch (e) { | ||
evt = document.createEvent('Event'); | ||
evt = doc.createEvent('Event'); | ||
evt.initEvent(events[i], true, true); | ||
@@ -537,4 +626,4 @@ evt.detail = eventData; | ||
function width() { | ||
if (this[0] === window) { | ||
return window.innerWidth; | ||
if (this[0] === win) { | ||
return win.innerWidth; | ||
} | ||
@@ -560,4 +649,4 @@ | ||
function height() { | ||
if (this[0] === window) { | ||
return window.innerHeight; | ||
if (this[0] === win) { | ||
return win.innerHeight; | ||
} | ||
@@ -586,7 +675,7 @@ | ||
var box = el.getBoundingClientRect(); | ||
var body = document.body; | ||
var body = doc.body; | ||
var clientTop = el.clientTop || body.clientTop || 0; | ||
var clientLeft = el.clientLeft || body.clientLeft || 0; | ||
var scrollTop = el === window ? window.scrollY : el.scrollTop; | ||
var scrollLeft = el === window ? window.scrollX : el.scrollLeft; | ||
var scrollTop = el === win ? win.scrollY : el.scrollTop; | ||
var scrollLeft = el === win ? win.scrollX : el.scrollLeft; | ||
return { | ||
@@ -616,3 +705,3 @@ top: (box.top + scrollTop) - clientTop, | ||
} | ||
if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') { | ||
if (win.getComputedStyle(el, null).getPropertyValue('display') === 'none') { | ||
// Still not visible | ||
@@ -625,3 +714,3 @@ el.style.display = 'block'; | ||
function styles() { | ||
if (this[0]) { return window.getComputedStyle(this[0], null); } | ||
if (this[0]) { return win.getComputedStyle(this[0], null); } | ||
return {}; | ||
@@ -635,3 +724,3 @@ } | ||
if (typeof props === 'string') { | ||
if (this[0]) { return window.getComputedStyle(this[0], null).getPropertyValue(props); } | ||
if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); } | ||
} else { | ||
@@ -759,4 +848,4 @@ for (i = 0; i < this.length; i += 1) { | ||
return false; | ||
} else if (selector === document) { return el === document; } | ||
else if (selector === window) { return el === window; } | ||
} else if (selector === doc) { return el === doc; } | ||
else if (selector === win) { return el === win; } | ||
@@ -819,3 +908,3 @@ if (selector.nodeType || selector instanceof Dom7) { | ||
if (typeof newChild === 'string') { | ||
var tempDiv = document.createElement('div'); | ||
var tempDiv = doc.createElement('div'); | ||
tempDiv.innerHTML = newChild; | ||
@@ -849,3 +938,3 @@ while (tempDiv.firstChild) { | ||
if (typeof newChild === 'string') { | ||
var tempDiv = document.createElement('div'); | ||
var tempDiv = doc.createElement('div'); | ||
tempDiv.innerHTML = newChild; | ||
@@ -1137,5 +1226,6 @@ for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { | ||
function scrollTo() { | ||
var assign; | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var left = args[0]; | ||
@@ -1148,3 +1238,2 @@ var top = args[1]; | ||
callback = easing; | ||
var assign; | ||
(assign = args, left = assign[0], top = assign[1], duration = assign[2], callback = assign[3], easing = assign[4]); | ||
@@ -1234,5 +1323,6 @@ } | ||
function scrollTop() { | ||
var assign; | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var top = args[0]; | ||
@@ -1243,3 +1333,2 @@ var duration = args[1]; | ||
if (args.length === 3 && typeof easing === 'function') { | ||
var assign; | ||
(assign = args, top = assign[0], duration = assign[1], callback = assign[2], easing = assign[3]); | ||
@@ -1255,5 +1344,6 @@ } | ||
function scrollLeft() { | ||
var assign; | ||
var args = [], len = arguments.length; | ||
while ( len-- ) args[ len ] = arguments[ len ]; | ||
var left = args[0]; | ||
@@ -1264,3 +1354,2 @@ var duration = args[1]; | ||
if (args.length === 3 && typeof easing === 'function') { | ||
var assign; | ||
(assign = args, left = assign[0], duration = assign[1], callback = assign[2], easing = assign[3]); | ||
@@ -1356,3 +1445,3 @@ } | ||
Object.keys(props).forEach(function (prop) { | ||
initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); | ||
initialFullValue = win.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); | ||
initialValue = parseFloat(initialFullValue); | ||
@@ -1485,5 +1574,6 @@ unit = initialFullValue.replace(initialValue, ''); | ||
var this$1 = this; | ||
var ref; | ||
var args = [], len = arguments.length - 1; | ||
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; | ||
if (typeof args[0] === 'undefined') { | ||
@@ -1501,3 +1591,2 @@ for (var i = 0; i < this.length; i += 1) { | ||
return (ref = this).on.apply(ref, [ name ].concat( args )); | ||
var ref; | ||
} | ||
@@ -1504,0 +1593,0 @@ |
/** | ||
* Dom7 2.0.1 | ||
* Dom7 2.0.2 | ||
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API | ||
* http://framework7.io/docs/dom.html | ||
* | ||
* Copyright 2017, Vladimir Kharlampidi | ||
* Copyright 2018, Vladimir Kharlampidi | ||
* The iDangero.us | ||
@@ -12,4 +12,4 @@ * http://www.idangero.us/ | ||
* | ||
* Released on: October 2, 2017 | ||
*/!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Dom7=e()}(this,function(){"use strict";function t(t,e){var n=[],i=0;if(t&&!e&&t instanceof Pt)return t;if(t)if("string"==typeof t){var r,o,s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var a="div";for(0===s.indexOf("<li")&&(a="ul"),0===s.indexOf("<tr")&&(a="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(a="tr"),0===s.indexOf("<tbody")&&(a="table"),0===s.indexOf("<option")&&(a="select"),o=document.createElement(a),o.innerHTML=s,i=0;i<o.childNodes.length;i+=1)n.push(o.childNodes[i])}else for(r=e||"#"!==t[0]||t.match(/[ .<>:~]/)?(e||document).querySelectorAll(t.trim()):[document.getElementById(t.trim().split("#")[1])],i=0;i<r.length;i+=1)r[i]&&n.push(r[i])}else if(t.nodeType||t===window||t===document)n.push(t);else if(t.length>0&&t[0].nodeType)for(i=0;i<t.length;i+=1)n.push(t[i]);return new Pt(n)}function e(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}function n(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function i(t){return window.requestAnimationFrame?window.requestAnimationFrame(t):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(t):window.setTimeout(t,1e3/60)}function r(t){return window.cancelAnimationFrame?window.cancelAnimationFrame(t):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(t):window.clearTimeout(t)}function o(t){var e=this;if(void 0===t)return this;for(var n=t.split(" "),i=0;i<n.length;i+=1)for(var r=0;r<this.length;r+=1)void 0!==e[r].classList&&e[r].classList.add(n[i]);return this}function s(t){for(var e=this,n=t.split(" "),i=0;i<n.length;i+=1)for(var r=0;r<this.length;r+=1)void 0!==e[r].classList&&e[r].classList.remove(n[i]);return this}function a(t){return!!this[0]&&this[0].classList.contains(t)}function l(t){for(var e=this,n=t.split(" "),i=0;i<n.length;i+=1)for(var r=0;r<this.length;r+=1)void 0!==e[r].classList&&e[r].classList.toggle(n[i]);return this}function h(t,e){var n=arguments,i=this;if(1!==arguments.length||"string"!=typeof t){for(var r=0;r<this.length;r+=1)if(2===n.length)i[r].setAttribute(t,e);else for(var o in t)i[r][o]=t[o],i[r].setAttribute(o,t[o]);return this}if(this[0])return this[0].getAttribute(t)}function f(t){for(var e=this,n=0;n<this.length;n+=1)e[n].removeAttribute(t);return this}function u(t,e){var n=arguments,i=this;if(1!==arguments.length||"string"!=typeof t){for(var r=0;r<this.length;r+=1)if(2===n.length)i[r][t]=e;else for(var o in t)i[r][o]=t[o];return this}if(this[0])return this[0][t]}function c(t,e){var n,i=this;if(void 0!==e){for(var r=0;r<this.length;r+=1)n=i[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this}if(n=this[0]){if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];var o=n.getAttribute("data-"+t);if(o)return o}else;}function d(t){for(var e=this,n=0;n<this.length;n+=1){var i=e[n];i.dom7ElementDataStorage&&i.dom7ElementDataStorage[t]&&(i.dom7ElementDataStorage[t]=null,delete i.dom7ElementDataStorage[t])}}function v(){var t=this[0];if(t){var e={};if(t.dataset)for(var i in t.dataset)e[i]=t.dataset[i];else for(var r=0;r<t.attributes.length;r+=1){var o=t.attributes[r];o.name.indexOf("data-")>=0&&(e[n(o.name.split("data-")[1])]=o.value)}for(var s in e)"false"===e[s]?e[s]=!1:"true"===e[s]?e[s]=!0:parseFloat(e[s])===1*e[s]&&(e[s]*=1);return e}}function p(t){var e=this;{if(void 0!==t){for(var n=0;n<this.length;n+=1)e[n].value=t;return this}if(this[0]){if(this[0].multiple&&"select"===this[0].nodeName.toLowerCase()){for(var i=[],r=0;r<this[0].selectedOptions.length;r+=1)i.push(e[0].selectedOptions[r].value);return i}return this[0].value}}}function g(t){for(var e=this,n=0;n<this.length;n+=1){var i=e[n].style;i.webkitTransform=t,i.transform=t}return this}function m(t){var e=this;"string"!=typeof t&&(t+="ms");for(var n=0;n<this.length;n+=1){var i=e[n].style;i.webkitTransitionDuration=t,i.transitionDuration=t}return this}function y(){function e(e){var n=e.target;if(n){var i=e.target.dom7EventData||[];if(i.unshift(e),t(n).is(a))l.apply(n,i);else for(var r=t(n).parents(),o=0;o<r.length;o+=1)t(r[o]).is(a)&&l.apply(r[o],i)}}function n(t){var e=t&&t.target?t.target.dom7EventData||[]:[];e.unshift(t),l.apply(this,e)}for(var i=this,r=[],o=arguments.length;o--;)r[o]=arguments[o];var s=r[0],a=r[1],l=r[2],h=r[3];if("function"==typeof r[1]){var f;f=r,s=f[0],l=f[1],h=f[2],a=void 0}h||(h=!1);for(var u,c=s.split(" "),d=0;d<this.length;d+=1){var v=i[d];if(a)for(u=0;u<c.length;u+=1)v.dom7LiveListeners||(v.dom7LiveListeners=[]),v.dom7LiveListeners.push({type:s,listener:l,proxyListener:e}),v.addEventListener(c[u],e,h);else for(u=0;u<c.length;u+=1)v.dom7Listeners||(v.dom7Listeners=[]),v.dom7Listeners.push({type:s,listener:l,proxyListener:n}),v.addEventListener(c[u],n,h)}return this}function w(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];if("function"==typeof e[1]){var a;a=e,i=a[0],o=a[1],s=a[2],r=void 0}s||(s=!1);for(var l=i.split(" "),h=0;h<l.length;h+=1)for(var f=0;f<this.length;f+=1){var u=t[f];if(r){if(u.dom7LiveListeners)for(var c=0;c<u.dom7LiveListeners.length;c+=1)o?u.dom7LiveListeners[c].listener===o&&u.removeEventListener(l[h],u.dom7LiveListeners[c].proxyListener,s):u.dom7LiveListeners[c].type===l[h]&&u.removeEventListener(l[h],u.dom7LiveListeners[c].proxyListener,s)}else if(u.dom7Listeners)for(var d=0;d<u.dom7Listeners.length;d+=1)o?u.dom7Listeners[d].listener===o&&u.removeEventListener(l[h],u.dom7Listeners[d].proxyListener,s):u.dom7Listeners[d].type===l[h]&&u.removeEventListener(l[h],u.dom7Listeners[d].proxyListener,s)}return this}function b(){function t(e){var n=e.target.dom7EventData||[];s.apply(this,n),i.off(r,o,t,a)}for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=this,r=e[0],o=e[1],s=e[2],a=e[3];if("function"==typeof e[1]){var l;l=e,r=l[0],s=l[1],a=l[2],o=void 0}return i.on(r,o,t,a)}function L(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var i=e[0].split(" "),r=e[1],o=0;o<i.length;o+=1)for(var s=0;s<this.length;s+=1){var a=void 0;try{a=new window.CustomEvent(i[o],{detail:r,bubbles:!0,cancelable:!0})}catch(t){a=document.createEvent("Event"),a.initEvent(i[o],!0,!0),a.detail=r}t[s].dom7EventData=e.filter(function(t,e){return e>0}),t[s].dispatchEvent(a),t[s].dom7EventData=[],delete t[s].dom7EventData}return this}function E(t){function e(o){if(o.target===this)for(t.call(this,o),n=0;n<i.length;n+=1)r.off(i[n],e)}var n,i=["webkitTransitionEnd","transitionend"],r=this;if(t)for(n=0;n<i.length;n+=1)r.on(i[n],e);return this}function x(t){function e(o){if(o.target===this)for(t.call(this,o),n=0;n<i.length;n+=1)r.off(i[n],e)}var n,i=["webkitAnimationEnd","animationend"],r=this;if(t)for(n=0;n<i.length;n+=1)r.on(i[n],e);return this}function S(){return this[0]===window?window.innerWidth:this.length>0?parseFloat(this.css("width")):null}function T(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function A(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null}function N(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function C(){if(this.length>0){var t=this[0],e=t.getBoundingClientRect(),n=document.body,i=t.clientTop||n.clientTop||0,r=t.clientLeft||n.clientLeft||0,o=t===window?window.scrollY:t.scrollTop,s=t===window?window.scrollX:t.scrollLeft;return{top:e.top+o-i,left:e.left+s-r}}return null}function k(){for(var t=this,e=0;e<this.length;e+=1)t[e].style.display="none";return this}function D(){for(var t=this,e=0;e<this.length;e+=1){var n=t[e];"none"===n.style.display&&(n.style.display=""),"none"===window.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function M(){return this[0]?window.getComputedStyle(this[0],null):{}}function O(t,e){var n,i=this;if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(var r in t)i[n].style[r]=t[r];return this}if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)i[n].style[t]=e;return this}return this}function F(){for(var t=this,e=[],n=0;n<this.length;n+=1)e.push(t[n]);return e}function I(t){var e=this;if(!t)return this;for(var n=0;n<this.length;n+=1)if(!1===t.call(e[n],n,e[n]))return e;return this}function V(t){var e=this;if(!t)return this;for(var n=0;n<this.length;n+=1)if(!1===t.call(e[n],e[n],n))return e;return this}function q(t){for(var e=[],n=this,i=0;i<n.length;i+=1)t.call(n[i],i,n[i])&&e.push(n[i]);return new Pt(e)}function H(t){for(var e=[],n=this,i=0;i<n.length;i+=1)e.push(t.call(n[i],i,n[i]));return new Pt(e)}function P(t){var e=this;if(void 0===t)return this[0]?this[0].innerHTML:void 0;for(var n=0;n<this.length;n+=1)e[n].innerHTML=t;return this}function B(t){var e=this;if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var n=0;n<this.length;n+=1)e[n].textContent=t;return this}function j(e){var n,i,r=this[0];if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(n=t(e),i=0;i<n.length;i+=1)if(n[i]===r)return!0;return!1}if(e===document)return r===document;if(e===window)return r===window;if(e.nodeType||e instanceof Pt){for(n=e.nodeType?[e]:e,i=0;i<n.length;i+=1)if(n[i]===r)return!0;return!1}return!1}function z(t){for(var e=this,n=0;n<this.length;n+=1)if(e[n]===t)return n;return-1}function W(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}}function R(t){if(void 0===t)return this;var e,n=this.length;return t>n-1?new Pt([]):t<0?(e=n+t,new Pt(e<0?[]:[this[e]])):new Pt([this[t]])}function U(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var i,r=0;r<e.length;r+=1){i=e[r];for(var o=0;o<this.length;o+=1)if("string"==typeof i){var s=document.createElement("div");for(s.innerHTML=i;s.firstChild;)t[o].appendChild(s.firstChild)}else if(i instanceof Pt)for(var a=0;a<i.length;a+=1)t[o].appendChild(i[a]);else t[o].appendChild(i)}return this}function X(e){return t(e).append(this),this}function Y(t){var e,n,i=this;for(e=0;e<this.length;e+=1)if("string"==typeof t){var r=document.createElement("div");for(r.innerHTML=t,n=r.childNodes.length-1;n>=0;n-=1)i[e].insertBefore(r.childNodes[n],i[e].childNodes[0])}else if(t instanceof Pt)for(n=0;n<t.length;n+=1)i[e].insertBefore(t[n],i[e].childNodes[0]);else i[e].insertBefore(t,i[e].childNodes[0]);return this}function G(e){return t(e).prepend(this),this}function J(e){for(var n=this,i=t(e),r=0;r<this.length;r+=1)if(1===i.length)i[0].parentNode.insertBefore(n[r],i[0]);else if(i.length>1)for(var o=0;o<i.length;o+=1)i[o].parentNode.insertBefore(n[r].cloneNode(!0),i[o])}function K(e){for(var n=this,i=t(e),r=0;r<this.length;r+=1)if(1===i.length)i[0].parentNode.insertBefore(n[r],i[0].nextSibling);else if(i.length>1)for(var o=0;o<i.length;o+=1)i[o].parentNode.insertBefore(n[r].cloneNode(!0),i[o].nextSibling)}function Q(e){return new Pt(this.length>0?e?this[0].nextElementSibling&&t(this[0].nextElementSibling).is(e)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])}function Z(e){var n=[],i=this[0];if(!i)return new Pt([]);for(;i.nextElementSibling;){var r=i.nextElementSibling;e?t(r).is(e)&&n.push(r):n.push(r),i=r}return new Pt(n)}function $(e){if(this.length>0){var n=this[0];return new Pt(e?n.previousElementSibling&&t(n.previousElementSibling).is(e)?[n.previousElementSibling]:[]:n.previousElementSibling?[n.previousElementSibling]:[])}return new Pt([])}function _(e){var n=[],i=this[0];if(!i)return new Pt([]);for(;i.previousElementSibling;){var r=i.previousElementSibling;e?t(r).is(e)&&n.push(r):n.push(r),i=r}return new Pt(n)}function tt(t){return this.nextAll(t).add(this.prevAll(t))}function et(n){for(var i=this,r=[],o=0;o<this.length;o+=1)null!==i[o].parentNode&&(n?t(i[o].parentNode).is(n)&&r.push(i[o].parentNode):r.push(i[o].parentNode));return t(e(r))}function nt(n){for(var i=this,r=[],o=0;o<this.length;o+=1)for(var s=i[o].parentNode;s;)n?t(s).is(n)&&r.push(s):r.push(s),s=s.parentNode;return t(e(r))}function it(t){var e=this;return void 0===t?new Pt([]):(e.is(t)||(e=e.parents(t).eq(0)),e)}function rt(t){for(var e=this,n=[],i=0;i<this.length;i+=1)for(var r=e[i].querySelectorAll(t),o=0;o<r.length;o+=1)n.push(r[o]);return new Pt(n)}function ot(n){for(var i=this,r=[],o=0;o<this.length;o+=1)for(var s=i[o].childNodes,a=0;a<s.length;a+=1)n?1===s[a].nodeType&&t(s[a]).is(n)&&r.push(s[a]):1===s[a].nodeType&&r.push(s[a]);return new Pt(e(r))}function st(){for(var t=this,e=0;e<this.length;e+=1)t[e].parentNode&&t[e].parentNode.removeChild(t[e]);return this}function at(){return this.remove()}function lt(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var i,r,o=this;for(i=0;i<e.length;i+=1){var s=t(e[i]);for(r=0;r<s.length;r+=1)o[o.length]=s[r],o.length+=1}return o}function ht(){for(var t=this,e=0;e<this.length;e+=1){var n=t[e];if(1===n.nodeType){for(var i=0;i<n.childNodes.length;i+=1)n.childNodes[i].parentNode&&n.childNodes[i].parentNode.removeChild(n.childNodes[i]);n.textContent=""}}return this}function ft(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=t[0],r=t[1],o=t[2],s=t[3],a=t[4];if(4===t.length&&"function"==typeof s){a=s;var l;l=t,n=l[0],r=l[1],o=l[2],a=l[3],s=l[4]}return void 0===s&&(s="swing"),this.each(function(){function t(n){void 0===n&&(n=(new Date).getTime()),null===y&&(y=n);var r,h=Math.max(Math.min((n-y)/o,1),0),f="linear"===s?h:.5-Math.cos(h*Math.PI)/2;if(g&&(d=e+f*(u-e)),m&&(v=l+f*(c-l)),g&&u>e&&d>=u&&(p.scrollTop=u,r=!0),g&&u<e&&d<=u&&(p.scrollTop=u,r=!0),m&&c>l&&v>=c&&(p.scrollLeft=c,r=!0),m&&c<l&&v<=c&&(p.scrollLeft=c,r=!0),r)return void(a&&a());g&&(p.scrollTop=d),m&&(p.scrollLeft=v),i(t)}var e,l,h,f,u,c,d,v,p=this,g=r>0||0===r,m=n>0||0===n;if(void 0===s&&(s="swing"),g&&(e=p.scrollTop,o||(p.scrollTop=r)),m&&(l=p.scrollLeft,o||(p.scrollLeft=n)),o){g&&(h=p.scrollHeight-p.offsetHeight,u=Math.max(Math.min(r,h),0)),m&&(f=p.scrollWidth-p.offsetWidth,c=Math.max(Math.min(n,f),0));var y=null;g&&u===e&&(g=!1),m&&c===l&&(m=!1),i(t)}})}function ut(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=t[0],i=t[1],r=t[2],o=t[3];if(3===t.length&&"function"==typeof r){var s;s=t,n=s[0],i=s[1],o=s[2],r=s[3]}var a=this;return void 0===n?a.length>0?a[0].scrollTop:null:a.scrollTo(void 0,n,i,r,o)}function ct(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=t[0],i=t[1],r=t[2],o=t[3];if(3===t.length&&"function"==typeof r){var s;s=t,n=s[0],i=s[1],o=s[2],r=s[3]}var a=this;return void 0===n?a.length>0?a[0].scrollLeft:null:a.scrollTo(n,void 0,i,r,o)}function dt(e,n){var o=this,s={props:t.extend({},e),params:t.extend({duration:300,easing:"swing"},n),elements:o,animating:!1,que:[],easingProgress:function(t,e){return"swing"===t?.5-Math.cos(e*Math.PI)/2:"function"==typeof t?t(e):e},stop:function(){s.frameId&&r(s.frameId),s.animating=!1,s.elements.each(function(t,e){delete e.dom7AnimateInstance}),s.que=[]},done:function(t){if(s.animating=!1,s.elements.each(function(t,e){delete e.dom7AnimateInstance}),t&&t(o),s.que.length>0){var e=s.que.shift();s.animate(e[0],e[1])}},animate:function(t,e){function n(){a=(new Date).getTime();var d,v;c||(c=!0,e.begin&&e.begin(o)),null===h&&(h=a),e.progress&&e.progress(o,Math.max(Math.min((a-h)/e.duration,1),0),h+e.duration-a<0?0:h+e.duration-a,h),r.forEach(function(n){var i=n;l||i.done||Object.keys(t).forEach(function(n){if(!l&&!i.done){d=Math.max(Math.min((a-h)/e.duration,1),0),v=s.easingProgress(e.easing,d);var o=i[n],c=o.initialValue,p=o.finalValue,g=o.unit;i[n].currentValue=c+v*(p-c);var m=i[n].currentValue;if((p>c&&m>=p||p<c&&m<=p)&&(i.container.style[n]=p+g,u+=1,u===Object.keys(t).length&&(i.done=!0,f+=1),f===r.length&&(l=!0)),l)return void s.done(e.complete);i.container.style[n]=m+g}})}),l||(s.frameId=i(n))}if(s.animating)return s.que.push([t,e]),s;var r=[];s.elements.each(function(e,n){var i,o,a,l,h;n.dom7AnimateInstance||(s.elements[e].dom7AnimateInstance=s),r[e]={container:n},Object.keys(t).forEach(function(s){i=window.getComputedStyle(n,null).getPropertyValue(s).replace(",","."),o=parseFloat(i),a=i.replace(o,""),l=parseFloat(t[s]),h=t[s]+a,r[e][s]={initialFullValue:i,initialValue:o,unit:a,finalValue:l,finalFullValue:h,currentValue:o}})});var a,l,h=null,f=0,u=0,c=!1;return s.animating=!0,s.frameId=i(n),s}};if(0===s.elements.length)return o;for(var a,l=0;l<s.elements.length;l+=1)s.elements[l].dom7AnimateInstance?a=s.elements[l].dom7AnimateInstance:s.elements[l].dom7AnimateInstance=s;return a||(a=s),"stop"===e?a.stop():a.animate(s.props,s.params),o}function vt(){for(var t=this,e=0;e<t.length;e+=1)t[e].dom7AnimateInstance&&t[e].dom7AnimateInstance.stop()}function pt(e){for(var n=this,i=[],r=arguments.length-1;r-- >0;)i[r]=arguments[r+1];if(void 0===i[0]){for(var o=0;o<this.length;o+=1)Wt.indexOf(e)<0&&(e in n[o]?n[o][e]():t(n[o]).trigger(e));return this}return(s=this).on.apply(s,[e].concat(i));var s}function gt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["click"].concat(t))}function mt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["blur"].concat(t))}function yt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["focus"].concat(t))}function wt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["focusin"].concat(t))}function bt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["focusout"].concat(t))}function Lt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["keyup"].concat(t))}function Et(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["keydown"].concat(t))}function xt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["keypress"].concat(t))}function St(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["submit"].concat(t))}function Tt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["change"].concat(t))}function At(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mousedown"].concat(t))}function Nt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mousemove"].concat(t))}function Ct(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseup"].concat(t))}function kt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseenter"].concat(t))}function Dt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseleave"].concat(t))}function Mt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseout"].concat(t))}function Ot(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseover"].concat(t))}function Ft(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["touchstart"].concat(t))}function It(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["touchend"].concat(t))}function Vt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["touchmove"].concat(t))}function qt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["resize"].concat(t))}function Ht(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["scroll"].concat(t))}var Pt=function(t){for(var e=this,n=0;n<t.length;n+=1)e[n]=t[n];return e.length=t.length,this};t.fn=Pt.prototype,t.Class=Pt,t.Dom7=Pt;var Bt=Object.freeze({addClass:o,removeClass:s,hasClass:a,toggleClass:l,attr:h,removeAttr:f,prop:u,data:c,removeData:d,dataset:v,val:p,transform:g,transition:m,on:y,off:w,once:b,trigger:L,transitionEnd:E,animationEnd:x,width:S,outerWidth:T,height:A,outerHeight:N,offset:C,hide:k,show:D,styles:M,css:O,toArray:F,each:I,forEach:V,filter:q,map:H,html:P,text:B,is:j,indexOf:z,index:W,eq:R,append:U,appendTo:X,prepend:Y,prependTo:G,insertBefore:J,insertAfter:K,next:Q,nextAll:Z,prev:$,prevAll:_,siblings:tt,parent:et,parents:nt,closest:it,find:rt,children:ot,remove:st,detach:at,add:lt,empty:ht}),jt=Object.freeze({scrollTo:ft,scrollTop:ut,scrollLeft:ct}),zt=Object.freeze({animate:dt,stop:vt}),Wt="resize scroll".split(" ");return[Bt,jt,zt,Object.freeze({click:gt,blur:mt,focus:yt,focusin:wt,focusout:bt,keyup:Lt,keydown:Et,keypress:xt,submit:St,change:Tt,mousedown:At,mousemove:Nt,mouseup:Ct,mouseenter:kt,mouseleave:Dt,mouseout:Mt,mouseover:Ot,touchstart:Ft,touchend:It,touchmove:Vt,resize:qt,scroll:Ht})].forEach(function(e){Object.keys(e).forEach(function(n){t.fn[n]=e[n]})}),t}); | ||
* Released on: February 10, 2018 | ||
*/!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Dom7=e()}(this,function(){"use strict";var t="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,e="undefined"==typeof window?{document:t,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,n=function(t){for(var e=0;e<t.length;e+=1)this[e]=t[e];return this.length=t.length,this};function i(i,r){var o=[],s=0;if(i&&!r&&i instanceof n)return i;if(i)if("string"==typeof i){var a,l,h=i.trim();if(h.indexOf("<")>=0&&h.indexOf(">")>=0){var u="div";for(0===h.indexOf("<li")&&(u="ul"),0===h.indexOf("<tr")&&(u="tbody"),0!==h.indexOf("<td")&&0!==h.indexOf("<th")||(u="tr"),0===h.indexOf("<tbody")&&(u="table"),0===h.indexOf("<option")&&(u="select"),(l=t.createElement(u)).innerHTML=h,s=0;s<l.childNodes.length;s+=1)o.push(l.childNodes[s])}else for(a=r||"#"!==i[0]||i.match(/[ .<>:~]/)?(r||t).querySelectorAll(i.trim()):[t.getElementById(i.trim().split("#")[1])],s=0;s<a.length;s+=1)a[s]&&o.push(a[s])}else if(i.nodeType||i===e||i===t)o.push(i);else if(i.length>0&&i[0].nodeType)for(s=0;s<i.length;s+=1)o.push(i[s]);return new n(o)}function r(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}function o(t){return e.requestAnimationFrame?e.requestAnimationFrame(t):e.webkitRequestAnimationFrame?e.webkitRequestAnimationFrame(t):e.setTimeout(t,1e3/60)}i.fn=n.prototype,i.Class=n,i.Dom7=n;var s=Object.freeze({addClass:function(t){if(void 0===t)return this;for(var e=t.split(" "),n=0;n<e.length;n+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i].classList&&this[i].classList.add(e[n]);return this},removeClass:function(t){for(var e=t.split(" "),n=0;n<e.length;n+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i].classList&&this[i].classList.remove(e[n]);return this},hasClass:function(t){return!!this[0]&&this[0].classList.contains(t)},toggleClass:function(t){for(var e=t.split(" "),n=0;n<e.length;n+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i].classList&&this[i].classList.toggle(e[n]);return this},attr:function(t,e){var n=arguments;if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var i=0;i<this.length;i+=1)if(2===n.length)this[i].setAttribute(t,e);else for(var r in t)this[i][r]=t[r],this[i].setAttribute(r,t[r]);return this},removeAttr:function(t){for(var e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},prop:function(t,e){var n=arguments;if(1!==arguments.length||"string"!=typeof t){for(var i=0;i<this.length;i+=1)if(2===n.length)this[i][t]=e;else for(var r in t)this[i][r]=t[r];return this}if(this[0])return this[0][t]},data:function(t,e){var n;if(void 0!==e){for(var i=0;i<this.length;i+=1)(n=this[i]).dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this}if(n=this[0]){if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];var r=n.getAttribute("data-"+t);return r||void 0}},removeData:function(t){for(var e=0;e<this.length;e+=1){var n=this[e];n.dom7ElementDataStorage&&n.dom7ElementDataStorage[t]&&(n.dom7ElementDataStorage[t]=null,delete n.dom7ElementDataStorage[t])}},dataset:function(){var t=this[0];if(t){var e,n={};if(t.dataset)for(var i in t.dataset)n[i]=t.dataset[i];else for(var r=0;r<t.attributes.length;r+=1){var o=t.attributes[r];o.name.indexOf("data-")>=0&&(n[(e=o.name.split("data-")[1],e.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}))]=o.value)}for(var s in n)"false"===n[s]?n[s]=!1:"true"===n[s]?n[s]=!0:parseFloat(n[s])===1*n[s]&&(n[s]*=1);return n}},val:function(t){if(void 0!==t){for(var e=0;e<this.length;e+=1)this[e].value=t;return this}if(this[0]){if(this[0].multiple&&"select"===this[0].nodeName.toLowerCase()){for(var n=[],i=0;i<this[0].selectedOptions.length;i+=1)n.push(this[0].selectedOptions[i].value);return n}return this[0].value}},transform:function(t){for(var e=0;e<this.length;e+=1){var n=this[e].style;n.webkitTransform=t,n.transform=t}return this},transition:function(t){"string"!=typeof t&&(t+="ms");for(var e=0;e<this.length;e+=1){var n=this[e].style;n.webkitTransitionDuration=t,n.transitionDuration=t}return this},on:function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=e[0],o=e[1],s=e[2],a=e[3];function l(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.unshift(t),i(e).is(o))s.apply(e,n);else for(var r=i(e).parents(),a=0;a<r.length;a+=1)i(r[a]).is(o)&&s.apply(r[a],n)}}function h(t){var e=t&&t.target&&t.target.dom7EventData||[];e.unshift(t),s.apply(this,e)}"function"==typeof e[1]&&(r=(t=e)[0],s=t[1],a=t[2],o=void 0),a||(a=!1);for(var u,f=r.split(" "),c=0;c<this.length;c+=1){var d=this[c];if(o)for(u=0;u<f.length;u+=1)d.dom7LiveListeners||(d.dom7LiveListeners=[]),d.dom7LiveListeners.push({type:r,listener:s,proxyListener:l}),d.addEventListener(f[u],l,a);else for(u=0;u<f.length;u+=1)d.dom7Listeners||(d.dom7Listeners=[]),d.dom7Listeners.push({type:r,listener:s,proxyListener:h}),d.addEventListener(f[u],h,a)}return this},off:function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];"function"==typeof e[1]&&(i=(t=e)[0],o=t[1],s=t[2],r=void 0),s||(s=!1);for(var a=i.split(" "),l=0;l<a.length;l+=1)for(var h=0;h<this.length;h+=1){var u=this[h];if(r){if(u.dom7LiveListeners)for(var f=0;f<u.dom7LiveListeners.length;f+=1)o?u.dom7LiveListeners[f].listener===o&&u.removeEventListener(a[l],u.dom7LiveListeners[f].proxyListener,s):u.dom7LiveListeners[f].type===a[l]&&u.removeEventListener(a[l],u.dom7LiveListeners[f].proxyListener,s)}else if(u.dom7Listeners)for(var c=0;c<u.dom7Listeners.length;c+=1)o?u.dom7Listeners[c].listener===o&&u.removeEventListener(a[l],u.dom7Listeners[c].proxyListener,s):u.dom7Listeners[c].type===a[l]&&u.removeEventListener(a[l],u.dom7Listeners[c].proxyListener,s)}return this},once:function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=this,r=e[0],o=e[1],s=e[2],a=e[3];return"function"==typeof e[1]&&(r=(t=e)[0],s=t[1],a=t[2],o=void 0),i.on(r,o,function t(e){var n=e.target.dom7EventData||[];s.apply(this,n),i.off(r,o,t,a)},a)},trigger:function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];for(var r=n[0].split(" "),o=n[1],s=0;s<r.length;s+=1)for(var a=0;a<this.length;a+=1){var l=void 0;try{l=new e.CustomEvent(r[s],{detail:o,bubbles:!0,cancelable:!0})}catch(e){(l=t.createEvent("Event")).initEvent(r[s],!0,!0),l.detail=o}this[a].dom7EventData=n.filter(function(t,e){return e>0}),this[a].dispatchEvent(l),this[a].dom7EventData=[],delete this[a].dom7EventData}return this},transitionEnd:function(t){var e,n=["webkitTransitionEnd","transitionend"],i=this;function r(o){if(o.target===this)for(t.call(this,o),e=0;e<n.length;e+=1)i.off(n[e],r)}if(t)for(e=0;e<n.length;e+=1)i.on(n[e],r);return this},animationEnd:function(t){var e,n=["webkitAnimationEnd","animationend"],i=this;function r(o){if(o.target===this)for(t.call(this,o),e=0;e<n.length;e+=1)i.off(n[e],r)}if(t)for(e=0;e<n.length;e+=1)i.on(n[e],r);return this},width:function(){return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null},outerWidth:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},height:function(){return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var n=this[0],i=n.getBoundingClientRect(),r=t.body,o=n.clientTop||r.clientTop||0,s=n.clientLeft||r.clientLeft||0,a=n===e?e.scrollY:n.scrollTop,l=n===e?e.scrollX:n.scrollLeft;return{top:i.top+a-o,left:i.left+l-s}}return null},hide:function(){for(var t=0;t<this.length;t+=1)this[t].style.display="none";return this},show:function(){for(var t=0;t<this.length;t+=1){var n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this},styles:function(){return this[0]?e.getComputedStyle(this[0],null):{}},css:function(t,n){var i;if(1===arguments.length){if("string"!=typeof t){for(i=0;i<this.length;i+=1)for(var r in t)this[i].style[r]=t[r];return this}if(this[0])return e.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(i=0;i<this.length;i+=1)this[i].style[t]=n;return this}return this},toArray:function(){for(var t=[],e=0;e<this.length;e+=1)t.push(this[e]);return t},each:function(t){if(!t)return this;for(var e=0;e<this.length;e+=1)if(!1===t.call(this[e],e,this[e]))return this;return this},forEach:function(t){if(!t)return this;for(var e=0;e<this.length;e+=1)if(!1===t.call(this[e],this[e],e))return this;return this},filter:function(t){for(var e=[],i=0;i<this.length;i+=1)t.call(this[i],i,this[i])&&e.push(this[i]);return new n(e)},map:function(t){for(var e=[],i=0;i<this.length;i+=1)e.push(t.call(this[i],i,this[i]));return new n(e)},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:void 0;for(var e=0;e<this.length;e+=1)this[e].innerHTML=t;return this},text:function(t){if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var e=0;e<this.length;e+=1)this[e].textContent=t;return this},is:function(r){var o,s,a=this[0];if(!a||void 0===r)return!1;if("string"==typeof r){if(a.matches)return a.matches(r);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(r);if(a.msMatchesSelector)return a.msMatchesSelector(r);for(o=i(r),s=0;s<o.length;s+=1)if(o[s]===a)return!0;return!1}if(r===t)return a===t;if(r===e)return a===e;if(r.nodeType||r instanceof n){for(o=r.nodeType?[r]:r,s=0;s<o.length;s+=1)if(o[s]===a)return!0;return!1}return!1},indexOf:function(t){for(var e=0;e<this.length;e+=1)if(this[e]===t)return e;return-1},index:function(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}},eq:function(t){if(void 0===t)return this;var e,i=this.length;return new n(t>i-1?[]:t<0?(e=i+t)<0?[]:[this[e]]:[this[t]])},append:function(){for(var e,i=[],r=arguments.length;r--;)i[r]=arguments[r];for(var o=0;o<i.length;o+=1){e=i[o];for(var s=0;s<this.length;s+=1)if("string"==typeof e){var a=t.createElement("div");for(a.innerHTML=e;a.firstChild;)this[s].appendChild(a.firstChild)}else if(e instanceof n)for(var l=0;l<e.length;l+=1)this[s].appendChild(e[l]);else this[s].appendChild(e)}return this},appendTo:function(t){return i(t).append(this),this},prepend:function(e){var i,r,o=this;for(i=0;i<this.length;i+=1)if("string"==typeof e){var s=t.createElement("div");for(s.innerHTML=e,r=s.childNodes.length-1;r>=0;r-=1)o[i].insertBefore(s.childNodes[r],o[i].childNodes[0])}else if(e instanceof n)for(r=0;r<e.length;r+=1)o[i].insertBefore(e[r],o[i].childNodes[0]);else o[i].insertBefore(e,o[i].childNodes[0]);return this},prependTo:function(t){return i(t).prepend(this),this},insertBefore:function(t){for(var e=i(t),n=0;n<this.length;n+=1)if(1===e.length)e[0].parentNode.insertBefore(this[n],e[0]);else if(e.length>1)for(var r=0;r<e.length;r+=1)e[r].parentNode.insertBefore(this[n].cloneNode(!0),e[r])},insertAfter:function(t){for(var e=i(t),n=0;n<this.length;n+=1)if(1===e.length)e[0].parentNode.insertBefore(this[n],e[0].nextSibling);else if(e.length>1)for(var r=0;r<e.length;r+=1)e[r].parentNode.insertBefore(this[n].cloneNode(!0),e[r].nextSibling)},next:function(t){return this.length>0?t?this[0].nextElementSibling&&i(this[0].nextElementSibling).is(t)?new n([this[0].nextElementSibling]):new n([]):this[0].nextElementSibling?new n([this[0].nextElementSibling]):new n([]):new n([])},nextAll:function(t){var e=[],r=this[0];if(!r)return new n([]);for(;r.nextElementSibling;){var o=r.nextElementSibling;t?i(o).is(t)&&e.push(o):e.push(o),r=o}return new n(e)},prev:function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&i(e.previousElementSibling).is(t)?new n([e.previousElementSibling]):new n([]):e.previousElementSibling?new n([e.previousElementSibling]):new n([])}return new n([])},prevAll:function(t){var e=[],r=this[0];if(!r)return new n([]);for(;r.previousElementSibling;){var o=r.previousElementSibling;t?i(o).is(t)&&e.push(o):e.push(o),r=o}return new n(e)},siblings:function(t){return this.nextAll(t).add(this.prevAll(t))},parent:function(t){for(var e=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?i(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return i(r(e))},parents:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var o=this[n].parentNode;o;)t?i(o).is(t)&&e.push(o):e.push(o),o=o.parentNode;return i(r(e))},closest:function(t){var e=this;return void 0===t?new n([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){for(var e=[],i=0;i<this.length;i+=1)for(var r=this[i].querySelectorAll(t),o=0;o<r.length;o+=1)e.push(r[o]);return new n(e)},children:function(t){for(var e=[],o=0;o<this.length;o+=1)for(var s=this[o].childNodes,a=0;a<s.length;a+=1)t?1===s[a].nodeType&&i(s[a]).is(t)&&e.push(s[a]):1===s[a].nodeType&&e.push(s[a]);return new n(r(e))},remove:function(){for(var t=0;t<this.length;t+=1)this[t].parentNode&&this[t].parentNode.removeChild(this[t]);return this},detach:function(){return this.remove()},add:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n,r;for(n=0;n<t.length;n+=1){var o=i(t[n]);for(r=0;r<o.length;r+=1)this[this.length]=o[r],this.length+=1}return this},empty:function(){for(var t=0;t<this.length;t+=1){var e=this[t];if(1===e.nodeType){for(var n=0;n<e.childNodes.length;n+=1)e.childNodes[n].parentNode&&e.childNodes[n].parentNode.removeChild(e.childNodes[n]);e.textContent=""}}return this}});var a=Object.freeze({scrollTo:function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=e[0],r=e[1],s=e[2],a=e[3],l=e[4];return 4===e.length&&"function"==typeof a&&(l=a,i=(t=e)[0],r=t[1],s=t[2],l=t[3],a=t[4]),void 0===a&&(a="swing"),this.each(function(){var t,e,n,h,u,f,c,d,v=this,g=r>0||0===r,p=i>0||0===i;if(void 0===a&&(a="swing"),g&&(t=v.scrollTop,s||(v.scrollTop=r)),p&&(e=v.scrollLeft,s||(v.scrollLeft=i)),s){g&&(n=v.scrollHeight-v.offsetHeight,u=Math.max(Math.min(r,n),0)),p&&(h=v.scrollWidth-v.offsetWidth,f=Math.max(Math.min(i,h),0));var m=null;g&&u===t&&(g=!1),p&&f===e&&(p=!1),o(function n(i){void 0===i&&(i=(new Date).getTime()),null===m&&(m=i);var r,h=Math.max(Math.min((i-m)/s,1),0),y="linear"===a?h:.5-Math.cos(h*Math.PI)/2;g&&(c=t+y*(u-t)),p&&(d=e+y*(f-e)),g&&u>t&&c>=u&&(v.scrollTop=u,r=!0),g&&u<t&&c<=u&&(v.scrollTop=u,r=!0),p&&f>e&&d>=f&&(v.scrollLeft=f,r=!0),p&&f<e&&d<=f&&(v.scrollLeft=f,r=!0),r?l&&l():(g&&(v.scrollTop=c),p&&(v.scrollLeft=d),o(n))})}})},scrollTop:function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];return 3===e.length&&"function"==typeof o&&(i=(t=e)[0],r=t[1],s=t[2],o=t[3]),void 0===i?this.length>0?this[0].scrollTop:null:this.scrollTo(void 0,i,r,o,s)},scrollLeft:function(){for(var t,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];return 3===e.length&&"function"==typeof o&&(i=(t=e)[0],r=t[1],s=t[2],o=t[3]),void 0===i?this.length>0?this[0].scrollLeft:null:this.scrollTo(i,void 0,r,o,s)}});var l=Object.freeze({animate:function(t,n){var r,s=this,a={props:i.extend({},t),params:i.extend({duration:300,easing:"swing"},n),elements:s,animating:!1,que:[],easingProgress:function(t,e){return"swing"===t?.5-Math.cos(e*Math.PI)/2:"function"==typeof t?t(e):e},stop:function(){var t;a.frameId&&(t=a.frameId,e.cancelAnimationFrame?e.cancelAnimationFrame(t):e.webkitCancelAnimationFrame?e.webkitCancelAnimationFrame(t):e.clearTimeout(t)),a.animating=!1,a.elements.each(function(t,e){delete e.dom7AnimateInstance}),a.que=[]},done:function(t){if(a.animating=!1,a.elements.each(function(t,e){delete e.dom7AnimateInstance}),t&&t(s),a.que.length>0){var e=a.que.shift();a.animate(e[0],e[1])}},animate:function(t,n){if(a.animating)return a.que.push([t,n]),a;var i=[];a.elements.each(function(n,r){var o,s,l,h,u;r.dom7AnimateInstance||(a.elements[n].dom7AnimateInstance=a),i[n]={container:r},Object.keys(t).forEach(function(a){o=e.getComputedStyle(r,null).getPropertyValue(a).replace(",","."),s=parseFloat(o),l=o.replace(s,""),h=parseFloat(t[a]),u=t[a]+l,i[n][a]={initialFullValue:o,initialValue:s,unit:l,finalValue:h,finalFullValue:u,currentValue:s}})});var r,l,h=null,u=0,f=0,c=!1;return a.animating=!0,a.frameId=o(function e(){var d,v;r=(new Date).getTime(),c||(c=!0,n.begin&&n.begin(s)),null===h&&(h=r),n.progress&&n.progress(s,Math.max(Math.min((r-h)/n.duration,1),0),h+n.duration-r<0?0:h+n.duration-r,h),i.forEach(function(e){var o=e;l||o.done||Object.keys(t).forEach(function(e){if(!l&&!o.done){d=Math.max(Math.min((r-h)/n.duration,1),0),v=a.easingProgress(n.easing,d);var s=o[e],c=s.initialValue,g=s.finalValue,p=s.unit;o[e].currentValue=c+v*(g-c);var m=o[e].currentValue;(g>c&&m>=g||g<c&&m<=g)&&(o.container.style[e]=g+p,(f+=1)===Object.keys(t).length&&(o.done=!0,u+=1),u===i.length&&(l=!0)),l?a.done(n.complete):o.container.style[e]=m+p}})}),l||(a.frameId=o(e))}),a}};if(0===a.elements.length)return s;for(var l=0;l<a.elements.length;l+=1)a.elements[l].dom7AnimateInstance?r=a.elements[l].dom7AnimateInstance:a.elements[l].dom7AnimateInstance=a;return r||(r=a),"stop"===t?r.stop():r.animate(a.props,a.params),s},stop:function(){for(var t=0;t<this.length;t+=1)this[t].dom7AnimateInstance&&this[t].dom7AnimateInstance.stop()}}),h="resize scroll".split(" ");function u(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];if(void 0===n[0]){for(var o=0;o<this.length;o+=1)h.indexOf(t)<0&&(t in this[o]?this[o][t]():i(this[o]).trigger(t));return this}return(e=this).on.apply(e,[t].concat(n))}return[s,a,l,Object.freeze({click:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["click"].concat(t))},blur:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["blur"].concat(t))},focus:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["focus"].concat(t))},focusin:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["focusin"].concat(t))},focusout:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["focusout"].concat(t))},keyup:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["keyup"].concat(t))},keydown:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["keydown"].concat(t))},keypress:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["keypress"].concat(t))},submit:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["submit"].concat(t))},change:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["change"].concat(t))},mousedown:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mousedown"].concat(t))},mousemove:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mousemove"].concat(t))},mouseup:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mouseup"].concat(t))},mouseenter:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mouseenter"].concat(t))},mouseleave:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mouseleave"].concat(t))},mouseout:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mouseout"].concat(t))},mouseover:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["mouseover"].concat(t))},touchstart:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["touchstart"].concat(t))},touchend:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["touchend"].concat(t))},touchmove:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["touchmove"].concat(t))},resize:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["resize"].concat(t))},scroll:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return u.bind(this).apply(void 0,["scroll"].concat(t))}})].forEach(function(t){Object.keys(t).forEach(function(e){i.fn[e]=t[e]})}),i}); | ||
//# sourceMappingURL=dom7.min.js.map |
/** | ||
* Dom7 2.0.1 | ||
* Dom7 2.0.2 | ||
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API | ||
* http://framework7.io/docs/dom.html | ||
* | ||
* Copyright 2017, Vladimir Kharlampidi | ||
* Copyright 2018, Vladimir Kharlampidi | ||
* The iDangero.us | ||
@@ -12,4 +12,6 @@ * http://www.idangero.us/ | ||
* | ||
* Released on: October 2, 2017 | ||
* Released on: February 10, 2018 | ||
*/ | ||
import { document, window } from 'ssr-window'; | ||
class Dom7 { | ||
@@ -16,0 +18,0 @@ constructor(arr) { |
/** | ||
* Dom7 2.0.1 | ||
* Dom7 2.0.2 | ||
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API | ||
* http://framework7.io/docs/dom.html | ||
* | ||
* Copyright 2017, Vladimir Kharlampidi | ||
* Copyright 2018, Vladimir Kharlampidi | ||
* The iDangero.us | ||
@@ -12,4 +12,6 @@ * http://www.idangero.us/ | ||
* | ||
* Released on: October 2, 2017 | ||
* Released on: February 10, 2018 | ||
*/ | ||
import { document, window } from 'ssr-window'; | ||
class Dom7 { | ||
@@ -16,0 +18,0 @@ constructor(arr) { |
@@ -8,2 +8,3 @@ const gulp = require('gulp'); | ||
const rollup = require('rollup-stream'); | ||
const resolve = require('rollup-plugin-node-resolve'); | ||
const buble = require('rollup-plugin-buble'); | ||
@@ -43,29 +44,29 @@ const source = require('vinyl-source-stream'); | ||
rollup({ | ||
entry: './src/dom7.js', | ||
plugins: [buble()], | ||
input: './src/dom7.js', | ||
plugins: [resolve(), buble()], | ||
format: 'umd', | ||
moduleName: 'Dom7', | ||
useStrict: true, | ||
sourceMap: env === 'development', | ||
name: 'Dom7', | ||
strict: true, | ||
sourcemap: env === 'development', | ||
banner, | ||
}) | ||
.pipe(source('dom7.js', './src')) | ||
.pipe(buffer()) | ||
.pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/`)) | ||
.on('end', () => { | ||
if (env === 'development') { | ||
if (cb) cb(); | ||
return; | ||
} | ||
gulp.src('./dist/dom7.js') | ||
.pipe(sourcemaps.init()) | ||
.pipe(uglify()) | ||
.pipe(header(banner)) | ||
.pipe(rename('dom7.min.js')) | ||
.pipe(sourcemaps.write('./')) | ||
.pipe(gulp.dest('./dist/')) | ||
.pipe(source('dom7.js', './src')) | ||
.pipe(buffer()) | ||
.pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/`)) | ||
.on('end', () => { | ||
if (cb) cb(); | ||
if (env === 'development') { | ||
if (cb) cb(); | ||
return; | ||
} | ||
gulp.src('./dist/dom7.js') | ||
.pipe(sourcemaps.init()) | ||
.pipe(uglify()) | ||
.pipe(header(banner)) | ||
.pipe(rename('dom7.min.js')) | ||
.pipe(sourcemaps.write('./')) | ||
.pipe(gulp.dest('./dist/')) | ||
.on('end', () => { | ||
if (cb) cb(); | ||
}); | ||
}); | ||
}); | ||
} | ||
@@ -77,33 +78,35 @@ // ES MODULE DIST | ||
rollup({ | ||
entry: './src/dom7.js', | ||
input: './src/dom7.js', | ||
format: 'es', | ||
moduleName: 'Dom7', | ||
useStrict: true, | ||
sourceMap: env === 'development', | ||
name: 'Dom7', | ||
strict: true, | ||
external: ['ssr-window'], | ||
sourcemap: env === 'development', | ||
banner, | ||
}) | ||
.pipe(source('dom7.js', './src')) | ||
.pipe(buffer()) | ||
.pipe(rename('dom7.module.js')) | ||
.pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/`)) | ||
.on('end', () => { | ||
cbs += 1; | ||
if (cb && cbs === 2) cb(); | ||
}); | ||
.pipe(source('dom7.js', './src')) | ||
.pipe(buffer()) | ||
.pipe(rename('dom7.module.js')) | ||
.pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/`)) | ||
.on('end', () => { | ||
cbs += 1; | ||
if (cb && cbs === 2) cb(); | ||
}); | ||
rollup({ | ||
entry: './src/dom7.modular.js', | ||
input: './src/dom7.modular.js', | ||
format: 'es', | ||
moduleName: 'Dom7', | ||
useStrict: true, | ||
sourceMap: env === 'development', | ||
name: 'Dom7', | ||
strict: true, | ||
external: ['ssr-window'], | ||
sourcemap: env === 'development', | ||
banner, | ||
}) | ||
.pipe(source('dom7.js', './src')) | ||
.pipe(buffer()) | ||
.pipe(rename('dom7.modular.js')) | ||
.pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/`)) | ||
.on('end', () => { | ||
cbs += 1; | ||
if (cb && cbs === 2) cb(); | ||
}); | ||
.pipe(source('dom7.js', './src')) | ||
.pipe(buffer()) | ||
.pipe(rename('dom7.modular.js')) | ||
.pipe(gulp.dest(`./${env === 'development' ? 'build' : 'dist'}/`)) | ||
.on('end', () => { | ||
cbs += 1; | ||
if (cb && cbs === 2) cb(); | ||
}); | ||
} | ||
@@ -110,0 +113,0 @@ |
{ | ||
"name": "dom7", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API", | ||
@@ -33,18 +33,22 @@ "main": "dist/dom7.js", | ||
"devDependencies": { | ||
"eslint": "^3.19.0", | ||
"eslint-config-airbnb-base": "^11.1.3", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint": "^4.9.0", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"gulp": "^3.9.1", | ||
"gulp-connect": "^5.0.0", | ||
"gulp-header": "^1.8.8", | ||
"gulp-modify-file": "^0.1.0", | ||
"gulp-open": "^2.0.0", | ||
"gulp-connect": "^5.2.0", | ||
"gulp-header": "^2.0.1", | ||
"gulp-modify-file": "^1.0.1", | ||
"gulp-open": "^2.1.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-sourcemaps": "^2.6.0", | ||
"gulp-uglify": "^2.1.2", | ||
"rollup-plugin-buble": "^0.15.0", | ||
"rollup-stream": "^1.19.0", | ||
"vinyl-buffer": "^1.0.0", | ||
"vinyl-source-stream": "^1.1.0" | ||
"gulp-sourcemaps": "^2.6.4", | ||
"gulp-uglify": "^3.0.0", | ||
"rollup-plugin-buble": "^0.19.1", | ||
"rollup-plugin-node-resolve": "^3.0.2", | ||
"rollup-stream": "^1.24.1", | ||
"vinyl-buffer": "^1.0.1", | ||
"vinyl-source-stream": "^2.0.0" | ||
}, | ||
"dependencies": { | ||
"ssr-window": "^1.0.0" | ||
} | ||
} |
@@ -0,1 +1,2 @@ | ||
import { window, document } from 'ssr-window'; | ||
import Dom7 from './dom7-class'; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { window } from 'ssr-window'; | ||
import $ from './$'; | ||
@@ -2,0 +3,0 @@ import { requestAnimationFrame, cancelAnimationFrame } from './utils'; |
@@ -0,1 +1,2 @@ | ||
import { window, document } from 'ssr-window'; | ||
import Dom7 from './dom7-class'; | ||
@@ -2,0 +3,0 @@ import $ from './$'; |
@@ -0,1 +1,3 @@ | ||
import { window } from 'ssr-window'; | ||
function unique(arr) { | ||
@@ -2,0 +4,0 @@ const uniqueArray = []; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
276434
5901
1
16
+ Addedssr-window@^1.0.0
+ Addedssr-window@1.0.1(transitive)