Socket
Socket
Sign inDemoInstall

@pluginjs/utils

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pluginjs/utils - npm Package Compare versions

Comparing version 0.8.8 to 0.8.9

60

dist/utils.common.js
/*!
* @pluginjs/utils v0.8.8 (https://pluginjs.com)
* Copyright 2021 Creation Studio Limited
* @pluginjs/utils v0.8.9 (https://pluginjs.com)
* Copyright 2022 Creation Studio Limited
* Released under the GPL-3.0 License.

@@ -12,17 +12,2 @@ */

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {

@@ -33,6 +18,5 @@ var keys = Object.keys(object);

var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
})), keys.push.apply(keys, symbols);
}

@@ -45,15 +29,8 @@

for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

@@ -64,2 +41,17 @@

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
var nub = arr => {

@@ -77,3 +69,3 @@ return Array.from(new Set(arr));

} else {
Object.entries(obj).map((_ref) => {
Object.entries(obj).map(_ref => {
var [key, value] = _ref;

@@ -80,0 +72,0 @@ return callback(key, value);

/*!
* @pluginjs/utils v0.8.8 (https://pluginjs.com)
* Copyright 2021 Creation Studio Limited
* @pluginjs/utils v0.8.9 (https://pluginjs.com)
* Copyright 2022 Creation Studio Limited
* Released under the GPL-3.0 License.
*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@pluginjs/is");function e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function n(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var o=e=>{if(r.isElement(e))return e;if(r.isArray(e))return e.slice();if(r.isDate(e))return new e.constructor(Number(e));if(r.isMap(e))return new Map(e);if(r.isSet(e))return new Set(e);if(r.isSymbol(e))return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(e)):{};if(r.isRegexp(e)){var t=new e.constructor(e.source,/\w+$/.exec(e));return t.lastIndex=e.lastIndex,t}return r.isError(e)?Object.create(e):r.isPlainObject(e)?Object.assign({},e):e},a=e=>r.isPlainObject(e)?i(e):r.isArray(e)?c(e):o(e),i=e=>{if(r.isPlainObject(e)){var t=new e.constructor;for(var n in e)t[n]=a(e[n]);return t}return e},c=r=>{for(var e=new r.constructor(r.length),t=0;t<r.length;t++)e[t]=a(r[t]);return e};function u(e,t){var n=r.isArray(t),a=r.isArray(e);if(r.isUndefined(t))return e;if(n!==a)return o(t);if(n)return o(t);if(r.isPlainObject(e)&&r.isPlainObject(t)){var i=o(e);return Object.keys(t).forEach((r=>{i[r]=u(i[r],t[r])})),i}return o(t)}var s=(r,e)=>{if(r===e)return!0;if(void 0===r||void 0===e)return!1;if(r.length!==e.length)return!1;for(var t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0},l=(e,t)=>{var n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++){var i=n[a];if(r.isArray(e[i])&&r.isArray(t[i])){if(!s(e[i],t[i]))return!1}else if(r.isObject(e[i])&&r.isObject(t[i])){if(!l(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1}return!0};exports.SvgElement=(r,e)=>{var t=document.createElementNS("http://www.w3.org/2000/svg",r);if(!e)return t;for(var n in e)Object.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n]);return t},exports.arrayDiff=(r,e)=>r.filter((r=>e.indexOf(r)<0)),exports.arrayEqual=s,exports.arrayIntersect=(r,e)=>{var t;return e.length>r.length&&(t=e,e=r,r=t),r.filter((r=>-1!==e.indexOf(r)))},exports.camelize=function(r){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r=r.replace(/[_.\- ]+(\w|$)/g,((r,e)=>e.toUpperCase())),e&&(r=r.substring(0,1).toUpperCase()+r.substring(1)),r},exports.clone=o,exports.compose=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e.reduceRight(((r,t,n)=>Array.isArray(r)&&n===e.length-1?t(...r):t(r)),t)};return n.currylen=e[e.curylen||e.length-1].length,n},exports.convertFloatToPercentage=r=>(r<0?r=0:r>1&&(r=1),"".concat(100*parseFloat(r).toFixed(4),"%")),exports.convertMatrixToArray=r=>!(!r||"matrix"!==r.substr(0,6))&&r.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/),exports.convertPercentageToFloat=r=>parseFloat(r.slice(0,-1)/100,10),exports.curry=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n=e.currylen||e.length,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var c=t.concat(a);return c.length>=n?e(...c):r(e,c)}},exports.curryWith=function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var c=a.findIndex(t);if(c>=0){var u=n.concat(...a.slice(0,c+1));return e(...u)}var s=n.concat(...a);return r(e,t,s)}},exports.dasherize=r=>r.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),exports.debounce=function(r){var e,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var c=t;e&&(clearTimeout(e),e=null),e=setTimeout((()=>{r.apply(c,a)}),n)}},exports.deepClone=a,exports.deepCloneArray=c,exports.deepCloneObject=i,exports.deepMerge=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(r.isObject).reduce(u,{})},exports.each=(e,t)=>{if(r.isArray(e))for(var n=0,o=e.length;n<o;n++)t(e[n],n);else Object.entries(e).map((r=>{var[e,n]=r;return t(e,n)}));return e},exports.fromPairs=function(r){return r.reduce(((r,e)=>{var[t,o]=e;return n(n({},r),{},{[t]:o})}),{})},exports.getTime=()=>void 0!==window.performance&&window.performance.now?window.performance.now():Date.now(),exports.getUID=r=>{do{r+=~~(1e6*Math.random())}while(document.getElementById(r));return r},exports.getValueByPath=(r,e)=>{if(Object(r)!==r||void 0===e)return r;if(e in r)return r[e];var t=e.split("."),n=t.length;if(n){for(var o=-1;r&&++o<n;){for(var a=t[o];"\\"===a[a.length-1];)a="".concat(a.slice(0,-1),".").concat(t[++o]);r=r[a]}return r}},exports.merge=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach((e=>{for(var t in e)r[t]=e[t]})),r},exports.nub=r=>Array.from(new Set(r)),exports.objectEqual=l,exports.parseDataOptions=function(r){return Object.entries(r).reduce(((r,e)=>{var[t,o]=e;try{var a=JSON.parse('{"data": '.concat(o.replace(/'/g,'"'),"}")).data;return n(n({},r),{},{[t]:a})}catch(e){return n(n({},r),{},{[t]:o})}}),{})},exports.range=r=>Array.from({length:r},((r,e)=>e)),exports.reflow=r=>r.offsetHeight,exports.throttle=function(r,e){var t=this,n=!1;function o(){n=!1}return void 0!==e||null!==e?function(){var a=t;if(!n){n=!0;for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];r.apply(a,c),window.setTimeout(o,e)}}:function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];var c=t;n||(n=!0,window.requestAnimationFrame((()=>{r.apply(c,a),o()})))}},exports.triggerNative=function(r,e,t){var n=document.createEvent("HTMLEvents");void 0!==t?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!1),r.dispatchEvent(n)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@pluginjs/is");function e(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function t(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?e(Object(o),!0).forEach((function(e){n(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function n(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var o=e=>{if(r.isElement(e))return e;if(r.isArray(e))return e.slice();if(r.isDate(e))return new e.constructor(Number(e));if(r.isMap(e))return new Map(e);if(r.isSet(e))return new Set(e);if(r.isSymbol(e))return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(e)):{};if(r.isRegexp(e)){var t=new e.constructor(e.source,/\w+$/.exec(e));return t.lastIndex=e.lastIndex,t}return r.isError(e)?Object.create(e):r.isPlainObject(e)?Object.assign({},e):e},a=e=>r.isPlainObject(e)?i(e):r.isArray(e)?c(e):o(e),i=e=>{if(r.isPlainObject(e)){var t=new e.constructor;for(var n in e)t[n]=a(e[n]);return t}return e},c=r=>{for(var e=new r.constructor(r.length),t=0;t<r.length;t++)e[t]=a(r[t]);return e};function u(e,t){var n=r.isArray(t),a=r.isArray(e);if(r.isUndefined(t))return e;if(n!==a)return o(t);if(n)return o(t);if(r.isPlainObject(e)&&r.isPlainObject(t)){var i=o(e);return Object.keys(t).forEach((r=>{i[r]=u(i[r],t[r])})),i}return o(t)}var s=(r,e)=>{if(r===e)return!0;if(void 0===r||void 0===e)return!1;if(r.length!==e.length)return!1;for(var t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0},l=(e,t)=>{var n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++){var i=n[a];if(r.isArray(e[i])&&r.isArray(t[i])){if(!s(e[i],t[i]))return!1}else if(r.isObject(e[i])&&r.isObject(t[i])){if(!l(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1}return!0};exports.SvgElement=(r,e)=>{var t=document.createElementNS("http://www.w3.org/2000/svg",r);if(!e)return t;for(var n in e)Object.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n]);return t},exports.arrayDiff=(r,e)=>r.filter((r=>e.indexOf(r)<0)),exports.arrayEqual=s,exports.arrayIntersect=(r,e)=>{var t;return e.length>r.length&&(t=e,e=r,r=t),r.filter((r=>-1!==e.indexOf(r)))},exports.camelize=function(r){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r=r.replace(/[_.\- ]+(\w|$)/g,((r,e)=>e.toUpperCase())),e&&(r=r.substring(0,1).toUpperCase()+r.substring(1)),r},exports.clone=o,exports.compose=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e.reduceRight(((r,t,n)=>Array.isArray(r)&&n===e.length-1?t(...r):t(r)),t)};return n.currylen=e[e.curylen||e.length-1].length,n},exports.convertFloatToPercentage=r=>(r<0?r=0:r>1&&(r=1),"".concat(100*parseFloat(r).toFixed(4),"%")),exports.convertMatrixToArray=r=>!(!r||"matrix"!==r.substr(0,6))&&r.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/),exports.convertPercentageToFloat=r=>parseFloat(r.slice(0,-1)/100,10),exports.curry=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n=e.currylen||e.length,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var c=t.concat(a);return c.length>=n?e(...c):r(e,c)}},exports.curryWith=function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var c=a.findIndex(t);if(c>=0){var u=n.concat(...a.slice(0,c+1));return e(...u)}var s=n.concat(...a);return r(e,t,s)}},exports.dasherize=r=>r.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),exports.debounce=function(r){var e,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var c=t;e&&(clearTimeout(e),e=null),e=setTimeout((()=>{r.apply(c,a)}),n)}},exports.deepClone=a,exports.deepCloneArray=c,exports.deepCloneObject=i,exports.deepMerge=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(r.isObject).reduce(u,{})},exports.each=(e,t)=>{if(r.isArray(e))for(var n=0,o=e.length;n<o;n++)t(e[n],n);else Object.entries(e).map((r=>{var[e,n]=r;return t(e,n)}));return e},exports.fromPairs=function(r){return r.reduce(((r,e)=>{var[n,o]=e;return t(t({},r),{},{[n]:o})}),{})},exports.getTime=()=>void 0!==window.performance&&window.performance.now?window.performance.now():Date.now(),exports.getUID=r=>{do{r+=~~(1e6*Math.random())}while(document.getElementById(r));return r},exports.getValueByPath=(r,e)=>{if(Object(r)!==r||void 0===e)return r;if(e in r)return r[e];var t=e.split("."),n=t.length;if(n){for(var o=-1;r&&++o<n;){for(var a=t[o];"\\"===a[a.length-1];)a="".concat(a.slice(0,-1),".").concat(t[++o]);r=r[a]}return r}},exports.merge=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach((e=>{for(var t in e)r[t]=e[t]})),r},exports.nub=r=>Array.from(new Set(r)),exports.objectEqual=l,exports.parseDataOptions=function(r){return Object.entries(r).reduce(((r,e)=>{var[n,o]=e;try{var a=JSON.parse('{"data": '.concat(o.replace(/'/g,'"'),"}")).data;return t(t({},r),{},{[n]:a})}catch(e){return t(t({},r),{},{[n]:o})}}),{})},exports.range=r=>Array.from({length:r},((r,e)=>e)),exports.reflow=r=>r.offsetHeight,exports.throttle=function(r,e){var t=this,n=!1;function o(){n=!1}return void 0!==e||null!==e?function(){var a=t;if(!n){n=!0;for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];r.apply(a,c),window.setTimeout(o,e)}}:function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];var c=t;n||(n=!0,window.requestAnimationFrame((()=>{r.apply(c,a),o()})))}},exports.triggerNative=function(r,e,t){var n=document.createEvent("HTMLEvents");void 0!==t?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!1),r.dispatchEvent(n)};
/*!
* @pluginjs/utils v0.8.8 (https://pluginjs.com)
* Copyright 2021 Creation Studio Limited
* @pluginjs/utils v0.8.9 (https://pluginjs.com)
* Copyright 2022 Creation Studio Limited
* Released under the GPL-3.0 License.

@@ -8,17 +8,2 @@ */

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {

@@ -29,6 +14,5 @@ var keys = Object.keys(object);

var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
})), keys.push.apply(keys, symbols);
}

@@ -41,15 +25,8 @@

for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

@@ -60,2 +37,17 @@

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
var nub = arr => {

@@ -73,3 +65,3 @@ return Array.from(new Set(arr));

} else {
Object.entries(obj).map((_ref) => {
Object.entries(obj).map(_ref => {
var [key, value] = _ref;

@@ -76,0 +68,0 @@ return callback(key, value);

/*!
* @pluginjs/utils v0.8.8 (https://pluginjs.com)
* Copyright 2021 Creation Studio Limited
* @pluginjs/utils v0.8.9 (https://pluginjs.com)
* Copyright 2022 Creation Studio Limited
* Released under the GPL-3.0 License.
*/
import{isArray as r,isElement as e,isDate as t,isMap as n,isSet as o,isSymbol as a,isRegexp as i,isError as u,isPlainObject as c,isObject as f,isUndefined as l}from"@pluginjs/is";function v(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function s(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function g(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){v(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var p=r=>Array.from(new Set(r)),h=(e,t)=>{if(r(e))for(var n=0,o=e.length;n<o;n++)t(e[n],n);else Object.entries(e).map((r=>{var[e,n]=r;return t(e,n)}));return e};function w(r,e,t){var n=document.createEvent("HTMLEvents");void 0!==t?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!1),r.dispatchEvent(n)}var y=f=>{if(e(f))return f;if(r(f))return f.slice();if(t(f))return new f.constructor(Number(f));if(n(f))return new Map(f);if(o(f))return new Set(f);if(a(f))return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(f)):{};if(i(f)){var l=new f.constructor(f.source,/\w+$/.exec(f));return l.lastIndex=f.lastIndex,l}return u(f)?Object.create(f):c(f)?Object.assign({},f):f},d=e=>c(e)?O(e):r(e)?b(e):y(e),O=r=>{if(c(r)){var e=new r.constructor;for(var t in r)e[t]=d(r[t]);return e}return r},b=r=>{for(var e=new r.constructor(r.length),t=0;t<r.length;t++)e[t]=d(r[t]);return e},m=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach((e=>{for(var t in e)r[t]=e[t]})),r};function j(e,t){var n=r(t),o=r(e);if(l(t))return e;if(n!==o)return y(t);if(n)return y(t);if(c(e)&&c(t)){var a=y(e);return Object.keys(t).forEach((r=>{a[r]=j(a[r],t[r])})),a}return y(t)}var A=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.filter(f).reduce(j,{})},P=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n=e.currylen||e.length,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var u=t.concat(a);return u.length>=n?e(...u):r(e,u)}},E=function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var u=a.findIndex(t);if(u>=0){var c=n.concat(...a.slice(0,u+1));return e(...c)}var f=n.concat(...a);return r(e,t,f)}},x=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e.reduceRight(((r,t,n)=>Array.isArray(r)&&n===e.length-1?t(...r):t(r)),t)};return n.currylen=e[e.curylen||e.length-1].length,n},S=r=>{do{r+=~~(1e6*Math.random())}while(document.getElementById(r));return r},$=r=>Array.from({length:r},((r,e)=>e)),D=r=>r.offsetHeight,N=(r,e)=>{if(r===e)return!0;if(void 0===r||void 0===e)return!1;if(r.length!==e.length)return!1;for(var t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0},C=(e,t)=>{var n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++){var i=n[a];if(r(e[i])&&r(t[i])){if(!N(e[i],t[i]))return!1}else if(f(e[i])&&f(t[i])){if(!C(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1}return!0},F=(r,e)=>r.filter((r=>e.indexOf(r)<0)),I=(r,e)=>{var t;return e.length>r.length&&(t=e,e=r,r=t),r.filter((r=>-1!==e.indexOf(r)))},T=r=>parseFloat(r.slice(0,-1)/100,10),M=r=>(r<0?r=0:r>1&&(r=1),"".concat(100*parseFloat(r).toFixed(4),"%")),k=r=>!(!r||"matrix"!==r.substr(0,6))&&r.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/),H=()=>void 0!==window.performance&&window.performance.now?window.performance.now():Date.now(),L=function(r){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r=r.replace(/[_.\- ]+(\w|$)/g,((r,e)=>e.toUpperCase())),e&&(r=r.substring(0,1).toUpperCase()+r.substring(1)),r},U=r=>r.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),q=(r,e)=>{if(Object(r)!==r||void 0===e)return r;if(e in r)return r[e];var t=e.split("."),n=t.length;if(n){for(var o=-1;r&&++o<n;){for(var a=t[o];"\\"===a[a.length-1];)a="".concat(a.slice(0,-1),".").concat(t[++o]);r=r[a]}return r}};function z(r,e){var t=this,n=!1;function o(){n=!1}return void 0!==e||null!==e?function(){var a=t;if(!n){n=!0;for(var i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];r.apply(a,u),window.setTimeout(o,e)}}:function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];var u=t;n||(n=!0,window.requestAnimationFrame((()=>{r.apply(u,a),o()})))}}function B(r){var e,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var u=t;e&&(clearTimeout(e),e=null),e=setTimeout((()=>{r.apply(u,a)}),n)}}function J(r){return r.reduce(((r,e)=>{var[t,n]=e;return g(g({},r),{},{[t]:n})}),{})}var R=(r,e)=>{var t=document.createElementNS("http://www.w3.org/2000/svg",r);if(!e)return t;for(var n in e)Object.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n]);return t};function Z(r){return Object.entries(r).reduce(((r,e)=>{var[t,n]=e;try{var o=JSON.parse('{"data": '.concat(n.replace(/'/g,'"'),"}")).data;return g(g({},r),{},{[t]:o})}catch(e){return g(g({},r),{},{[t]:n})}}),{})}export{R as SvgElement,F as arrayDiff,N as arrayEqual,I as arrayIntersect,L as camelize,y as clone,x as compose,M as convertFloatToPercentage,k as convertMatrixToArray,T as convertPercentageToFloat,P as curry,E as curryWith,U as dasherize,B as debounce,d as deepClone,b as deepCloneArray,O as deepCloneObject,A as deepMerge,h as each,J as fromPairs,H as getTime,S as getUID,q as getValueByPath,m as merge,p as nub,C as objectEqual,Z as parseDataOptions,$ as range,D as reflow,z as throttle,w as triggerNative};
import{isArray as r,isElement as e,isDate as t,isMap as n,isSet as o,isSymbol as a,isRegexp as i,isError as u,isPlainObject as c,isObject as f,isUndefined as l}from"@pluginjs/is";function v(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function s(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?v(Object(t),!0).forEach((function(e){g(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function g(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var p=r=>Array.from(new Set(r)),h=(e,t)=>{if(r(e))for(var n=0,o=e.length;n<o;n++)t(e[n],n);else Object.entries(e).map((r=>{var[e,n]=r;return t(e,n)}));return e};function w(r,e,t){var n=document.createEvent("HTMLEvents");void 0!==t?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!1),r.dispatchEvent(n)}var y=f=>{if(e(f))return f;if(r(f))return f.slice();if(t(f))return new f.constructor(Number(f));if(n(f))return new Map(f);if(o(f))return new Set(f);if(a(f))return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(f)):{};if(i(f)){var l=new f.constructor(f.source,/\w+$/.exec(f));return l.lastIndex=f.lastIndex,l}return u(f)?Object.create(f):c(f)?Object.assign({},f):f},d=e=>c(e)?O(e):r(e)?b(e):y(e),O=r=>{if(c(r)){var e=new r.constructor;for(var t in r)e[t]=d(r[t]);return e}return r},b=r=>{for(var e=new r.constructor(r.length),t=0;t<r.length;t++)e[t]=d(r[t]);return e},m=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach((e=>{for(var t in e)r[t]=e[t]})),r};function j(e,t){var n=r(t),o=r(e);if(l(t))return e;if(n!==o)return y(t);if(n)return y(t);if(c(e)&&c(t)){var a=y(e);return Object.keys(t).forEach((r=>{a[r]=j(a[r],t[r])})),a}return y(t)}var A=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.filter(f).reduce(j,{})},P=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n=e.currylen||e.length,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var u=t.concat(a);return u.length>=n?e(...u):r(e,u)}},E=function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var u=a.findIndex(t);if(u>=0){var c=n.concat(...a.slice(0,u+1));return e(...c)}var f=n.concat(...a);return r(e,t,f)}},x=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e.reduceRight(((r,t,n)=>Array.isArray(r)&&n===e.length-1?t(...r):t(r)),t)};return n.currylen=e[e.curylen||e.length-1].length,n},S=r=>{do{r+=~~(1e6*Math.random())}while(document.getElementById(r));return r},$=r=>Array.from({length:r},((r,e)=>e)),D=r=>r.offsetHeight,N=(r,e)=>{if(r===e)return!0;if(void 0===r||void 0===e)return!1;if(r.length!==e.length)return!1;for(var t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0},C=(e,t)=>{var n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++){var i=n[a];if(r(e[i])&&r(t[i])){if(!N(e[i],t[i]))return!1}else if(f(e[i])&&f(t[i])){if(!C(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1}return!0},F=(r,e)=>r.filter((r=>e.indexOf(r)<0)),I=(r,e)=>{var t;return e.length>r.length&&(t=e,e=r,r=t),r.filter((r=>-1!==e.indexOf(r)))},T=r=>parseFloat(r.slice(0,-1)/100,10),M=r=>(r<0?r=0:r>1&&(r=1),"".concat(100*parseFloat(r).toFixed(4),"%")),k=r=>!(!r||"matrix"!==r.substr(0,6))&&r.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/),H=()=>void 0!==window.performance&&window.performance.now?window.performance.now():Date.now(),L=function(r){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r=r.replace(/[_.\- ]+(\w|$)/g,((r,e)=>e.toUpperCase())),e&&(r=r.substring(0,1).toUpperCase()+r.substring(1)),r},U=r=>r.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),q=(r,e)=>{if(Object(r)!==r||void 0===e)return r;if(e in r)return r[e];var t=e.split("."),n=t.length;if(n){for(var o=-1;r&&++o<n;){for(var a=t[o];"\\"===a[a.length-1];)a="".concat(a.slice(0,-1),".").concat(t[++o]);r=r[a]}return r}};function z(r,e){var t=this,n=!1;function o(){n=!1}return void 0!==e||null!==e?function(){var a=t;if(!n){n=!0;for(var i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];r.apply(a,u),window.setTimeout(o,e)}}:function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];var u=t;n||(n=!0,window.requestAnimationFrame((()=>{r.apply(u,a),o()})))}}function B(r){var e,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var u=t;e&&(clearTimeout(e),e=null),e=setTimeout((()=>{r.apply(u,a)}),n)}}function J(r){return r.reduce(((r,e)=>{var[t,n]=e;return s(s({},r),{},{[t]:n})}),{})}var R=(r,e)=>{var t=document.createElementNS("http://www.w3.org/2000/svg",r);if(!e)return t;for(var n in e)Object.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n]);return t};function Z(r){return Object.entries(r).reduce(((r,e)=>{var[t,n]=e;try{var o=JSON.parse('{"data": '.concat(n.replace(/'/g,'"'),"}")).data;return s(s({},r),{},{[t]:o})}catch(e){return s(s({},r),{},{[t]:n})}}),{})}export{R as SvgElement,F as arrayDiff,N as arrayEqual,I as arrayIntersect,L as camelize,y as clone,x as compose,M as convertFloatToPercentage,k as convertMatrixToArray,T as convertPercentageToFloat,P as curry,E as curryWith,U as dasherize,B as debounce,d as deepClone,b as deepCloneArray,O as deepCloneObject,A as deepMerge,h as each,J as fromPairs,H as getTime,S as getUID,q as getValueByPath,m as merge,p as nub,C as objectEqual,Z as parseDataOptions,$ as range,D as reflow,z as throttle,w as triggerNative};
/*!
* @pluginjs/utils v0.8.8 (https://pluginjs.com)
* Copyright 2021 Creation Studio Limited
* @pluginjs/utils v0.8.9 (https://pluginjs.com)
* Copyright 2022 Creation Studio Limited
* Released under the GPL-3.0 License.

@@ -9,20 +9,5 @@ */

typeof define === 'function' && define.amd ? define(['exports', '@pluginjs/is'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['@pluginjs/utils'] = {}, global['@pluginjs/is']));
}(this, (function (exports, is) { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@pluginjs/utils"] = {}, global["@pluginjs/is"]));
})(this, (function (exports, is) { 'use strict';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {

@@ -33,6 +18,5 @@ var keys = Object.keys(object);

var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
})), keys.push.apply(keys, symbols);
}

@@ -45,15 +29,8 @@

for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}

@@ -64,2 +41,17 @@

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _slicedToArray(arr, i) {

@@ -82,14 +74,17 @@ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();

function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
var _s, _e;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);

@@ -646,2 +641,2 @@

})));
}));
/*!
* @pluginjs/utils v0.8.8 (https://pluginjs.com)
* Copyright 2021 Creation Studio Limited
* @pluginjs/utils v0.8.9 (https://pluginjs.com)
* Copyright 2022 Creation Studio Limited
* Released under the GPL-3.0 License.
*/
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@pluginjs/is")):"function"==typeof define&&define.amd?define(["exports","@pluginjs/is"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["@pluginjs/utils"]={},r["@pluginjs/is"])}(this,(function(r,e){"use strict";function t(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function i(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach((function(e){t(r,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}function o(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(r)))return;var t=[],n=!0,i=!1,o=void 0;try{for(var a,u=r[Symbol.iterator]();!(n=(a=u.next()).done)&&(t.push(a.value),!e||t.length!==e);n=!0);}catch(r){i=!0,o=r}finally{try{n||null==u.return||u.return()}finally{if(i)throw o}}return t}(r,e)||u(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(r){return function(r){if(Array.isArray(r))return c(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||u(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(r,e){if(r){if("string"==typeof r)return c(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(r,e):void 0}}function c(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var f=function(r){if(e.isElement(r))return r;if(e.isArray(r))return r.slice();if(e.isDate(r))return new r.constructor(Number(r));if(e.isMap(r))return new Map(r);if(e.isSet(r))return new Set(r);if(e.isSymbol(r))return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(r)):{};if(e.isRegexp(r)){var t=new r.constructor(r.source,/\w+$/.exec(r));return t.lastIndex=r.lastIndex,t}return e.isError(r)?Object.create(r):e.isPlainObject(r)?Object.assign({},r):r},l=function(r){return e.isPlainObject(r)?s(r):e.isArray(r)?p(r):f(r)},s=function(r){if(e.isPlainObject(r)){var t=new r.constructor;for(var n in r)t[n]=l(r[n]);return t}return r},p=function(r){for(var e=new r.constructor(r.length),t=0;t<r.length;t++)e[t]=l(r[t]);return e};function y(r,t){var n=e.isArray(t),i=e.isArray(r);if(e.isUndefined(t))return r;if(n!==i)return f(t);if(n)return f(t);if(e.isPlainObject(r)&&e.isPlainObject(t)){var o=f(r);return Object.keys(t).forEach((function(r){o[r]=y(o[r],t[r])})),o}return f(t)}var v=function(r,e){if(r===e)return!0;if(void 0===r||void 0===e)return!1;if(r.length!==e.length)return!1;for(var t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0};r.SvgElement=function(r,e){var t=document.createElementNS("http://www.w3.org/2000/svg",r);if(!e)return t;for(var n in e)Object.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n]);return t},r.arrayDiff=function(r,e){return r.filter((function(r){return e.indexOf(r)<0}))},r.arrayEqual=v,r.arrayIntersect=function(r,e){var t;return e.length>r.length&&(t=e,e=r,r=t),r.filter((function(r){return-1!==e.indexOf(r)}))},r.camelize=function(r){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r=r.replace(/[_.\- ]+(\w|$)/g,(function(r,e){return e.toUpperCase()})),e&&(r=r.substring(0,1).toUpperCase()+r.substring(1)),r},r.clone=f,r.compose=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e.reduceRight((function(r,t,n){return Array.isArray(r)&&n===e.length-1?t.apply(void 0,a(r)):t(r)}),t)};return n.currylen=e[e.curylen||e.length-1].length,n},r.convertFloatToPercentage=function(r){return r<0?r=0:r>1&&(r=1),"".concat(100*parseFloat(r).toFixed(4),"%")},r.convertMatrixToArray=function(r){return!(!r||"matrix"!==r.substr(0,6))&&r.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)},r.convertPercentageToFloat=function(r){return parseFloat(r.slice(0,-1)/100,10)},r.curry=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n=e.currylen||e.length,i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];var c=t.concat(o);return c.length>=n?e.apply(void 0,a(c)):r(e,c)}},r.curryWith=function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function(){for(var i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];var c=o.findIndex(t);if(c>=0){var f=n.concat.apply(n,a(o.slice(0,c+1)));return e.apply(void 0,a(f))}var l=n.concat.apply(n,o);return r(e,t,l)}},r.dasherize=function(r){return r.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()},r.debounce=function(r){var e,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var u=t;e&&(clearTimeout(e),e=null),e=setTimeout((function(){r.apply(u,o)}),n)}},r.deepClone=l,r.deepCloneArray=p,r.deepCloneObject=s,r.deepMerge=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return t.filter(e.isObject).reduce(y,{})},r.each=function(r,t){if(e.isArray(r))for(var n=0,i=r.length;n<i;n++)t(r[n],n);else Object.entries(r).map((function(r){var e=o(r,2),n=e[0],i=e[1];return t(n,i)}));return r},r.fromPairs=function(r){return r.reduce((function(r,e){var n=o(e,2),a=n[0],u=n[1];return i(i({},r),{},t({},a,u))}),{})},r.getTime=function(){return void 0!==window.performance&&window.performance.now?window.performance.now():Date.now()},r.getUID=function(r){do{r+=~~(1e6*Math.random())}while(document.getElementById(r));return r},r.getValueByPath=function(r,e){if(Object(r)!==r||void 0===e)return r;if(e in r)return r[e];var t=e.split("."),n=t.length;if(n){for(var i=-1;r&&++i<n;){for(var o=t[i];"\\"===o[o.length-1];)o="".concat(o.slice(0,-1),".").concat(t[++i]);r=r[o]}return r}},r.merge=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach((function(e){for(var t in e)r[t]=e[t]})),r},r.nub=function(r){return Array.from(new Set(r))},r.objectEqual=function r(t,n){var i=Object.getOwnPropertyNames(t),o=Object.getOwnPropertyNames(n);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++){var u=i[a];if(e.isArray(t[u])&&e.isArray(n[u])){if(!v(t[u],n[u]))return!1}else if(e.isObject(t[u])&&e.isObject(n[u])){if(!r(t[u],n[u]))return!1}else if(t[u]!==n[u])return!1}return!0},r.parseDataOptions=function(r){return Object.entries(r).reduce((function(r,e){var n=o(e,2),a=n[0],u=n[1];try{var c=JSON.parse('{"data": '.concat(u.replace(/'/g,'"'),"}")).data;return i(i({},r),{},t({},a,c))}catch(e){return i(i({},r),{},t({},a,u))}}),{})},r.range=function(r){return Array.from({length:r},(function(r,e){return e}))},r.reflow=function(r){return r.offsetHeight},r.throttle=function(r,e){var t=this,n=!1;function i(){n=!1}return void 0!==e||null!==e?function(){var o=t;if(!n){n=!0;for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];r.apply(o,u),window.setTimeout(i,e)}}:function(){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];var u=t;n||(n=!0,window.requestAnimationFrame((function(){r.apply(u,o),i()})))}},r.triggerNative=function(r,e,t){var n=document.createEvent("HTMLEvents");void 0!==t?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!1),r.dispatchEvent(n)},Object.defineProperty(r,"__esModule",{value:!0})}));
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@pluginjs/is")):"function"==typeof define&&define.amd?define(["exports","@pluginjs/is"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["@pluginjs/utils"]={},r["@pluginjs/is"])}(this,(function(r,e){"use strict";function t(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function n(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?t(Object(n),!0).forEach((function(e){o(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function o(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function i(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null==t)return;var n,o,i=[],u=!0,a=!1;try{for(t=t.call(r);!(u=(n=t.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(r){a=!0,o=r}finally{try{u||null==t.return||t.return()}finally{if(a)throw o}}return i}(r,e)||a(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(r){return function(r){if(Array.isArray(r))return c(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||a(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(r,e){if(r){if("string"==typeof r)return c(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(r,e):void 0}}function c(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var f=function(r){if(e.isElement(r))return r;if(e.isArray(r))return r.slice();if(e.isDate(r))return new r.constructor(Number(r));if(e.isMap(r))return new Map(r);if(e.isSet(r))return new Set(r);if(e.isSymbol(r))return Symbol.prototype.valueOf?Object(Symbol.prototype.valueOf.call(r)):{};if(e.isRegexp(r)){var t=new r.constructor(r.source,/\w+$/.exec(r));return t.lastIndex=r.lastIndex,t}return e.isError(r)?Object.create(r):e.isPlainObject(r)?Object.assign({},r):r},l=function(r){return e.isPlainObject(r)?s(r):e.isArray(r)?p(r):f(r)},s=function(r){if(e.isPlainObject(r)){var t=new r.constructor;for(var n in r)t[n]=l(r[n]);return t}return r},p=function(r){for(var e=new r.constructor(r.length),t=0;t<r.length;t++)e[t]=l(r[t]);return e};function y(r,t){var n=e.isArray(t),o=e.isArray(r);if(e.isUndefined(t))return r;if(n!==o)return f(t);if(n)return f(t);if(e.isPlainObject(r)&&e.isPlainObject(t)){var i=f(r);return Object.keys(t).forEach((function(r){i[r]=y(i[r],t[r])})),i}return f(t)}var v=function(r,e){if(r===e)return!0;if(void 0===r||void 0===e)return!1;if(r.length!==e.length)return!1;for(var t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0};r.SvgElement=function(r,e){var t=document.createElementNS("http://www.w3.org/2000/svg",r);if(!e)return t;for(var n in e)Object.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n]);return t},r.arrayDiff=function(r,e){return r.filter((function(r){return e.indexOf(r)<0}))},r.arrayEqual=v,r.arrayIntersect=function(r,e){var t;return e.length>r.length&&(t=e,e=r,r=t),r.filter((function(r){return-1!==e.indexOf(r)}))},r.camelize=function(r){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r=r.replace(/[_.\- ]+(\w|$)/g,(function(r,e){return e.toUpperCase()})),e&&(r=r.substring(0,1).toUpperCase()+r.substring(1)),r},r.clone=f,r.compose=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];var n=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e.reduceRight((function(r,t,n){return Array.isArray(r)&&n===e.length-1?t.apply(void 0,u(r)):t(r)}),t)};return n.currylen=e[e.curylen||e.length-1].length,n},r.convertFloatToPercentage=function(r){return r<0?r=0:r>1&&(r=1),"".concat(100*parseFloat(r).toFixed(4),"%")},r.convertMatrixToArray=function(r){return!(!r||"matrix"!==r.substr(0,6))&&r.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)},r.convertPercentageToFloat=function(r){return parseFloat(r.slice(0,-1)/100,10)},r.curry=function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(){for(var n=e.currylen||e.length,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=t.concat(i);return c.length>=n?e.apply(void 0,u(c)):r(e,c)}},r.curryWith=function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=i.findIndex(t);if(c>=0){var f=n.concat.apply(n,u(i.slice(0,c+1)));return e.apply(void 0,u(f))}var l=n.concat.apply(n,i);return r(e,t,l)}},r.dasherize=function(r){return r.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()},r.debounce=function(r){var e,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){for(var o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];var a=t;e&&(clearTimeout(e),e=null),e=setTimeout((function(){r.apply(a,i)}),n)}},r.deepClone=l,r.deepCloneArray=p,r.deepCloneObject=s,r.deepMerge=function(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return t.filter(e.isObject).reduce(y,{})},r.each=function(r,t){if(e.isArray(r))for(var n=0,o=r.length;n<o;n++)t(r[n],n);else Object.entries(r).map((function(r){var e=i(r,2),n=e[0],o=e[1];return t(n,o)}));return r},r.fromPairs=function(r){return r.reduce((function(r,e){var t=i(e,2),u=t[0],a=t[1];return n(n({},r),{},o({},u,a))}),{})},r.getTime=function(){return void 0!==window.performance&&window.performance.now?window.performance.now():Date.now()},r.getUID=function(r){do{r+=~~(1e6*Math.random())}while(document.getElementById(r));return r},r.getValueByPath=function(r,e){if(Object(r)!==r||void 0===e)return r;if(e in r)return r[e];var t=e.split("."),n=t.length;if(n){for(var o=-1;r&&++o<n;){for(var i=t[o];"\\"===i[i.length-1];)i="".concat(i.slice(0,-1),".").concat(t[++o]);r=r[i]}return r}},r.merge=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach((function(e){for(var t in e)r[t]=e[t]})),r},r.nub=function(r){return Array.from(new Set(r))},r.objectEqual=function r(t,n){var o=Object.getOwnPropertyNames(t),i=Object.getOwnPropertyNames(n);if(o.length!==i.length)return!1;for(var u=0;u<o.length;u++){var a=o[u];if(e.isArray(t[a])&&e.isArray(n[a])){if(!v(t[a],n[a]))return!1}else if(e.isObject(t[a])&&e.isObject(n[a])){if(!r(t[a],n[a]))return!1}else if(t[a]!==n[a])return!1}return!0},r.parseDataOptions=function(r){return Object.entries(r).reduce((function(r,e){var t=i(e,2),u=t[0],a=t[1];try{var c=JSON.parse('{"data": '.concat(a.replace(/'/g,'"'),"}")).data;return n(n({},r),{},o({},u,c))}catch(e){return n(n({},r),{},o({},u,a))}}),{})},r.range=function(r){return Array.from({length:r},(function(r,e){return e}))},r.reflow=function(r){return r.offsetHeight},r.throttle=function(r,e){var t=this,n=!1;function o(){n=!1}return void 0!==e||null!==e?function(){var i=t;if(!n){n=!0;for(var u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];r.apply(i,a),window.setTimeout(o,e)}}:function(){for(var e=arguments.length,i=new Array(e),u=0;u<e;u++)i[u]=arguments[u];var a=t;n||(n=!0,window.requestAnimationFrame((function(){r.apply(a,i),o()})))}},r.triggerNative=function(r,e,t){var n=document.createEvent("HTMLEvents");void 0!==t?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!1),r.dispatchEvent(n)},Object.defineProperty(r,"__esModule",{value:!0})}));

@@ -14,3 +14,3 @@ {

},
"version": "0.8.8",
"version": "0.8.9",
"category": "utils",

@@ -37,17 +37,17 @@ "main": "dist/utils.common.js",

"dependencies": {
"@pluginjs/is": "^0.8.7"
"@pluginjs/is": "^0.8.8"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@pluginjs/browserslist-config": "^1.3.2",
"@pluginjs/cli": "^0.8.4",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.1.0",
"babel-jest": "*",
"jest": "*",
"jest-extended": "*",
"@babel/core": "^7.16.7",
"@pluginjs/browserslist-config": "^1.3.3",
"@pluginjs/cli": "^0.8.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"babel-jest": "^27.4.6",
"jest": "^27.4.7",
"jest-extended": "^1.2.0",
"rename": "^1.0.4",
"rollup": "^2.38.1",
"rollup-plugin-babel": "*",
"rollup-plugin-terser": "*"
"rollup": "^2.63.0",
"rollup-plugin-terser": "^7.0.2"
},

@@ -54,0 +54,0 @@ "engines": {

@@ -354,2 +354,2 @@ # Utils

Copyright (C) 2018 [Creation Studio Limited](creationstudio.com).
Copyright (C) 2022 [Creation Studio Limited](creationstudio.com).
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