Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dom7

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom7 - npm Package Compare versions

Comparing version 4.0.0-beta.1 to 4.0.0-beta.2

868

dom7.esm.js
/**
* Dom7 4.0.0-beta.1
* Dom7 4.0.0-beta.2
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API

@@ -10,141 +10,34 @@ * https://framework7.io/docs/dom7.html

*
* Released on: July 22, 2021
* Released on: August 4, 2021
*/
import { getWindow, getDocument } from 'ssr-window';
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !_isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return _setPrototypeOf(Wrapper, Class);
};
return _wrapNativeSuper(Class);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
/* eslint-disable no-proto */
function makeReactive(obj) {
var proto = obj.__proto__;
const proto = obj.__proto__;
Object.defineProperty(obj, '__proto__', {
get: function get() {
get() {
return proto;
},
set: function set(value) {
set(value) {
proto.__proto__ = value;
}
});
}
var Dom7 = /*#__PURE__*/function (_Array) {
_inheritsLoose(Dom7, _Array);
function Dom7(items) {
var _this;
_this = _Array.call.apply(_Array, [this].concat(items)) || this;
makeReactive(_assertThisInitialized(_this));
return _this;
class Dom7 extends Array {
constructor(items) {
super(...items);
makeReactive(this);
}
return Dom7;
}( /*#__PURE__*/_wrapNativeSuper(Array));
}
function arrayFlat(arr) {
if (arr === void 0) {
arr = [];
}
var res = [];
arr.forEach(function (el) {
function arrayFlat(arr = []) {
const res = [];
arr.forEach(el => {
if (Array.isArray(el)) {
res.push.apply(res, arrayFlat(el));
res.push(...arrayFlat(el));
} else {

@@ -160,5 +53,5 @@ res.push(el);

function arrayUnique(arr) {
var uniqueArray = [];
const uniqueArray = [];
for (var i = 0; i < arr.length; i += 1) {
for (let i = 0; i < arr.length; i += 1) {
if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);

@@ -170,5 +63,3 @@ }

function toCamelCase(string) {
return string.toLowerCase().replace(/-(.)/g, function (match, group) {
return group.toUpperCase();
});
return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());
}

@@ -183,6 +74,6 @@

var a = [];
var res = context.querySelectorAll(selector);
const a = [];
const res = context.querySelectorAll(selector);
for (var i = 0; i < res.length; i += 1) {
for (let i = 0; i < res.length; i += 1) {
a.push(res[i]);

@@ -195,5 +86,5 @@ }

function $(selector, context) {
var window = getWindow();
var document = getDocument();
var arr = [];
const window = getWindow();
const document = getDocument();
let arr = [];

@@ -209,6 +100,6 @@ if (!context && selector instanceof Dom7) {

if (typeof selector === 'string') {
var html = selector.trim();
const html = selector.trim();
if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
var toCreate = 'div';
let toCreate = 'div';
if (html.indexOf('<li') === 0) toCreate = 'ul';

@@ -219,6 +110,6 @@ if (html.indexOf('<tr') === 0) toCreate = 'tbody';

if (html.indexOf('<option') === 0) toCreate = 'select';
var tempParent = document.createElement(toCreate);
const tempParent = document.createElement(toCreate);
tempParent.innerHTML = html;
for (var i = 0; i < tempParent.childNodes.length; i += 1) {
for (let i = 0; i < tempParent.childNodes.length; i += 1) {
arr.push(tempParent.childNodes[i]);

@@ -244,14 +135,6 @@ }

function addClass() {
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
classes[_key] = arguments[_key];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
this.forEach(function (el) {
var _el$classList;
(_el$classList = el.classList).add.apply(_el$classList, classNames);
function addClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
this.forEach(el => {
el.classList.add(...classNames);
});

@@ -261,14 +144,6 @@ return this;

function removeClass() {
for (var _len2 = arguments.length, classes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
classes[_key2] = arguments[_key2];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
this.forEach(function (el) {
var _el$classList2;
(_el$classList2 = el.classList).remove.apply(_el$classList2, classNames);
function removeClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
this.forEach(el => {
el.classList.remove(...classNames);
});

@@ -278,12 +153,6 @@ return this;

function toggleClass() {
for (var _len3 = arguments.length, classes = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
classes[_key3] = arguments[_key3];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
this.forEach(function (el) {
classNames.forEach(function (className) {
function toggleClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
this.forEach(el => {
classNames.forEach(className => {
el.classList.toggle(className);

@@ -294,14 +163,6 @@ });

function hasClass() {
for (var _len4 = arguments.length, classes = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
classes[_key4] = arguments[_key4];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
return arrayFilter(this, function (el) {
return classNames.filter(function (className) {
return el.classList.contains(className);
}).length > 0;
function hasClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
return arrayFilter(this, el => {
return classNames.filter(className => el.classList.contains(className)).length > 0;
}).length > 0;

@@ -318,3 +179,3 @@ }

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (arguments.length === 2) {

@@ -325,3 +186,3 @@ // String

// Object
for (var attrName in attrs) {
for (const attrName in attrs) {
this[i][attrName] = attrs[attrName];

@@ -337,3 +198,3 @@ this[i].setAttribute(attrName, attrs[attrName]);

function removeAttr(attr) {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].removeAttribute(attr);

@@ -351,3 +212,3 @@ }

// Set props
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (arguments.length === 2) {

@@ -358,3 +219,3 @@ // String

// Object
for (var propName in props) {
for (const propName in props) {
this[i][propName] = props[propName];

@@ -372,3 +233,3 @@ }

function data(key, value) {
var el;
let el;

@@ -383,3 +244,3 @@ if (typeof value === 'undefined') {

var dataKey = el.getAttribute("data-" + key);
const dataKey = el.getAttribute(`data-${key}`);

@@ -394,3 +255,3 @@ if (dataKey) {

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
el = this[i];

@@ -405,4 +266,4 @@ if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};

function removeData(key) {
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];

@@ -417,16 +278,16 @@ if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {

function dataset() {
var el = this[0];
const el = this[0];
if (!el) return undefined;
var dataset = {}; // eslint-disable-line
const dataset = {}; // eslint-disable-line
if (el.dataset) {
for (var dataKey in el.dataset) {
for (const dataKey in el.dataset) {
dataset[dataKey] = el.dataset[dataKey];
}
} else {
for (var i = 0; i < el.attributes.length; i += 1) {
var _attr = el.attributes[i];
for (let i = 0; i < el.attributes.length; i += 1) {
const attr = el.attributes[i];
if (_attr.name.indexOf('data-') >= 0) {
dataset[toCamelCase(_attr.name.split('data-')[1])] = _attr.value;
if (attr.name.indexOf('data-') >= 0) {
dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;
}

@@ -436,3 +297,3 @@ }

for (var key in dataset) {
for (const key in dataset) {
if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;

@@ -447,9 +308,9 @@ }

// get value
var el = this[0];
const el = this[0];
if (!el) return undefined;
if (el.multiple && el.nodeName.toLowerCase() === 'select') {
var values = [];
const values = [];
for (var i = 0; i < el.selectedOptions.length; i += 1) {
for (let i = 0; i < el.selectedOptions.length; i += 1) {
values.push(el.selectedOptions[i].value);

@@ -465,11 +326,11 @@ }

for (var _i = 0; _i < this.length; _i += 1) {
var _el = this[_i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];
if (Array.isArray(value) && _el.multiple && _el.nodeName.toLowerCase() === 'select') {
for (var j = 0; j < _el.options.length; j += 1) {
_el.options[j].selected = value.indexOf(_el.options[j].value) >= 0;
if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {
for (let j = 0; j < el.options.length; j += 1) {
el.options[j].selected = value.indexOf(el.options[j].value) >= 0;
}
} else {
_el.value = value;
el.value = value;
}

@@ -486,3 +347,3 @@ }

function transform(transform) {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].style.transform = transform;

@@ -495,4 +356,4 @@ }

function transition(duration) {
for (var i = 0; i < this.length; i += 1) {
this[i].style.transitionDuration = typeof duration !== 'string' ? duration + "ms" : duration;
for (let i = 0; i < this.length; i += 1) {
this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;
}

@@ -503,16 +364,7 @@

function on() {
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
function on(...args) {
let [eventType, targetSelector, listener, capture] = args;
var eventType = args[0],
targetSelector = args[1],
listener = args[2],
capture = args[3];
if (typeof args[1] === 'function') {
eventType = args[0];
listener = args[1];
capture = args[2];
[eventType, listener, capture] = args;
targetSelector = undefined;

@@ -524,5 +376,5 @@ }

function handleLiveEvent(e) {
var target = e.target;
const target = e.target;
if (!target) return;
var eventData = e.target.dom7EventData || [];
const eventData = e.target.dom7EventData || [];

@@ -534,7 +386,6 @@ if (eventData.indexOf(e) < 0) {

if ($(target).is(targetSelector)) listener.apply(target, eventData);else {
var _parents = $(target).parents(); // eslint-disable-line
const parents = $(target).parents(); // eslint-disable-line
for (var k = 0; k < _parents.length; k += 1) {
if ($(_parents[k]).is(targetSelector)) listener.apply(_parents[k], eventData);
for (let k = 0; k < parents.length; k += 1) {
if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);
}

@@ -545,3 +396,3 @@ }

function handleEvent(e) {
var eventData = e && e.target ? e.target.dom7EventData || [] : [];
const eventData = e && e.target ? e.target.dom7EventData || [] : [];

@@ -555,15 +406,15 @@ if (eventData.indexOf(e) < 0) {

var events = eventType.split(' ');
var j;
const events = eventType.split(' ');
let j;
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];
if (!targetSelector) {
for (j = 0; j < events.length; j += 1) {
var event = events[j];
const event = events[j];
if (!el.dom7Listeners) el.dom7Listeners = {};
if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];
el.dom7Listeners[event].push({
listener: listener,
listener,
proxyListener: handleEvent

@@ -576,12 +427,10 @@ });

for (j = 0; j < events.length; j += 1) {
var _event = events[j];
const event = events[j];
if (!el.dom7LiveListeners) el.dom7LiveListeners = {};
if (!el.dom7LiveListeners[_event]) el.dom7LiveListeners[_event] = [];
el.dom7LiveListeners[_event].push({
listener: listener,
if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];
el.dom7LiveListeners[event].push({
listener,
proxyListener: handleLiveEvent
});
el.addEventListener(_event, handleLiveEvent, capture);
el.addEventListener(event, handleLiveEvent, capture);
}

@@ -594,16 +443,7 @@ }

function off() {
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
args[_key6] = arguments[_key6];
}
function off(...args) {
let [eventType, targetSelector, listener, capture] = args;
var eventType = args[0],
targetSelector = args[1],
listener = args[2],
capture = args[3];
if (typeof args[1] === 'function') {
eventType = args[0];
listener = args[1];
capture = args[2];
[eventType, listener, capture] = args;
targetSelector = undefined;

@@ -613,10 +453,10 @@ }

if (!capture) capture = false;
var events = eventType.split(' ');
const events = eventType.split(' ');
for (var i = 0; i < events.length; i += 1) {
var event = events[i];
for (let i = 0; i < events.length; i += 1) {
const event = events[i];
for (var j = 0; j < this.length; j += 1) {
var el = this[j];
var handlers = void 0;
for (let j = 0; j < this.length; j += 1) {
const el = this[j];
let handlers;

@@ -630,4 +470,4 @@ if (!targetSelector && el.dom7Listeners) {

if (handlers && handlers.length) {
for (var k = handlers.length - 1; k >= 0; k -= 1) {
var handler = handlers[k];
for (let k = handlers.length - 1; k >= 0; k -= 1) {
const handler = handlers[k];

@@ -652,26 +492,12 @@ if (listener && handler.listener === listener) {

function once() {
var dom = this;
function once(...args) {
const dom = this;
let [eventName, targetSelector, listener, capture] = args;
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
args[_key7] = arguments[_key7];
}
var eventName = args[0],
targetSelector = args[1],
listener = args[2],
capture = args[3];
if (typeof args[1] === 'function') {
eventName = args[0];
listener = args[1];
capture = args[2];
[eventName, listener, capture] = args;
targetSelector = undefined;
}
function onceHandler() {
for (var _len8 = arguments.length, eventArgs = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
eventArgs[_key8] = arguments[_key8];
}
function onceHandler(...eventArgs) {
listener.apply(this, eventArgs);

@@ -689,20 +515,15 @@ dom.off(eventName, targetSelector, onceHandler, capture);

function trigger() {
var window = getWindow();
function trigger(...args) {
const window = getWindow();
const events = args[0].split(' ');
const eventData = args[1];
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
args[_key9] = arguments[_key9];
}
for (let i = 0; i < events.length; i += 1) {
const event = events[i];
var events = args[0].split(' ');
var eventData = args[1];
for (let j = 0; j < this.length; j += 1) {
const el = this[j];
for (var i = 0; i < events.length; i += 1) {
var event = events[i];
for (var j = 0; j < this.length; j += 1) {
var el = this[j];
if (window.CustomEvent) {
var evt = new window.CustomEvent(event, {
const evt = new window.CustomEvent(event, {
detail: eventData,

@@ -712,5 +533,3 @@ bubbles: true,

});
el.dom7EventData = args.filter(function (data, dataIndex) {
return dataIndex > 0;
});
el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);
el.dispatchEvent(evt);

@@ -727,3 +546,3 @@ el.dom7EventData = [];

function transitionEnd(callback) {
var dom = this;
const dom = this;

@@ -744,3 +563,3 @@ function fireCallBack(e) {

function animationEnd(callback) {
var dom = this;
const dom = this;

@@ -761,3 +580,3 @@ function fireCallBack(e) {

function width() {
var window = getWindow();
const window = getWindow();

@@ -778,5 +597,4 @@ if (this[0] === window) {

if (includeMargins) {
var _styles = this.styles();
return this[0].offsetWidth + parseFloat(_styles.getPropertyValue('margin-right')) + parseFloat(_styles.getPropertyValue('margin-left'));
const styles = this.styles();
return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
}

@@ -791,3 +609,3 @@

function height() {
var window = getWindow();
const window = getWindow();

@@ -808,5 +626,4 @@ if (this[0] === window) {

if (includeMargins) {
var _styles2 = this.styles();
return this[0].offsetHeight + parseFloat(_styles2.getPropertyValue('margin-top')) + parseFloat(_styles2.getPropertyValue('margin-bottom'));
const styles = this.styles();
return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
}

@@ -822,11 +639,11 @@

if (this.length > 0) {
var window = getWindow();
var document = getDocument();
var el = this[0];
var box = el.getBoundingClientRect();
var body = document.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;
const window = getWindow();
const document = getDocument();
const el = this[0];
const box = el.getBoundingClientRect();
const body = document.body;
const clientTop = el.clientTop || body.clientTop || 0;
const clientLeft = el.clientLeft || body.clientLeft || 0;
const scrollTop = el === window ? window.scrollY : el.scrollTop;
const scrollLeft = el === window ? window.scrollX : el.scrollLeft;
return {

@@ -842,3 +659,3 @@ top: box.top + scrollTop - clientTop,

function hide() {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].style.display = 'none';

@@ -851,6 +668,6 @@ }

function show() {
var window = getWindow();
const window = getWindow();
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];

@@ -871,3 +688,3 @@ if (el.style.display === 'none') {

function styles() {
var window = getWindow();
const window = getWindow();
if (this[0]) return window.getComputedStyle(this[0], null);

@@ -878,4 +695,4 @@ return {};

function css(props, value) {
var window = getWindow();
var i;
const window = getWindow();
let i;

@@ -889,4 +706,4 @@ if (arguments.length === 1) {

for (i = 0; i < this.length; i += 1) {
for (var _prop in props) {
this[i].style[_prop] = props[_prop];
for (const prop in props) {
this[i].style[prop] = props[prop];
}

@@ -913,3 +730,3 @@ }

if (!callback) return this;
this.forEach(function (el, index) {
this.forEach((el, index) => {
callback.apply(el, [el, index]);

@@ -921,3 +738,3 @@ });

function filter(callback) {
var result = arrayFilter(this, callback);
const result = arrayFilter(this, callback);
return $(result);

@@ -931,3 +748,3 @@ }

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].innerHTML = html;

@@ -944,3 +761,3 @@ }

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].textContent = text;

@@ -953,7 +770,7 @@ }

function is(selector) {
var window = getWindow();
var document = getDocument();
var el = this[0];
var compareWith;
var i;
const window = getWindow();
const document = getDocument();
const el = this[0];
let compareWith;
let i;
if (!el || typeof selector === 'undefined') return false;

@@ -996,4 +813,4 @@

function index() {
var child = this[0];
var i;
let child = this[0];
let i;

@@ -1015,3 +832,3 @@ if (child) {

if (typeof index === 'undefined') return this;
var length = this.length;
const length = this.length;

@@ -1023,3 +840,3 @@ if (index > length - 1) {

if (index < 0) {
var returnIndex = length + index;
const returnIndex = length + index;
if (returnIndex < 0) return $([]);

@@ -1032,12 +849,12 @@ return $([this[returnIndex]]);

function append() {
var newChild;
var document = getDocument();
function append(...els) {
let newChild;
const document = getDocument();
for (var k = 0; k < arguments.length; k += 1) {
newChild = k < 0 || arguments.length <= k ? undefined : arguments[k];
for (let k = 0; k < els.length; k += 1) {
newChild = els[k];
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (typeof newChild === 'string') {
var tempDiv = document.createElement('div');
const tempDiv = document.createElement('div');
tempDiv.innerHTML = newChild;

@@ -1049,3 +866,3 @@

} else if (newChild instanceof Dom7) {
for (var j = 0; j < newChild.length; j += 1) {
for (let j = 0; j < newChild.length; j += 1) {
this[i].appendChild(newChild[j]);

@@ -1068,9 +885,9 @@ }

function prepend(newChild) {
var document = getDocument();
var i;
var j;
const document = getDocument();
let i;
let j;
for (i = 0; i < this.length; i += 1) {
if (typeof newChild === 'string') {
var tempDiv = document.createElement('div');
const tempDiv = document.createElement('div');
tempDiv.innerHTML = newChild;

@@ -1099,9 +916,9 @@

function insertBefore(selector) {
var before = $(selector);
const before = $(selector);
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (before.length === 1) {
before[0].parentNode.insertBefore(this[i], before[0]);
} else if (before.length > 1) {
for (var j = 0; j < before.length; j += 1) {
for (let j = 0; j < before.length; j += 1) {
before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);

@@ -1114,9 +931,9 @@ }

function insertAfter(selector) {
var after = $(selector);
const after = $(selector);
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (after.length === 1) {
after[0].parentNode.insertBefore(this[i], after[0].nextSibling);
} else if (after.length > 1) {
for (var j = 0; j < after.length; j += 1) {
for (let j = 0; j < after.length; j += 1) {
after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);

@@ -1146,14 +963,14 @@ }

function nextAll(selector) {
var nextEls = [];
var el = this[0];
const nextEls = [];
let el = this[0];
if (!el) return $([]);
while (el.nextElementSibling) {
var _next = el.nextElementSibling; // eslint-disable-line
const next = el.nextElementSibling; // eslint-disable-line
if (selector) {
if ($(_next).is(selector)) nextEls.push(_next);
} else nextEls.push(_next);
if ($(next).is(selector)) nextEls.push(next);
} else nextEls.push(next);
el = _next;
el = next;
}

@@ -1166,3 +983,3 @@

if (this.length > 0) {
var el = this[0];
const el = this[0];

@@ -1185,14 +1002,14 @@ if (selector) {

function prevAll(selector) {
var prevEls = [];
var el = this[0];
const prevEls = [];
let el = this[0];
if (!el) return $([]);
while (el.previousElementSibling) {
var _prev = el.previousElementSibling; // eslint-disable-line
const prev = el.previousElementSibling; // eslint-disable-line
if (selector) {
if ($(_prev).is(selector)) prevEls.push(_prev);
} else prevEls.push(_prev);
if ($(prev).is(selector)) prevEls.push(prev);
} else prevEls.push(prev);
el = _prev;
el = prev;
}

@@ -1208,5 +1025,5 @@

function parent(selector) {
var parents = []; // eslint-disable-line
const parents = []; // eslint-disable-line
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (this[i].parentNode !== null) {

@@ -1225,15 +1042,15 @@ if (selector) {

function parents(selector) {
var parents = []; // eslint-disable-line
const parents = []; // eslint-disable-line
for (var i = 0; i < this.length; i += 1) {
var _parent = this[i].parentNode; // eslint-disable-line
for (let i = 0; i < this.length; i += 1) {
let parent = this[i].parentNode; // eslint-disable-line
while (_parent) {
while (parent) {
if (selector) {
if ($(_parent).is(selector)) parents.push(_parent);
if ($(parent).is(selector)) parents.push(parent);
} else {
parents.push(_parent);
parents.push(parent);
}
_parent = _parent.parentNode;
parent = parent.parentNode;
}

@@ -1246,3 +1063,3 @@ }

function closest(selector) {
var closest = this; // eslint-disable-line
let closest = this; // eslint-disable-line

@@ -1261,8 +1078,8 @@ if (typeof selector === 'undefined') {

function find(selector) {
var foundElements = [];
const foundElements = [];
for (var i = 0; i < this.length; i += 1) {
var found = this[i].querySelectorAll(selector);
for (let i = 0; i < this.length; i += 1) {
const found = this[i].querySelectorAll(selector);
for (var j = 0; j < found.length; j += 1) {
for (let j = 0; j < found.length; j += 1) {
foundElements.push(found[j]);

@@ -1276,8 +1093,8 @@ }

function children(selector) {
var children = []; // eslint-disable-line
const children = []; // eslint-disable-line
for (var i = 0; i < this.length; i += 1) {
var childNodes = this[i].children;
for (let i = 0; i < this.length; i += 1) {
const childNodes = this[i].children;
for (var j = 0; j < childNodes.length; j += 1) {
for (let j = 0; j < childNodes.length; j += 1) {
if (!selector || $(childNodes[j]).is(selector)) {

@@ -1293,3 +1110,3 @@ children.push(childNodes[j]);

function remove() {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);

@@ -1305,13 +1122,9 @@ }

function add() {
var dom = this;
var i;
var j;
function add(...els) {
const dom = this;
let i;
let j;
for (var _len10 = arguments.length, els = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
els[_key10] = arguments[_key10];
}
for (i = 0; i < els.length; i += 1) {
var toAdd = $(els[i]);
const toAdd = $(els[i]);

@@ -1327,7 +1140,7 @@ for (j = 0; j < toAdd.length; j += 1) {

function empty() {
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];
if (el.nodeType === 1) {
for (var j = 0; j < el.childNodes.length; j += 1) {
for (let j = 0; j < el.childNodes.length; j += 1) {
if (el.childNodes[j].parentNode) {

@@ -1347,22 +1160,9 @@ el.childNodes[j].parentNode.removeChild(el.childNodes[j]);

function scrollTo() {
var window = getWindow();
function scrollTo(...args) {
const window = getWindow();
let [left, top, duration, easing, callback] = args;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var left = args[0],
top = args[1],
duration = args[2],
easing = args[3],
callback = args[4];
if (args.length === 4 && typeof easing === 'function') {
callback = easing;
left = args[0];
top = args[1];
duration = args[2];
callback = args[3];
easing = args[4];
[left, top, duration, callback, easing] = args;
}

@@ -1372,15 +1172,15 @@

return this.each(function animate() {
var el = this;
var currentTop;
var currentLeft;
var maxTop;
var maxLeft;
var newTop;
var newLeft;
var scrollTop; // eslint-disable-line
const el = this;
let currentTop;
let currentLeft;
let maxTop;
let maxLeft;
let newTop;
let newLeft;
let scrollTop; // eslint-disable-line
var scrollLeft; // eslint-disable-line
let scrollLeft; // eslint-disable-line
var animateTop = top > 0 || top === 0;
var animateLeft = left > 0 || left === 0;
let animateTop = top > 0 || top === 0;
let animateLeft = left > 0 || left === 0;

@@ -1419,11 +1219,7 @@ if (typeof easing === 'undefined') {

var startTime = null;
let startTime = null;
if (animateTop && newTop === currentTop) animateTop = false;
if (animateLeft && newLeft === currentLeft) animateLeft = false;
function render(time) {
if (time === void 0) {
time = new Date().getTime();
}
function render(time = new Date().getTime()) {
if (startTime === null) {

@@ -1433,5 +1229,5 @@ startTime = time;

var progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
var easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;
var done;
const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;
let done;
if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);

@@ -1475,20 +1271,10 @@ if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);

function scrollTop() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
function scrollTop(...args) {
let [top, duration, easing, callback] = args;
var top = args[0],
duration = args[1],
easing = args[2],
callback = args[3];
if (args.length === 3 && typeof easing === 'function') {
top = args[0];
duration = args[1];
callback = args[2];
easing = args[3];
[top, duration, callback, easing] = args;
}
var dom = this;
const dom = this;

@@ -1503,20 +1289,10 @@ if (typeof top === 'undefined') {

function scrollLeft() {
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
function scrollLeft(...args) {
let [left, duration, easing, callback] = args;
var left = args[0],
duration = args[1],
easing = args[2],
callback = args[3];
if (args.length === 3 && typeof easing === 'function') {
left = args[0];
duration = args[1];
callback = args[2];
easing = args[3];
[left, duration, callback, easing] = args;
}
var dom = this;
const dom = this;

@@ -1534,5 +1310,5 @@ if (typeof left === 'undefined') {

function animate(initialProps, initialParams) {
var window = getWindow();
var els = this;
var a = {
const window = getWindow();
const els = this;
const a = {
props: Object.assign({}, initialProps),

@@ -1553,3 +1329,4 @@ params: Object.assign({

que: [],
easingProgress: function easingProgress(easing, progress) {
easingProgress(easing, progress) {
if (easing === 'swing') {

@@ -1565,3 +1342,4 @@ return 0.5 - Math.cos(progress * Math.PI) / 2;

},
stop: function stop() {
stop() {
if (a.frameId) {

@@ -1572,4 +1350,4 @@ window.cancelAnimationFrame(a.frameId);

a.animating = false;
a.elements.each(function (el) {
var element = el;
a.elements.each(el => {
const element = el;
delete element.dom7AnimateInstance;

@@ -1579,6 +1357,7 @@ });

},
done: function done(complete) {
done(complete) {
a.animating = false;
a.elements.each(function (el) {
var element = el;
a.elements.each(el => {
const element = el;
delete element.dom7AnimateInstance;

@@ -1589,7 +1368,8 @@ });

if (a.que.length > 0) {
var que = a.que.shift();
const que = a.que.shift();
a.animate(que[0], que[1]);
}
},
animate: function animate(props, params) {
animate(props, params) {
if (a.animating) {

@@ -1600,10 +1380,10 @@ a.que.push([props, params]);

var elements = []; // Define & Cache Initials & Units
const elements = []; // Define & Cache Initials & Units
a.elements.each(function (el, index) {
var initialFullValue;
var initialValue;
var unit;
var finalValue;
var finalFullValue;
a.elements.each((el, index) => {
let initialFullValue;
let initialValue;
let unit;
let finalValue;
let finalFullValue;
if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;

@@ -1613,3 +1393,3 @@ elements[index] = {

};
Object.keys(props).forEach(function (prop) {
Object.keys(props).forEach(prop => {
initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');

@@ -1621,7 +1401,7 @@ initialValue = parseFloat(initialFullValue);

elements[index][prop] = {
initialFullValue: initialFullValue,
initialValue: initialValue,
unit: unit,
finalValue: finalValue,
finalFullValue: finalFullValue,
initialFullValue,
initialValue,
unit,
finalValue,
finalFullValue,
currentValue: initialValue

@@ -1631,8 +1411,8 @@ };

});
var startTime = null;
var time;
var elementsDone = 0;
var propsDone = 0;
var done;
var began = false;
let startTime = null;
let time;
let elementsDone = 0;
let propsDone = 0;
let done;
let began = false;
a.animating = true;

@@ -1642,4 +1422,4 @@

time = new Date().getTime();
var progress;
var easeProgress; // let el;
let progress;
let easeProgress; // let el;

@@ -1660,15 +1440,16 @@ if (!began) {

elements.forEach(function (element) {
var el = element;
elements.forEach(element => {
const el = element;
if (done || el.done) return;
Object.keys(props).forEach(function (prop) {
Object.keys(props).forEach(prop => {
if (done || el.done) return;
progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);
easeProgress = a.easingProgress(params.easing, progress);
var _el$prop = el[prop],
initialValue = _el$prop.initialValue,
finalValue = _el$prop.finalValue,
unit = _el$prop.unit;
const {
initialValue,
finalValue,
unit
} = el[prop];
el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);
var currentValue = el[prop].currentValue;
const currentValue = el[prop].currentValue;

@@ -1705,2 +1486,3 @@ if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {

}
};

@@ -1712,5 +1494,5 @@

var animateInstance;
let animateInstance;
for (var i = 0; i < a.elements.length; i += 1) {
for (let i = 0; i < a.elements.length; i += 1) {
if (a.elements[i].dom7AnimateInstance) {

@@ -1735,5 +1517,5 @@ animateInstance = a.elements[i].dom7AnimateInstance;

function stop() {
var els = this;
const els = this;
for (var i = 0; i < els.length; i += 1) {
for (let i = 0; i < els.length; i += 1) {
if (els[i].dom7AnimateInstance) {

@@ -1745,12 +1527,8 @@ els[i].dom7AnimateInstance.stop();

var noTrigger = 'resize scroll'.split(' ');
const noTrigger = 'resize scroll'.split(' ');
function shortcut(name) {
function eventHandler() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
function eventHandler(...args) {
if (typeof args[0] === 'undefined') {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (noTrigger.indexOf(name) < 0) {

@@ -1766,3 +1544,3 @@ if (name in this[i]) this[i][name]();else {

return this.on.apply(this, [name].concat(args));
return this.on(name, ...args);
}

@@ -1773,26 +1551,26 @@

var click = shortcut('click');
var blur = shortcut('blur');
var focus = shortcut('focus');
var focusin = shortcut('focusin');
var focusout = shortcut('focusout');
var keyup = shortcut('keyup');
var keydown = shortcut('keydown');
var keypress = shortcut('keypress');
var submit = shortcut('submit');
var change = shortcut('change');
var mousedown = shortcut('mousedown');
var mousemove = shortcut('mousemove');
var mouseup = shortcut('mouseup');
var mouseenter = shortcut('mouseenter');
var mouseleave = shortcut('mouseleave');
var mouseout = shortcut('mouseout');
var mouseover = shortcut('mouseover');
var touchstart = shortcut('touchstart');
var touchend = shortcut('touchend');
var touchmove = shortcut('touchmove');
var resize = shortcut('resize');
var scroll = shortcut('scroll');
const click = shortcut('click');
const blur = shortcut('blur');
const focus = shortcut('focus');
const focusin = shortcut('focusin');
const focusout = shortcut('focusout');
const keyup = shortcut('keyup');
const keydown = shortcut('keydown');
const keypress = shortcut('keypress');
const submit = shortcut('submit');
const change = shortcut('change');
const mousedown = shortcut('mousedown');
const mousemove = shortcut('mousemove');
const mouseup = shortcut('mouseup');
const mouseenter = shortcut('mouseenter');
const mouseleave = shortcut('mouseleave');
const mouseout = shortcut('mouseout');
const mouseover = shortcut('mouseover');
const touchstart = shortcut('touchstart');
const touchend = shortcut('touchend');
const touchmove = shortcut('touchmove');
const resize = shortcut('resize');
const scroll = shortcut('scroll');
export default $;
export { $, add, addClass, animate, animationEnd, append, appendTo, attr, blur, change, children, click, closest, css, data, dataset, detach, each, empty, eq, filter, find, focus, focusin, focusout, hasClass, height, hide, html, index, insertAfter, insertBefore, is, keydown, keypress, keyup, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup, next, nextAll, off, offset, on, once, outerHeight, outerWidth, parent, parents, prepend, prependTo, prev, prevAll, prop, remove, removeAttr, removeClass, removeData, resize, scroll, scrollLeft, scrollTo, scrollTop, show, siblings, stop, styles, submit, text, toggleClass, touchend, touchmove, touchstart, transform, transition, transitionEnd, trigger, val, value, width };
/**
* Dom7 4.0.0-beta.1
* Dom7 4.0.0-beta.2
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API

@@ -10,3 +10,3 @@ * https://framework7.io/docs/dom7.html

*
* Released on: July 22, 2021
* Released on: August 4, 2021
*/

@@ -54,23 +54,23 @@ (function (global, factory) {

body: {},
addEventListener: function addEventListener() {},
removeEventListener: function removeEventListener() {},
addEventListener: function () {},
removeEventListener: function () {},
activeElement: {
blur: function blur() {},
blur: function () {},
nodeName: ''
},
querySelector: function querySelector() {
querySelector: function () {
return null;
},
querySelectorAll: function querySelectorAll() {
querySelectorAll: function () {
return [];
},
getElementById: function getElementById() {
getElementById: function () {
return null;
},
createEvent: function createEvent() {
createEvent: function () {
return {
initEvent: function initEvent() {}
initEvent: function () {}
};
},
createElement: function createElement() {
createElement: function () {
return {

@@ -80,4 +80,4 @@ children: [],

style: {},
setAttribute: function setAttribute() {},
getElementsByTagName: function getElementsByTagName() {
setAttribute: function () {},
getElementsByTagName: function () {
return [];

@@ -87,6 +87,6 @@ }

},
createElementNS: function createElementNS() {
createElementNS: function () {
return {};
},
importNode: function importNode() {
importNode: function () {
return null;

@@ -128,6 +128,6 @@ },

history: {
replaceState: function replaceState() {},
pushState: function pushState() {},
go: function go() {},
back: function back() {}
replaceState: function () {},
pushState: function () {},
go: function () {},
back: function () {}
},

@@ -137,7 +137,7 @@ CustomEvent: function CustomEvent() {

},
addEventListener: function addEventListener() {},
removeEventListener: function removeEventListener() {},
getComputedStyle: function getComputedStyle() {
addEventListener: function () {},
removeEventListener: function () {},
getComputedStyle: function () {
return {
getPropertyValue: function getPropertyValue() {
getPropertyValue: function () {
return '';

@@ -147,11 +147,11 @@ }

},
Image: function Image() {},
Date: function Date() {},
Image: function () {},
Date: function () {},
screen: {},
setTimeout: function setTimeout() {},
clearTimeout: function clearTimeout() {},
matchMedia: function matchMedia() {
setTimeout: function () {},
clearTimeout: function () {},
matchMedia: function () {
return {};
},
requestAnimationFrame: function requestAnimationFrame(callback) {
requestAnimationFrame: function (callback) {
if (typeof setTimeout === 'undefined') {

@@ -164,3 +164,3 @@ callback();

},
cancelAnimationFrame: function cancelAnimationFrame(id) {
cancelAnimationFrame: function (id) {
if (typeof setTimeout === 'undefined') {

@@ -180,137 +180,30 @@ return;

function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !_isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return _setPrototypeOf(Wrapper, Class);
};
return _wrapNativeSuper(Class);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
/* eslint-disable no-proto */
function makeReactive(obj) {
var proto = obj.__proto__;
const proto = obj.__proto__;
Object.defineProperty(obj, '__proto__', {
get: function get() {
get() {
return proto;
},
set: function set(value) {
set(value) {
proto.__proto__ = value;
}
});
}
var Dom7 = /*#__PURE__*/function (_Array) {
_inheritsLoose(Dom7, _Array);
function Dom7(items) {
var _this;
_this = _Array.call.apply(_Array, [this].concat(items)) || this;
makeReactive(_assertThisInitialized(_this));
return _this;
class Dom7 extends Array {
constructor(items) {
super(...items);
makeReactive(this);
}
return Dom7;
}( /*#__PURE__*/_wrapNativeSuper(Array));
}
function arrayFlat(arr) {
if (arr === void 0) {
arr = [];
}
var res = [];
arr.forEach(function (el) {
function arrayFlat(arr = []) {
const res = [];
arr.forEach(el => {
if (Array.isArray(el)) {
res.push.apply(res, arrayFlat(el));
res.push(...arrayFlat(el));
} else {

@@ -326,5 +219,5 @@ res.push(el);

function arrayUnique(arr) {
var uniqueArray = [];
const uniqueArray = [];
for (var i = 0; i < arr.length; i += 1) {
for (let i = 0; i < arr.length; i += 1) {
if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]);

@@ -336,5 +229,3 @@ }

function toCamelCase(string) {
return string.toLowerCase().replace(/-(.)/g, function (match, group) {
return group.toUpperCase();
});
return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase());
}

@@ -349,6 +240,6 @@

var a = [];
var res = context.querySelectorAll(selector);
const a = [];
const res = context.querySelectorAll(selector);
for (var i = 0; i < res.length; i += 1) {
for (let i = 0; i < res.length; i += 1) {
a.push(res[i]);

@@ -361,5 +252,5 @@ }

function $(selector, context) {
var window = getWindow();
var document = getDocument();
var arr = [];
const window = getWindow();
const document = getDocument();
let arr = [];

@@ -375,6 +266,6 @@ if (!context && selector instanceof Dom7) {

if (typeof selector === 'string') {
var html = selector.trim();
const html = selector.trim();
if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
var toCreate = 'div';
let toCreate = 'div';
if (html.indexOf('<li') === 0) toCreate = 'ul';

@@ -385,6 +276,6 @@ if (html.indexOf('<tr') === 0) toCreate = 'tbody';

if (html.indexOf('<option') === 0) toCreate = 'select';
var tempParent = document.createElement(toCreate);
const tempParent = document.createElement(toCreate);
tempParent.innerHTML = html;
for (var i = 0; i < tempParent.childNodes.length; i += 1) {
for (let i = 0; i < tempParent.childNodes.length; i += 1) {
arr.push(tempParent.childNodes[i]);

@@ -410,14 +301,6 @@ }

function addClass() {
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) {
classes[_key] = arguments[_key];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
this.forEach(function (el) {
var _el$classList;
(_el$classList = el.classList).add.apply(_el$classList, classNames);
function addClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
this.forEach(el => {
el.classList.add(...classNames);
});

@@ -427,14 +310,6 @@ return this;

function removeClass() {
for (var _len2 = arguments.length, classes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
classes[_key2] = arguments[_key2];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
this.forEach(function (el) {
var _el$classList2;
(_el$classList2 = el.classList).remove.apply(_el$classList2, classNames);
function removeClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
this.forEach(el => {
el.classList.remove(...classNames);
});

@@ -444,12 +319,6 @@ return this;

function toggleClass() {
for (var _len3 = arguments.length, classes = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
classes[_key3] = arguments[_key3];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
this.forEach(function (el) {
classNames.forEach(function (className) {
function toggleClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
this.forEach(el => {
classNames.forEach(className => {
el.classList.toggle(className);

@@ -460,14 +329,6 @@ });

function hasClass() {
for (var _len4 = arguments.length, classes = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
classes[_key4] = arguments[_key4];
}
var classNames = arrayFlat(classes.map(function (c) {
return c.split(' ');
}));
return arrayFilter(this, function (el) {
return classNames.filter(function (className) {
return el.classList.contains(className);
}).length > 0;
function hasClass(...classes) {
const classNames = arrayFlat(classes.map(c => c.split(' ')));
return arrayFilter(this, el => {
return classNames.filter(className => el.classList.contains(className)).length > 0;
}).length > 0;

@@ -484,3 +345,3 @@ }

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (arguments.length === 2) {

@@ -491,3 +352,3 @@ // String

// Object
for (var attrName in attrs) {
for (const attrName in attrs) {
this[i][attrName] = attrs[attrName];

@@ -503,3 +364,3 @@ this[i].setAttribute(attrName, attrs[attrName]);

function removeAttr(attr) {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].removeAttribute(attr);

@@ -517,3 +378,3 @@ }

// Set props
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (arguments.length === 2) {

@@ -524,3 +385,3 @@ // String

// Object
for (var propName in props) {
for (const propName in props) {
this[i][propName] = props[propName];

@@ -538,3 +399,3 @@ }

function data(key, value) {
var el;
let el;

@@ -549,3 +410,3 @@ if (typeof value === 'undefined') {

var dataKey = el.getAttribute("data-" + key);
const dataKey = el.getAttribute(`data-${key}`);

@@ -560,3 +421,3 @@ if (dataKey) {

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
el = this[i];

@@ -571,4 +432,4 @@ if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {};

function removeData(key) {
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];

@@ -583,16 +444,16 @@ if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {

function dataset() {
var el = this[0];
const el = this[0];
if (!el) return undefined;
var dataset = {}; // eslint-disable-line
const dataset = {}; // eslint-disable-line
if (el.dataset) {
for (var dataKey in el.dataset) {
for (const dataKey in el.dataset) {
dataset[dataKey] = el.dataset[dataKey];
}
} else {
for (var i = 0; i < el.attributes.length; i += 1) {
var _attr = el.attributes[i];
for (let i = 0; i < el.attributes.length; i += 1) {
const attr = el.attributes[i];
if (_attr.name.indexOf('data-') >= 0) {
dataset[toCamelCase(_attr.name.split('data-')[1])] = _attr.value;
if (attr.name.indexOf('data-') >= 0) {
dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value;
}

@@ -602,3 +463,3 @@ }

for (var key in dataset) {
for (const key in dataset) {
if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1;

@@ -613,9 +474,9 @@ }

// get value
var el = this[0];
const el = this[0];
if (!el) return undefined;
if (el.multiple && el.nodeName.toLowerCase() === 'select') {
var values = [];
const values = [];
for (var i = 0; i < el.selectedOptions.length; i += 1) {
for (let i = 0; i < el.selectedOptions.length; i += 1) {
values.push(el.selectedOptions[i].value);

@@ -631,11 +492,11 @@ }

for (var _i = 0; _i < this.length; _i += 1) {
var _el = this[_i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];
if (Array.isArray(value) && _el.multiple && _el.nodeName.toLowerCase() === 'select') {
for (var j = 0; j < _el.options.length; j += 1) {
_el.options[j].selected = value.indexOf(_el.options[j].value) >= 0;
if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') {
for (let j = 0; j < el.options.length; j += 1) {
el.options[j].selected = value.indexOf(el.options[j].value) >= 0;
}
} else {
_el.value = value;
el.value = value;
}

@@ -652,3 +513,3 @@ }

function transform(transform) {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].style.transform = transform;

@@ -661,4 +522,4 @@ }

function transition(duration) {
for (var i = 0; i < this.length; i += 1) {
this[i].style.transitionDuration = typeof duration !== 'string' ? duration + "ms" : duration;
for (let i = 0; i < this.length; i += 1) {
this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration;
}

@@ -669,16 +530,7 @@

function on() {
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
args[_key5] = arguments[_key5];
}
function on(...args) {
let [eventType, targetSelector, listener, capture] = args;
var eventType = args[0],
targetSelector = args[1],
listener = args[2],
capture = args[3];
if (typeof args[1] === 'function') {
eventType = args[0];
listener = args[1];
capture = args[2];
[eventType, listener, capture] = args;
targetSelector = undefined;

@@ -690,5 +542,5 @@ }

function handleLiveEvent(e) {
var target = e.target;
const target = e.target;
if (!target) return;
var eventData = e.target.dom7EventData || [];
const eventData = e.target.dom7EventData || [];

@@ -700,7 +552,6 @@ if (eventData.indexOf(e) < 0) {

if ($(target).is(targetSelector)) listener.apply(target, eventData);else {
var _parents = $(target).parents(); // eslint-disable-line
const parents = $(target).parents(); // eslint-disable-line
for (var k = 0; k < _parents.length; k += 1) {
if ($(_parents[k]).is(targetSelector)) listener.apply(_parents[k], eventData);
for (let k = 0; k < parents.length; k += 1) {
if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData);
}

@@ -711,3 +562,3 @@ }

function handleEvent(e) {
var eventData = e && e.target ? e.target.dom7EventData || [] : [];
const eventData = e && e.target ? e.target.dom7EventData || [] : [];

@@ -721,15 +572,15 @@ if (eventData.indexOf(e) < 0) {

var events = eventType.split(' ');
var j;
const events = eventType.split(' ');
let j;
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];
if (!targetSelector) {
for (j = 0; j < events.length; j += 1) {
var event = events[j];
const event = events[j];
if (!el.dom7Listeners) el.dom7Listeners = {};
if (!el.dom7Listeners[event]) el.dom7Listeners[event] = [];
el.dom7Listeners[event].push({
listener: listener,
listener,
proxyListener: handleEvent

@@ -742,12 +593,10 @@ });

for (j = 0; j < events.length; j += 1) {
var _event = events[j];
const event = events[j];
if (!el.dom7LiveListeners) el.dom7LiveListeners = {};
if (!el.dom7LiveListeners[_event]) el.dom7LiveListeners[_event] = [];
el.dom7LiveListeners[_event].push({
listener: listener,
if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = [];
el.dom7LiveListeners[event].push({
listener,
proxyListener: handleLiveEvent
});
el.addEventListener(_event, handleLiveEvent, capture);
el.addEventListener(event, handleLiveEvent, capture);
}

@@ -760,16 +609,7 @@ }

function off() {
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
args[_key6] = arguments[_key6];
}
function off(...args) {
let [eventType, targetSelector, listener, capture] = args;
var eventType = args[0],
targetSelector = args[1],
listener = args[2],
capture = args[3];
if (typeof args[1] === 'function') {
eventType = args[0];
listener = args[1];
capture = args[2];
[eventType, listener, capture] = args;
targetSelector = undefined;

@@ -779,10 +619,10 @@ }

if (!capture) capture = false;
var events = eventType.split(' ');
const events = eventType.split(' ');
for (var i = 0; i < events.length; i += 1) {
var event = events[i];
for (let i = 0; i < events.length; i += 1) {
const event = events[i];
for (var j = 0; j < this.length; j += 1) {
var el = this[j];
var handlers = void 0;
for (let j = 0; j < this.length; j += 1) {
const el = this[j];
let handlers;

@@ -796,4 +636,4 @@ if (!targetSelector && el.dom7Listeners) {

if (handlers && handlers.length) {
for (var k = handlers.length - 1; k >= 0; k -= 1) {
var handler = handlers[k];
for (let k = handlers.length - 1; k >= 0; k -= 1) {
const handler = handlers[k];

@@ -818,26 +658,12 @@ if (listener && handler.listener === listener) {

function once() {
var dom = this;
function once(...args) {
const dom = this;
let [eventName, targetSelector, listener, capture] = args;
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
args[_key7] = arguments[_key7];
}
var eventName = args[0],
targetSelector = args[1],
listener = args[2],
capture = args[3];
if (typeof args[1] === 'function') {
eventName = args[0];
listener = args[1];
capture = args[2];
[eventName, listener, capture] = args;
targetSelector = undefined;
}
function onceHandler() {
for (var _len8 = arguments.length, eventArgs = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
eventArgs[_key8] = arguments[_key8];
}
function onceHandler(...eventArgs) {
listener.apply(this, eventArgs);

@@ -855,20 +681,15 @@ dom.off(eventName, targetSelector, onceHandler, capture);

function trigger() {
var window = getWindow();
function trigger(...args) {
const window = getWindow();
const events = args[0].split(' ');
const eventData = args[1];
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
args[_key9] = arguments[_key9];
}
for (let i = 0; i < events.length; i += 1) {
const event = events[i];
var events = args[0].split(' ');
var eventData = args[1];
for (let j = 0; j < this.length; j += 1) {
const el = this[j];
for (var i = 0; i < events.length; i += 1) {
var event = events[i];
for (var j = 0; j < this.length; j += 1) {
var el = this[j];
if (window.CustomEvent) {
var evt = new window.CustomEvent(event, {
const evt = new window.CustomEvent(event, {
detail: eventData,

@@ -878,5 +699,3 @@ bubbles: true,

});
el.dom7EventData = args.filter(function (data, dataIndex) {
return dataIndex > 0;
});
el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0);
el.dispatchEvent(evt);

@@ -893,3 +712,3 @@ el.dom7EventData = [];

function transitionEnd(callback) {
var dom = this;
const dom = this;

@@ -910,3 +729,3 @@ function fireCallBack(e) {

function animationEnd(callback) {
var dom = this;
const dom = this;

@@ -927,3 +746,3 @@ function fireCallBack(e) {

function width() {
var window = getWindow();
const window = getWindow();

@@ -944,5 +763,4 @@ if (this[0] === window) {

if (includeMargins) {
var _styles = this.styles();
return this[0].offsetWidth + parseFloat(_styles.getPropertyValue('margin-right')) + parseFloat(_styles.getPropertyValue('margin-left'));
const styles = this.styles();
return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
}

@@ -957,3 +775,3 @@

function height() {
var window = getWindow();
const window = getWindow();

@@ -974,5 +792,4 @@ if (this[0] === window) {

if (includeMargins) {
var _styles2 = this.styles();
return this[0].offsetHeight + parseFloat(_styles2.getPropertyValue('margin-top')) + parseFloat(_styles2.getPropertyValue('margin-bottom'));
const styles = this.styles();
return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
}

@@ -988,11 +805,11 @@

if (this.length > 0) {
var window = getWindow();
var document = getDocument();
var el = this[0];
var box = el.getBoundingClientRect();
var body = document.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;
const window = getWindow();
const document = getDocument();
const el = this[0];
const box = el.getBoundingClientRect();
const body = document.body;
const clientTop = el.clientTop || body.clientTop || 0;
const clientLeft = el.clientLeft || body.clientLeft || 0;
const scrollTop = el === window ? window.scrollY : el.scrollTop;
const scrollLeft = el === window ? window.scrollX : el.scrollLeft;
return {

@@ -1008,3 +825,3 @@ top: box.top + scrollTop - clientTop,

function hide() {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].style.display = 'none';

@@ -1017,6 +834,6 @@ }

function show() {
var window = getWindow();
const window = getWindow();
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];

@@ -1037,3 +854,3 @@ if (el.style.display === 'none') {

function styles() {
var window = getWindow();
const window = getWindow();
if (this[0]) return window.getComputedStyle(this[0], null);

@@ -1044,4 +861,4 @@ return {};

function css(props, value) {
var window = getWindow();
var i;
const window = getWindow();
let i;

@@ -1055,4 +872,4 @@ if (arguments.length === 1) {

for (i = 0; i < this.length; i += 1) {
for (var _prop in props) {
this[i].style[_prop] = props[_prop];
for (const prop in props) {
this[i].style[prop] = props[prop];
}

@@ -1079,3 +896,3 @@ }

if (!callback) return this;
this.forEach(function (el, index) {
this.forEach((el, index) => {
callback.apply(el, [el, index]);

@@ -1087,3 +904,3 @@ });

function filter(callback) {
var result = arrayFilter(this, callback);
const result = arrayFilter(this, callback);
return $(result);

@@ -1097,3 +914,3 @@ }

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].innerHTML = html;

@@ -1110,3 +927,3 @@ }

for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
this[i].textContent = text;

@@ -1119,7 +936,7 @@ }

function is(selector) {
var window = getWindow();
var document = getDocument();
var el = this[0];
var compareWith;
var i;
const window = getWindow();
const document = getDocument();
const el = this[0];
let compareWith;
let i;
if (!el || typeof selector === 'undefined') return false;

@@ -1162,4 +979,4 @@

function index() {
var child = this[0];
var i;
let child = this[0];
let i;

@@ -1181,3 +998,3 @@ if (child) {

if (typeof index === 'undefined') return this;
var length = this.length;
const length = this.length;

@@ -1189,3 +1006,3 @@ if (index > length - 1) {

if (index < 0) {
var returnIndex = length + index;
const returnIndex = length + index;
if (returnIndex < 0) return $([]);

@@ -1198,12 +1015,12 @@ return $([this[returnIndex]]);

function append() {
var newChild;
var document = getDocument();
function append(...els) {
let newChild;
const document = getDocument();
for (var k = 0; k < arguments.length; k += 1) {
newChild = k < 0 || arguments.length <= k ? undefined : arguments[k];
for (let k = 0; k < els.length; k += 1) {
newChild = els[k];
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (typeof newChild === 'string') {
var tempDiv = document.createElement('div');
const tempDiv = document.createElement('div');
tempDiv.innerHTML = newChild;

@@ -1215,3 +1032,3 @@

} else if (newChild instanceof Dom7) {
for (var j = 0; j < newChild.length; j += 1) {
for (let j = 0; j < newChild.length; j += 1) {
this[i].appendChild(newChild[j]);

@@ -1234,9 +1051,9 @@ }

function prepend(newChild) {
var document = getDocument();
var i;
var j;
const document = getDocument();
let i;
let j;
for (i = 0; i < this.length; i += 1) {
if (typeof newChild === 'string') {
var tempDiv = document.createElement('div');
const tempDiv = document.createElement('div');
tempDiv.innerHTML = newChild;

@@ -1265,9 +1082,9 @@

function insertBefore(selector) {
var before = $(selector);
const before = $(selector);
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (before.length === 1) {
before[0].parentNode.insertBefore(this[i], before[0]);
} else if (before.length > 1) {
for (var j = 0; j < before.length; j += 1) {
for (let j = 0; j < before.length; j += 1) {
before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]);

@@ -1280,9 +1097,9 @@ }

function insertAfter(selector) {
var after = $(selector);
const after = $(selector);
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (after.length === 1) {
after[0].parentNode.insertBefore(this[i], after[0].nextSibling);
} else if (after.length > 1) {
for (var j = 0; j < after.length; j += 1) {
for (let j = 0; j < after.length; j += 1) {
after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling);

@@ -1312,14 +1129,14 @@ }

function nextAll(selector) {
var nextEls = [];
var el = this[0];
const nextEls = [];
let el = this[0];
if (!el) return $([]);
while (el.nextElementSibling) {
var _next = el.nextElementSibling; // eslint-disable-line
const next = el.nextElementSibling; // eslint-disable-line
if (selector) {
if ($(_next).is(selector)) nextEls.push(_next);
} else nextEls.push(_next);
if ($(next).is(selector)) nextEls.push(next);
} else nextEls.push(next);
el = _next;
el = next;
}

@@ -1332,3 +1149,3 @@

if (this.length > 0) {
var el = this[0];
const el = this[0];

@@ -1351,14 +1168,14 @@ if (selector) {

function prevAll(selector) {
var prevEls = [];
var el = this[0];
const prevEls = [];
let el = this[0];
if (!el) return $([]);
while (el.previousElementSibling) {
var _prev = el.previousElementSibling; // eslint-disable-line
const prev = el.previousElementSibling; // eslint-disable-line
if (selector) {
if ($(_prev).is(selector)) prevEls.push(_prev);
} else prevEls.push(_prev);
if ($(prev).is(selector)) prevEls.push(prev);
} else prevEls.push(prev);
el = _prev;
el = prev;
}

@@ -1374,5 +1191,5 @@

function parent(selector) {
var parents = []; // eslint-disable-line
const parents = []; // eslint-disable-line
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (this[i].parentNode !== null) {

@@ -1391,15 +1208,15 @@ if (selector) {

function parents(selector) {
var parents = []; // eslint-disable-line
const parents = []; // eslint-disable-line
for (var i = 0; i < this.length; i += 1) {
var _parent = this[i].parentNode; // eslint-disable-line
for (let i = 0; i < this.length; i += 1) {
let parent = this[i].parentNode; // eslint-disable-line
while (_parent) {
while (parent) {
if (selector) {
if ($(_parent).is(selector)) parents.push(_parent);
if ($(parent).is(selector)) parents.push(parent);
} else {
parents.push(_parent);
parents.push(parent);
}
_parent = _parent.parentNode;
parent = parent.parentNode;
}

@@ -1412,3 +1229,3 @@ }

function closest(selector) {
var closest = this; // eslint-disable-line
let closest = this; // eslint-disable-line

@@ -1427,8 +1244,8 @@ if (typeof selector === 'undefined') {

function find(selector) {
var foundElements = [];
const foundElements = [];
for (var i = 0; i < this.length; i += 1) {
var found = this[i].querySelectorAll(selector);
for (let i = 0; i < this.length; i += 1) {
const found = this[i].querySelectorAll(selector);
for (var j = 0; j < found.length; j += 1) {
for (let j = 0; j < found.length; j += 1) {
foundElements.push(found[j]);

@@ -1442,8 +1259,8 @@ }

function children(selector) {
var children = []; // eslint-disable-line
const children = []; // eslint-disable-line
for (var i = 0; i < this.length; i += 1) {
var childNodes = this[i].children;
for (let i = 0; i < this.length; i += 1) {
const childNodes = this[i].children;
for (var j = 0; j < childNodes.length; j += 1) {
for (let j = 0; j < childNodes.length; j += 1) {
if (!selector || $(childNodes[j]).is(selector)) {

@@ -1459,3 +1276,3 @@ children.push(childNodes[j]);

function remove() {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (this[i].parentNode) this[i].parentNode.removeChild(this[i]);

@@ -1471,13 +1288,9 @@ }

function add() {
var dom = this;
var i;
var j;
function add(...els) {
const dom = this;
let i;
let j;
for (var _len10 = arguments.length, els = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
els[_key10] = arguments[_key10];
}
for (i = 0; i < els.length; i += 1) {
var toAdd = $(els[i]);
const toAdd = $(els[i]);

@@ -1493,7 +1306,7 @@ for (j = 0; j < toAdd.length; j += 1) {

function empty() {
for (var i = 0; i < this.length; i += 1) {
var el = this[i];
for (let i = 0; i < this.length; i += 1) {
const el = this[i];
if (el.nodeType === 1) {
for (var j = 0; j < el.childNodes.length; j += 1) {
for (let j = 0; j < el.childNodes.length; j += 1) {
if (el.childNodes[j].parentNode) {

@@ -1573,22 +1386,9 @@ el.childNodes[j].parentNode.removeChild(el.childNodes[j]);

function scrollTo() {
var window = getWindow();
function scrollTo(...args) {
const window = getWindow();
let [left, top, duration, easing, callback] = args;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var left = args[0],
top = args[1],
duration = args[2],
easing = args[3],
callback = args[4];
if (args.length === 4 && typeof easing === 'function') {
callback = easing;
left = args[0];
top = args[1];
duration = args[2];
callback = args[3];
easing = args[4];
[left, top, duration, callback, easing] = args;
}

@@ -1598,15 +1398,15 @@

return this.each(function animate() {
var el = this;
var currentTop;
var currentLeft;
var maxTop;
var maxLeft;
var newTop;
var newLeft;
var scrollTop; // eslint-disable-line
const el = this;
let currentTop;
let currentLeft;
let maxTop;
let maxLeft;
let newTop;
let newLeft;
let scrollTop; // eslint-disable-line
var scrollLeft; // eslint-disable-line
let scrollLeft; // eslint-disable-line
var animateTop = top > 0 || top === 0;
var animateLeft = left > 0 || left === 0;
let animateTop = top > 0 || top === 0;
let animateLeft = left > 0 || left === 0;

@@ -1645,11 +1445,7 @@ if (typeof easing === 'undefined') {

var startTime = null;
let startTime = null;
if (animateTop && newTop === currentTop) animateTop = false;
if (animateLeft && newLeft === currentLeft) animateLeft = false;
function render(time) {
if (time === void 0) {
time = new Date().getTime();
}
function render(time = new Date().getTime()) {
if (startTime === null) {

@@ -1659,5 +1455,5 @@ startTime = time;

var progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
var easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;
var done;
const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2;
let done;
if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop);

@@ -1701,20 +1497,10 @@ if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft);

function scrollTop() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
function scrollTop(...args) {
let [top, duration, easing, callback] = args;
var top = args[0],
duration = args[1],
easing = args[2],
callback = args[3];
if (args.length === 3 && typeof easing === 'function') {
top = args[0];
duration = args[1];
callback = args[2];
easing = args[3];
[top, duration, callback, easing] = args;
}
var dom = this;
const dom = this;

@@ -1729,20 +1515,10 @@ if (typeof top === 'undefined') {

function scrollLeft() {
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
args[_key3] = arguments[_key3];
}
function scrollLeft(...args) {
let [left, duration, easing, callback] = args;
var left = args[0],
duration = args[1],
easing = args[2],
callback = args[3];
if (args.length === 3 && typeof easing === 'function') {
left = args[0];
duration = args[1];
callback = args[2];
easing = args[3];
[left, duration, callback, easing] = args;
}
var dom = this;
const dom = this;

@@ -1767,5 +1543,5 @@ if (typeof left === 'undefined') {

function animate(initialProps, initialParams) {
var window = getWindow();
var els = this;
var a = {
const window = getWindow();
const els = this;
const a = {
props: Object.assign({}, initialProps),

@@ -1786,3 +1562,4 @@ params: Object.assign({

que: [],
easingProgress: function easingProgress(easing, progress) {
easingProgress(easing, progress) {
if (easing === 'swing') {

@@ -1798,3 +1575,4 @@ return 0.5 - Math.cos(progress * Math.PI) / 2;

},
stop: function stop() {
stop() {
if (a.frameId) {

@@ -1805,4 +1583,4 @@ window.cancelAnimationFrame(a.frameId);

a.animating = false;
a.elements.each(function (el) {
var element = el;
a.elements.each(el => {
const element = el;
delete element.dom7AnimateInstance;

@@ -1812,6 +1590,7 @@ });

},
done: function done(complete) {
done(complete) {
a.animating = false;
a.elements.each(function (el) {
var element = el;
a.elements.each(el => {
const element = el;
delete element.dom7AnimateInstance;

@@ -1822,7 +1601,8 @@ });

if (a.que.length > 0) {
var que = a.que.shift();
const que = a.que.shift();
a.animate(que[0], que[1]);
}
},
animate: function animate(props, params) {
animate(props, params) {
if (a.animating) {

@@ -1833,10 +1613,10 @@ a.que.push([props, params]);

var elements = []; // Define & Cache Initials & Units
const elements = []; // Define & Cache Initials & Units
a.elements.each(function (el, index) {
var initialFullValue;
var initialValue;
var unit;
var finalValue;
var finalFullValue;
a.elements.each((el, index) => {
let initialFullValue;
let initialValue;
let unit;
let finalValue;
let finalFullValue;
if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a;

@@ -1846,3 +1626,3 @@ elements[index] = {

};
Object.keys(props).forEach(function (prop) {
Object.keys(props).forEach(prop => {
initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');

@@ -1854,7 +1634,7 @@ initialValue = parseFloat(initialFullValue);

elements[index][prop] = {
initialFullValue: initialFullValue,
initialValue: initialValue,
unit: unit,
finalValue: finalValue,
finalFullValue: finalFullValue,
initialFullValue,
initialValue,
unit,
finalValue,
finalFullValue,
currentValue: initialValue

@@ -1864,8 +1644,8 @@ };

});
var startTime = null;
var time;
var elementsDone = 0;
var propsDone = 0;
var done;
var began = false;
let startTime = null;
let time;
let elementsDone = 0;
let propsDone = 0;
let done;
let began = false;
a.animating = true;

@@ -1875,4 +1655,4 @@

time = new Date().getTime();
var progress;
var easeProgress; // let el;
let progress;
let easeProgress; // let el;

@@ -1893,15 +1673,16 @@ if (!began) {

elements.forEach(function (element) {
var el = element;
elements.forEach(element => {
const el = element;
if (done || el.done) return;
Object.keys(props).forEach(function (prop) {
Object.keys(props).forEach(prop => {
if (done || el.done) return;
progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);
easeProgress = a.easingProgress(params.easing, progress);
var _el$prop = el[prop],
initialValue = _el$prop.initialValue,
finalValue = _el$prop.finalValue,
unit = _el$prop.unit;
const {
initialValue,
finalValue,
unit
} = el[prop];
el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue);
var currentValue = el[prop].currentValue;
const currentValue = el[prop].currentValue;

@@ -1938,2 +1719,3 @@ if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) {

}
};

@@ -1945,5 +1727,5 @@

var animateInstance;
let animateInstance;
for (var i = 0; i < a.elements.length; i += 1) {
for (let i = 0; i < a.elements.length; i += 1) {
if (a.elements[i].dom7AnimateInstance) {

@@ -1968,5 +1750,5 @@ animateInstance = a.elements[i].dom7AnimateInstance;

function stop() {
var els = this;
const els = this;
for (var i = 0; i < els.length; i += 1) {
for (let i = 0; i < els.length; i += 1) {
if (els[i].dom7AnimateInstance) {

@@ -1984,12 +1766,8 @@ els[i].dom7AnimateInstance.stop();

var noTrigger = 'resize scroll'.split(' ');
const noTrigger = 'resize scroll'.split(' ');
function shortcut(name) {
function eventHandler() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
function eventHandler(...args) {
if (typeof args[0] === 'undefined') {
for (var i = 0; i < this.length; i += 1) {
for (let i = 0; i < this.length; i += 1) {
if (noTrigger.indexOf(name) < 0) {

@@ -2005,3 +1783,3 @@ if (name in this[i]) this[i][name]();else {

return this.on.apply(this, [name].concat(args));
return this.on(name, ...args);
}

@@ -2012,24 +1790,24 @@

var click = shortcut('click');
var blur = shortcut('blur');
var focus = shortcut('focus');
var focusin = shortcut('focusin');
var focusout = shortcut('focusout');
var keyup = shortcut('keyup');
var keydown = shortcut('keydown');
var keypress = shortcut('keypress');
var submit = shortcut('submit');
var change = shortcut('change');
var mousedown = shortcut('mousedown');
var mousemove = shortcut('mousemove');
var mouseup = shortcut('mouseup');
var mouseenter = shortcut('mouseenter');
var mouseleave = shortcut('mouseleave');
var mouseout = shortcut('mouseout');
var mouseover = shortcut('mouseover');
var touchstart = shortcut('touchstart');
var touchend = shortcut('touchend');
var touchmove = shortcut('touchmove');
var resize = shortcut('resize');
var scroll = shortcut('scroll');
const click = shortcut('click');
const blur = shortcut('blur');
const focus = shortcut('focus');
const focusin = shortcut('focusin');
const focusout = shortcut('focusout');
const keyup = shortcut('keyup');
const keydown = shortcut('keydown');
const keypress = shortcut('keypress');
const submit = shortcut('submit');
const change = shortcut('change');
const mousedown = shortcut('mousedown');
const mousemove = shortcut('mousemove');
const mouseup = shortcut('mouseup');
const mouseenter = shortcut('mouseenter');
const mouseleave = shortcut('mouseleave');
const mouseout = shortcut('mouseout');
const mouseover = shortcut('mouseover');
const touchstart = shortcut('touchstart');
const touchend = shortcut('touchend');
const touchmove = shortcut('touchmove');
const resize = shortcut('resize');
const scroll = shortcut('scroll');

@@ -2062,4 +1840,4 @@ var shortcuts = /*#__PURE__*/Object.freeze({

[methods, scroll$1, animate$1, shortcuts].forEach(function (group) {
Object.keys(group).forEach(function (methodName) {
[methods, scroll$1, animate$1, shortcuts].forEach(group => {
Object.keys(group).forEach(methodName => {
$.fn[methodName] = group[methodName];

@@ -2066,0 +1844,0 @@ });

/**
* Dom7 4.0.0-beta.1
* Dom7 4.0.0-beta.2
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API

@@ -10,5 +10,5 @@ * https://framework7.io/docs/dom7.html

*
* Released on: July 22, 2021
* Released on: August 4, 2021
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Dom7=e()}(this,(function(){"use strict";function t(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function e(n,r){void 0===n&&(n={}),void 0===r&&(r={}),Object.keys(r).forEach((function(i){void 0===n[i]?n[i]=r[i]:t(r[i])&&t(n[i])&&Object.keys(r[i]).length>0&&e(n[i],r[i])}))}var n={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[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){var t="undefined"!=typeof document?document:{};return e(t,n),t}var i={document:n,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function o(){var t="undefined"!=typeof window?window:{};return e(t,i),t}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(t,e,n){return(u=l()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function f(t){var e="function"==typeof Map?new Map:void 0;return(f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return u(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)})(t)}var h=function(t){var e,n;function r(e){var n,r,i;return n=t.call.apply(t,[this].concat(e))||this,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n),i=r.__proto__,Object.defineProperty(r,"__proto__",{get:function(){return i},set:function(t){i.__proto__=t}}),n}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n),r}(f(Array));function c(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,c(t)):e.push(t)})),e}function d(t,e){return Array.prototype.filter.call(t,e)}function p(t,e){var n=o(),i=r(),s=[];if(!e&&t instanceof h)return t;if(!t)return new h(s);if("string"==typeof t){var a=t.trim();if(a.indexOf("<")>=0&&a.indexOf(">")>=0){var l="div";0===a.indexOf("<li")&&(l="ul"),0===a.indexOf("<tr")&&(l="tbody"),0!==a.indexOf("<td")&&0!==a.indexOf("<th")||(l="tr"),0===a.indexOf("<tbody")&&(l="table"),0===a.indexOf("<option")&&(l="select");var u=i.createElement(l);u.innerHTML=a;for(var f=0;f<u.childNodes.length;f+=1)s.push(u.childNodes[f])}else s=function(t,e){if("string"!=typeof t)return[t];for(var n=[],r=e.querySelectorAll(t),i=0;i<r.length;i+=1)n.push(r[i]);return n}(t.trim(),e||i)}else if(t.nodeType||t===n||t===i)s.push(t);else if(Array.isArray(t)){if(t instanceof h)return t;s=t}return new h(function(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(s))}p.fn=h.prototype;var v=Object.freeze({__proto__:null,addClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=c(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).add.apply(e,r)})),this},removeClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=c(e.map((function(t){return t.split(" ")})));return this.forEach((function(t){var e;(e=t.classList).remove.apply(e,r)})),this},toggleClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=c(e.map((function(t){return t.split(" ")})));this.forEach((function(t){r.forEach((function(e){t.classList.toggle(e)}))}))},hasClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=c(e.map((function(t){return t.split(" ")})));return d(this,(function(t){return r.filter((function(e){return t.classList.contains(e)})).length>0})).length>0},attr:function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(var r in t)this[n][r]=t[r],this[n].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){if(1!==arguments.length||"string"!=typeof t){for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n][t]=e;else for(var r in t)this[n][r]=t[r];return this}return this[0]?this[0][t]:this},data:function(t,e){var n;if(void 0===e){if(!(n=this[0]))return;if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];var r=n.getAttribute("data-"+t);return r||void 0}for(var i=0;i<this.length;i+=1)(n=this[i]).dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this},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 r in t.dataset)n[r]=t.dataset[r];else for(var i=0;i<t.attributes.length;i+=1){var o=t.attributes[i];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){var e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){for(var n=[],r=0;r<e.selectedOptions.length;r+=1)n.push(e.selectedOptions[r].value);return n}return e.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(t)&&o.multiple&&"select"===o.nodeName.toLowerCase())for(var s=0;s<o.options.length;s+=1)o.options[s].selected=t.indexOf(o.options[s].value)>=0;else o.value=t}return this},value:function(t){return this.val(t)},transform:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transform=t;return this},transition:function(t){for(var e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?t+"ms":t;return this},on:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];function a(t){var e=t.target;if(e){var n=t.target.dom7EventData||[];if(n.indexOf(t)<0&&n.unshift(t),p(e).is(i))o.apply(e,n);else for(var r=p(e).parents(),s=0;s<r.length;s+=1)p(r[s]).is(i)&&o.apply(r[s],n)}}function l(t){var e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),o.apply(this,e)}"function"==typeof e[1]&&(r=e[0],o=e[1],s=e[2],i=void 0),s||(s=!1);for(var u,f=r.split(" "),h=0;h<this.length;h+=1){var c=this[h];if(i)for(u=0;u<f.length;u+=1){var d=f[u];c.dom7LiveListeners||(c.dom7LiveListeners={}),c.dom7LiveListeners[d]||(c.dom7LiveListeners[d]=[]),c.dom7LiveListeners[d].push({listener:o,proxyListener:a}),c.addEventListener(d,a,s)}else for(u=0;u<f.length;u+=1){var v=f[u];c.dom7Listeners||(c.dom7Listeners={}),c.dom7Listeners[v]||(c.dom7Listeners[v]=[]),c.dom7Listeners[v].push({listener:o,proxyListener:l}),c.addEventListener(v,l,s)}}return this},off:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];"function"==typeof e[1]&&(r=e[0],o=e[1],s=e[2],i=void 0),s||(s=!1);for(var a=r.split(" "),l=0;l<a.length;l+=1)for(var u=a[l],f=0;f<this.length;f+=1){var h=this[f],c=void 0;if(!i&&h.dom7Listeners?c=h.dom7Listeners[u]:i&&h.dom7LiveListeners&&(c=h.dom7LiveListeners[u]),c&&c.length)for(var d=c.length-1;d>=0;d-=1){var p=c[d];o&&p.listener===o||o&&p.listener&&p.listener.dom7proxy&&p.listener.dom7proxy===o?(h.removeEventListener(u,p.proxyListener,s),c.splice(d,1)):o||(h.removeEventListener(u,p.proxyListener,s),c.splice(d,1))}}return this},once:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],o=n[1],s=n[2],a=n[3];function l(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];s.apply(this,n),t.off(i,o,l,a),l.dom7proxy&&delete l.dom7proxy}return"function"==typeof n[1]&&(i=n[0],s=n[1],a=n[2],o=void 0),l.dom7proxy=s,t.on(i,o,l,a)},trigger:function(){for(var t=o(),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n[0].split(" "),s=n[1],a=0;a<i.length;a+=1)for(var l=i[a],u=0;u<this.length;u+=1){var f=this[u];if(t.CustomEvent){var h=new t.CustomEvent(l,{detail:s,bubbles:!0,cancelable:!0});f.dom7EventData=n.filter((function(t,e){return e>0})),f.dispatchEvent(h),f.dom7EventData=[],delete f.dom7EventData}}return this},transitionEnd:function(t){var e=this;return t&&e.on("transitionend",(function n(r){r.target===this&&(t.call(this,r),e.off("transitionend",n))})),this},animationEnd:function(t){var e=this;return t&&e.on("animationend",(function n(r){r.target===this&&(t.call(this,r),e.off("animationend",n))})),this},width:function(){var t=o();return this[0]===t?t.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(){var t=o();return this[0]===t?t.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 t=o(),e=r(),n=this[0],i=n.getBoundingClientRect(),s=e.body,a=n.clientTop||s.clientTop||0,l=n.clientLeft||s.clientLeft||0,u=n===t?t.scrollY:n.scrollTop,f=n===t?t.scrollX:n.scrollLeft;return{top:i.top+u-a,left:i.left+f-l}}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=o(),e=0;e<this.length;e+=1){var n=this[e];"none"===n.style.display&&(n.style.display=""),"none"===t.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this},styles:function(){var t=o();return this[0]?t.getComputedStyle(this[0],null):{}},css:function(t,e){var n,r=o();if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(var i in t)this[n].style[i]=t[i];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)this[n].style[t]=e;return this}return this},each:function(t){return t?(this.forEach((function(e,n){t.apply(e,[e,n])})),this):this},filter:function(t){return p(d(this,t))},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;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(t){var e,n,i=o(),s=r(),a=this[0];if(!a||void 0===t)return!1;if("string"==typeof t){if(a.matches)return a.matches(t);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(t);if(a.msMatchesSelector)return a.msMatchesSelector(t);for(e=p(t),n=0;n<e.length;n+=1)if(e[n]===a)return!0;return!1}if(t===s)return a===s;if(t===i)return a===i;if(t.nodeType||t instanceof h){for(e=t.nodeType?[t]:t,n=0;n<e.length;n+=1)if(e[n]===a)return!0;return!1}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=this.length;if(t>e-1)return p([]);if(t<0){var n=e+t;return p(n<0?[]:[this[n]])}return p([this[t]])},append:function(){for(var t,e=r(),n=0;n<arguments.length;n+=1){t=n<0||arguments.length<=n?void 0:arguments[n];for(var i=0;i<this.length;i+=1)if("string"==typeof t){var o=e.createElement("div");for(o.innerHTML=t;o.firstChild;)this[i].appendChild(o.firstChild)}else if(t instanceof h)for(var s=0;s<t.length;s+=1)this[i].appendChild(t[s]);else this[i].appendChild(t)}return this},appendTo:function(t){return p(t).append(this),this},prepend:function(t){var e,n,i=r();for(e=0;e<this.length;e+=1)if("string"==typeof t){var o=i.createElement("div");for(o.innerHTML=t,n=o.childNodes.length-1;n>=0;n-=1)this[e].insertBefore(o.childNodes[n],this[e].childNodes[0])}else if(t instanceof h)for(n=0;n<t.length;n+=1)this[e].insertBefore(t[n],this[e].childNodes[0]);else this[e].insertBefore(t,this[e].childNodes[0]);return this},prependTo:function(t){return p(t).prepend(this),this},insertBefore:function(t){for(var e=p(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=p(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&&p(this[0].nextElementSibling).is(t)?p([this[0].nextElementSibling]):p([]):this[0].nextElementSibling?p([this[0].nextElementSibling]):p([]):p([])},nextAll:function(t){var e=[],n=this[0];if(!n)return p([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;t?p(r).is(t)&&e.push(r):e.push(r),n=r}return p(e)},prev:function(t){if(this.length>0){var e=this[0];return t?e.previousElementSibling&&p(e.previousElementSibling).is(t)?p([e.previousElementSibling]):p([]):e.previousElementSibling?p([e.previousElementSibling]):p([])}return p([])},prevAll:function(t){var e=[],n=this[0];if(!n)return p([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;t?p(r).is(t)&&e.push(r):e.push(r),n=r}return p(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?p(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return p(e)},parents:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)t?p(r).is(t)&&e.push(r):e.push(r),r=r.parentNode;return p(e)},closest:function(t){var e=this;return void 0===t?p([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(t),i=0;i<r.length;i+=1)e.push(r[i]);return p(e)},children:function(t){for(var e=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)t&&!p(r[i]).is(t)||e.push(r[i]);return p(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,n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];for(t=0;t<i.length;t+=1){var s=p(i[t]);for(e=0;e<s.length;e+=1)n.push(s[e])}return n},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 m=Object.freeze({__proto__:null,scrollTo:function(){for(var t=o(),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],s=n[1],a=n[2],l=n[3],u=n[4];return 4===n.length&&"function"==typeof l&&(u=l,i=n[0],s=n[1],a=n[2],u=n[3],l=n[4]),void 0===l&&(l="swing"),this.each((function(){var e,n,r,o,f,h,c,d,p=this,v=s>0||0===s,m=i>0||0===i;if(void 0===l&&(l="swing"),v&&(e=p.scrollTop,a||(p.scrollTop=s)),m&&(n=p.scrollLeft,a||(p.scrollLeft=i)),a){v&&(r=p.scrollHeight-p.offsetHeight,f=Math.max(Math.min(s,r),0)),m&&(o=p.scrollWidth-p.offsetWidth,h=Math.max(Math.min(i,o),0));var g=null;v&&f===e&&(v=!1),m&&h===n&&(m=!1),t.requestAnimationFrame((function r(i){void 0===i&&(i=(new Date).getTime()),null===g&&(g=i);var o,s=Math.max(Math.min((i-g)/a,1),0),y="linear"===l?s:.5-Math.cos(s*Math.PI)/2;v&&(c=e+y*(f-e)),m&&(d=n+y*(h-n)),v&&f>e&&c>=f&&(p.scrollTop=f,o=!0),v&&f<e&&c<=f&&(p.scrollTop=f,o=!0),m&&h>n&&d>=h&&(p.scrollLeft=h,o=!0),m&&h<n&&d<=h&&(p.scrollLeft=h,o=!0),o?u&&u():(v&&(p.scrollTop=c),m&&(p.scrollLeft=d),t.requestAnimationFrame(r))}))}}))},scrollTop:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];3===e.length&&"function"==typeof o&&(r=e[0],i=e[1],s=e[2],o=e[3]);var a=this;return void 0===r?a.length>0?a[0].scrollTop:null:a.scrollTo(void 0,r,i,o,s)},scrollLeft:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],i=e[1],o=e[2],s=e[3];3===e.length&&"function"==typeof o&&(r=e[0],i=e[1],s=e[2],o=e[3]);var a=this;return void 0===r?a.length>0?a[0].scrollLeft:null:a.scrollTo(r,void 0,i,o,s)}});var g=Object.freeze({__proto__:null,animate:function(t,e){var n,r=o(),i=this,s={props:Object.assign({},t),params:Object.assign({duration:300,easing:"swing"},e),elements:i,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.cancelAnimationFrame(s.frameId),s.animating=!1,s.elements.each((function(t){delete t.dom7AnimateInstance})),s.que=[]},done:function(t){if(s.animating=!1,s.elements.each((function(t){delete t.dom7AnimateInstance})),t&&t(i),s.que.length>0){var e=s.que.shift();s.animate(e[0],e[1])}},animate:function(t,e){if(s.animating)return s.que.push([t,e]),s;var n=[];s.elements.each((function(e,i){var o,a,l,u,f;e.dom7AnimateInstance||(s.elements[i].dom7AnimateInstance=s),n[i]={container:e},Object.keys(t).forEach((function(s){o=r.getComputedStyle(e,null).getPropertyValue(s).replace(",","."),a=parseFloat(o),l=o.replace(a,""),u=parseFloat(t[s]),f=t[s]+l,n[i][s]={initialFullValue:o,initialValue:a,unit:l,finalValue:u,finalFullValue:f,currentValue:a}}))}));var o,a,l=null,u=0,f=0,h=!1;return s.animating=!0,s.frameId=r.requestAnimationFrame((function c(){var d,p;o=(new Date).getTime(),h||(h=!0,e.begin&&e.begin(i)),null===l&&(l=o),e.progress&&e.progress(i,Math.max(Math.min((o-l)/e.duration,1),0),l+e.duration-o<0?0:l+e.duration-o,l),n.forEach((function(r){var i=r;a||i.done||Object.keys(t).forEach((function(r){if(!a&&!i.done){d=Math.max(Math.min((o-l)/e.duration,1),0),p=s.easingProgress(e.easing,d);var h=i[r],c=h.initialValue,v=h.finalValue,m=h.unit;i[r].currentValue=c+p*(v-c);var g=i[r].currentValue;(v>c&&g>=v||v<c&&g<=v)&&(i.container.style[r]=v+m,(f+=1)===Object.keys(t).length&&(i.done=!0,u+=1),u===n.length&&(a=!0)),a?s.done(e.complete):i.container.style[r]=g+m}}))})),a||(s.frameId=r.requestAnimationFrame(c))})),s}};if(0===s.elements.length)return i;for(var a=0;a<s.elements.length;a+=1)s.elements[a].dom7AnimateInstance?n=s.elements[a].dom7AnimateInstance:s.elements[a].dom7AnimateInstance=s;return n||(n=s),"stop"===t?n.stop():n.animate(s.props,s.params),i},stop:function(){for(var t=this,e=0;e<t.length;e+=1)t[e].dom7AnimateInstance&&t[e].dom7AnimateInstance.stop()}}),y="resize scroll".split(" ");function b(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(void 0===n[0]){for(var i=0;i<this.length;i+=1)y.indexOf(t)<0&&(t in this[i]?this[i][t]():p(this[i]).trigger(t));return this}return this.on.apply(this,[t].concat(n))}}var E=b("click"),L=b("blur"),A=b("focus"),x=b("focusin"),w=b("focusout"),S=b("keyup"),O=b("keydown"),T=b("keypress"),_=b("submit"),N=b("change"),C=b("mousedown"),M=b("mousemove"),j=b("mouseup"),D=b("mouseenter"),F=b("mouseleave"),k=b("mouseout"),P=b("mouseover"),I=b("touchstart"),V=b("touchend"),q=b("touchmove"),B=b("resize"),H=b("scroll");return[v,m,g,Object.freeze({__proto__:null,click:E,blur:L,focus:A,focusin:x,focusout:w,keyup:S,keydown:O,keypress:T,submit:_,change:N,mousedown:C,mousemove:M,mouseup:j,mouseenter:D,mouseleave:F,mouseout:k,mouseover:P,touchstart:I,touchend:V,touchmove:q,resize:B,scroll:H})].forEach((function(t){Object.keys(t).forEach((function(e){p.fn[e]=t[e]}))})),p}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Dom7=e()}(this,(function(){"use strict";function t(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function e(n,i){void 0===n&&(n={}),void 0===i&&(i={}),Object.keys(i).forEach((function(o){void 0===n[o]?n[o]=i[o]:t(i[o])&&t(n[o])&&Object.keys(i[o]).length>0&&e(n[o],i[o])}))}var n={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[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function i(){var t="undefined"!=typeof document?document:{};return e(t,n),t}var o={document:n,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"==typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!=typeof setTimeout&&clearTimeout(t)}};function r(){var t="undefined"!=typeof window?window:{};return e(t,o),t}class s extends Array{constructor(t){super(...t),function(t){const e=t.__proto__;Object.defineProperty(t,"__proto__",{get:()=>e,set(t){e.__proto__=t}})}(this)}}function l(t=[]){const e=[];return t.forEach((t=>{Array.isArray(t)?e.push(...l(t)):e.push(t)})),e}function u(t,e){return Array.prototype.filter.call(t,e)}function c(t,e){const n=r(),o=i();let l=[];if(!e&&t instanceof s)return t;if(!t)return new s(l);if("string"==typeof t){const n=t.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let t="div";0===n.indexOf("<li")&&(t="ul"),0===n.indexOf("<tr")&&(t="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(t="tr"),0===n.indexOf("<tbody")&&(t="table"),0===n.indexOf("<option")&&(t="select");const e=o.createElement(t);e.innerHTML=n;for(let t=0;t<e.childNodes.length;t+=1)l.push(e.childNodes[t])}else l=function(t,e){if("string"!=typeof t)return[t];const n=[],i=e.querySelectorAll(t);for(let t=0;t<i.length;t+=1)n.push(i[t]);return n}(t.trim(),e||o)}else if(t.nodeType||t===n||t===o)l.push(t);else if(Array.isArray(t)){if(t instanceof s)return t;l=t}return new s(function(t){const e=[];for(let n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(l))}c.fn=s.prototype;var h=Object.freeze({__proto__:null,addClass:function(...t){const e=l(t.map((t=>t.split(" "))));return this.forEach((t=>{t.classList.add(...e)})),this},removeClass:function(...t){const e=l(t.map((t=>t.split(" "))));return this.forEach((t=>{t.classList.remove(...e)})),this},toggleClass:function(...t){const e=l(t.map((t=>t.split(" "))));this.forEach((t=>{e.forEach((e=>{t.classList.toggle(e)}))}))},hasClass:function(...t){const e=l(t.map((t=>t.split(" "))));return u(this,(t=>e.filter((e=>t.classList.contains(e))).length>0)).length>0},attr:function(t,e){if(1===arguments.length&&"string"==typeof t)return this[0]?this[0].getAttribute(t):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(t,e);else for(const e in t)this[n][e]=t[e],this[n].setAttribute(e,t[e]);return this},removeAttr:function(t){for(let e=0;e<this.length;e+=1)this[e].removeAttribute(t);return this},prop:function(t,e){if(1!==arguments.length||"string"!=typeof t){for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n][t]=e;else for(const e in t)this[n][e]=t[e];return this}return this[0]?this[0][t]:this},data:function(t,e){let n;if(void 0===e){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];const e=n.getAttribute(`data-${t}`);return e||void 0}for(let i=0;i<this.length;i+=1)n=this[i],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this},removeData:function(t){for(let e=0;e<this.length;e+=1){const n=this[e];n.dom7ElementDataStorage&&n.dom7ElementDataStorage[t]&&(n.dom7ElementDataStorage[t]=null,delete n.dom7ElementDataStorage[t])}},dataset:function(){const t=this[0];if(!t)return;const e={};if(t.dataset)for(const n in t.dataset)e[n]=t.dataset[n];else for(let i=0;i<t.attributes.length;i+=1){const o=t.attributes[i];o.name.indexOf("data-")>=0&&(e[(n=o.name.split("data-")[1],n.toLowerCase().replace(/-(.)/g,((t,e)=>e.toUpperCase())))]=o.value)}var n;for(const t in e)"false"===e[t]?e[t]=!1:"true"===e[t]?e[t]=!0:parseFloat(e[t])===1*e[t]&&(e[t]*=1);return e},val:function(t){if(void 0===t){const t=this[0];if(!t)return;if(t.multiple&&"select"===t.nodeName.toLowerCase()){const e=[];for(let n=0;n<t.selectedOptions.length;n+=1)e.push(t.selectedOptions[n].value);return e}return t.value}for(let e=0;e<this.length;e+=1){const n=this[e];if(Array.isArray(t)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let e=0;e<n.options.length;e+=1)n.options[e].selected=t.indexOf(n.options[e].value)>=0;else n.value=t}return this},value:function(t){return this.val(t)},transform:function(t){for(let e=0;e<this.length;e+=1)this[e].style.transform=t;return this},transition:function(t){for(let e=0;e<this.length;e+=1)this[e].style.transitionDuration="string"!=typeof t?`${t}ms`:t;return this},on:function(...t){let[e,n,i,o]=t;function r(t){const e=t.target;if(!e)return;const o=t.target.dom7EventData||[];if(o.indexOf(t)<0&&o.unshift(t),c(e).is(n))i.apply(e,o);else{const t=c(e).parents();for(let e=0;e<t.length;e+=1)c(t[e]).is(n)&&i.apply(t[e],o)}}function s(t){const e=t&&t.target&&t.target.dom7EventData||[];e.indexOf(t)<0&&e.unshift(t),i.apply(this,e)}"function"==typeof t[1]&&([e,i,o]=t,n=void 0),o||(o=!1);const l=e.split(" ");let u;for(let t=0;t<this.length;t+=1){const e=this[t];if(n)for(u=0;u<l.length;u+=1){const t=l[u];e.dom7LiveListeners||(e.dom7LiveListeners={}),e.dom7LiveListeners[t]||(e.dom7LiveListeners[t]=[]),e.dom7LiveListeners[t].push({listener:i,proxyListener:r}),e.addEventListener(t,r,o)}else for(u=0;u<l.length;u+=1){const t=l[u];e.dom7Listeners||(e.dom7Listeners={}),e.dom7Listeners[t]||(e.dom7Listeners[t]=[]),e.dom7Listeners[t].push({listener:i,proxyListener:s}),e.addEventListener(t,s,o)}}return this},off:function(...t){let[e,n,i,o]=t;"function"==typeof t[1]&&([e,i,o]=t,n=void 0),o||(o=!1);const r=e.split(" ");for(let t=0;t<r.length;t+=1){const e=r[t];for(let t=0;t<this.length;t+=1){const r=this[t];let s;if(!n&&r.dom7Listeners?s=r.dom7Listeners[e]:n&&r.dom7LiveListeners&&(s=r.dom7LiveListeners[e]),s&&s.length)for(let t=s.length-1;t>=0;t-=1){const n=s[t];i&&n.listener===i||i&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===i?(r.removeEventListener(e,n.proxyListener,o),s.splice(t,1)):i||(r.removeEventListener(e,n.proxyListener,o),s.splice(t,1))}}}return this},once:function(...t){const e=this;let[n,i,o,r]=t;function s(...t){o.apply(this,t),e.off(n,i,s,r),s.dom7proxy&&delete s.dom7proxy}return"function"==typeof t[1]&&([n,o,r]=t,i=void 0),s.dom7proxy=o,e.on(n,i,s,r)},trigger:function(...t){const e=r(),n=t[0].split(" "),i=t[1];for(let o=0;o<n.length;o+=1){const r=n[o];for(let n=0;n<this.length;n+=1){const o=this[n];if(e.CustomEvent){const n=new e.CustomEvent(r,{detail:i,bubbles:!0,cancelable:!0});o.dom7EventData=t.filter(((t,e)=>e>0)),o.dispatchEvent(n),o.dom7EventData=[],delete o.dom7EventData}}}return this},transitionEnd:function(t){const e=this;return t&&e.on("transitionend",(function n(i){i.target===this&&(t.call(this,i),e.off("transitionend",n))})),this},animationEnd:function(t){const e=this;return t&&e.on("animationend",(function n(i){i.target===this&&(t.call(this,i),e.off("animationend",n))})),this},width:function(){const t=r();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null},outerWidth:function(t){if(this.length>0){if(t){const t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},height:function(){const t=r();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(t){if(this.length>0){if(t){const t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){const t=r(),e=i(),n=this[0],o=n.getBoundingClientRect(),s=e.body,l=n.clientTop||s.clientTop||0,u=n.clientLeft||s.clientLeft||0,c=n===t?t.scrollY:n.scrollTop,h=n===t?t.scrollX:n.scrollLeft;return{top:o.top+c-l,left:o.left+h-u}}return null},hide:function(){for(let t=0;t<this.length;t+=1)this[t].style.display="none";return this},show:function(){const t=r();for(let e=0;e<this.length;e+=1){const n=this[e];"none"===n.style.display&&(n.style.display=""),"none"===t.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this},styles:function(){const t=r();return this[0]?t.getComputedStyle(this[0],null):{}},css:function(t,e){const n=r();let i;if(1===arguments.length){if("string"!=typeof t){for(i=0;i<this.length;i+=1)for(const e in t)this[i].style[e]=t[e];return this}if(this[0])return n.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]=e;return this}return this},each:function(t){return t?(this.forEach(((e,n)=>{t.apply(e,[e,n])})),this):this},filter:function(t){return c(u(this,t))},html:function(t){if(void 0===t)return this[0]?this[0].innerHTML:null;for(let 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(let e=0;e<this.length;e+=1)this[e].textContent=t;return this},is:function(t){const e=r(),n=i(),o=this[0];let l,u;if(!o||void 0===t)return!1;if("string"==typeof t){if(o.matches)return o.matches(t);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(o.msMatchesSelector)return o.msMatchesSelector(t);for(l=c(t),u=0;u<l.length;u+=1)if(l[u]===o)return!0;return!1}if(t===n)return o===n;if(t===e)return o===e;if(t.nodeType||t instanceof s){for(l=t.nodeType?[t]:t,u=0;u<l.length;u+=1)if(l[u]===o)return!0;return!1}return!1},index:function(){let 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;const e=this.length;if(t>e-1)return c([]);if(t<0){const n=e+t;return c(n<0?[]:[this[n]])}return c([this[t]])},append:function(...t){let e;const n=i();for(let i=0;i<t.length;i+=1){e=t[i];for(let t=0;t<this.length;t+=1)if("string"==typeof e){const i=n.createElement("div");for(i.innerHTML=e;i.firstChild;)this[t].appendChild(i.firstChild)}else if(e instanceof s)for(let n=0;n<e.length;n+=1)this[t].appendChild(e[n]);else this[t].appendChild(e)}return this},appendTo:function(t){return c(t).append(this),this},prepend:function(t){const e=i();let n,o;for(n=0;n<this.length;n+=1)if("string"==typeof t){const i=e.createElement("div");for(i.innerHTML=t,o=i.childNodes.length-1;o>=0;o-=1)this[n].insertBefore(i.childNodes[o],this[n].childNodes[0])}else if(t instanceof s)for(o=0;o<t.length;o+=1)this[n].insertBefore(t[o],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this},prependTo:function(t){return c(t).prepend(this),this},insertBefore:function(t){const e=c(t);for(let t=0;t<this.length;t+=1)if(1===e.length)e[0].parentNode.insertBefore(this[t],e[0]);else if(e.length>1)for(let n=0;n<e.length;n+=1)e[n].parentNode.insertBefore(this[t].cloneNode(!0),e[n])},insertAfter:function(t){const e=c(t);for(let t=0;t<this.length;t+=1)if(1===e.length)e[0].parentNode.insertBefore(this[t],e[0].nextSibling);else if(e.length>1)for(let n=0;n<e.length;n+=1)e[n].parentNode.insertBefore(this[t].cloneNode(!0),e[n].nextSibling)},next:function(t){return this.length>0?t?this[0].nextElementSibling&&c(this[0].nextElementSibling).is(t)?c([this[0].nextElementSibling]):c([]):this[0].nextElementSibling?c([this[0].nextElementSibling]):c([]):c([])},nextAll:function(t){const e=[];let n=this[0];if(!n)return c([]);for(;n.nextElementSibling;){const i=n.nextElementSibling;t?c(i).is(t)&&e.push(i):e.push(i),n=i}return c(e)},prev:function(t){if(this.length>0){const e=this[0];return t?e.previousElementSibling&&c(e.previousElementSibling).is(t)?c([e.previousElementSibling]):c([]):e.previousElementSibling?c([e.previousElementSibling]):c([])}return c([])},prevAll:function(t){const e=[];let n=this[0];if(!n)return c([]);for(;n.previousElementSibling;){const i=n.previousElementSibling;t?c(i).is(t)&&e.push(i):e.push(i),n=i}return c(e)},siblings:function(t){return this.nextAll(t).add(this.prevAll(t))},parent:function(t){const e=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(t?c(this[n].parentNode).is(t)&&e.push(this[n].parentNode):e.push(this[n].parentNode));return c(e)},parents:function(t){const e=[];for(let n=0;n<this.length;n+=1){let i=this[n].parentNode;for(;i;)t?c(i).is(t)&&e.push(i):e.push(i),i=i.parentNode}return c(e)},closest:function(t){let e=this;return void 0===t?c([]):(e.is(t)||(e=e.parents(t).eq(0)),e)},find:function(t){const e=[];for(let n=0;n<this.length;n+=1){const i=this[n].querySelectorAll(t);for(let t=0;t<i.length;t+=1)e.push(i[t])}return c(e)},children:function(t){const e=[];for(let n=0;n<this.length;n+=1){const i=this[n].children;for(let n=0;n<i.length;n+=1)t&&!c(i[n]).is(t)||e.push(i[n])}return c(e)},remove:function(){for(let 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(...t){const e=this;let n,i;for(n=0;n<t.length;n+=1){const o=c(t[n]);for(i=0;i<o.length;i+=1)e.push(o[i])}return e},empty:function(){for(let t=0;t<this.length;t+=1){const e=this[t];if(1===e.nodeType){for(let t=0;t<e.childNodes.length;t+=1)e.childNodes[t].parentNode&&e.childNodes[t].parentNode.removeChild(e.childNodes[t]);e.textContent=""}}return this}});var f=Object.freeze({__proto__:null,scrollTo:function(...t){const e=r();let[n,i,o,s,l]=t;return 4===t.length&&"function"==typeof s&&(l=s,[n,i,o,l,s]=t),void 0===s&&(s="swing"),this.each((function(){const t=this;let r,u,c,h,f,a,d,p,m=i>0||0===i,g=n>0||0===n;if(void 0===s&&(s="swing"),m&&(r=t.scrollTop,o||(t.scrollTop=i)),g&&(u=t.scrollLeft,o||(t.scrollLeft=n)),!o)return;m&&(c=t.scrollHeight-t.offsetHeight,f=Math.max(Math.min(i,c),0)),g&&(h=t.scrollWidth-t.offsetWidth,a=Math.max(Math.min(n,h),0));let y=null;m&&f===r&&(m=!1),g&&a===u&&(g=!1),e.requestAnimationFrame((function n(i=(new Date).getTime()){null===y&&(y=i);const c=Math.max(Math.min((i-y)/o,1),0),h="linear"===s?c:.5-Math.cos(c*Math.PI)/2;let v;m&&(d=r+h*(f-r)),g&&(p=u+h*(a-u)),m&&f>r&&d>=f&&(t.scrollTop=f,v=!0),m&&f<r&&d<=f&&(t.scrollTop=f,v=!0),g&&a>u&&p>=a&&(t.scrollLeft=a,v=!0),g&&a<u&&p<=a&&(t.scrollLeft=a,v=!0),v?l&&l():(m&&(t.scrollTop=d),g&&(t.scrollLeft=p),e.requestAnimationFrame(n))}))}))},scrollTop:function(...t){let[e,n,i,o]=t;3===t.length&&"function"==typeof i&&([e,n,o,i]=t);const r=this;return void 0===e?r.length>0?r[0].scrollTop:null:r.scrollTo(void 0,e,n,i,o)},scrollLeft:function(...t){let[e,n,i,o]=t;3===t.length&&"function"==typeof i&&([e,n,o,i]=t);const r=this;return void 0===e?r.length>0?r[0].scrollLeft:null:r.scrollTo(e,void 0,n,i,o)}});var a=Object.freeze({__proto__:null,animate:function(t,e){const n=r(),i=this,o={props:Object.assign({},t),params:Object.assign({duration:300,easing:"swing"},e),elements:i,animating:!1,que:[],easingProgress:(t,e)=>"swing"===t?.5-Math.cos(e*Math.PI)/2:"function"==typeof t?t(e):e,stop(){o.frameId&&n.cancelAnimationFrame(o.frameId),o.animating=!1,o.elements.each((t=>{delete t.dom7AnimateInstance})),o.que=[]},done(t){if(o.animating=!1,o.elements.each((t=>{delete t.dom7AnimateInstance})),t&&t(i),o.que.length>0){const t=o.que.shift();o.animate(t[0],t[1])}},animate(t,e){if(o.animating)return o.que.push([t,e]),o;const r=[];o.elements.each(((e,i)=>{let s,l,u,c,h;e.dom7AnimateInstance||(o.elements[i].dom7AnimateInstance=o),r[i]={container:e},Object.keys(t).forEach((o=>{s=n.getComputedStyle(e,null).getPropertyValue(o).replace(",","."),l=parseFloat(s),u=s.replace(l,""),c=parseFloat(t[o]),h=t[o]+u,r[i][o]={initialFullValue:s,initialValue:l,unit:u,finalValue:c,finalFullValue:h,currentValue:l}}))}));let s,l,u=null,c=0,h=0,f=!1;return o.animating=!0,o.frameId=n.requestAnimationFrame((function a(){let d,p;s=(new Date).getTime(),f||(f=!0,e.begin&&e.begin(i)),null===u&&(u=s),e.progress&&e.progress(i,Math.max(Math.min((s-u)/e.duration,1),0),u+e.duration-s<0?0:u+e.duration-s,u),r.forEach((n=>{const i=n;l||i.done||Object.keys(t).forEach((n=>{if(l||i.done)return;d=Math.max(Math.min((s-u)/e.duration,1),0),p=o.easingProgress(e.easing,d);const{initialValue:f,finalValue:a,unit:m}=i[n];i[n].currentValue=f+p*(a-f);const g=i[n].currentValue;(a>f&&g>=a||a<f&&g<=a)&&(i.container.style[n]=a+m,h+=1,h===Object.keys(t).length&&(i.done=!0,c+=1),c===r.length&&(l=!0)),l?o.done(e.complete):i.container.style[n]=g+m}))})),l||(o.frameId=n.requestAnimationFrame(a))})),o}};if(0===o.elements.length)return i;let s;for(let t=0;t<o.elements.length;t+=1)o.elements[t].dom7AnimateInstance?s=o.elements[t].dom7AnimateInstance:o.elements[t].dom7AnimateInstance=o;return s||(s=o),"stop"===t?s.stop():s.animate(o.props,o.params),i},stop:function(){const t=this;for(let e=0;e<t.length;e+=1)t[e].dom7AnimateInstance&&t[e].dom7AnimateInstance.stop()}});const d="resize scroll".split(" ");function p(t){return function(...e){if(void 0===e[0]){for(let e=0;e<this.length;e+=1)d.indexOf(t)<0&&(t in this[e]?this[e][t]():c(this[e]).trigger(t));return this}return this.on(t,...e)}}const m=p("click"),g=p("blur"),y=p("focus"),v=p("focusin"),b=p("focusout"),E=p("keyup"),L=p("keydown"),x=p("keypress"),S=p("submit"),A=p("change"),T=p("mousedown"),N=p("mousemove"),O=p("mouseup"),_=p("mouseenter"),C=p("mouseleave"),w=p("mouseout"),M=p("mouseover"),D=p("touchstart"),k=p("touchend"),F=p("touchmove"),I=p("resize"),V=p("scroll");return[h,f,a,Object.freeze({__proto__:null,click:m,blur:g,focus:y,focusin:v,focusout:b,keyup:E,keydown:L,keypress:x,submit:S,change:A,mousedown:T,mousemove:N,mouseup:O,mouseenter:_,mouseleave:C,mouseout:w,mouseover:M,touchstart:D,touchend:k,touchmove:F,resize:I,scroll:V})].forEach((t=>{Object.keys(t).forEach((e=>{c.fn[e]=t[e]}))})),c}));
//# sourceMappingURL=dom7.min.js.map
{
"name": "dom7",
"version": "4.0.0-beta.1",
"version": "4.0.0-beta.2",
"description": "Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc